Jogl compile woe

Hello,

I’m currently attempting to get jogl into the fedora repositories, because it is blocking scilab in the fedora review process. I’m far more experienced at c++/autoconf/make than I am at ant + java, so bear with me if I say something stupid.

Anyway, the problem is that I am currently having lots of problems building jogl for F10+. The issue is that we can’t have jogl bundling gluegen in the fedora repo, so we have to patch jogl to build separately. So far I have been able to get the build to roll, but it dies partway through. This could be partially my fault, owing to bad editing of the jogl build.xml to remove the gluegen build, and redirect it to the existing jar, or it could be a mismatch in gluegen versions or I don’t know what.

So the symptoms of the problem are this. Partway through the build process I get


....

java.compile.firstpass:

java.generate.composable.pipeline.check:

java.generate.composable.pipeline:

java.compile.secondpass:
    [javac] Compiling 220 source files to /home/makerpm/rpmbuild/BUILD/jogl/build/classes
    [javac] /home/makerpm/rpmbuild/BUILD/jogl/src/classes/com/sun/opengl/impl/error/Error.java:48: cannot find symbol
    [javac] symbol  : class GLU
    [javac] location: package javax.media.opengl.glu
    [javac] import javax.media.opengl.glu.GLU;
    [javac]                              ^
    [javac] /home/makerpm/rpmbuild/BUILD/jogl/src/classes/com/sun/opengl/impl/mipmap/BuildMipmap.java:48: cannot find symbol
    [javac] symbol  : class GLU
    [javac] location: package javax.media.opengl.glu
    [javac] import javax.media.opengl.glu.GLU;
    [javac]                              ^
    [javac] /home/makerpm/rpmbuild/BUILD/jogl/src/classes/com/sun/opengl/impl/mipmap/Mipmap.java:48: cannot find symbol
    [javac] symbol  : class GLU
    [javac] location: package javax.media.opengl.glu
    [javac] import javax.media.opengl.glu.GLU;
    [javac]                              ^

....

  [javac] /home/makerpm/rpmbuild/BUILD/jogl/src/classes/com/sun/opengl/impl/windows/WindowsOnscreenGLDrawable.java:55: cannot find symbol
    [javac] symbol  : class JAWT_DrawingSurface
    [javac] location: class com.sun.opengl.impl.windows.WindowsOnscreenGLDrawable
    [javac]   private JAWT_DrawingSurface ds;
    [javac]           ^
    [javac] /home/makerpm/rpmbuild/BUILD/jogl/src/classes/com/sun/opengl/impl/windows/WindowsOnscreenGLDrawable.java:56: cannot find symbol
    [javac] symbol  : class JAWT_DrawingSurfaceInfo
    [javac] location: class com.sun.opengl.impl.windows.WindowsOnscreenGLDrawable
    [javac]   private JAWT_DrawingSurfaceInfo dsi;
    [javac]           ^
    [javac] /home/makerpm/rpmbuild/BUILD/jogl/src/classes/com/sun/opengl/impl/windows/WindowsOnscreenGLDrawable.java:57: cannot find symbol
    [javac] symbol  : class JAWT_Win32DrawingSurfaceInfo
    [javac] location: class com.sun.opengl.impl.windows.WindowsOnscreenGLDrawable
    [javac]   private JAWT_Win32DrawingSurfaceInfo win32dsi;
    [javac]           ^

.....


So in short it says that it cant find the GLU class in the build. So I go poking about in jogl/src/classes/javax/media/opengl/glu/ and find a grand total of 5 files, containing very little code. Notably there is not GLU.java
ls -lah
total 40K
drwxr-xr-x 2 makerpm makerpm 4.0K 2009-06-20 00:04 .
drwxr-xr-x 3 makerpm makerpm 4.0K 2008-05-22 18:01 …
-rw-r–r-- 1 makerpm makerpm 107 2007-10-09 17:38 GLUnurbs.java
-rw-r–r-- 1 makerpm makerpm 119 2005-10-25 05:19 GLUquadric.java
-rw-r–r-- 1 makerpm makerpm 4.0K 2006-07-22 08:45 GLUtessellatorCallbackAdapter.java
-rw-r–r-- 1 makerpm makerpm 15K 2006-07-22 08:45 GLUtessellatorCallback.java
-rw-r–r-- 1 makerpm makerpm 3.2K 2006-07-22 08:45 GLUtessellator.java

OK, so what gives? Why is there no GLU.java to compile? Where is all the source code?

I am using gluegen from svn, rev135. I had to patch gluegen to prevent a crash in JavaMethodBindingEmitter.java, which I have included for completeness below.


--- src/java/com/sun/gluegen/JavaMethodBindingEmitter.java      2009-06-19 23:31:16.000000000 +1000
+++ src/java/com/sun/gluegen/JavaMethodBindingEmitter.java.new  2009-06-19 23:32:37.000000000 +1000
@@ -392,9 +392,16 @@
     if (code != null) {
       String[] argumentNames = argumentNameArray();
       for (Iterator iter = code.iterator(); iter.hasNext(); ) {
-        MessageFormat fmt = new MessageFormat((String) iter.next());
-        writer.println("    " + fmt.format(argumentNames));
-      }                                      
+        String str = (String) iter.next();   
+       //PATCH: Revert to glugen behaviour in glugen bundeld with jsr1.1.1a
+        try {                                
+            MessageFormat fmt = new MessageFormat(str);
+            writer.println("    " + fmt.format(argumentNames));
+        } catch (IllegalArgumentException e) {
+            // (Poorly) handle case where prologue / epilogue contains blocks of code with braces      
+            writer.println("    " + str);
+       }}
+            //
     }
   }
 

If anyone can offer some pointers as to what I am doing wrong, I would be most appreciative. These bugs have been open for a long time…

https://bugzilla.redhat.com/show_bug.cgi?id=439630

All the files ant which couldn’t be found are gluegen generated ones.
You need the latest trunk version 149, which (like JOGL) is the new merge
of our version2 sandbox.
You won’t have any luck with the old gluegen.

Hi!

JOGL is already included in Mandriva, maybe you should ask them how they solved this problem.