JOGL OSX Leopard.. Stumped..

Hi all,

I seem to have developed an issue with JOGL under OSX Leopard and I can’t for the life of me see what the issue is.
I have installed the libraries under /Library/Java/Extensions. However whenever I run a JOGL application I get the following error:

Exception in thread “main” java.lang.UnsatisfiedLinkError: /Library/Java/Extensions/libjogl.jnilib

If I remove all traces of JOGL from the folder then I get an error about not being able to find JOGL on the java library path…

Therefore as far as I can see it is finding the libraries… just erroring out when it loads them.

I can’t for the life of me see what the problem is… I can only hazzard a guess something has got broken with my Java installation… but what?

I will hold my hand up and say JOGL used to work fine on Leopard so I presume it is something I have done to my Java install… I’ve tried installing the latest Java SE 6 Developer Preview from Apple but that reports the same issue… stumped.

Any clues would be greatly welcome!

Cheers

Mark

i am not sure if this is true for OSX, but as far as i know, you are not supposed to put the libraries in the extension folder but put them directly on the classpath.

Hi Ezmic,

Yes true… although the OSX instructions tell you to put them there…

Either way… I used time machine to roll back my Java installations a few months and got it all working again.

BUT

as soon as I update to 64bit Java 6 I get the same error again… I guess its something to do with the OSX JOGL Binary distribution not being built for the 64bit Apple JVM or something along those lines…

again any ideas will be most welcome…

Cheers

Mark

I think this mailing distribution list might be a good place to ask this question.

http://lists.apple.com/mailman/listinfo/java-dev

Searching previous threads for UnsatisfiedLinkError might also help.

Hi Al Guy,

Its certainly not a problem with finding the libraries… because it is doing…

However I think I’ve tracked the problem… simply the JOGL build scripts don’t appear to support 64bit Java on OSX…

I’ve started picking through the ant scripts and have managed to convince JOGL to build against the 64bit libraries however the end result is ominously small in size and not quite working… but the JOGL libraries are getting correctly picked up at runtime now…

Will hopefully have a fully functioning build soon… though no doubt there are others far competent in JOGL building than me out there to beat me to it! :slight_smile:

Cheers

Mark

I too was stumped, but Mark put me on the right track.
I had never before built JOGL, so almost surely missed
something important. With that warning, here is what I did.

Note that I did not attempt to make fat universal jni libraries for 32- and 64-bit.
I needed only the x86_64 jnilibs.

Download source code for latest release build of JOGL JSR-231 1.1.0
final release. As stated in the build instructions, put the source in my home
directory. (Yuck.)

Download antlr-2.7.2 (not ANTLR 3!) according to instructions.
Modified gluegen.properties to set antlr location.

Download ant-antlr.jar from apache ant.
Put this in /usr/share/ant/lib.

In gluegen/make/gluegen-cpptasks.xml, modify compiler and linker to be
as follows:












In source code for com.sun.gluegen.StructLayout, add this line to
method createForCurrentPlatform:
(os.startsWith(“mac os”) && cpu.equals(“x86_64”)) ||

In source code for com.sun.gluegen.runtime.CPU, add this line to
method is32Bit:
(os.startsWith(“mac os”) && cpu.equals(“x86_64”)) ||

Run ant in gluegen/make and then jogl/make.
Copy jars and jnilibs to my usual places.
Run tests using Java 1.5 64-bit JVM for Leopard.

Hope this helps,
Dave

Please file a bug and attach your instructions and changes. We’ll get this checked in and hopefully added to the nightly build system soon.

Hi Dave,

Thats brilliant… I was almost there but festivities have got in the way.

Good work.

Cheers

Mark

Note that I’ve filed Issue 336 to track this.

Hi all,

I compiled jogl using this procedure, but it does not work( java.lang.UnsatisfiedLinkError: /Library/Java/Extensions/libjogl.jnilib).
It may come from my JVM. I use Java 6 Preview 8 from ADC.

Someone make it work with the same jvm?

Regards

:slight_smile: Applying dhale’s patches worked fine for me on 10.5.1 with Java6 DP9.
Thanks a lot