[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Potential issue with JNA native library search path on some architectures



Dear libjna-java package maintainers,


The libjna-java package seems to apply a few patches that make things work on some architectures but not others.


1.
This patch will make JNA search for jnidispatch in /usr/lib/arm-linux-gnueabi/jni on all arm platforms, but this path is wrong on some arm platforms:
* https://sources.debian.org/patches/libjna-java/4.5.2-1/04-load-native-code-from-fs.patch/

armhf -> /usr/lib/arm-linux-gnueabihf/jni
arm64 -> /usr/lib/aarch64-linux-gnu/jni)

I would recommend adding all /usr/lib/*/jni folders to the search path if we can't know the if we can't know in advance where the *.so file is going to be.


2.
Another patch further complicates things by making JNA ignore the jna.boot.library.path property so we can't even force the correct library location manually:
* https://sources.debian.org/patches/libjna-java/4.5.2-1/14-rename-native-library.patch/

I would recommend respecting the jna.boot.library.path and jna.boot.library.name properties, and changing only the default value to from jnidispatch to jnidispatch.system.


Kind Regards,
Reinhard Pointner

Reply to: