ninia / jep

Embed Python in Java
Other
1.27k stars 146 forks source link

libnio.so: undefined symbol: reuseport_available #518

Open Voxanimus opened 5 months ago

Voxanimus commented 5 months ago

Describe the problem The installation goes well until I try to launch jep in the terminal. It seems that there is a problem with libnio.so. I check for it in using ldd /usr/lib/jvm/java-17-openjdk/lib/libnio.so and everything went fine.

Environment:

Logs Error while launching jep: Error: LinkageError when loading the jep.Run main class java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-17-openjdk/lib/libnio.so: /usr/lib/jvm/java-17-openjdk/lib/libnio.so: undefined symbol: reuseport_available

Result of ldd command: linux-vdso.so.1 (0x00007ffce3bd3000) libjava.so => /usr/lib/jvm/java-17-openjdk/lib/libjava.so (0x00007c255407600) libnet.so => /usr/lib/jvm/java-17-openjdk/lib/libnet.so (0x00007c255405e000) libc.so.6 => /usr/lib/libc.so.6 (0x00007c2553e4b000) libjvm.so => /usr/lib/jvm/java-17-openjdk/lib/server/libjvm.so (0x00007c2552a00000) /usr/lib64/ld-linux-x86-64.so.2 (0x00007c25540b3000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007c2552600000) libm.so.6 => /usr/lib/libm.so.6 (0x00007c2552913000) libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007c2553e24000)

bsteffensmeier commented 5 months ago

It looks like there may be problems with some versions of java when LD_LIBRARY_PATH is used. The jep script sets LD_LIBRARY_PATH to help find libjep but on most linux systems that is no longer strictly necessary as long as libjep can be found in a predictable location. Could you try modifying the jep script and removing the LD_LIBRARY_PATH portion and reporting back if that resolves the issue.

Voxanimus commented 5 months ago

It looks like there may be problems with some versions of java when LD_LIBRARY_PATH is used. The jep script sets LD_LIBRARY_PATH to help find libjep but on most linux systems that is no longer strictly necessary as long as libjep can be found in a predictable location. Could you try modifying the jep script and removing the LD_LIBRARY_PATH portion and reporting back if that resolves the issue.

Everything is working fine. Thank you. Maybe this deserves a later patch.