Login  Register

Re: Overwriting nativewindow.ws.name to force x11 on R-Pi resuls in UnsatisfiedLinkError

Posted by Xerxes Rånby on Jun 14, 2015; 9:56pm
URL: https://forum.jogamp.org/Overwriting-nativewindow-ws-name-to-force-x11-on-R-Pi-resuls-in-UnsatisfiedLinkError-tp4034695p4034698.html

gohai wrote
Hello all,

Not sure if this is the right place to fill bug reports, but here we go:

When I set the property nativewindow.ws.name to "jogamp.newt.driver.x11" in order not to use the Raspberry Pi specific driver, I get an UnsatisfiedLinkError for setX11ErrorHandler0(ZZ)V. This is on a system running Eric Anholt's vc4 driver [sortof] running, but the binary vc driver still in place at /opt/vc. It does work when I remove the binary driver from the local jogl looks for it.

I don't know the root cause of this, but I believe it's due to NativeWindowFactory.java mixing nativeWindowingTypePure (here: TYPE_BCM_VC_IV due to the auto-detect) and nativeWindowingTypeCustom for its functionality.

And hints to (properly) solve this would be greatly appreciated. I can probably hack around this issue for now by removing the binary driver, but I rather not make the situation any more complicated for the Raspberry Pi users..

Thanks
Gottfried
The autodetection code in NativeWindowFactory think it is on a raspberry pi system using the bcm opengl es library if it can find the /opt/vc/lib/libbcm_host.so
src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowFactory.java:                    "/opt/vc/lib/libbcm_host.so");

Most ARM GNU/Linux systems uses OpenGL ES with X11 but on the Raspberry Pi using the video core drivers OpenGL ES is using broadcom specific dispmanx surfaces without X11.

If you are using a kernel with Eric Anholt's vc4 driver then i expect you to use X11 with Glamour thus you should only use the mesa OpenGL driver that you have compiled.
Thus it is correct that you should remove the  /opt/vc/lib/ on systems using Erics X11 vc4 drivers.

We need to write some new clever heuristics if both OpenGL drivers can be used on the same Pi system.