question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unciv not working in Raspberry Pi 3B+ (Linux armhf)

See original GitHub issue

Hi! I tried to run Unciv in Raspberry Pi and got the following errors.

~$ java -jar Unciv.jar
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
Packing textures - 349ms
Could not initialize Discord
Exception in thread "main" com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load shared library 'libgdxarm.so' for target: Linux, 32-bit
        at com.badlogic.gdx.utils.SharedLibraryLoader.load(SharedLibraryLoader.java:126)
        at com.badlogic.gdx.utils.GdxNativesLoader.load(GdxNativesLoader.java:31)
        at com.badlogic.gdx.backends.lwjgl.LwjglNativesLoader.load(LwjglNativesLoader.java:46)
        at com.badlogic.gdx.backends.lwjgl.LwjglApplication.<init>(LwjglApplication.java:83)
        at com.badlogic.gdx.backends.lwjgl.LwjglApplication.<init>(LwjglApplication.java:71)
        at com.unciv.app.desktop.DesktopLauncher.main(DesktopLauncher.kt:67)
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: Unable to read file for extraction: libgdxarm.so
        at com.badlogic.gdx.utils.SharedLibraryLoader.readFile(SharedLibraryLoader.java:134)
        at com.badlogic.gdx.utils.SharedLibraryLoader.loadFile(SharedLibraryLoader.java:290)
        at com.badlogic.gdx.utils.SharedLibraryLoader.load(SharedLibraryLoader.java:122)
        ... 5 more

Note that Raspberry Pi comes pre-installed with Java 11. I tried to manually install java8-jre, setting it as default and run Unciv, but got same kind of error. I tried using Windows 32 bit jar. It also failed.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:23 (21 by maintainers)

github_iconTop GitHub Comments

3reactions
touhidurrrcommented, Nov 9, 2021

@asda488 @yairm210 yes the Game is confirmed to be working on Raspberry Pi from version 3.18.0. The command java -jar Unciv.jar works fine. I have tested Mods too. Both RekMOD and 5Hex Tileset is working fine. And yes I am using an Raspberry Pi OS armhf. Here is a Screenshot from Pi, unciv-on-raspberrypi

2reactions
touhidurrrcommented, Nov 4, 2021

Fixed for aarch64/arm64 building .jar file without Android Studio and with JDK11, building commit 25cad3a. Should also work on armhf as they are the same arch, just different bit, unless something hasn’t been ported across, but that is unlikely, I think we would just need a confirmation from touhidurrr to close this issue, hopefully it works 😃. (As above, most probably the upgrade to LWJGL 3 that fixed it.)

Ok, so does the latest release has this fix? Ok I will start testing now.

Update: I tested Release 3.17.14 but it threw the following error.

~$ java -jar ./Unciv.jar
Packing textures - 325ms
Could not initialize Discord
[LwjglApplication] Couldn't initialize audio, disabling audio
java.lang.UnsatisfiedLinkError: /tmp/libgdxpi/e06d3531/liblwjgl.so: /tmp/libgdxpi/e06d3531/liblwjgl.so: cannot open shared object file: No such file or directory (Possible cause: can't load IA 32-bit .so on a ARM-bit platform)
	at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
	at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2442)
	at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2498)
	at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2694)
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2627)
	at java.base/java.lang.Runtime.load0(Runtime.java:768)
	at java.base/java.lang.System.load(System.java:1837)
	at org.lwjgl.Sys$1.run(Sys.java:70)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
	at org.lwjgl.Sys.loadLibrary(Sys.java:96)
	at org.lwjgl.Sys.<clinit>(Sys.java:117)
	at org.lwjgl.openal.AL.<clinit>(AL.java:59)
	at com.badlogic.gdx.backends.lwjgl.audio.OpenALLwjglAudio.<init>(OpenALLwjglAudio.java:72)
	at com.badlogic.gdx.backends.lwjgl.LwjglApplication.createAudio(LwjglApplication.java:282)
	at com.badlogic.gdx.backends.lwjgl.LwjglApplication.<init>(LwjglApplication.java:90)
	at com.badlogic.gdx.backends.lwjgl.LwjglApplication.<init>(LwjglApplication.java:71)
	at com.unciv.app.desktop.DesktopLauncher.main(DesktopLauncher.kt:56)
Exception in thread "LWJGL Application" java.lang.NoClassDefFoundError: Could not initialize class org.lwjgl.Sys
	at org.lwjgl.opengl.Display.<clinit>(Display.java:135)
	at com.badlogic.gdx.backends.lwjgl.LwjglGraphics.setVSync(LwjglGraphics.java:643)
	at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:125)

Update 2: Ok, 3.17.14 was released 2 days ago while the commit https://github.com/yairm210/Unciv/commit/25cad3aef2e3fb38a2088840cf7c768021cd2fb8 was made yesterday. I need to wait for the next release to test it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

can't run on raspberry pi 4B+ · Issue #1624 · yairm210/Unciv
It turns out there is no Discord RPC for ARM processors ... I guess the framework doesn't work for Raspberry Pi at all,...
Read more >
RaspberryPi3b+, Arm64? Armhf?
I am setting up a raspberry pi 3b+ and need to know which version to install from the downloads.raspberrypi.org. Thanks. Running Arch Linux...
Read more >
Installation problem on Raspberry Pi 4 Debian 10
The commands: sudo apt install ffmpeg sudo apt-get install libavcodec-dev libswresample-dev libavformat-dev libavfilter-dev.
Read more >
10 Game Servers You Can Run on a Raspberry Pi
The Raspberry Pi can do many wonderful things, including run as a game server. Here are some of the best games it can...
Read more >
https://raw.githubusercontent.com/voc/33C3_schedul...
13; The discussion will include: - The law and policy issues in the FBI v. ... DVB - a Raspberry Pi and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found