Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux native library needs GLIBC 2.38 #83

Open
antzGames opened this issue Mar 8, 2025 · 3 comments
Open

Linux native library needs GLIBC 2.38 #83

antzGames opened this issue Mar 8, 2025 · 3 comments

Comments

@antzGames
Copy link

There are a lot of ditros that do not support GLIBC 2.38 such as Debian/Mint.

Exception in thread "main" com.badlogic.gdx.utils.GdxRuntimeException: java.lang.ExceptionInInitializerError
	at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:159)
	at com.antz.physics.lwjgl3.Lwjgl3Launcher.createApplication(Lwjgl3Launcher.java:15)
	at com.antz.physics.lwjgl3.Lwjgl3Launcher.main(Lwjgl3Launcher.java:11)
Caused by: java.lang.ExceptionInInitializerError
	at com.antz.physics.PhysXScreen.<init>(PhysXScreen.java:68)
	at com.antz.physics.JoltScreen.doLogic(JoltScreen.java:155)
	at com.antz.physics.JoltScreen.render(JoltScreen.java:110)
	at com.badlogic.gdx.Game.render(Game.java:48)
	at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window.update(Lwjgl3Window.java:435)
	at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop(Lwjgl3Application.java:181)
	at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:153)
	... 2 more
Caused by: java.lang.IllegalStateException: Failed loading native PhysX libraries for platform LINUX
	at de.fabmax.physxjni.Loader.load(Loader.java:37)
	at physx.NativeObject.<clinit>(NativeObject.java:7)
	... 9 more
Caused by: java.lang.UnsatisfiedLinkError: /tmp/de.fabmax.physx-jni/2.5.1/libPhysXJniBindings_64.so: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.38' not found (required by /tmp/de.fabmax.physx-jni/2.5.1/libPhysXJniBindings_64.so)
	at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
	at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388)
	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232)
	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174)
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2394)
	at java.base/java.lang.Runtime.load0(Runtime.java:755)
	at java.base/java.lang.System.load(System.java:1970)
	at de.fabmax.physxjni.NativeLib.load(NativeLib.java:49)
	at de.fabmax.physxjni.Loader.load(Loader.java:35)
	... 10 more
anthony@laptop:~/Downloads$ ldd --version
ldd (Ubuntu GLIBC 2.35-0ubuntu3.8) 2.35
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
@fabmax
Copy link
Owner

fabmax commented Mar 8, 2025

Hmm not sure if there is much I can do about that. I'm using Ubuntu 24.04 to build the linux binaries (via a github workflow runner). Using an older version would probably break it for the newer versions.

@antzGames
Copy link
Author

The GNU C Library handles backward compatibility like a champ. Learn how to use compat symbols to control which version of glibc the linkers use. One of the GNU C Library's (glibc's) unwritten rules is that a program built against an old version of glibc will continue to work against newer versions of glibc.

From: https://developers.redhat.com/blog/2019/08/01/how-the-gnu-c-library-handles-backward-compatibility

@fabmax
Copy link
Owner

fabmax commented Mar 8, 2025

Oh okay so then simply using an Ubuntu 22.04 runner should do the trick. Will try that out soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants