problem with libjogl_cg.so under linux

I’m trying to port the NeHe lesson 47 on vertex shading to JOGL ( http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=47) but I get the following error when I try to run:

Exception in thread “Thread-1” java.lang.UnsatisfiedLinkError: /opt/sun-jdk-1.5.0_beta2/jre/lib/i386/libjogl_cg.so: /usr/lib/libCgGL.so: undefined symbol: gluErrorString
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1739)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1656)
at java.lang.Runtime.loadLibrary0(Runtime.java:821)
at java.lang.System.loadLibrary(System.java:991)
at net.java.games.cg.CgGL.(CgGL.java:1962)
at Lesson47.init(Lesson47.java:73)
at net.java.games.jogl.impl.GLDrawableHelper.init(GLDrawableHelper.java:68)
at net.java.games.jogl.GLCanvas$InitAction.run(GLCanvas.java:214)
at net.java.games.jogl.impl.x11.X11GLContext.makeCurrent(X11GLContext.ja
va:164)
at net.java.games.jogl.impl.x11.X11OnscreenGLContext.makeCurrent(X11OnscreenGLContext.java:111)
at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:254)
at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:208)
at net.java.games.jogl.GLCanvas.display(GLCanvas.java:75)
at net.java.games.jogl.Animator$1.run(Animator.java:107)
at java.lang.Thread.run(Thread.java:595)

I’m using 1.1b4 for linux, with the nvidia-cg-toolkit 1.2.0402.1900

I have posted the jar file in case it will help. (I used a little java 1.5 syntax): http://cs.oberlin.edu/~btaitelb/files/lesson47.jar

thanks for any help – i’m pretty baffled right now.

-ben

It looks like your GLU installation is broken since NVidia’s Cg library doesn’t seem to be able to find it. Check /usr/lib/ and see whether appropriate symlinks are in place.

According to the hs_err_pid4871.log that I got, /usr/lib/libGLU.so.1.3 has been loaded. I believe this is the libGLU that comes with xorg by default.

Also, nm /usr/lib/libGLU.so.1.3 | grep gluErrorString gives:
000166bc T gluErrorString
00077020 d gluErrorStrings

I have made a 1.4.2.03 version of the same file if you would like to test it, it can be found at http://cs.oberlin.edu/~btaitelb/files/Lesson47.new.jar

When I run this file, I get the error, and then a fork bomb of java processes, so keep a killall -9 java handy.

Did anyone find out what the problem was? I seem to suffer the same problem :frowning:
I get:
java.lang.UnsatisfiedLinkError: /home/gregof/jbproject/testarea/libs_linux/libjogl_cg.so: /usr/lib/libCgGL.so: undefined symbol: gluErrorString

// Gregof

Hi
I found my problem at least, on close inspection, I had an old version of libjogl_cg.so laying around… changed to newest version and it works like a charm :slight_smile:

// Gregof