Problem Building JOGL Natives On Linux

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem Building JOGL Natives On Linux

rhatcher
Fedora 12/i386
gcc (GCC) 4.4.4 20100630 (Red Hat 4.4.4-10)
Sun/Oracle JDK 7u5
ant 1.8.4

I've been attempting to build GlueGen and JOGL from repositories I just now cloned.

I think GlueGen is building ok.  At least the jars I expect to see are there, and the one that has the native stuff contains a .so file.

When JOGL builds it says it was successful.  The Java components seem to build ok; however, all the jars that should contain native components are there but contain only a manifest.

I have the repos cloned at a common root, i.e. .../jogamp/gluegen and .../jogamp/jogl, and am building GlueGen first and then JOGL.  I'm not using any custom .properties files for either of them despite what the JOGL build ant output suggests (maybe I should be, but the instructions I was going by said it was optional).  CLASSPATH is unset in the shell's environment.

At some point in the JOGL build ant output there is this complaint:

  [gluegen] ANTLR Parsing Error: line 393:617513: unexpected token: RECT token name:ID
  [gluegen] line 393:617513: unexpected token: RECT
  [gluegen]     at com.jogamp.gluegen.cgram.GnuCParser.specifierQualifierList(GnuCParser.java:3267)
  [gluegen]     at com.jogamp.gluegen.cgram.GnuCParser.structDeclaration(GnuCParser.java:3167)
  [gluegen]     at com.jogamp.gluegen.cgram.GnuCParser.structDeclarationList(GnuCParser.java:3137)
  [gluegen]     at com.jogamp.gluegen.cgram.GnuCParser.structOrUnionSpecifier(GnuCParser.java:2721)
  [gluegen]     at com.jogamp.gluegen.cgram.GnuCParser.typeSpecifier(GnuCParser.java:2534)
  [gluegen]     at com.jogamp.gluegen.cgram.GnuCParser.declSpecifiers(GnuCParser.java:1908)
  [gluegen]     at com.jogamp.gluegen.cgram.GnuCParser.declaration(GnuCParser.java:546)
  [gluegen]     at com.jogamp.gluegen.cgram.GnuCParser.externalDef(GnuCParser.java:490)
  [gluegen]     at com.jogamp.gluegen.cgram.GnuCParser.externalList(GnuCParser.java:258)
  [gluegen]     at com.jogamp.gluegen.cgram.GnuCParser.translationUnit(GnuCParser.java:219)
  [gluegen]     at com.jogamp.gluegen.GlueGen.run(GlueGen.java:131)
  [gluegen]     at com.jogamp.gluegen.GlueGen.main(GlueGen.java:363)

Is that the root of the problem or have I overlooked something more fundamental upstream?
Reply | Threaded
Open this post in threaded view
|

Re: Problem Building JOGL Natives On Linux

Wade Walker
Administrator
Hm, that Ant output looks very messed up :) Specifically, all the "Trying to override old definition of task for" messages make me thing something is wrong. Perhaps there's something odd on your classpath (which should be empty)? Or maybe you're using a corrupted or odd version of Ant? You could also try "ant -verbose" to see if it gives any more useful error message.
Reply | Threaded
Open this post in threaded view
|

Re: Problem Building JOGL Natives On Linux

rhatcher
Hi Wade.  You've responded to some of my posts in the past.  Good to hear from you.

Heh, yeah I had the same thought about the ant output, but not knowing what it was supposed to look like it's hard to know what's right and what's wrong.

The ant installation is the same one we use to do our regular builds and those are all working ok.

However...

We use an old version of ant-contrib that's in $ANT_HOME/lib, and I could swear I remember reading somewhere that the JOGL build also requires some flavor of ant-contrib (?).  Maybe that's messing something up.

I'll try your ant -verbose suggestion next and see if all that spew offers any clues.
Reply | Threaded
Open this post in threaded view
|

Re: Problem Building JOGL Natives On Linux

rhatcher
Sure enough, that was the problem.  If I move our older $ANT_HOME/lib/ant-contrib.jar file out of ant's lib directory - or replace it with ant-contrib-1.0b3.jar - then the natives jar files are produced correctly.

That's probably a good Safety Tip for the "How To Build" wiki page.  If you have an existing ant-contrib jar file in $ANT_HOME/lib that doesn't jive with the one the JOGL build wants to use then you'll need to move it out of the way.

A wiki being what it is I suppose I could just go change it, but I thought I should check first to see if you guys want that kind of note included there.