-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Provide complete information about the problem
Version of JNA and related jars: 5.13 https://github.com/java-native-access/jna/blob/4962fd7758493b7395e86578705d8a32f6238872/dist/linux-riscv64.jar
Version and vendor of the java virtual machine: Ubuntu OpenJDK 11
Operating system: Linux
System architecture (CPU type, bitness of the JVM): riscv64, 64bits
Complete description of the problem:
The libjnidispatch.so library in dist/linux-riscv64.jar takes a dependency on GLIBC 2.34 with JNA version 5.13. That is new in 5.13 as that same dist/linux-riscv64.jar at version 5.12 only has a dependency on GLIBC 2.27.
The symbols that have a dependency on GLIBC_2.34 are the following:
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.34 dlerror
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.34 pthread_getspecific
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.34 pthread_key_create
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.34 pthread_key_delete
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.34 dlopen
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.34 dlsym
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.34 dlclose
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.34 pthread_once
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.34 pthread_setspecific
Because of this new dependency, it's not possible to use JNA on Ubuntu 20.04 which only has glibc 2.31 available.
Steps to reproduce:
For 5.12:
$> wget https://github.com/java-native-access/jna/raw/0d7499f105e4495bdea15fc21f5b1046e81ca822/dist/linux-riscv64.jar -O linux-riscv64-5.12.jar
$> unzip -d linux-riscv64-5.12 linux-riscv64-5.12.jar
$> objdump -T linux-riscv64-5.12/libjnidispatch.so | grep GLIBC_2.34 # This _is_ empty; GOOD
For 5.13:
$> wget https://github.com/java-native-access/jna/raw/4962fd7758493b7395e86578705d8a32f6238872/dist/linux-riscv64.jar -O linux-riscv64-5.13.jar
$> unzip -d linux-riscv64-5.13 linux-riscv64-5.13.jar
$> objdump -T linux-riscv64-5.13/libjnidispatch.so | grep GLIBC_2.34 # This _is not_ empty; FAIL
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.34 dlerror
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.34 pthread_getspecific
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.34 pthread_key_create
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.34 pthread_key_delete
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.34 dlopen
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.34 dlsym
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.34 dlclose
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.34 pthread_once
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.34 pthread_setspecific