1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link href="../../style.css" rel="stylesheet" type="text/css"/>
<link href="../../style-alt1.css" rel="alternate stylesheet" title="default sans-serif font" type="text/css"/>
<title>How to build GlueGen</title>
</head>
<body>
<div id="container">
<div id="header">
<div id="slogan">How to build GlueGen</div>
<div id="logo"><a href="http://jogamp.org/">How to build GlueGen</a></div>
</div>
<div id="menu">
<ul>
<li><a href="http://jogamp.org/">Home</a></li>
<li><a href="../../gluegen/www/">Gluegen</a></li>
<li><a href="../../joal/www/">JOAL</a></li>
<li><a href="../../jocl/www/">JOCL</a></li>
<li><a href="../../jogl/www/">JOGL</a></li>
<li><a href="../../demos/www/">Demos</a></li>
<li><a href="../../wiki/">Wiki</a></li>
<li><a href="../../deployment/jogamp-next/javadoc/gluegen/javadoc/">JavaDoc</a></li>
<li><a href="../../blog/">Blogs</a></li>
<li><a href="../../forum.html">Forums</a></li>
</ul>
</div>
<div id="main">
<div id="text" class="fill">
<h2>Platform and Component Requirements</h2>
<hr/>
Here is a list of platforms and components, we were able to build GlueGen on,<br/>
if not stated otherwise.<br/>
See <a href="JogAmpPlatforms.html">JogAmp's Supported Platforms</a>.
<ul>
<li> <b>Java</b>
<ul>
<li>Build: An <a href="http://openjdk.java.net/">OpenJDK</a> 17 compliant SDK.</li>
<li>Runtime: An <a href="http://openjdk.java.net/">OpenJDK</a> 8 compliant JRE.</li>
</ul>
JogAmp builds are currently performed using an <a href="http://openjdk.java.net/">OpenJDK 21</a> build @ <a href="https://adoptium.net/temurin/releases/">Adoptium</a>.<br/>
<br/>
Or you may try one of the following SDK's and/or Runtimes:
<ul>
<li> <a href="https://www.azul.com/downloads/zulu-community/">Azul's Zulu</a> (active, +embedded)</li>
<li> <a href="https://github.com/ReadyTalk/avian">Avian</a> (inactive, not tested)</li>
</ul>
</li>
<li> <b><a href="http://ant.apache.org/">Ant</a></b> 1.10.5 or later</li>
<li> <b><a href="http://www.kernel.org/pub/software/scm/git/docs/">Git</a></b> 2.0.4 or later<br/>
<ul>
<li> Use your Unix distribution's version, if available, or</li>
<li> <a href="http://www.kernel.org/pub/software/scm/git/">Source Code for GNU/Linux, MacOS, ..</a>, or</li>
<li> Git on Windows is provided by <a href="https://cygwin.com">cygwin</a></li>
<li> Git ≥ 2.37 provided by Xcode ≥ 14</li>
</ul>
</li>
<li> <b><a href="https://www.freebsd.org/">FreeBSD</a></b> x86_64, ...
<ul>
<li> <b><a href="https://www.freebsd.org/releases/">FreeBSD</a></b> 14 or later
<ul>
<li>openjdk21</li>
<li>apache-ant</li>
<li>git</li>
<li>7-zip</li>
<li>clang</li>
<li>doxygen</li>
<li>bash</li>
</ul>
Commandline:
<ul>
<li><b>FreeBSD </b> 14.3
<pre>
pkg install git doxygen bash openjdk21 junit 7-zip apache-ant
ln -s /usr/local/bin/bash /bin/bash
</pre>
Add the following to your /etc/fstab
<pre>
fdesc /dev/fd fdescfs rw 0 0
proc /proc procfs rw 0 0
</pre>
</li>
</ul>
</ul>
</li>
<li> <b>GNU Linux</b> x86_64 as well as Arm64, etc<br/>
You may have to install a few developer packages ...
<ul>
<li> <b>Debian</b> 12 or later
<ul>
<li>build-essential</li>
<li>openjdk-17-jre</li>
<li>openjdk-17-jdk</li>
<li>apache-ant</li>
<li>git</li>
<li>gawk</li>
<li>p7zip-full</li>
<li>gcc</li>
<li>cmake</li>
</ul>
One liner install command:
<ul>
<li><b>Debian</b> 12
<pre>
apt-get install build-essential openjdk-17-jre openjdk-17-jdk ant git-all gawk p7zip-full gcc cmake
</pre></li>
</ul>
</li>
<li> <b>OpenSuSE</b> 15.0 or later
<ul>
<li>java-17-openjdk</li>
<li>apache-ant</li>
<li>git</li>
<li>gawk</li>
<li>p7zip-full</li>
<li>gcc</li>
<li>cmake</li>
</ul>
</li>
<li> <b>CentOS 7 / Red Hat Enterprise Linux 7.6</b> or later<br/>
<ul>
<li>java-17-openjdk</li>
<li>apache-ant</li>
<li>git</li>
<li>gawk</li>
<li>p7zip-full</li>
<li>gcc</li>
<li>cmake</li>
</ul>
</li>
</ul>
</li>
<li> <b>Android/Linux</b> Version 8.0 Oreo API Level 26 or later<br/>
<ul>
<li>any of the above GNU/Linux x86_64 hosts for crosscompilation</li>
<li>android ndk <i>(version 29)</i></li>
<li>android sdk <i>(build-tools version 36)</i></li>
<li>android:minSdkVersion: 26 (Android 8, Oreo)</li>
<li>android:targetSdkVersion=: 35 (Android 15), as required as of 2025-08-31</li>
<li>for details, see make/jogamp-env.xml and make/scripts/setenv-android-tools.sh</li>
</ul>
</li>
<li> <b><a href="https://en.wikipedia.org/wiki/OpenSolaris#Derivatives">OpenSolaris Derivatives</a></b> SPARC and x86, 32- and 64-bit
<ul>
<li><a href="https://www.openindiana.org/">OpenIndiana</a> using illumus's OpenSolaris continuation <i>(todo: test)</i></li>
</ul>
</li>
<li> <b>MacOS and iOS</b> x86_64 and aarch64
<ul>
<li>Build machine: <a href="http://www.apple.com/macosx/">Mac OS</a> 12.6.5 (Monterey)
<ul>
<li>Lowest test machine: <a href="http://www.apple.com/macosx/">Mac OS</a> 10.13.6 (High Sierra)</li>
<li>Minimum deployment target: <a href="http://www.apple.com/macosx/">Mac OS</a> 10.7 (Lion)</li>
</ul></li>
<li><a href="http://developer.apple.com/technologies/xcode.html">Xcode</a> 14.2 for clang, etc (included in MacOS)</li>
<li>MacOS SDK 11.3 from a previous XCode version or <a href="https://github.com/phracker/MacOSX-SDKs">from this alternative site</a>
<ul>
<li><i>export SDKROOT=macosx11.3</i></li>
<li>We use <i>-mmacosx-version-min=10.7</i> (Lion 10.7) minimum deployment target.</li>
</ul></li>
<li>git ≥ 2.37 provided by Xcode ≥ 14</li>
<li>awk is provided by MacOS</li>
<li><a href="https://cmake.org/">CMake 3.25.1</a>, and install the <a href="https://stackoverflow.com/questions/30668601/installing-cmake-command-line-tools-on-a-mac">command line tools</a>
<ul>
<li>Install symlinks to <i>/usr/local/bin</i>, run: <i>sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install</i></li>
</ul></li>
<li><a href="https://7-zip.org/">7-Zip 21.07</a> x86_64 and arm64 version</li>
<li>See also <a href="JogAmpPlatforms.html">MacOS Versions Related to JogAmp</a></li>
</ul>
Prepare fat universal OpenJDK libraries
<ul>
<li>Open a terminal in your home folder, e.g. <i>/Users/jogamp</i></li>
<li>The OpenJDK library folder of each target platform, x86_64 or aarch64, is <i>/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/lib</i></li>
<li>Transfer the x86_64 OpenJDK library folder to <i>temurin-17.jdk.amd64.lib</i><li>
<li>Transfer the aarch64 OpenJDK library folder to <i> temurin-17.jdk.arm64.lib</i></li>
<li>Run the script <i>gluegen/make/scripts/make.macosx.jdk_lipo_libs.sh</i></li>
<li>Fat universal OpenJDK libraries are produced into <i>temurin-17.jdk.fat.lib</i></li>
</ul>
Now we have to tell the <i>gluegen</i> build framework to use <i>temurin-17.jdk.fat.lib</i>,
by adding an <i>ant</i> macro in <i>$HOME/gluegen.properties</i>
<pre>
java.lib.dir.platform=/Users/jogamp/temurin-17.jdk.fat.lib
</pre>
Replace <i>jogamp</i> with your user name.
</li>
<li> <b>Windows</b>/x86_64 (64-bit)
<ul>
<li>Windows 7 or later </li>
<li>git is provided by <a href="https://cygwin.com">cygwin</a></li>
<li>gawk is provided by <a href="https://cygwin.com">cygwin</a></li>
<li> <a href="http://mingw-w64.org/">MinGW64</a> (<a href="https://github.com/niXman/mingw-builds-binaries/releases">files on github</a>)
<ul>
<li> <a href="https://github.com/niXman/mingw-builds-binaries/releases/download/12.2.0-rt_v10-rev2/x86_64-12.2.0-release-posix-seh-msvcrt-rt_v10-rev2.7z">x86_64-12.2.0-release-posix-seh-msvcrt-rt_v10-rev2.7z</a>
<ul>
<li>version: 12.2.0</li>
<li>host: x64</li>
<li>threading: posix</li>
<li>exceptions: seh</li>
<li>c-runtime: msvcrt</li>
<li>revision: 2</li>
</ul></li>
<li> <s><a href="https://github.com/niXman/mingw-builds-binaries/releases/download/12.2.0-rt_v10-rev2/x86_64-12.2.0-release-win32-seh-msvcrt-rt_v10-rev2.7z">x86_64-12.2.0-release-win32-seh-msvcrt-rt_v10-rev2.7z</a>
<ul>
<li>version: 12.2.0</li>
<li>host: x64</li>
<li>threading: win32</li>
<li>exceptions: seh</li>
<li>c-runtime: msvcrt</li>
<li>revision: 2</li>
</ul></s></li>
</ul>
</li>
<li><a href="https://cmake.org/">CMake 3.25.1</a> 64bit version</li>
<li><a href="https://www.7-zip.org/">7-Zip 22.01</a> 64bit version</li>
</ul>
</li>
</ul>
<p>
CMake has been added here for JOAL and JOGL.
</p>
<p>
Additional platforms such as HP/UX are handled by the
build system, but are not officially supported.
</p>
<h2>Build Steps</h2>
<hr/>
<p>
Here are the steps that are required in order to build GlueGen.
</p>
<ol>
<li><b>Optain the source code</b> using git:
<ul>
<li><a href="http://jogamp.org/git/?p=gluegen.git">Gluegen Dev GIT Repo</a></li>
</ul><br/>
It is crucial that you checkout the source code under a common root directory:
<pre>
/home/dude/projects/jogamp> git clone --recurse-submodules git://jogamp.org/srv/scm/gluegen.git gluegen
</pre>
Now you should have following directory structure:
<pre>
/home/dude/projects/jogamp
/home/dude/projects/jogamp/gluegen
</pre>
<p>
Note-1: The GlueGen source must be fetched using <i>-recurse-submodules</i>,
which imports <i>JCPP</i>, now used as the default C preprocessor.
</p>
</li>
<li> <b>Unset your CLASSPATH environment variable:</b> <br/>
The Ant build requires that the GlueGen jars not be visible on the classpath. On Unix, type
<code> unsetenv CLASSPATH </code> into a csh or tcsh shell, or <code> unset CLASSPATH </code>
into a Bourne shell. On Windows, type <code> set CLASSPATH= </code> into a command prompt.
</li>
<li> <b>Optional</b> <i>Copy and edit <b>gluegen.properties</b>:</i> <br/>
To specify different basic options for components and compilers,<br/>
copy <b>gluegen/make/gluegen.properties</b> into your home directory (pointed to by the Java system property <b>user.home</b>). <br/></li>
<li> <b>Build the source tree:</b> <br/>
Open a command shell in the "gluegen/make" directory of the source tree and invoke <code>ant</code>
with the given properties as follows
<pre>
cd /home/dude/projects/jogamp/gluegen/make/
ant
</pre>
Optionally you can also set certain build features via properites or environment variables
<pre>
Feature 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"
</pre>
</li>
<li> <b>Test your build:</b> <br/> Stay in your command shell in the "gluegen/make" directory of the source tree and invoke <code>ant</code> with above properties or environment variables and use the target <code>junit.run</code>.</li>
<li> <b>Build Javadoc:</b> <br/> Stay in your command shell in the "gluegen/make" directory of the source tree and invoke <code>ant</code> with above properties or environment variables and use the target <code>doxygen.public</code> or <code>doxygen.all</code>.
This will produce the end-user documentation for GlueGen along with some auxiliary utility packages.
</li>
</ol>
Note that there might be a few warnings produced by ANTLR about the
C grammar and our modifications to some of the signatures of the
productions; the C grammar warnings have been documented by the
author of the grammar as having been investigated completely and
harmless, and the warnings about our modifications are also
harmless.
<h2> Common build problems </h2>
<ol>
<li>
<b>Your CLASSPATH environment variable appears to be set (some GlueGen classes are currently visible to the build.)</b>, 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.
</li>
<li>
<b>CharScanner; panic: ClassNotFoundException: com.jogamp.gluegen.cgram.CToken</b>
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.
</li>
</ol>
<br/>
<p>
<i>- Christopher Kline and Kenneth Russell, June 2003 (revised November 2006)</i><br/>
<i>- Sven Gothel and Michael Bien, May 2010</i><br/>
<i>- Sven Gothel, March 2010 (Extracted version from JOGL)</i><br/>
</p>
</div>
</div>
<div id="footer">
<div id="footer_left">
<span>JogAmp.org</span>
by <a href="http://jogamp.org">http://jogamp.org</a>
is licensed under a <br/>
<a href="http://creativecommons.org/licenses/by/3.0/us/">Creative Commons Attribution 3.0 License</a>.
</div>
</div>
</div>
</body>
</html>
|