Get libGDX games running on arm architecture
Closed, ResolvedPublic

Description

There are several free software games available built with the libGDX framework.

Some examples:

You can type "libgdx" into the search bar at https://mglapps.frama.io to get a list of 13 free software games based on libgdx.

The big advantage with these games is:

The problem:

  • the .jars can not be run on smartphones like the PinePhone because the .jar builds do not contain the library libgdx.so for the right target architecture

The solution:

  • get libgdx.so for the right architecture integrated into the .jars during build time
  • maybe this is only a configuration issue (not determined yet)
cahfofpai created this task.Mar 3 2020, 8:08 AM

Error message when running Klooni 1010! on KDE Neon on PinePhone Brave Heart:

java -jar Klooni-v0.8.jar 
Exception in thread "main" com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load shared library 'libgdx.so' for target: Linux, 32-bit
        at com.badlogic.gdx.utils.SharedLibraryLoader.load(SharedLibraryLoader.java:119)
        at com.badlogic.gdx.utils.GdxNativesLoader.load(GdxNativesLoader.java:33)
        at com.badlogic.gdx.backends.lwjgl.LwjglNativesLoader.load(LwjglNativesLoader.java:47)
        at com.badlogic.gdx.backends.lwjgl.LwjglApplication.<init>(LwjglApplication.java:81)
        at com.badlogic.gdx.backends.lwjgl.LwjglApplication.<init>(LwjglApplication.java:69)
        at io.github.lonamiwebs.klooni.desktop.DesktopLauncher.main(DesktopLauncher.java:34)
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: java.lang.UnsatisfiedLinkError: /tmp/libgdxphablet/8ef2bd9f/libgdx.so: /tmp/libgdxphablet/8ef2bd9f/libgdx.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
        at com.badlogic.gdx.utils.SharedLibraryLoader.loadFile(SharedLibraryLoader.java:312)
        at com.badlogic.gdx.utils.SharedLibraryLoader.load(SharedLibraryLoader.java:115)
        ... 5 more
Caused by: java.lang.UnsatisfiedLinkError: /tmp/libgdxphablet/8ef2bd9f/libgdx.so: /tmp/libgdxphablet/8ef2bd9f/libgdx.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
        at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
        at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2430)
        at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2487)
        at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2684)
        at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2617)
        at java.base/java.lang.Runtime.load0(Runtime.java:767)
        at java.base/java.lang.System.load(System.java:1834)
        at com.badlogic.gdx.utils.SharedLibraryLoader.loadFile(SharedLibraryLoader.java:318)
        at com.badlogic.gdx.utils.SharedLibraryLoader.loadFile(SharedLibraryLoader.java:287)
        ... 6 more
bshah added a subscriber: bshah.Mar 29 2021, 8:41 AM

I am going to close this task as it is more of libgdx or application specific issue then the Plasma Mobile itself.

bshah closed this task as Resolved.Mar 29 2021, 8:42 AM
bshah claimed this task.