Box2D not working on 1.10.1-SNAPSHOT with Linux
See original GitHub issueIssue details
The latest gdx snapshot (1.10.1-SNAPSHOT
) is not working with Box2D on my Amazon Linux 2 EC2 instance.
Unknown if this is isolated to just Amazon distros or not.
Context: https://discord.com/channels/348229412858101762/873537733430226964/936111896023695411
Reproduction steps/code
- Create an Amazon Linux 2 EC2 instance
- Dist a libGDX jar using
1.10.1-SNAPSHOT
that creates a Box2D world. - Run the jar on the EC2 instance:
java -jar mygame.jar
- See error stack trace when creating Box2D world:
Caused by: com.badlogic.gdx.utils.SharedLibraryLoadRuntimeException: Couldn't load shared library 'libgdx-box2d64.so' for target: Linux, 64-bit
Version of libGDX and/or relevant dependencies
- libGDX version:
1.10.1-SNAPSHOT
gradlew server:dependencies
output:
| +--- project :core
| | +--- com.badlogicgames.gdx:gdx:1.10.1-SNAPSHOT
| | | \--- com.badlogicgames.gdx:gdx-jnigen-loader:2.2.0
| | +--- com.badlogicgames.gdx:gdx-box2d:1.10.1-SNAPSHOT
| | | \--- com.badlogicgames.gdx:gdx:1.10.1-SNAPSHOT (*)
| | +--- com.github.tommyettinger.gdx-utils:libgdx-utils:0.13.7
| | | \--- com.badlogicgames.gdx:gdx:1.9.12 -> 1.10.1-SNAPSHOT (*)
| | +--- com.github.tommyettinger.gdx-utils:libgdx-utils-box2d:0.13.7
| | | +--- com.github.tommyettinger.gdx-utils:libgdx-utils:0.13.7 (*)
| | | \--- com.badlogicgames.gdx:gdx-box2d:1.9.12 -> 1.10.1-SNAPSHOT (*)
| | +--- com.github.czyzby:gdx-websocket:1.9.1.9.6
| | +--- com.github.czyzby:gdx-websocket-serialization:1.9.1.9.6
| | | \--- com.github.czyzby:gdx-websocket:1.9.1.9.6
| | +--- de.golfgl.gdxgameanalytics:gdx-gameanalytics-core:1.0.0
| | | \--- com.badlogicgames.gdx:gdx:1.9.5 -> 1.10.1-SNAPSHOT (*)
| | +--- com.github.tommyettinger:jagd:191bdd1ceb
| | | \--- com.badlogicgames.gdx:gdx:1.9.10 -> 1.10.1-SNAPSHOT (*)
| | +--- space.earlygrey:shapedrawer:8e2a97479fb9ba7f07b842afa5512240e8bc3d41
| | | \--- com.badlogicgames.gdx:gdx:1.9.10 -> 1.10.1-SNAPSHOT (*)
| | +--- com.kotcrab.vis:vis-ui:1.4.2
| | | \--- com.badlogicgames.gdx:gdx:1.9.9 -> 1.10.1-SNAPSHOT (*)
| | +--- com.github.payne911:PieMenu:5.0.0
| | | +--- com.badlogicgames.gdx:gdx:1.9.10 -> 1.10.1-SNAPSHOT (*)
| | | \--- space.earlygrey:shapedrawer:2.3.0 -> 8e2a97479fb9ba7f07b842afa5512240e8bc3d41 (*)
| | +--- com.github.tommyettinger:formic:0.1.4
| | | +--- com.google.jsinterop:base:1.0.0-RC1
| | | | \--- com.google.jsinterop:jsinterop-annotations:1.0.2
| | | +--- com.google.elemental2:elemental2-core:1.0.0-RC1
| | | | +--- com.google.jsinterop:jsinterop-annotations:1.0.2
| | | | \--- com.google.jsinterop:base:1.0.0-RC1 (*)
| | | \--- com.google.elemental2:elemental2-dom:1.0.0-RC1
| | | +--- com.google.jsinterop:jsinterop-annotations:1.0.2
| | | +--- com.google.jsinterop:base:1.0.0-RC1 (*)
| | | +--- com.google.elemental2:elemental2-core:1.0.0-RC1 (*)
| | | \--- com.google.elemental2:elemental2-promise:1.0.0-RC1
| | | +--- com.google.jsinterop:jsinterop-annotations:1.0.2
| | | \--- com.google.jsinterop:base:1.0.0-RC1 (*)
| | +--- org.slf4j:slf4j-simple:1.7.9
| | | \--- org.slf4j:slf4j-api:1.7.9 -> 1.7.25
| | \--- com.google.gwt:gwt-user:2.8.0
| | +--- com.google.jsinterop:jsinterop-annotations:1.0.1 -> 1.0.2
| | +--- javax.validation:validation-api:1.0.0.GA
| | +--- javax.servlet:javax.servlet-api:3.1.0
| | \--- org.w3c.css:sac:1.3
| +--- com.badlogicgames.gdx:gdx-backend-lwjgl:1.10.1-SNAPSHOT
| | +--- com.badlogicgames.gdx:gdx:1.10.1-SNAPSHOT (*)
| | +--- org.lwjgl.lwjgl:lwjgl:2.9.3
| | | +--- org.lwjgl.lwjgl:lwjgl-platform:2.9.3
| | | \--- net.java.jinput:jinput:2.0.5
| | | +--- net.java.jutils:jutils:1.0.0
| | | \--- net.java.jinput:jinput-platform:2.0.5
| | +--- com.badlogicgames.jlayer:jlayer:1.0.1-gdx
| | \--- org.jcraft:jorbis:0.0.17
| +--- com.badlogicgames.gdx:gdx-platform:1.10.1-SNAPSHOT
| +--- com.badlogicgames.gdx:gdx-box2d-platform:1.10.1-SNAPSHOT
| +--- com.badlogicgames.gdx:gdx-backend-headless:1.10.1-SNAPSHOT
| | \--- com.badlogicgames.gdx:gdx:1.10.1-SNAPSHOT (*)
| +--- com.badlogicgames.gdx:gdx-tools:1.10.1-SNAPSHOT
| | +--- com.badlogicgames.gdx:gdx-backend-lwjgl:1.10.1-SNAPSHOT (*)
| | +--- com.badlogicgames.gdx:gdx-freetype:1.10.1-SNAPSHOT
| | | \--- com.badlogicgames.gdx:gdx:1.10.1-SNAPSHOT (*)
| | \--- com.badlogicgames.gdx:gdx-backend-headless:1.10.1-SNAPSHOT (*)
| +--- org.mockito:mockito-all:1.9.5
| \--- com.github.Anuken:GdxGifRecorder:1.3
| \--- com.badlogicgames.gdx:gdx:1.9.5 -> 1.10.1-SNAPSHOT (*)
+--- project :core (*)
+--- org.java-websocket:Java-WebSocket:1.4.0
| \--- org.slf4j:slf4j-api:1.7.25
+--- org.luaj:luaj-jse:3.0.1
+--- org.spongepowered:noise:2.0.0-SNAPSHOT
\--- com.sudoplay.joise:joise:1.1.0
Stacktrace
ec2 Amazon Linux 2 instance stack trace (when calling new World()
):
ec2.internal bash[25188]: Exception in thread "HeadlessApplication" com.badlogic.gdx.utils.GdxRuntimeException: java.lang.ExceptionInInitializerError
ec2.internal bash[25188]: at com.badlogic.gdx.backends.headless.HeadlessApplication$1.run(HeadlessApplication.java:98)
ec2.internal bash[25188]: Caused by: java.lang.ExceptionInInitializerError
ec2.internal bash[25188]: at io.lurkers.game.Level.create(Level.java:82)
ec2.internal bash[25188]: at io.lurkers.game.Game.loadLevel(Game.java:128)
ec2.internal bash[25188]: at io.lurkers.server.ListenerServer.event(ListenerServer.java:46)
ec2.internal bash[25188]: at io.lurkers.game.messagequeue.MessageQueue.notifyListeners(MessageQueue.java:144)
ec2.internal bash[25188]: at io.lurkers.game.messagequeue.MessageQueue.process(MessageQueue.java:55)
ec2.internal bash[25188]: at io.lurkers.game.messagequeue.MessageQueue.process(MessageQueue.java:38)
ec2.internal bash[25188]: at io.lurkers.game.Game.create(Game.java:82)
ec2.internal bash[25188]: at io.lurkers.server.GameServerHeadless.create(GameServerHeadless.java:169)
ec2.internal bash[25188]: at com.badlogic.gdx.backends.headless.HeadlessApplication.mainLoop(HeadlessApplication.java:108)
ec2.internal bash[25188]: at com.badlogic.gdx.backends.headless.HeadlessApplication$1.run(HeadlessApplication.java:93)
ec2.internal bash[25188]: Caused by: com.badlogic.gdx.utils.SharedLibraryLoadRuntimeException: Couldn't load shared library 'libgdx-box2d64.so' for target: Linux, 64-bit
ec2.internal bash[25188]: at com.badlogic.gdx.utils.SharedLibraryLoader.load(SharedLibraryLoader.java:128)
ec2.internal bash[25188]: at com.badlogic.gdx.physics.box2d.World.<clinit>(World.java:188)
ec2.internal bash[25188]: ... 10 more
ec2.internal bash[25188]: Caused by: com.badlogic.gdx.utils.SharedLibraryLoadRuntimeException: java.lang.UnsatisfiedLinkError: /tmp/libgdxec2-user/443f008d/libgdx-box2d64.so: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /tmp/libgdxec2-user/443f008d/libgdx-box2d64.so)
ec2.internal bash[25188]: at com.badlogic.gdx.utils.SharedLibraryLoader.loadFile(SharedLibraryLoader.java:324)
ec2.internal bash[25188]: at com.badlogic.gdx.utils.SharedLibraryLoader.load(SharedLibraryLoader.java:124)
ec2.internal bash[25188]: ... 11 more
ec2.internal bash[25188]: Caused by: java.lang.UnsatisfiedLinkError: /tmp/libgdxec2-user/443f008d/libgdx-box2d64.so: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /tmp/libgdxec2-user/443f008d/libgdx-box2d64.so)
ec2.internal bash[25188]: at java.lang.ClassLoader$NativeLibrary.load(Native Method)
ec2.internal bash[25188]: at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1934)
ec2.internal bash[25188]: at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1817)
ec2.internal bash[25188]: at java.lang.Runtime.load0(Runtime.java:810)
ec2.internal bash[25188]: at java.lang.System.load(System.java:1088)
ec2.internal bash[25188]: at com.badlogic.gdx.utils.SharedLibraryLoader.loadFile(SharedLibraryLoader.java:330)
ec2.internal bash[25188]: at com.badlogic.gdx.utils.SharedLibraryLoader.loadFile(SharedLibraryLoader.java:299)
ec2.internal bash[25188]: ... 12 more
Please select the affected platforms
- Android
- iOS
- HTML/GWT
- Windows
- Linux
- macOS
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
How to compile Box2D in Linux? - c++ - Stack Overflow
yes this can be built, rollback your git clone of Box2D until the build doesn't fail. Long answer... Seems you've encountered two separate...
Read more >https://tracker.debian.org/media/packages/libr/lib...
use nowindows build profile for (not) building unowinreg * debian/rules, ... fix setsdkenv_unix.sh to work with *-linux-gnu* (as on e.g. armhf) ...
Read more >Problems with Box2D (Linux) - C++ - Cocos Forums
Hello I installed Cocos2D-X v3.7. I tried adding Box2D within CMakeList.txt Linux project, but I have not succeeded.
Read more >Untitled
... bl25-linux-x86.tar.gz bl25-src.tar.gz Box2D-2.3.1-cmake.patch Box2D-2.3.1.tar.gz ... 0001-check-to-be-sure-that-n-is-not-being-set-as-format-t.patch ...
Read more >bullet keychain - CSDN
Some authentication plugins will not work. 2019-01-11 20:23:15 62433 [Note] RSA public key file not found: /usr/local/var/mysql//public_key.pem.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had a similar problem with another Linux distro, and yes the problem was the
GLIBC
version… Since libGDX is now built with Ubuntu 18.04 you need at leastglibc 2.27
and probably in your AWS instance is installed an older version… Looking at Amazon Linux 2 release notes looks like they’re stuck atglibc 2.26
https://aws.amazon.com/amazon-linux-2/release-notes/That’s a bummer.