jsr231 beta3 build problem

I downloaded the source to beta3 and I’m having trouble building it. It appears that the ant build process is picking up the gcc-java binary or classpath jar files, however java and javac both resolve to the sun jdk from the path. I specifically set java.home.dir to be the sun jdk in jogl.properties. Any ideas about what I’m doing wrong?


    ...
     [echo] Generating JAWT interface class
     [echo] java.home.dir=/usr/java/jdk1.5.0_06
Overriding previous definition of reference to stub.includes.fileset.platform
  [gluegen] java.io.FileNotFoundException: ${java.includes.dir.platform}/jawt_md.h (No such file or directory)
  [gluegen]    at gnu.java.nio.channels.FileChannelImpl.open(java.lang.String, int) (/usr/lib64/libgcj.so.6.0.0)
  [gluegen]    at gnu.java.nio.channels.FileChannelImpl.FileChannelImpl(java.lang.String, int) (/usr/lib64/libgcj.so.6.0.0)
  [gluegen]    at java.io.FileInputStream.FileInputStream(java.io.File) (/usr/lib64/libgcj.so.6.0.0)
  [gluegen]    at java.io.FileInputStream.FileInputStream(java.lang.String) (/usr/lib64/libgcj.so.6.0.0)
  [gluegen]    at java.io.FileReader.FileReader(java.lang.String) (/usr/lib64/libgcj.so.6.0.0)
  [gluegen]    at com.sun.gluegen.GlueGen.run(java.lang.String[]) (Unknown Source)
  [gluegen]    at com.sun.gluegen.GlueGen.main(java.lang.String[]) (Unknown Source)
  [gluegen]    at .main (/usr/lib64/libgij.so.6.0.0)
  [gluegen]    at .__libc_start_main (/lib64/libc-2.3.5.so)
  [gluegen] Exception occurred while generating glue code. Exiting.

BUILD FAILED
/home/sauron.0/cj/apps/jogl/beta3/jogl/make/build.xml:1276: The following error occurred while executing this line:
/home/sauron.0/cj/apps/jogl/beta3/jogl/make/build.xml:1203: The following error occurred while executing this line:
/home/sauron.0/cj/apps/jogl/beta3/jogl/make/build.xml:528: GlueGen returned: 1


My CLASSPATH is not set.
I’m runing FC4.x86_64 with the sun jdk-1.5.0_06-fcs.x86_64. My ant build target was linux.amd64.

If I manually set

java.includes.dir.platform=/usr/java/jdk1.5.0_06/include/linux

in jogl.properties, the build fails in a different spot:

I’m not sure what could be going wrong. Make sure the environment variable JAVA_HOME is not set and that java and javac resolve to the 64-bit version of Java from the Sun JDK; i.e, bin/amd64/java.

java is setup correctly. I tried the 1.6 jdk beta and I get the same error. I’m pretty sure the problem is in the glugen guessing:

It’s failing to set the isLinuxAMD64 variable even though I specify ‘ant linux.amd64’ at the command line.
since that variable is not set, the parameters in the jogl build.xml:339 are not getting set or are getting
set improperly. I don’t understand the build files well enough to understand what is going on, but I’m
pretty sure it has to do with these new isLinux, isLinuxAMD64, etc variables. I get the same error if I
just run ‘ant’ without specifying the build target.

Could you try applying the following patch to your gluegen-cpptasks.xml file and see whether that fixes the problem?


*** gluegen-cpptasks.xml.~1.2.~	Mon Jan 16 03:20:01 2006
--- gluegen-cpptasks.xml	Sun Feb 19 13:26:22 2006
***************
*** 94,100 ****
      <condition property="isLinuxAMD64">
        <and>
          <istrue value="${isLinux}" />
!         <os arch="AMD64" />
        </and>
      </condition>
      <condition property="isLinuxIA64">
--- 94,103 ----
      <condition property="isLinuxAMD64">
        <and>
          <istrue value="${isLinux}" />
!         <or>
!           <os arch="AMD64" />
!           <os arch="x86_64" />
!         </or>
        </and>
      </condition>
      <condition property="isLinuxIA64">

If that doesn’t fix the problem, could you please post the output of this Java program?


public class OS {
  public static void main(String[] args) {
    System.out.println("os.arch=" + System.getProperty("os.arch"));
  }
}

Yeah, that fixed it. Thanks.