summaryrefslogtreecommitdiffstats
path: root/doc/HowToBuild.html
blob: 71ea85cc5e8972cafe2038a936d4c6952c54ab0d (plain)
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
<!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" />
        <link href="../../style.css" rel="stylesheet" type="text/css"/>
        <title>How to build JOGL</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/jogl-next/javadoc_public/">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/>

                    <ul>
                        <li> <b>Java</b><br/>
                            A Java 1.6 compliant SDK.
                        </li>
                        <li> <b><a href="http://ant.apache.org/">Ant</a></b> 1.9.0 or later</li>
                        <li> <b><a href="http://www.kernel.org/pub/software/scm/git/docs/">Git</a></b> 1.6.0 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, MacOSX, ..</a>, or</li>
                                <li> Git on Windows
                                    <ul>
                                        <li> <a href="https://cygwin.com">cygwin</a></li>
                                        <li> <a href="http://code.google.com/p/msysgit/">msysgit</a></li>
                                    </ul>
                                </li>
                                <li> <a href="http://code.google.com/p/git-osx-installer/">git-osx-installer</a> </li>
                            </ul>
                        </li>

                        <li> <b>GNU Linux</b> x86, 32- and 64-bit<br/>
                            You may have to install a few developer packages ...
                            <ul>
                                <li> <b>Debian</b> 5.00 or later
                                    <ul>
                                        <li>openjdk-7-jre</li>
                                        <li>openjdk-7-jdk</li>
                                        <li>ant</li>
                                        <li>git</li>
                                        <li>p7zip-full</li>
                                        <li>gcc</li>
                                    </ul>
                                    One liner install command:
                                    <pre>
apt-get install openjdk-7-jre openjdk-7-jdk ant git-all p7zip-full gcc
                                    </pre>
                                    Optional: Add <i>kernel</i> build utilities:
                                    <pre>
apt-get install kernel-package build-essential 
                                    </pre>
                                    Optional: Add <i>multiarch</i> i386 next to amd64 
                                    <ul>
                                      <li><b>Debian</b> 7.00
                                        <pre>
dpkg --add-architecture i386
apt-get update
apt-get install ia32-libs ia32-libs-gtk gcc-multilib lib32gcc1 lib32gomp1 lib32itm1 lib32quadmath0 libc6-i386 ibc6-dev-i386 g++-multilib lib32stdc++6 openjdk-7-jre:i386 openjdk-7-jdk:i386
                                        </pre></li>

                                      <li><b>Debian</b> 8.00
                                        <pre>
dpkg --add-architecture i386
apt-get update
apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 gcc-multilib lib32gcc1 lib32gomp1 lib32itm1 lib32quadmath0 libc6-i386 libc6-dev-i386 g++-multilib lib32stdc++6 openjdk-7-jre:i386 openjdk-7-jdk:i386
                                        </pre></li>
                                    </ul>
                                </li>
                                <li> <b>OpenSuSE</b> 10.2 or later
                                    <ul>
                                        <li>openjdk-7-jre</li>
                                        <li>openjdk-7-jdk</li>
                                        <li>ant</li>
                                        <li>git</li>
                                        <li>p7zip-full</li>
                                        <li>gcc</li>
                                    </ul>
                                </li>
                                <li> <b>CentOS / Red Hat Enterprise Linux</b> 5.4 or later<br/>
                                    <ul>
                                        <li>openjdk-7-jre</li>
                                        <li>openjdk-7-jdk</li>
                                        <li>ant</li>
                                        <li>git</li>
                                        <li>p7zip-full</li>
                                        <li>gcc</li>
                                    </ul>
                                </li>
                            </ul>
                        </li>
                        <li> <b>OpenSolaris</b> SPARC and x86, 32- and 64-bit
                            <ul>
                                <li> <a href="http://opensolaris.org/">OpenSolaris 2009.06 or later</a></li>
                            </ul>
                        </li>
                        <li> <b>MacOSX</b> Intel
                            <ul>
                                <li> git, see above </li>
                                <li> <a href="http://www.apple.com/macosx/">Mac OS X</a> 10.3 (note: will not work with earlier releases) </li>
                                <li> <a href="http://developer.apple.com/technologies/xcode.html">Xcode</a> for gcc, etc (included in OSX)</li>
                            </ul>
                        </li>
                        <li> <b>Windows</b>/x86 (32 bit)
                            <ul>
                                <li>Windows XP or later </li>
                                <li>git, see above</li>
                                <li> <a href="http://mingw-w64.sourceforge.net/">MinGW64</a>
                                  <ul>
                                    <li> <a href="http://sourceforge.net/projects/mingwbuilds/files/mingw-builds-install/mingw-builds-install.exe/download">Installer</a>
                                      <ul>
                                        <li>mingw-build-install</li>
                                        <li>version: 4.8.1</li>
                                        <li>host: x32</li>
                                        <li>threading: win32</li>
                                        <li>exceptions: SJLJ</li>
                                        <li>revision: 5</li>
                                      </ul></li>
                                    <li> or <a href="http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/">manual</a> 
                                         via  <a href="http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.8.1/32-bit/threads-win32/sjlj/">7z archive file</a></li>
                                  </ul></li>
                            </ul>
                        </li>
                        <li> <b>Windows</b>/x86_64 (64-bit)
                            <ul>
                                <li>Windows XP or later </li>
                                <li>git, see above</li>
                                <li> <a href="http://mingw-w64.sourceforge.net/">MinGW64</a>
                                  <ul>
                                    <li> <a href="http://sourceforge.net/projects/mingwbuilds/files/mingw-builds-install/mingw-builds-install.exe/download">Installer</a>
                                      <ul>
                                        <li>mingw-build-install</li>
                                        <li>version: 4.8.1</li>
                                        <li>host: x64</li>
                                        <li>threading: win32</li>
                                        <li>exceptions: SJLJ</li>
                                        <li>revision: 5</li>
                                      </ul></li>
                                    <li> or <a href="http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/">manual</a> 
                                         via  <a href="http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.8.1/64-bit/threads-win32/sjlj/">7z archive file</a></li>
                                  </ul></li>
                            </ul>
                        </li>
                    </ul>

                    <p>
                        Additional platforms such as FreeBSD and 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 JOGL.
                    </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 JOGL 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 type <code>"ant"</code>.
                        </li>

                        <li> <b>Test your build:</b> <br/> Stay in your command shell in the "gluegen/make" directory of the source tree and type <code>"ant 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 type "<code>ant javadoc"</code>.
                            This will produce the end-user documentation for JOGL 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>