gluegen-rt raspberry problem with tmp directory

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

gluegen-rt raspberry problem with tmp directory

Elen
Hi I tried to run  this demo http://labb.zafena.se/?p=547 on Raspberry Pi
raspberrypi:/path/to/jogamp-all-platforms$ java -Dnativewindow.ws.namw=jogamp.newt.driver.bcm.vc.iv -cp  graph.jar:jar/jogl-all.jar:jar/gluegen-rt.jar: RawGL2ES2demo
I've got this exception:
Exception in thread "main" java.lang.UnsatisfiedLinkError:
 /tmp/jogamp_0000/file_cache/jln2113502944061639206/jln6985497449694482276/libgluegen-rt.so: /tmp/jogamp_0000/file_cache/jln2113502944061639206/jln6985497449694482276/libgluegen-rt.so: cannot open shared object file: No such file or directory
 at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1954)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1843)
        at java.lang.Runtime.load0(Runtime.java:792)
        at java.lang.System.load(System.java:1060)
        at com.jogamp.common.jvm.JNILibLoaderBase.loadLibraryInternal(JNILibLoaderBase.java:437)
        at com.jogamp.common.jvm.JNILibLoaderBase.access$000(JNILibLoaderBase.java:59)
        at com.jogamp.common.jvm.JNILibLoaderBase$DefaultAction.loadLibrary(JNILibLoaderBase.java:90)
        at com.jogamp.common.jvm.JNILibLoaderBase.loadLibrary(JNILibLoaderBase.java:328)
        at com.jogamp.common.os.DynamicLibraryBundle$GlueJNILibLoader.loadLibrary(DynamicLibraryBundle.java:390)
        at com.jogamp.common.os.Platform.loadGlueGenRTImpl(Platform.java:251)
        at com.jogamp.common.os.Platform.access$000(Platform.java:57)
        at com.jogamp.common.os.Platform$1.run(Platform.java:186)
        at com.jogamp.common.os.Platform$1.run(Platform.java:183)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.jogamp.common.os.Platform.<clinit>(Platform.java:183)
        at javax.media.opengl.GLProfile.<clinit>(GLProfile.java:82)
        at RawGL2ES2demo.main(RawGL2ES2demo.java:252)

I checked that directory and file exists.
I tried to change temp directory by setting -Djava.io.tmpdir but this didn't helped me. Can we set path to this library, so it wouldn't search it in temp directory?
I hope you will help me.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gluegen-rt raspberry problem with tmp directory

Xerxes Rånby
This post was updated on .
Elen wrote
Hi I tried to run  this demo http://labb.zafena.se/?p=547 on Raspberry Pi
raspberrypi:/path/to/jogamp-all-platforms$ java -Dnativewindow.ws.namw=jogamp.newt.driver.bcm.vc.iv -cp  graph.jar:jar/jogl-all.jar:jar/gluegen-rt.jar: RawGL2ES2demo
I've got this exception:
Exception in thread "main" java.lang.UnsatisfiedLinkError:
 /tmp/jogamp_0000/file_cache/jln2113502944061639206/jln6985497449694482276/libgluegen-rt.so: /tmp/jogamp_0000/file_cache/jln2113502944061639206/jln6985497449694482276/libgluegen-rt.so: cannot open shared object file: No such file or directory
 at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1954)
...
        at RawGL2ES2demo.main(RawGL2ES2demo.java:252)

I checked that directory and file exists.
I tried to change temp directory by setting -Djava.io.tmpdir but this didn't helped me. Can we set path to this library, so it wouldn't search it in temp directory?
I hope you will help me.

Hi Elen.

Please report the java jre / JDK version you use.
java -version

To my knowledge the issue you report is known to be reproducible when using the Oracle JDK 8 hardfloat armhf early access build. The Oracle JDK 8 launcher build is built statically linked (do not expose the system library path) and announce itself as os.arch = arm ( this means that gluegen will assume you run on a soft float armel system) this confuse gluegen that tries to load the armel library on you armhf system. You get the link exception because the ABI do not match your system ABI (you armhf system is unable to load a armel library)

Try use OpenJDK or workaround the Oracle JDK 8 EA issue by passing -Djava.library.path=/usr/lib/arm-linux-gnueabihf

We have informed Oracle about this issue and they will instroduce a new system property in their next JDK 8 hardfloat build that will expose the ABI in use.
http://www.raspberrypi.org/phpBB3/viewtopic.php?p=238541
http://mail.openjdk.java.net/pipermail/porters-dev/2013-January/000437.html

We can update JogAmp gluegen to support the Oracle JDK 8 hardfloat build when Oracle decided and published a new early access build that include this new ABI system property.

you can check this for your self using run
file /tmp/jogamp_0000/file_cache/jln2113502944061639206/jln6985497449694482276/libgluegen-rt.so
to check which arm ABI (armel/armhf) the native library got.

also check the java system properties java.library.path and os.arch reported by your jvm.


Cheers
Xerxes
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gluegen-rt raspberry problem with tmp directory

Elen
Thank you very much for help.
java version "1.8.0-ea"
Adding this option -Djava.library.path=/usr/lib/arm-linux-gnueabihf helped me.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gluegen-rt raspberry problem with tmp directory

Xerxes Rånby
Elen wrote
Thank you very much for help.
java version "1.8.0-ea"
Adding this option -Djava.library.path=/usr/lib/arm-linux-gnueabihf helped me.
Sven Gothel have filed a bug and added a suggested fix on how we can implement a ELF header file checker inside gluegen in order to correctly identify the runtime ABI regardless if the JVM launcher vendor implements correct os.arch & java.library.path etc system properties correctly or not.
https://jogamp.org/bugzilla/show_bug.cgi?id=681
Loading...