Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (780)
Games in Android Showcase (233)
games submitted by our members
Games in WIP (857)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  lwjgl 2.9.3, mini2dx on raspberry pi unsatisfied link error  (Read 601 times)
0 Members and 1 Guest are viewing this topic.
Offline torbuntu

Senior Newbie


Medals: 4



« Posted 2019-01-12 17:00:20 »

I am attempting to get a mini2dx project which uses libgdx backend to run on my pi 3b.

I replaced the .so files for lwjgl and libgdxarm.so and got through a bunch of errors. I also replaced the native jar files with ones from the raspbian repo that came with liblwjgl-java, But now I am stuck with the following and am unsure how to proceed.
   
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
LwjglApplication: Couldn't initialize audio, disabling audio
java.lang.UnsatisfiedLinkError: org.lwjgl.DefaultSysImplementation.getJNIVersion()I
   at org.lwjgl.DefaultSysImplementation.getJNIVersion(Native Method)
   at org.lwjgl.Sys.<clinit>(Sys.java:120)
   at org.lwjgl.openal.AL.<clinit>(AL.java:59)
   at com.badlogic.gdx.backends.lwjgl.audio.Mini2DxOpenALAudio.<init>(Mini2DxOpenALAudio.java:94)
   at com.badlogic.gdx.backends.lwjgl.DesktopMini2DxGame.initialiseLibGDX(DesktopMini2DxGame.java:97)
   at com.badlogic.gdx.backends.lwjgl.DesktopMini2DxGame.<init>(DesktopMini2DxGame.java:90)
   at com.badlogic.gdx.backends.lwjgl.DesktopMini2DxGame.<init>(DesktopMini2DxGame.java:67)
   at leikr.desktop.DesktopLauncher.main(DesktopLauncher.java:15)
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:591)
   at com.badlogic.gdx.backends.lwjgl.DesktopMini2DxGame$1.run(DesktopMini2DxGame.java:119)


it makes me think that either the libgdxarm.so that I compiled is not working, or the lwjgl files that come with the raspbian repo are wrong. I'd appreciate any advice possible, as I am out of ideas to try.

My project I am trying this with is here: github.com/torbuntu/leikr
Offline VaTTeRGeR
« Reply #1 - Posted 2019-01-12 20:51:46 »

The RPi is not officially supported AFAIK.

The most recent solution i could find is this here: https://www.raspberrypi.org/forums/viewtopic.php?t=206824
He's swapping out some graphics and sound driver related files to get it working, but i don't know what version of LibGDX and Raspbian he's using so maybe this doesn't work with the lwjgl-based backend.

Also there's this thread here: https://www.raspberrypi.org/forums/viewtopic.php?f=81&t=163604&sid=66a8d783ac58313c08c78e5e32b4c12f
The first page contains many posts from 2016 and onwards, the second page is more interesting.

Looks like you either have to bend over backwards or use an old LibGDX version with the JOGL backend.
Offline torbuntu

Senior Newbie


Medals: 4



« Reply #2 - Posted 2019-01-12 21:48:57 »

I know it isn't officially supported. I dont want to use jogl and a lot of those posts don't work and are too outdated for what I'm trying.
I was just curious if this was even close to working. I'm starting to think the lwjgl that is in the raspbian repo is just messed up and not actually an arm version. In which case I need to go back to the start and try compiling it myself again.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline KaiHH

JGO Kernel


Medals: 655



« Reply #3 - Posted 2019-01-12 22:08:16 »

I'm starting to think the lwjgl that is in the raspbian repo is just messed up and not actually an arm version
What does `file liblwjgl.so` say? Is it something like `liblwjgl.so: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, BuildID[sha1]=5dbb547852e87aba1b74ac4c654c701bbfef1fed, stripped`?
And what does `nm -D liblwjgl.so | grep getJNIVersion` say?
Should be `... T Java_org_lwjgl_DefaultSysImplementation_getJNIVersion`.
Otherwise, try downloading the .deb package directly from: https://packages.debian.org/sid/arm64/liblwjgl-java-jni/download
Offline Shatterhand
« Reply #4 - Posted 2019-01-13 09:49:58 »

@KaiHH Raspbian is only 32bit ATM, so using the Arm64 packages from the Debian repos will most probably not work.

@torbuntu Probably compiling it yourself is the best option. Smiley

Cheers

Micro$oft broke Volkswagen's world record: Volkswagen only made 22 million bugs!
Offline KaiHH

JGO Kernel


Medals: 655



« Reply #5 - Posted 2019-01-13 09:53:02 »

Well, then: https://packages.debian.org/sid/armhf/liblwjgl-java-jni/download
Offline torbuntu

Senior Newbie


Medals: 4



« Reply #6 - Posted 2019-01-13 16:32:05 »

The `file liblwjgl.so` returned the expected 32bit info. So it is the 'right' type.
I ran the `nm -D liblwjgl.so | grep getJNIVersion` and I didn't get anything back. So I removed the pipe to grep and there is no getJNIVersion in there at all... Which is a problem.

That also explains why it is borking on calling that from my project. This means I pretty much have to compile it manually then, right?

Edit:
I found this https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=893302 while trying to compile manually. Trying to grab the 8 jdk now to see if it can get me further.
I'm still wondering if the source in the repo is broken.

Edit2:
Just successfully compiled lwjgl 2.9.3 on the pi (using JDK 1.8 instead of 9, I'm dumb). And the nm -D liblwjgl.so does show the getJNIVersion is there! Now to adjust my jars and see what happens.

Edit3:
Well dang it. That's all it took! Got the thing actually running now. Thanks for the help!! The liblwjgl.so that comes in the repo is in fact broken!! 
This helped especially:
Quote
What does `file liblwjgl.so` say? Is it something like `liblwjgl.so: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, BuildID[sha1]=5dbb547852e87aba1b74ac4c654c701bbfef1fed, stripped`?
And what does `nm -D liblwjgl.so | grep getJNIVersion` say?
Should be `... T Java_org_lwjgl_DefaultSysImplementation_getJNIVersion`.
Otherwise, try downloading the .deb package directly from: https://packages.debian.org/sid/arm64/liblwjgl-java-jni/download
Pages: [1]
  ignore  |  Print  
 
 

 
hadezbladez (761 views)
2018-11-16 13:46:03

hadezbladez (394 views)
2018-11-16 13:41:33

hadezbladez (758 views)
2018-11-16 13:35:35

hadezbladez (200 views)
2018-11-16 13:32:03

EgonOlsen (2401 views)
2018-06-10 19:43:48

EgonOlsen (2581 views)
2018-06-10 19:43:44

EgonOlsen (1486 views)
2018-06-10 19:43:20

DesertCoockie (2150 views)
2018-05-13 18:23:11

nelsongames (1967 views)
2018-04-24 18:15:36

nelsongames (2656 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!