Starting an application via the lauchner created by java-pkg_dolauncher on a 64-bit system invokes the Java VM with only a 32-bit library path: GJL_DEBUG=1 sandmann -p Calling: gjl --package sandmann-bin --get-args --get-jar /usr/share/sandmann-bin/lib/sandmann.jar --get-vm Using: openjdk-17 Running: exec java -classpath /usr/share/sandmann-bin/lib/sandmann.jar -Djava.library.path=/lib:/usr/lib -jar /usr/share/sandmann-bin/lib/sandmann.jar -p Exception in thread "main" java.lang.UnsatisfiedLinkError: /lib/libsystemd.so.0.37.0: wrong ELF class: ELFCLASS32 Library names [systemd] Search paths: [/lib, /usr/lib, /usr/local/lib, /usr/lib64, /usr/local/lib64, /usr/lib/rust/lib, /usr/lib/llvm/16/lib, /usr/lib/llvm/16/lib64, /usr/lib/llvm/15/lib, /usr/lib/llvm/15/lib64, /usr/lib64/opencascade, /usr/lib/gcc/x86_64-pc-linux-gnu/13, /usr/lib/gcc/x86_64-pc-linux-gnu/13/32] at jnr.ffi.provider.jffi.NativeLibrary.loadNativeLibraries(NativeLibrary.java:111) at jnr.ffi.provider.jffi.NativeLibrary.getNativeLibraries(NativeLibrary.java:85) at jnr.ffi.provider.jffi.NativeLibrary.getSymbolAddress(NativeLibrary.java:64) at jnr.ffi.provider.jffi.NativeLibrary.findSymbolAddress(NativeLibrary.java:74) at jnr.ffi.provider.jffi.AsmLibraryLoader.generateInterfaceImpl(AsmLibraryLoader.java:141) at jnr.ffi.provider.jffi.AsmLibraryLoader.loadLibrary(AsmLibraryLoader.java:87) at jnr.ffi.provider.jffi.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:44) at jnr.ffi.LibraryLoader.load(LibraryLoader.java:420) at jnr.ffi.LibraryLoader.load(LibraryLoader.java:399) at eu.geekplace.systemd.Systemd$.<clinit>(Systemd.scala:32) at eu.geekplace.sandmann.Logging$.<clinit>(Logging.scala:41) at eu.geekplace.sandmann.Sandmann$.<clinit>(Sandmann.scala:32) at eu.geekplace.sandmann.Sandmann.main(Sandmann.scala) Note the "Djava.library.path=/lib:/usr/lib" above. Substituting 'lib' with 'lib64' allows the application to run.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/java-config.git/commit/?id=951de94124539904d9aa498d89ae8f0daf8aa508 commit 951de94124539904d9aa498d89ae8f0daf8aa508 Author: Florian Schmaus <flow@gentoo.org> AuthorDate: 2023-11-14 11:36:15 +0000 Commit: Florian Schmaus <flow@gentoo.org> CommitDate: 2023-11-14 11:38:42 +0000 gjl: obtain library directory via LIBDIR Newer versions of java-config-2.eclass will record LIBDIR in package.env, which we obtain in gjl and use to set java.library.path when invoking the Java VM. Bug: https://bugs.gentoo.org/917326 Signed-off-by: Florian Schmaus <flow@gentoo.org> src/gjl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=725274b578ca59a164f7837fcc546e4559ad7286 commit 725274b578ca59a164f7837fcc546e4559ad7286 Author: Florian Schmaus <flow@gentoo.org> AuthorDate: 2023-11-14 11:35:46 +0000 Commit: Florian Schmaus <flow@gentoo.org> CommitDate: 2023-11-14 14:11:27 +0000 java-utils-2.eclass: record LIBDIR in package.env Bug: https://bugs.gentoo.org/917326 Closes: https://github.com/gentoo/gentoo/pull/33821 Signed-off-by: Florian Schmaus <flow@gentoo.org> eclass/java-utils-2.eclass | 3 +++ 1 file changed, 3 insertions(+)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6978c5a64afc8a18bf6567e558f9807f66211bda commit 6978c5a64afc8a18bf6567e558f9807f66211bda Author: Florian Schmaus <flow@gentoo.org> AuthorDate: 2023-11-16 20:28:47 +0000 Commit: Florian Schmaus <flow@gentoo.org> CommitDate: 2023-11-16 20:30:16 +0000 dev-java/java-config: add 2.3.3 Closes: https://bugs.gentoo.org/830860 Closes: https://bugs.gentoo.org/909905 Closes: https://bugs.gentoo.org/917326 Signed-off-by: Florian Schmaus <flow@gentoo.org> dev-java/java-config/Manifest | 1 + dev-java/java-config/java-config-2.3.3.ebuild | 75 +++++++++++++++++++++++++++ 2 files changed, 76 insertions(+)