The natives are hostile: Why is the Debian package code incompatible with any other natives?
Posted by
ObsequiousNewt on
URL: https://forum.jogamp.org/The-natives-are-hostile-Why-is-the-Debian-package-code-incompatible-with-any-other-natives-tp4025459.html
I am running an Ubuntu machine, on which I have installed JOGL/GlueGen using the Debian package system. I have version 2.0-rc3, the most recent version available through Debian. The code I wrote for JOGL runs fine using the libraries /usr/share/java/jogl2.jar (installed from the package libjogl-java) and /usr/share/java/gluegen2-2.0-rc3-rt.jar (installed from the package libgluegen2-rt-java). These refer to the following native libraries:
/usr/lib/jni/libgluegen2-rt.so (installed from libgluegen2-jni)
/usr/lib/jni/libjogl_desktop.so (installed from libjogl2-jni)
/usr/lib/jni/libjogl_mobile.so (installed from libjogl2-jni)
/usr/lib/jni/libnativewindow_awt.so (installed from libjogl2-jni)
/usr/lib/jni/libnativewindow_x11.so (installed from libjogl2-jni)
/usr/lib/jni/libnewt.so (installed from libjogl2-jni)
And everything works out
wonderfully.Except this: The JOGL/GlueGen natives downloadable from
http://jogamp.org/deployment/v2.0-rc9/jar/ don't match those names. Specifically the gluegen native. If I run my program anywhere other than my Ubuntu machine, it won't work, because it looks for "gluegen2-rt", NOT "gluegen-rt". AND if I rename the "gluegen-rt" native to "gluegen2-rt" (with appropriate suffix), it crashes on account of it can't find some native method. And when I look at the source for loading the gluegen-rt native, it is
hardcoded to look for gluegen2-rt.
Q1. Why is there this inconsistency?
Q2. How can I fix my program?