openglfx icon indicating copy to clipboard operation
openglfx copied to clipboard

java.lang.UnsatisfiedLinkError for com-huskerdev-openglfx-natives-linux-lib-4.1.20

Open streamingdv opened this issue 9 months ago • 1 comments
trafficstars

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.(GLCanvas.kt:60) at com.grill.psplay.video.surface.OpenGLVideoSurface.createOpenGLCanvas(Unknown Source) at com.grill.psplay.video.surface.OpenGLVideoSurface.(Unknown Source) at com.grill.psplay.ui.view.remote.RemoteView.lambda$initVideoDecoderEventHandlers$39(Unknown Source) at de.saxsys.mvvmfx.utils.notifications.DefaultNotificationCenter.publish(DefaultNotificationCenter.java:149) at de.saxsys.mvvmfx.utils.notifications.DefaultNotificationCenter.publish(DefaultNotificationCenter.java:77) at de.saxsys.mvvmfx.ViewModel.publish(ViewModel.java:64) at com.grill.psplay.ui.view.remote.RemoteViewModel.lambda$onDecoderInitialized$8(Unknown Source) at javafx.graphics@22/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456) at java.base/java.security.AccessController.doPrivileged(AccessController.java:400) at javafx.graphics@22/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455) at javafx.graphics@22/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at javafx.graphics@22/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at javafx.graphics@22/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$10(GtkApplication.java:264) at java.base/java.lang.Thread.run(Thread.java:1583)

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

streamingdv avatar Feb 16 '25 12:02 streamingdv

I understood the problem, I will try to do something in the next few days

husker-dev avatar Feb 17 '25 11:02 husker-dev

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 avatar Apr 25 '25 18:04 QuattroDome

@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

husker-dev avatar Apr 26 '25 09:04 husker-dev