Login  Register

Building JOGAMP with pre-built GlueGen

Posted by utgarda on Sep 19, 2010; 5:08pm
URL: https://forum.jogamp.org/What-about-Maven-tp844816p1524854.html

To check if putting GlueGen to maven repo can be of any use to anyone, trying to build JOGL only with pre-built artifacts from repo, having troubles:

1) JOGL buildfiles refer to gluegen-cpptasks.xml and otherwise relies rather heavily on ../../gluegen/ , which is not-so-cool, so I'm trying to add an option to rely only on artifacts fetched by maven, for this I pack gluegen-cpptasks*.xml into another jar. The problem is those files refer to ${gluegen.root}/make/ , which makes it difficult to import them though <import> <javaresource>, so I have to unpack them to ../../gluegen/make and ../../gluegen/build after fetching with maven, which is totally not cool. Yep, maybe I can fix that myself, but maybe you guys can do that faster.

2) cpptasks.jar is present in repos, so copying it to some lib directory should work fine. The problem is that gluegen-cpptasks.xml gets it though ${gluegen.root}/make/lib/ , not some variable that means library folder.

Please review the changes to buildfiles: GlueGen, JOGL

3) Seems like gluegen-rt.jar still doesn't contain everything required to run those cpp tasks, here's an attempt to build JOGL with only gluegen-rt:
java.generate.composable.pipeline.custom.check.glfixfunc:

java.generate.composable.pipeline.custom.glfixfunc:
     [java] Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/gluegen/opengl/BuildComposablePipeline
     [java] Caused by: java.lang.ClassNotFoundException: com.sun.gluegen.opengl.BuildComposablePipeline
     [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
     [java]     at java.security.AccessController.doPrivileged(Native Method)
     [java]     at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
     [java]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
     [java]     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:334)
     [java] Could not find the main class: com.sun.gluegen.opengl.BuildComposablePipeline. Program will exit.

BUILD FAILED
/home/etsvigun/devenv/jogamp/jogl/make/build.xml:37: The following error occurred while executing this line:
/home/etsvigun/devenv/jogamp/jogl/make/build-jogl.xml:980: Java returned: 1