shared-libraries

Creating symlinks when packaging a Library (Debian)?

邮差的信 提交于 2019-12-06 05:26:05
问题 I'm trying for the first time to package for Debian a small library. For this, I'm using the official Debian Policy manual but since two days I encounter an issue than I cannot fix. This is the way I'm packaging : Creating the tarball (here libvl_1.0.orig.tar.gz) Using dh_make to generate the debian conf file in the debian directory Modifying the control file, changelog and copyright properly. Building the package using the dpkg-buildpackage command. Up to here, there is no problem. But as it

How to use JNAerator with multiple dynamic libraries under one header?

时间秒杀一切 提交于 2019-12-06 05:06:46
问题 I am using JNAerator to generate a single jar file I can include in a project, and I'd like to support the dynamic libraries for each operating system and arch all in this single jar. In fiddling with JNAerator so far, I've been able to include a single dynamic library using a command like the following: java -jar jnaerator.jar test.dll test.h [...] -mode StandaloneJar However, this only packages test.dll , while I have dynamic libraries for multiple systems ( test_win32.dll , test_win64.dll

java.lang.UnsatisfiedLinkError: Couldn't load eposprint: findLibrary returned null

这一生的挚爱 提交于 2019-12-06 04:51:46
问题 I am using Android Studio. I am using e-POS-Print.jar in my app. Whenever I run the code I get this error: java.lang.ExceptionInInitializerError at com.stc.printer.MyActivity.onCreate(MyActivity.java:48) at android.app.Activity.performCreate(Activity.java:5163) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2061) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2122)

Failed to linked symbol in .so file while the symbol exists

蹲街弑〆低调 提交于 2019-12-06 04:40:30
I want to install lxml module in my unix system, and it doesn't work. the problem is failed to reference symbol: Python 2.6.4 (r264:75706, Sep 12 2010, 18:46:30) [C] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> from lxml import etree Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: ld.so.1: isapython2.6: fatal: relocation error: file lxml/etree.so: symbol __xmlStructuredErrorContext: referenced symbol not found however, the output of ldd command is: $ ldd lxml/etree.so libxslt.so.1 => /usr/lib/libxslt.so.1 libexslt.so.0

Keep all exported symbols when creating a shared library from a static library

空扰寡人 提交于 2019-12-06 04:39:19
I am creating a shared library from a static library for which I do not have the source code. Many Stack Overflow questions provide answers on how to do that: gcc -shared -o libxxx.so -Wl,--whole-archive libxxx.a -Wl,--no-whole-archive However, some public functions of the static library are included as hidden functions in the shared library: $ nm --defined-only libxxx.a | grep __intel_cpu_indicator_init 0000000000000000 T __intel_cpu_indicator_init $ nm libxxx.so | grep __intel_cpu_indicator_init 00000000030bb160 t __intel_cpu_indicator_init The __intel_cpu_indicator_init symbol went from

libicui18n.so.52: cannot open shared object file

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 04:27:24
I have been using libicu to detect charset in my node app that runs inside of docker, ubuntu. this is done through the module node-icu-charset-detector that uses the libicu-dev package, which I install prior to the npm package. It all worked fine but I suddently get the error module.js:356 Module._extensions[extension](this, filename); ^ Error: libicui18n.so.52: cannot open shared object file: No such file or directory at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.<anonymous> (/app/node

Why does including -fPIC to compile a static library cause a segmentation fault at run time?

不想你离开。 提交于 2019-12-06 04:19:27
I'm compiling C++ static library with g++ and using the -fPIC option. I must use the -fPIC option because eventually this library will be linked with other static libraries to form a dynamic library. When I test the static library locally, it works completely fine when I don't include the -fPIC option. But as soon as I compile the library with -fPIC, I receive a segmentation fault error at run-time when calling one of the functions. What reasons could including -fPIC to compile a static library cause a segementation fault at run-time? A dynamic library is supposed to be loaded at run-time and

Loading Linux libraries at runtime

感情迁移 提交于 2019-12-06 04:14:35
问题 I think a major design flaw in Linux is the shared object hell when it comes to distributing programs in binary instead of source code form. Here is my specific problem: I want to publish a Linux program in ELF binary form that should run on as many distributions as possible so my mandatory dependencies are as low as it gets: The only libraries required under any circumstances are libpthread, libX11, librt and libm (and glibc of course). I'm linking dynamically against these libraries when I

Why is my Linux application pulling in the wrong .so library?

﹥>﹥吖頭↗ 提交于 2019-12-06 03:53:02
问题 I have an application I'm building that's using the NetCDF C++ library, and NetCDF is pulling in the HDF-4 libary. However, it's pulling in the wrong HDF-4 library. Here's how my app is linked: /apps1/intel/bin/icpc -gxx-name=/apps1/gcc-4.5.0/bin/g++ -shared -o lib/libMyCustom.so -Llib -L/apps1/boost-1.48.0/lib -Wl,-rpath=/apps1/boost-1.48.0/lib -L/apps1/gdal-1.8.0-jasper/lib -Wl,-rpath=/apps1/gdal-1.8.0-jasper/lib -L/new_apps1/hdf4/lib -Wl,-rpath=/new_apps1/hdf4/lib -L/new_apps1/netcdf/lib

Call a non-reentrant native shared library from multiple Java threads

巧了我就是萌 提交于 2019-12-06 03:47:25
问题 I have some Java code that is calling some native code, originally written in Fortran, using JNA. (It's a numerical library, and lots of math people do their coding in Fortran.) It is compiled to a .so library, see below: Fortran: https://github.com/mizzao/libmao/tree/master/src/main/fortran Java binding: https://github.com/mizzao/libmao/blob/master/src/main/java/net/andrewmao/probability/MvnPackDirect.java I was getting great results with everything unit tested in my code, but then I tried