Summary: | UnsatisfiedLinkError with gluegen-rt native library on Mac OS 10.5.8 with 64-bit processor | ||
---|---|---|---|
Product: | [JogAmp] Jogl | Reporter: | Derek Manwaring <manwaringsandals> |
Component: | macosx | Assignee: | Sven Gothel <sgothel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | manwaringsandals, sgothel, wwalker3 |
Priority: | --- | ||
Version: | 2 | ||
Hardware: | All | ||
OS: | macosx | ||
Type: | --- | SCM Refs: |
b3d5e20c04af353b246c9b2607c145f7dbd508dd
|
Workaround: | --- |
Description
Derek Manwaring
2011-11-11 17:46:40 CET
In the forum thread you mentioned, Wade created custom binaries w/ the experimental linker flag '-no_compact_linkedit'. It seems that nobody tested them, hence we have no progress in this regards, since I only have a 10.6.4 and a 10.7 OS X machine available. If nobody validates this issue .. we may can close this bug .. ?! I tested my JOGL application with the custom binaries Wade created (jogl-no-compact-linkedit.zip on the forum thread). I got it to run normally on Mac OS 10.6.8 with these binaries and classes. When I did the same on Mac OS 10.5.8, I got the same error as before: Exception in thread "main" java.lang.UnsatisfiedLinkError: /[...]/jogl-no-compact-linkedit/lib/libgluegen-rt.jnilib: no suitable image found. Did find: /[...]/jogl-no-compact-linkedit/lib/libgluegen-rt.jnilib: unknown required load command 0x80000022 After examining the Stack Overflow question Wade referenced (http://stackoverflow.com/questions/1440456/static-libraries-in-version-cross-compiled-program), I wondered if the problem is that the binaries were compiled with the -no_compact_linkedit flag, but not the other flag from the question $CFLAGS = -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5. I haven't tried building JOGL on the 10.5.8 machine yet. Any thoughts on this, Wade? Dennis, since you have such a machine w/ 10.5.8 - can't you just test it yourself ? If you got something working - then we can try it on 10.6/10.7 and may merge it. I just hope we don't need 2 binaries for OS X :) If Derek wants to try building JOGL on his OS X 10.6.8 machine with -mmacosx-version-min=10.5 set, he could then test it on his OS X 10.5.8 machine to see if it works. Build instructions are at http://jogamp.org/wiki/index.php/Building_JOGL_on_the_command_line. Alternately, I can build JOGL on my OS X 10.7 machine with -mmacosx-version-min=10.5 set and mail the binaries to Derek for testing. Derek, just let me know which one you'd like to try. As Sven says, hopefully there's some way to build on recent OS X versions and have it still work on older versions :) Wade, if you could build the binaries for me and send them I will try them out. I can test them on my 10.6.8 machine and the 10.5.8 machine so we can know if the same binaries will work for both. I downloaded the latest dev build, then in the file gluegen/make/gluegen-cpptasks-base.xml I added <compilerarg value="-mmacosx-version-min=10.5"/> to the end of the <compiler id="compiler.cfg.macosx" name="gcc"> block, and added <linkerarg value="-mmacosx-version-min=10.5"/> to the end of the <linker id="linker.cfg.macosx" name="gcc"> block. Then I recompiled gluegen and jogl, cut some extraneous stuff out of the build directories, and emailed the .tar.gz files to Derek. Let me know if these work, and we can go from there. Added Wade's suggested compiler/linker flag .. let's see. I finally got around to testing my program with the libraries Wade sent me. I got a different error this time. It looks like the native libraries do actually get loaded now on Mac OS 10.5.8. Before our program's window pops up the following exception is thrown: Exception in thread "main" javax.media.opengl.GLException: Profile GL_DEFAULT is not available on MacOSXGraphicsDevice[type MacOSX, connection decon, unitID 0, handle 0x0], but: [] at javax.media.opengl.GLProfile.get(GLProfile.java:602) at javax.media.opengl.GLProfile.getDefault(GLProfile.java:425) at javax.media.opengl.awt.GLCanvas.<init>(GLCanvas.java:233) at javax.media.opengl.awt.GLCanvas.<init>(GLCanvas.java:183) at javax.media.opengl.awt.GLCanvas.<init>(GLCanvas.java:173) at edu.byu.chem.boltzmann.view.maingui.components.GLPanel.<init>(GLPanel.java:226) ... It's possible that there is a real problem with the machine's graphics card/configuration, but the machine will run old versions of our program built with the jogl binaries from a few years ago. I'm sorry I can't spend much time digging into the jogl code and trying things out myself. I'm happy to test new builds or try different things and let you all know how it goes. I hope the information I've provided this far has been helpful. As I mentioned w/ comment 7, it's included in RC4 already. Maybe you can just test it online: http://jogamp.org/deployment/jogamp-current/jogl-test-applets.html Detailed bugreport: DL http://jogamp.org/deployment/v2.0-rc4/archive/jogamp-macosx-universal.7z 7z x jogamp-macosx-universal.7z cd jogamp-macosx-universal/ sh etc/test.sh sh etc/test_dbg.sh then .. send us the test.log and test_dbg.log file please. So it looks like the UnsatisfiedLinkError is solved with the setting. Nevertheless another issue (bug) prevents you from using JOGL. Can you pls try http://jogamp.org/deployment/archive/master/gluegen_457-joal_251-jogl_579-jocl_495/archive/ DL http://jogamp.org/deployment/archive/master/gluegen_457-joal_251-jogl_579-jocl_495/archive/jogamp-macosx-universal.7z 7z x jogamp-macosx-universal.7z cd jogamp-macosx-universal/ sh etc/test.sh sh etc/test_dbg.sh then .. attach the test.log and test_dbg.log file please. Thank you. UnsatisfiedLinkError with gluegen-rt .. on OSX 10.5.8 is solved. If the 'remaining' bug still exists, pls open a new bug dedicated to it's behavior. Nevertheless, I guess it's solved for now (-> latest builds). Thank you. |