LibGDX Java development linking issues

So I’m trying to do some android/java development using LibGDX on my NixOS computer, but I’m running into driver issue it seems. When I try to build a default template project (generated with the LibGDX setup jar) for desktop I get the following error

java.lang.UnsatisfiedLinkError: /tmp/libgdxskykanin/dd5c1a65/ cannot open shared object file: No such file or directory
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(
	at java.lang.ClassLoader.loadLibrary(
	at java.lang.Runtime.load0(
	at java.lang.System.load(
	at org.lwjgl.Sys$
	at Method)
	at org.lwjgl.Sys.doLoadLibrary(
	at org.lwjgl.Sys.loadLibrary(
	at org.lwjgl.Sys.<clinit>(
	at org.lwjgl.openal.AL.<clinit>(
	at com.badlogic.gdx.backends.lwjgl.LwjglApplication.<init>(
	at com.badlogic.gdx.backends.lwjgl.LwjglApplication.<init>(
Exception in thread "LWJGL Application" java.lang.NoClassDefFoundError: Could not initialize class org.lwjgl.Sys
	at org.lwjgl.opengl.Display.<clinit>(
	at com.badlogic.gdx.backends.lwjgl.LwjglGraphics.setVSync(
	at com.badlogic.gdx.backends.lwjgl.LwjglApplication$

I’ve tried doing nix-env -iA nixos.xorg.libXxf86vm to no avail so I’m not sure what the issue is. I’m using OpenJDK8 if that matters.

1 Like

Changing the LibGDX desktop backend (lwjgl) to version 3 fixed the issue

api "com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion"