Platform and Component Requirements
Here is a list of platforms and components, we were able to build GlueGen on,
if not stated otherwise.
- Java
- Build & Runtime: An OpenJDK 11 compliant SDK.
- Runtime: An OpenJDK 8 compliant JRE.
Or you may try one of the following SDK's and/or Runtimes:- Azul's Zulu (active, +embedded)
- Avian (inactive, not tested)
- Ant 1.10.5 or later
- Git 2.0.4 or later
- Use your Unix distribution's version, if available, or
- Source Code for GNU/Linux, MacOS, .., or
- Git on Windows is provided by cygwin
- Git ≥ 2.37 provided by Xcode ≥ 14
- FreeBSD x86, 32- and 64-bit, ...
- FreeBSD 12 or later (todo: test)
- openjdk11
- ant
- git
- awk
- p7zip-full ???
- gcc
- cmake
- FreeBSD 12 or later (todo: test)
- GNU Linux x86, 32- and 64-bit as well as Arm64, etc
You may have to install a few developer packages ...- Debian 10 or later
- openjdk-11-jre
- openjdk-11-jdk
- ant
- git
- gawk
- p7zip-full
- gcc
- cmake
- Debian 10 Buster
apt-get install openjdk-11-jre openjdk-11-jdk ant git-all gawk p7zip-full gcc cmake
apt-get install kernel-package build-essential
Optional: Add multiarch i386 next to amd64- Debian 10 Buster
dpkg --add-architecture i386 apt-get update apt-get install lib32z1 lib32ncurses5 gcc-multilib lib32gcc1 lib32gomp1 lib32itm1 lib32quadmath0 libudev1:i386 libc6-i386 libc6-dev-i386 g++-multilib lib32stdc++6 openjdk-11-jre:i386 openjdk-11-jdk:i386
- OpenSuSE 15.0 or later
- java-11-openjdk
- ant
- git
- gawk
- p7zip-full
- gcc
- cmake
- CentOS 7 / Red Hat Enterprise Linux 7.6 or later
- java-11-openjdk
- ant
- git
- gawk
- p7zip-full
- gcc
- cmake
- Debian 10 or later
- Android/Linux Version 7.0 Nougat API Level 24 or later
- any of the above GNU/Linux x86_64 hosts for crosscompilation
- android ndk (todo: detail instructions)
- android sdk (todo: detail instructions)
- OpenSolaris Derivatives SPARC and x86, 32- and 64-bit
- OpenIndiana using illumus's OpenSolaris continuation (todo: test)
- MacOS and iOS Intel and Arm64
- git ≥ 2.37 provided by Xcode ≥ 14
- awk is provided by MacOS
- CMake 3.15.2, and install the command line tools
- Mac OS 11 or later (note: may not work with earlier releases)
- Xcode 14 or later for clang, etc (included in MacOS)
- Windows/x86 (32 bit)
- Windows XP or later
- git is provided by cygwin
- gawk is provided by cygwin
- MinGW64 (files on sourceforge)
- i686-8.1.0-release-win32-sjlj-rt_v6-rev0.7z
- version: 8.1.0
- host: x32
- threading: win32
- exceptions: SJLJ
- revision: 0
- i686-8.1.0-release-win32-sjlj-rt_v6-rev0.7z
- CMake 3.15.2 32bit version
- Windows/x86_64 (64-bit)
- Windows XP or later
- git is provided by cygwin
- gawk is provided by cygwin
- MinGW64 (files on sourceforge)
- x86_64-8.1.0-release-win32-sjlj-rt_v6-rev0.7z
- version: 8.1.0
- host: x64
- threading: win32
- exceptions: SJLJ
- revision: 0
- x86_64-8.1.0-release-win32-sjlj-rt_v6-rev0.7z
- CMake 3.15.2 64bit version
CMake has been added here for JOAL and JOGL.
Additional platforms such as FreeBSD and HP/UX are handled by the build system, but are not officially supported.
Build Steps
Here are the steps that are required in order to build GlueGen.
- Optain the source code using git:
It is crucial that you checkout the source code under a common root directory:/home/dude/projects/jogamp> git clone --recurse-submodules git://jogamp.org/srv/scm/gluegen.git gluegen
Now you should have following directory structure:/home/dude/projects/jogamp /home/dude/projects/jogamp/gluegen
Note-1: The GlueGen source must be fetched using -recurse-submodules, which imports JCPP, now used as the default C preprocessor.
- Unset your CLASSPATH environment variable:
The Ant build requires that the GlueGen jars not be visible on the classpath. On Unix, typeunsetenv CLASSPATH
into a csh or tcsh shell, orunset CLASSPATH
into a Bourne shell. On Windows, typeset CLASSPATH=
into a command prompt. - Optional Copy and edit gluegen.properties:
To specify different basic options for components and compilers,
copy gluegen/make/gluegen.properties into your home directory (pointed to by the Java system property user.home). - Build the source tree:
Open a command shell in the "gluegen/make" directory of the source tree and invokeant
with the given properties as followscd /home/dude/projects/jogamp/gluegen/make/ ant -Dtarget.sourcelevel=1.8 -Dtarget.targetlevel=1.8 -Dtarget.rt.jar=/your/openjdk8/lib/rt.jar
Alternatively you can also use environment variables instead of propertiesexport SOURCE_LEVEL=1.8 export TARGET_LEVEL=1.8 export TARGET_RT_JAR=/your/openjdk8/lib/rt.jar ant
Optionally you can also set certain build features via properites or environment variablesFeature Property or Environment Variable developer-zip-archive: build.archiveon=true BUILD_ARCHIVE=true Native Debug Code: c.compiler.debug=true Java Debug Code: javacdebuglevel="source,lines,vars"
- Test your build:
Stay in your command shell in the "gluegen/make" directory of the source tree and invokeant
with above properties or environment variables and use the targetjunit.run
. - Build Javadoc:
Stay in your command shell in the "gluegen/make" directory of the source tree and invokeant
with above properties or environment variables and use the targetjavadoc
. This will produce the end-user documentation for GlueGen along with some auxiliary utility packages.
Common build problems
- Your CLASSPATH environment variable appears to be set (some GlueGen classes are currently visible to the build.), and $CLASSPATH isn't set. An older version of GlueGen was installed into the extension directory of the JDK you're using to build the current GlueGen. On Windows and Linux, delete any ANTLR jars from jre/lib/ext, and on Mac OS X, delete them from /Library/Java/Extensions. It is generally not a good idea to drop GlueGen directly into the extensions directory, as this can interfere with upgrades via Java Web Start.
- CharScanner; panic: ClassNotFoundException: com.jogamp.gluegen.cgram.CToken This occurs because ANTLR was dropped into the Extensions directory of the JRE/JDK. On Windows and Linux, delete any ANTLR jars from jre/lib/ext, and on Mac OS X, delete them from /Library/Java/Extensions. Use the antlr.jar property in the build.xml to point to a JRE-external location of this jar file.
- Christopher Kline and Kenneth Russell, June 2003 (revised November 2006)
- Sven Gothel and Michael Bien, May 2010
- Sven Gothel, March 2010 (Extracted version from JOGL)