Build problem

My apologies if this has been addressed before or the answer is in a FAQ somewhere…

I’m having difficulty building JOGL under both Linux and Windows.

Here is where the make process fails:


peccary:~/is_knott/jogl/jogl/make> make x11


mkdir -p …/build/obj …/build/obj/jogl …/build/obj/jogl_cg …/build/gensrc/classes/net/java/games/jogl/impl …/build/gensrc/classes/net/java/games/cg …/build/gensrc/native/jogl …/build/gensrc/native/jogl_cg …/build/classes …/build/gensrc/classes/net/java/games/gluegen/cgram
make -f Makefile2 x11
make[1]: Entering directory `/.autofs/lci/lciprojectpai/is/knott/jogl/jogl/make’

Makefile2:923: target ../build/obj' given more than once in the same rule. java -cp "../build/classes:" net.java.games.gluegen.GlueGen -Enet.java.games.gluegen.opengl.GLEmitter -Cgl-x11.cfg -Istub_includes/x11 -Istub_includes/win32 -Istub_includes/macosx -Istub_includes/opengl stub_includes/x11/gl.c CharScanner; panic: ClassNotFoundException: net.java.games.gluegen.cgram.CToken make[1]: *** [../build/gensrc/classes/net/java/games/jogl/GL.java] Error 1 make[1]: Leaving directory /.autofs/lci/lciprojectpai/is/knott/jogl/jogl/make’
make: [x11] Error 2 (ignored)

peccary:~/is_knott/jogl/jogl/make>

Not sure what the problem is here.
The class “net.java.games.gluegen.cgram.CToken” appears to have been compiled properly and is on the specified classpath:


peccary:~/is_knott/jogl/jogl/make> ls …/build/classes/net/java/games/gluegen/cgram/

CToken.class

Anybody have an idea what’s gone wrong?

thanks,
dave

I have encountered the same problem. I think it may be related to how antlr is installed. Initially, I just shoved the antlr.jar into $JAVA_HOME/jre/lib/ext/ , and encountered the problem. Once I put antlr.jar on the $CLASSPATH and everything works fine.

[quote]Once I put antlr.jar on the $CLASSPATH and everything works fine.
[/quote]
Yeah, that worked.
Everything compiles and the gears demo runs properly.

Very odd problem. Hard to figure out why antlr.jar won’t work when it resides in jre/lib/ext. Doubly confusing, since the “class not found” error is for a jogl class, not an antlr class. Perhaps the antlr code is reading the CLASSPATH and trying to locate itself for some reason.

Thanks very much for your help.

later,
dave

The problem is that when ANTLR is installed into jre/lib/ext it is loaded by the extension class loader but GlueGen is loaded by the application class loader. ANTLR uses reflection to instantiate the token class type and when this is done from the extension loader the classes known by the application loader are not reachable.