openglfx
openglfx copied to clipboard
java.lang.UnsatisfiedLinkError for com-huskerdev-openglfx-natives-linux-lib-4.1.20
I tried the newest version 4.1.20 and I get following dependency error
Exception in thread "JavaFX Application Thread" java.lang.UnsatisfiedLinkError: /tmp/1739707126006#com-huskerdev-openglfx-natives-linux-lib-4.1.20-x64.so: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.32' not found (required by /tmp/1739707126006#com-huskerdev-openglfx-natives-linux-lib-4.1.20-x64.so)
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:331)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:197)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:139)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2418)
at java.base/java.lang.Runtime.load0(Runtime.java:852)
at java.base/java.lang.System.load(System.java:2025)
at com.huskerdev.grapl.core.platform.Platform$Companion.loadLibraryFromResources(Platform.kt:63)
at com.huskerdev.grapl.core.platform.Platform$Companion.loadLibraryFromResources(Platform.kt:74)
at com.huskerdev.openglfx.internal.GLFXUtils$Companion.loadLibrary(GLFXUtils.kt:40)
at com.huskerdev.openglfx.canvas.GLCanvas.
GLIBCXX_3.4.30 is installed on my system, I can update but a crash like that is not very convenient to handle and a user most likely doesn't know what to do. Can you build the natives with a lower libstdc requirment so that it also works on older machines? Not entirely sure how you build the openglfx-natives-linux-lib but I guess it can be solved by setting
set(CMAKE_C_STANDARD 11) set(CMAKE_CXX_STANDARD 17)
And/ or by using an older gcc compiler?
Edit: I upgraded the required lib by using these commands
sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get upgrade sudo apt-get dist-upgrade
but without adding the test repo the newest version I could upgrade to was GLIBCXX_3.4.30, so lowering the required dependency would be great
I understood the problem, I will try to do something in the next few days
I have the same problem running on RHEL 9 system. Here the available GLIBCXX version is 3.4.29 (GCC 11 environment). Maybe the GLIBCXX requirement can be relaxed by building the linux libraries on Ubuntu 22 instead of Ubuntu 24 (latest).
Best regards
@QuattroDome Yes, it may solve the problem, but in 5 years, when version 22 will be removed from github actions, it will stop working :)
I will merge your fix, but I still need to rework the publication to maven, because I migrated to the new maven central