For one application I've unpacked the native libs to a local directory (as part of the installation process), and I've set jogamp.gluegen.UseTempJarCache to false. This used to work in the past, but recently with Java 1.8 I see errors like this: java.lang.UnsatisfiedLinkError: Can't load library: /…/libgluegen-rt.dylib Searching the web for this, I found some indications that simply renaming the *.jnilib that came from the Jogamp release to *.dylib should work. I tried it out, and indeed it did work. So perhaps the natives jar file for OS X should be using those names? I haven't found any official documentation on that change so far. I'm using JOGL 2.2.1 here, but I verified that in 2.3.2 the files are still called jnilib not dylib. (I'm confused that the version field here in Bugzilla doesn't allow me selecting a version earlier than 2.4.0 as the version where the bug was found, so I couldn't fill out that required field correctly.) $ java -version java version "1.8.0_72" Java(TM) SE Runtime Environment (build 1.8.0_72-b15) Java HotSpot(TM) 64-Bit Server VM (build 25.72-b15, mixed mode) The OS is OS X 10.11.5 (15F34). https://github.com/LWJGL/lwjgl/commit/a6bb6e31d888c07026ac0381c2900c895765ffbb was what suggested simply renaming the files. It's also the source naming java 1.8 as the release introducing this breakage, so I'm simply quoting that.
Would it still work with previous versions of Java under OS X, for example OpenJDK or Oracle Java 1.7?
Trying to track this down: In OpenJDK the file hotspot/src/os/bsd/vm/os_bsd.cpp has this: #define JNI_LIB_PREFIX "lib" #ifdef __APPLE__ #define JNI_LIB_SUFFIX ".dylib" #else #define JNI_LIB_SUFFIX ".so" #endif This should be the setting that is being used by the native implementation of System.mapLibraryName in jdk/src/share/native/java/lang/System.c. The file names .dylib since it got included into the repository in 2011. I don't know how the Apple resp. Oracle JDK gets derived from this, so I don't know for how long they supported both forms, if ever. I don't have a wide range of OpenJDK at my disposal just now to test this. http://lists.apple.com/archives/java-dev/2012/Nov/msg00036.html reports dylib vs. jnilib naming issues with jogamp code as far back as 2012. JDK version unknown.
Now I understand why .jnilib had been used: http://markmail.org/message/cksb24oiwjszohvl#query:+page:1+mid:nvmhqaimybukzg4l+state:results It seems reasonable to rename .jnilib files into .dylib, I'll do it as soon as possible.
We should stop calling "rename.dylib" in make/build-jogl.xml, make/build-nativewindow.xml, make/build-newt.xml and make/build-oculusvr.xml. Then, we should replace "lib@{output.lib.name}.jnilib" by "lib@{output.lib.name}.dylib" in those files.
(In reply to Julien Gouesse from comment #4) > We should stop calling "rename.dylib" in make/build-jogl.xml, > make/build-nativewindow.xml, make/build-newt.xml and > make/build-oculusvr.xml. Then, we should replace > "lib@{output.lib.name}.jnilib" by "lib@{output.lib.name}.dylib" in those > files. Correct.
(In reply to Sven Gothel from comment #5) > (In reply to Julien Gouesse from comment #4) > > We should stop calling "rename.dylib" in make/build-jogl.xml, > > make/build-nativewindow.xml, make/build-newt.xml and > > make/build-oculusvr.xml. Then, we should replace > > "lib@{output.lib.name}.jnilib" by "lib@{output.lib.name}.dylib" in those > > files. > > Correct. I've forgotten to stop calling "rename.dylib" in make/build.xml in GlueGen, JOAL and JOCL too.
Created attachment 804 [details] Gluegen patch
Created attachment 805 [details] JOAL patch
Created attachment 806 [details] JOCL patch
Created attachment 807 [details] JOGL patch
(In reply to Sven Gothel from comment #5) > (In reply to Julien Gouesse from comment #4) > > We should stop calling "rename.dylib" in make/build-jogl.xml, > > make/build-nativewindow.xml, make/build-newt.xml and > > make/build-oculusvr.xml. Then, we should replace > > "lib@{output.lib.name}.jnilib" by "lib@{output.lib.name}.dylib" in those > > files. > > Correct. Please can you give a try to my patches? There is still a target whose name contains the word "rename" in GlueGen whereas it no longer move any file now, feel free to rename this target.
(In reply to Julien Gouesse from comment #11) > (In reply to Sven Gothel from comment #5) > > (In reply to Julien Gouesse from comment #4) > > > We should stop calling "rename.dylib" in make/build-jogl.xml, > > > make/build-nativewindow.xml, make/build-newt.xml and > > > make/build-oculusvr.xml. Then, we should replace > > > "lib@{output.lib.name}.jnilib" by "lib@{output.lib.name}.dylib" in those > > > files. > > > > Correct. > > Please can you give a try to my patches? There is still a target whose name > contains the word "rename" in GlueGen whereas it no longer move any file > now, feel free to rename this target. Julien, next time we both need to coordinate the work better ;-) I did same changes and completed testing now. BTW, I updated our poor test machine to latest OSX 10.14.13 and using XCode 10.2 - which was a necessary tedious exercise. So OSX 10.11 is now the lowest baseline, since XCode 10.2 claims to be need OSX >= 10.11 Whatever, all tests passed.
Bug 1316: MacOSX: Keep *.dylib (Don't move to *.jnilib) Since Java8 (or even earlier), JRE on OSX uses *.dylib native library suffix instead of *.jnilib when automatically searching and loading them. This is not easily being recognized by JogAmp, since we explicitly name the native libraries with full path when testing with our TempJarCache. Tested on OSX 10.14, XCode 10.2, SDK OSX 10.11 baseline min version Java 1.8.0_192-b12 Working