shared-libraries

Android - Dynamic module(.so) needs to be production signed

十年热恋 提交于 2020-07-07 12:23:21
问题 As i understand this from Hexagon DSP document: To enable a .so to be successfully deployed on production devices across a large number of OEM devices, the dynamic module needs to be production signed by the OEM. ISVs are encouraged to work with their OEM POCs to have the modules production signed for OEM devices. So, is there any way i can get my .so(s) to work on production device (OnePlus 3T running OxygenOS originally)? I have tried to root the device by compiling LineageOS and installing

“undefined symbol: __cxa_pure_virtual” error when loading library from java

江枫思渺然 提交于 2020-07-07 07:33:31
问题 I have a Java program that needs to load a native code library (through JNI with SWIG) but when I tried to run it I got an error as follows: Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/lib/libmyapp_jni.so.0.0.0: /usr/local/lib/libmyapp_jni.so.0.0.0: undefined symbol: __cxa_pure_virtual at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1939) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1864) at

How to use OpenCV 4 in Java on Windows?

♀尐吖头ヾ 提交于 2020-06-29 03:41:04
问题 I've compiled OpenCV 4.4.0 from source on Windows 64 bit along with java bindings and I'm trying to compile a basic test, however I'm running into unexpected errors. Here's how I've setup an eclipse project: and this how the jar references the native libraries: And this is the basic test snippet: import org.opencv.core.*; public class CVTest { public static void main(String[] args) { System.load(Core.NATIVE_LIBRARY_NAME); } } which throws this exception: Exception in thread "main" java.lang

How to use OpenCV 4 in Java on Windows?

99封情书 提交于 2020-06-29 03:40:01
问题 I've compiled OpenCV 4.4.0 from source on Windows 64 bit along with java bindings and I'm trying to compile a basic test, however I'm running into unexpected errors. Here's how I've setup an eclipse project: and this how the jar references the native libraries: And this is the basic test snippet: import org.opencv.core.*; public class CVTest { public static void main(String[] args) { System.load(Core.NATIVE_LIBRARY_NAME); } } which throws this exception: Exception in thread "main" java.lang

Extend section in Mach-O file

吃可爱长大的小学妹 提交于 2020-06-16 20:51:15
问题 I am trying to extract libraries from the Dyld_shared_cache, and need to fix in external references. For example, the pointers in the __DATA.__objc_selrefs section usually point to data outside the mach-o file, to fix that I would have to copy the corresponding c-string from the dyld and append it to the __TEXT.__objc_methname section. Though from my understanding of the Mach-O file format, this extension of the __TEXT.__objc_methname would shift all the sections after it and would force me

Load shared object using ctyped.cdll.loadLibrary from dist-packages folder

风流意气都作罢 提交于 2020-06-15 07:39:41
问题 I created this setup.py to compile a libDIV.so shared library and install it. from distutils.core import setup, Extension libDIV = Extension( 'DIV', sources = ['example.c'] ) setup ( name = 'divv', version = '0.1', description = 'DIVV, you want it', ext_modules = [libDIV], packages = [''], package_data={'': ['libDIV.so']} ) After running python3 setup.py install , the shared library is placed in the dist-packages folder as: /usr/local/lib/python3.4/dist-packages/DIV.cpython-34m.so In an extra

ASAN detects ODR violation of vtable of class which is shared with dynamically loaded library

天涯浪子 提交于 2020-06-11 12:46:10
问题 I'm working on a project which has a "util" library containing stuff like logging, assertion handling etc. This is compiled into a static library with -fPIC added. I also have a plugin system, where the plugins are shared libraries loaded at runtime via dlopen . Those plugins and the main executable both use the static util library. The problem: Now I'm getting AddressSanitizer: odr-violation errors when using ASAN. The issue is size=40 'vtable for StdStreamWriter' reported twice where

ASAN detects ODR violation of vtable of class which is shared with dynamically loaded library

|▌冷眼眸甩不掉的悲伤 提交于 2020-05-30 07:35:12
问题 I'm working on a project which has a "util" library containing stuff like logging, assertion handling etc. This is compiled into a static library with -fPIC added. I also have a plugin system, where the plugins are shared libraries loaded at runtime via dlopen . Those plugins and the main executable both use the static util library. The problem: Now I'm getting AddressSanitizer: odr-violation errors when using ASAN. The issue is size=40 'vtable for StdStreamWriter' reported twice where

Export C++ function to python using ctypes: undefined symbol

会有一股神秘感。 提交于 2020-05-29 07:13:31
问题 Consider this file containing two similar functions: #include <iostream> int main() { std::cout << "main\n"; } int notmain() { std::cout << "notmain\n"; } I compiled this into a shared library: g++ -shared -Wl,-soname,code -o code.so -fPIC code.cpp I wish to call these from python, for main this works fine: import ctypes libc = ctypes.cdll.LoadLibrary("code.so") libc.main() Which prints main . However, notmain doesn't work: import ctypes libc = ctypes.cdll.LoadLibrary("code.so") libc.notmain(

CMake add -ldl at end of link stage of add_library

删除回忆录丶 提交于 2020-05-26 04:47:06
问题 I wrote/maintain a small unit test library on github https://github.com/acgreek/ExtremeCUnit built using cmake. You can checkout and run some tests via 'cmake test' after checking out. It was working great on Cygwin and Ubuntu (my only home systems). I recent upgrade to ubuntu 13.10 and the library stopped linking with the test binary because the ExtremeUnitC library now needs to be linked with -ldl at the link stage (via add_library) and additionally the -ldl needs to be add to the end of