1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
2 <html> |
2 <html> |
3 <head> |
3 <head> |
4 <title>OpenJDK Build README</title> |
4 <title>OpenJDK Build README</title> |
5 </head> |
5 </head> |
6 <body style="background-color:lightcyan"> |
6 <body style="background-color:aquamarine"> |
|
7 |
7 <!-- ====================================================== --> |
8 <!-- ====================================================== --> |
8 <table width="100%"> |
9 <table width="100%"> |
9 <tr> |
10 <tr> |
10 <td align="center"> |
11 <td align="center"> |
11 <img alt="OpenJDK" |
12 <img alt="OpenJDK" |
12 src="http://openjdk.java.net/images/openjdk.png" |
13 src="http://openjdk.java.net/images/openjdk.png" |
13 width=256 /> |
14 width=256> |
14 </td> |
15 </td> |
15 </tr> |
16 </tr> |
16 <tr> |
17 <tr> |
17 <td align=center> |
18 <td align=center> |
18 <h1>OpenJDK Build README</h1> |
19 <h1>OpenJDK Build README</h1> |
19 </td> |
20 </td> |
20 </tr> |
21 </tr> |
21 </table> |
22 </table> |
22 <!-- ------------------------------------------------------ --> |
23 |
|
24 <!-- ====================================================== --> |
23 <hr> |
25 <hr> |
24 <h2><a name="introduction">Introduction</a></h2> |
26 <h2><a name="introduction">Introduction</a></h2> |
25 <blockquote> |
27 <blockquote> |
26 <p> |
28 This README file contains build instructions for the |
27 This README file contains build instructions for the |
29 <a href="http://openjdk.java.net" target="_blank">OpenJDK</a>. |
28 <a href="http://openjdk.java.net" target="_blank">OpenJDK</a>. |
30 Building the source code for the |
29 Building the source code for the |
31 OpenJDK |
30 OpenJDK |
32 requires |
31 requires |
33 a certain degree of technical expertise. |
32 a certain degree of technical expertise. |
34 |
|
35 <!-- ====================================================== --> |
|
36 <h3>!!!!!!!!!!!!!!! THIS IS A MAJOR RE-WRITE of this document. !!!!!!!!!!!!!</h3> |
|
37 <blockquote> |
|
38 Some Headlines: |
|
39 <ul> |
|
40 <li> |
|
41 The build is now a "<code>configure && make</code>" style build |
|
42 </li> |
|
43 <li> |
|
44 Any GNU make 3.81 or newer should work |
|
45 </li> |
|
46 <li> |
|
47 The build should scale, i.e. more processors should |
|
48 cause the build to be done in less wall-clock time |
|
49 </li> |
|
50 <li> |
|
51 Nested or recursive make invocations have been significantly |
|
52 reduced, as has the total fork/exec or spawning |
|
53 of sub processes during the build |
|
54 </li> |
|
55 <li> |
|
56 Windows MKS usage is no longer supported |
|
57 </li> |
|
58 <li> |
|
59 Windows Visual Studio <code>vsvars*.bat</code> and |
|
60 <code>vcvars*.bat</code> files are run automatically |
|
61 </li> |
|
62 <li> |
|
63 Ant is no longer used when building the OpenJDK |
|
64 </li> |
|
65 <li> |
|
66 Use of ALT_* environment variables for configuring the |
|
67 build is no longer supported |
|
68 </li> |
|
69 </ul> |
|
70 </blockquote> |
33 </blockquote> |
71 </blockquote> |
34 <!-- ------------------------------------------------------ --> |
72 |
|
73 <!-- ====================================================== --> |
35 <hr> |
74 <hr> |
36 <h2><a name="contents">Contents</a></h2> |
75 <h2><a name="contents">Contents</a></h2> |
37 <blockquote> |
76 <blockquote> |
38 <ul> |
77 <ul> |
39 <li><a href="#introduction">Introduction</a></li> |
78 <li><a href="#introduction">Introduction</a></li> |
|
79 |
40 <li><a href="#hg">Use of Mercurial</a> |
80 <li><a href="#hg">Use of Mercurial</a> |
41 <ul> |
81 <ul> |
42 <li><a href="#get_source">Getting the Source</a></li> |
82 <li><a href="#get_source">Getting the Source</a></li> |
|
83 <li><a href="#repositories">Repositories</a></li> |
43 </ul> |
84 </ul> |
44 </li> |
85 </li> |
45 <li><a href="#MBE">Minimum Build Environments</a></li> |
86 |
46 <li><a href="#SDBE">Specific Developer Build Environments</a> |
87 <li><a href="#building">Building</a> |
47 <ul> |
88 <ul> |
48 <li><a href="#fedora">Fedora Linux</a> </li> |
89 <li><a href="#setup">System Setup</a> |
49 <li><a href="#centos">CentOS Linux</a> </li> |
90 <ul> |
50 <li><a href="#debian">Debian GNU/Linux</a></li> |
91 <li><a href="#linux">Linux</a></li> |
51 <li><a href="#ubuntu">Ubuntu Linux</a> </li> |
92 <li><a href="#solaris">Solaris</a></li> |
52 <li><a href="#opensuse">OpenSUSE</a></li> |
93 <li><a href="#macosx">Mac OS X</a></li> |
53 <li><a href="#mandriva">Mandriva</a></li> |
94 <li><a href="#windows">Windows</a></li> |
54 <li><a href="#opensolaris">OpenSolaris</a></li> |
95 </ul> |
|
96 </li> |
|
97 <li><a href="#configure">Configure</a></li> |
|
98 <li><a href="#make">Make</a></li> |
55 </ul> |
99 </ul> |
56 </li> |
100 </li> |
57 <li><a href="#directories">Source Directory Structure</a> |
101 <li><a href="#testing">Testing</a></li> |
|
102 </ul> |
|
103 <hr> |
|
104 <ul> |
|
105 <li><a href="#hints">Appendix A: Hints and Tips</a> |
58 <ul> |
106 <ul> |
59 <li><a href="#drops">Managing the Source Drops</a></li> |
107 <li><a href="#faq">FAQ</a></li> |
|
108 <li><a href="#performance">Build Performance Tips</a></li> |
|
109 <li><a href="#troubleshooting">Troubleshooting</a></li> |
60 </ul> |
110 </ul> |
61 </li> |
111 </li> |
62 <li><a href="#building">Build Information</a> |
112 <li><a href="#gmake">Appendix B: GNU Make Information</a></li> |
63 <ul> |
113 <li><a href="#buildenvironments">Appendix C: Build Environments</a></li> |
64 <li><a href="#gmake">GNU Make (<tt><i>gmake</i></tt>)</a> </li> |
114 |
65 <li><a href="#linux">Basic Linux System Setup</a> </li> |
115 <!-- Leave out |
66 <li><a href="#solaris">Basic Solaris System Setup</a> </li> |
116 <li><a href="#mapping">Appendix D: Mapping Old Builds to the New Builds</a></li> |
67 <li><a href="#windows">Basic Windows System Setup</a> </li> |
117 --> |
68 <li><a href="#macosx">Basic Mac OS X System Setup</a></li> |
118 |
69 <li><a href="#dependencies">Build Dependencies</a> |
|
70 <ul> |
|
71 <li><a href="#bootjdk">Bootstrap JDK</a> </li> |
|
72 <li><a href="#importjdk">Optional Import JDK</a> </li> |
|
73 <li><a href="#ant">Ant 1.7.1</a> </li> |
|
74 <li><a href="#cacerts">Certificate Authority File (cacert)</a> </li> |
|
75 <li><a href="#compilers">Compilers</a> |
|
76 <ul> |
|
77 <li><a href="#msvc32">Microsoft Visual Studio Professional/Express for 32 bit</a> </li> |
|
78 <li><a href="#msvc64">Microsoft Visual Studio Professional for 64 bit</a> </li> |
|
79 <li><a href="#mssdk64">Microsoft Windows SDK for 64 bit</a> </li> |
|
80 <li><a href="#gcc">Linux gcc/binutils</a> </li> |
|
81 <li><a href="#studio">Sun Studio</a> </li> |
|
82 </ul> |
|
83 </li> |
|
84 <li><a href="#zip">Zip and Unzip</a> </li> |
|
85 <li><a href="#freetype">FreeType2 Fonts</a> </li> |
|
86 <li>Linux and Solaris: |
|
87 <ul> |
|
88 <li><a href="#cups">CUPS Include files</a> </li> |
|
89 <li><a href="#xrender">XRender Include files</a></li> |
|
90 </ul> |
|
91 </li> |
|
92 <li>Linux only: |
|
93 <ul> |
|
94 <li><a href="#alsa">ALSA files</a> </li> |
|
95 </ul> |
|
96 </li> |
|
97 <li>Windows only: |
|
98 <ul> |
|
99 <li>Unix Command Tools (<a href="#cygwin">CYGWIN</a>) <strong>or</strong></li> |
|
100 <li>Minimalist GNU for Windows (<a href="#msys">MinGW/MSYS</a>)</li> |
|
101 <li><a href="#dxsdk">DirectX 9.0 SDK</a> </li> |
|
102 </ul> |
|
103 </li> |
|
104 </ul> |
|
105 </li> |
|
106 </ul> |
|
107 </li> |
|
108 <li><a href="#creating">Creating the Build</a> </li> |
|
109 <li><a href="#testing">Testing the Build</a> </li> |
|
110 <li><a href="#variables">Environment/Make Variables</a></li> |
|
111 <li><a href="#troubleshooting">Troubleshooting</a></li> |
|
112 <li><a href="#newbuild">The New Build</a></li> |
|
113 </ul> |
119 </ul> |
114 </blockquote> |
120 </blockquote> |
115 |
121 |
116 <!-- ------------------------------------------------------ --> |
122 <!-- ====================================================== --> |
117 <hr> |
123 <hr> |
118 <h2><a name="hg">Use of Mercurial</a></h2> |
124 <h2><a name="hg">Use of Mercurial</a></h2> |
119 <blockquote> |
125 <blockquote> |
120 The OpenJDK sources are maintained with the revision control system |
126 The OpenJDK sources are maintained with the revision control system |
121 <a href="http://mercurial.selenic.com/wiki/Mercurial">Mercurial</a>. |
127 <a href="http://mercurial.selenic.com/wiki/Mercurial">Mercurial</a>. |
122 If you are new to Mercurial, please see the |
128 If you are new to Mercurial, please see the |
123 <a href="http://mercurial.selenic.com/wiki/BeginnersGuides">Beginner Guides</a> |
129 <a href="http://mercurial.selenic.com/wiki/BeginnersGuides"> |
124 or refer to the <a href="http://hgbook.red-bean.com/">Mercurial Book</a>. |
130 Beginner Guides</a> |
|
131 or refer to the <a href="http://hgbook.red-bean.com/"> |
|
132 Mercurial Book</a>. |
125 The first few chapters of the book provide an excellent overview of |
133 The first few chapters of the book provide an excellent overview of |
126 Mercurial, what it is and how it works. |
134 Mercurial, what it is and how it works. |
127 <br> |
135 <br> |
128 For using Mercurial with the OpenJDK refer to the |
136 For using Mercurial with the OpenJDK refer to the |
129 <a href="http://openjdk.java.net/guide/repositories.html#installConfig"> |
137 <a href="http://openjdk.java.net/guide/repositories.html#installConfig"> |
130 Developer Guide: Installing and Configuring Mercurial</a> |
138 Developer Guide: Installing and Configuring Mercurial</a> |
131 section for more information. |
139 section for more information. |
132 |
140 |
133 <!-- ------------------------------------------------------ --> |
|
134 <h3><a name="get_source">Getting the Source</a></h3> |
141 <h3><a name="get_source">Getting the Source</a></h3> |
135 <blockquote> |
142 <blockquote> |
136 To get the entire set of OpenJDK Mercurial repositories |
143 To get the entire set of OpenJDK Mercurial repositories |
137 use the script <code>get_source.sh</code> located in the root repository: |
144 use the script <code>get_source.sh</code> located in the |
|
145 root repository: |
138 <blockquote> |
146 <blockquote> |
139 <tt> |
147 <code> |
140 hg clone http://hg.openjdk.java.net/jdk8/jdk8 <i>YourOpenJDK</i> |
148 hg clone http://hg.openjdk.java.net/jdk8/jdk8 |
141 <br>cd <i>YourOpenJDK</i> |
149 <i>YourOpenJDK</i> |
142 <br>sh ./get_source.sh |
150 <br> |
143 </tt> |
151 cd <i>YourOpenJDK</i> |
|
152 <br> |
|
153 bash ./get_source.sh |
|
154 </code> |
144 </blockquote> |
155 </blockquote> |
145 Once you have all the repositories, the |
156 Once you have all the repositories, keep in mind that each |
146 script <tt>make/scripts/hgforest.sh</tt> |
157 repository is it's own independent repository. |
147 can be used to repeat the same <tt>hg</tt> |
158 You can also re-run <code>./get_source.sh</code> anytime to |
148 command on every repository in the forest, e.g. |
159 pull over all the latest changesets in all the repositories. |
|
160 This set of nested repositories has been given the term |
|
161 "forest" and there are various ways to apply the same |
|
162 <code>hg</code> command to each of the repositories. |
|
163 For example, the script <code>make/scripts/hgforest.sh</code> |
|
164 can be used to repeat the same <code>hg</code> |
|
165 command on every repository, e.g. |
149 <blockquote> |
166 <blockquote> |
150 <tt> |
167 <code> |
151 cd <i>YourOpenJDK</i> |
168 cd <i>YourOpenJDK</i> |
152 <br>sh ./make/scripts/hgforest.sh pull -u |
169 <br> |
153 </tt> |
170 bash ./make/scripts/hgforest.sh status |
|
171 </code> |
154 </blockquote> |
172 </blockquote> |
155 </blockquote> |
173 </blockquote> |
156 |
174 |
|
175 <h3><a name="repositories">Repositories</a></h3> |
|
176 <blockquote> |
|
177 <p>The set of repositories and what they contain:</p> |
|
178 <table border="1"> |
|
179 <thead> |
|
180 <tr> |
|
181 <th>Repository</th> |
|
182 <th>Contains</th> |
|
183 </tr> |
|
184 </thead> |
|
185 <tbody> |
|
186 <tr> |
|
187 <td> |
|
188 . (root) |
|
189 </td> |
|
190 <td> |
|
191 common configure and makefile logic |
|
192 </td> |
|
193 </tr> |
|
194 <tr> |
|
195 <td> |
|
196 hotspot |
|
197 </td> |
|
198 <td> |
|
199 source code and make files for building |
|
200 the OpenJDK Hotspot Virtual Machine |
|
201 </td> |
|
202 </tr> |
|
203 <tr> |
|
204 <td> |
|
205 langtools |
|
206 </td> |
|
207 <td> |
|
208 source code for the OpenJDK javac and language tools |
|
209 </td> |
|
210 </tr> |
|
211 <tr> |
|
212 <td> |
|
213 jdk |
|
214 </td> |
|
215 <td> |
|
216 source code and make files for building |
|
217 the OpenJDK runtime libraries and misc files |
|
218 </td> |
|
219 </tr> |
|
220 <tr> |
|
221 <td> |
|
222 jaxp |
|
223 </td> |
|
224 <td> |
|
225 source code for the OpenJDK JAXP functionality |
|
226 </td> |
|
227 </tr> |
|
228 <tr> |
|
229 <td> |
|
230 jaxws |
|
231 </td> |
|
232 <td> |
|
233 source code for the OpenJDK JAX-WS functionality |
|
234 </td> |
|
235 </tr> |
|
236 <tr> |
|
237 <td> |
|
238 corba |
|
239 </td> |
|
240 <td> |
|
241 source code for the OpenJDK Corba functionality |
|
242 </td> |
|
243 </tr> |
|
244 </tbody> |
|
245 </table> |
|
246 </blockquote> |
|
247 |
|
248 <h3><a name="guidelines">Repository Source Guidelines</a></h3> |
|
249 <blockquote> |
|
250 There are some very basic guidelines: |
|
251 <ul> |
|
252 <li> |
|
253 Use of whitespace in source files |
|
254 (.java, .c, .h, .cpp, and .hpp files) |
|
255 is restricted. |
|
256 No TABs, no trailing whitespace on lines, and files |
|
257 should not terminate in more than one blank line. |
|
258 </li> |
|
259 <li> |
|
260 Files with execute permissions should not be added |
|
261 to the source repositories. |
|
262 </li> |
|
263 <li> |
|
264 All generated files need to be kept isolated from |
|
265 the files |
|
266 maintained or managed by the source control system. |
|
267 The standard area for generated files is the top level |
|
268 <code>build/</code> directory. |
|
269 </li> |
|
270 <li> |
|
271 The default build process should be to build the product |
|
272 and nothing else, in one form, e.g. a product (optimized), |
|
273 debug (non-optimized, -g plus assert logic), or |
|
274 fastdebug (optimized, -g plus assert logic). |
|
275 </li> |
|
276 <li> |
|
277 The <tt>.hgignore</tt> file in each repository |
|
278 must exist and should |
|
279 include <tt>^build/</tt>, <tt>^dist/</tt> and |
|
280 optionally any |
|
281 <tt>nbproject/private</tt> directories. |
|
282 <strong>It should NEVER</strong> include |
|
283 anything in the |
|
284 <tt>src/</tt> or <tt>test/</tt> |
|
285 or any managed directory area of a repository. |
|
286 </li> |
|
287 <li> |
|
288 Directory names and file names should never contain |
|
289 blanks or |
|
290 non-printing characters. |
|
291 </li> |
|
292 <li> |
|
293 Generated source or binary files should NEVER be added to |
|
294 the repository (that includes <tt>javah</tt> output). |
|
295 There are some exceptions to this rule, in particular |
|
296 with some of the generated configure scripts. |
|
297 </li> |
|
298 <li> |
|
299 Files not needed for typical building |
|
300 or testing of the repository |
|
301 should not be added to the repository. |
|
302 </li> |
|
303 </ul> |
|
304 </blockquote> |
|
305 |
157 </blockquote> |
306 </blockquote> |
158 |
307 |
159 <!-- ------------------------------------------------------ --> |
308 <!-- ====================================================== --> |
160 <hr> |
309 <hr> |
161 <h2><a name="MBE">Minimum Build Environments</a></h2> |
310 <h2><a name="building">Building</a></h2> |
162 <blockquote> |
311 <blockquote> |
163 This file often describes specific requirements for what we call the |
312 The very first step in building the OpenJDK is making sure the |
164 "minimum build environments" (MBE) for this |
313 system itself has everything it needs to do OpenJDK builds. |
165 specific release of the JDK, |
314 Once a system is setup, it generally doesn't need to be done again. |
166 Building with the MBE will generate the most compatible |
315 <br> |
167 bits that install on, and run correctly on, the most variations |
316 Building the OpenJDK is now done with running a |
168 of the same base OS and hardware architecture. |
317 <a href="#configure"><code>configure</code></a> |
169 These usually represent what is often called the |
318 script which will try and find and verify you have everything |
170 least common denominator platforms. |
319 you need, followed by running |
171 It is understood that most developers will NOT be using these |
320 <a href="#gmake"><code>make</code></a>, e.g. |
172 specific platforms, and in fact creating these specific platforms |
|
173 may be difficult due to the age of some of this software. |
|
174 <p> |
|
175 The minimum OS and C/C++ compiler versions needed for building the |
|
176 OpenJDK: |
|
177 <p> |
|
178 <table border="1"> |
|
179 <thead> |
|
180 <tr> |
|
181 <th>Base OS and Architecture</th> |
|
182 <th>OS</th> |
|
183 <th>C/C++ Compiler</th> |
|
184 <th>BOOT JDK</th> |
|
185 </tr> |
|
186 </thead> |
|
187 <tbody> |
|
188 <tr> |
|
189 <td>Linux X86 (32-bit)</td> |
|
190 <td>Fedora 9</td> |
|
191 <td>gcc 4.3 </td> |
|
192 <td>JDK 6u18</td> |
|
193 </tr> |
|
194 <tr> |
|
195 <td>Linux X64 (64-bit)</td> |
|
196 <td>Fedora 9</td> |
|
197 <td>gcc 4.3 </td> |
|
198 <td>JDK 6u18</td> |
|
199 </tr> |
|
200 <tr> |
|
201 <td>Solaris SPARC (32-bit)</td> |
|
202 <td>Solaris 10 Update 6</td> |
|
203 <td>Sun Studio 12 Update 1 + patches</td> |
|
204 <td>JDK 6u18</td> |
|
205 </tr> |
|
206 <tr> |
|
207 <td>Solaris SPARCV9 (64-bit)</td> |
|
208 <td>Solaris 10 Update 6</td> |
|
209 <td>Sun Studio 12 Update 1 + patches</td> |
|
210 <td>JDK 6u18</td> |
|
211 </tr> |
|
212 <tr> |
|
213 <td>Solaris X86 (32-bit)</td> |
|
214 <td>Solaris 10 Update 6</td> |
|
215 <td>Sun Studio 12 Update 1 + patches</td> |
|
216 <td>JDK 6u18</td> |
|
217 </tr> |
|
218 <tr> |
|
219 <td>Solaris X64 (64-bit)</td> |
|
220 <td>Solaris 10 Update 6</td> |
|
221 <td>Sun Studio 12 Update 1 + patches</td> |
|
222 <td>JDK 6u18</td> |
|
223 </tr> |
|
224 <tr> |
|
225 <td>Windows X86 (32-bit)</td> |
|
226 <td>Windows XP</td> |
|
227 <td>Microsoft Visual Studio C++ 2010 Professional Edition</td> |
|
228 <td>JDK 6u18</td> |
|
229 </tr> |
|
230 <tr> |
|
231 <td>Windows X64 (64-bit)</td> |
|
232 <td>Windows Server 2003 - Enterprise x64 Edition</td> |
|
233 <td>Microsoft Visual Studio C++ 2010 Professional Edition</td> |
|
234 <td>JDK 6u18</td> |
|
235 </tr> |
|
236 <tr> |
|
237 <td>Mac OS X X64 (64-bit)</td> |
|
238 <td>Mac OS X 10.7.3 "Lion"</td> |
|
239 <td>XCode 4.1 or later</td> |
|
240 <td>Java for OS X Lion Update 1</td> |
|
241 </tr> |
|
242 </tbody> |
|
243 </table> |
|
244 <p> |
|
245 These same sources do indeed build on many more systems than the |
|
246 above older generation systems, again the above is just a minimum. |
|
247 <p> |
|
248 Compilation problems with newer or different C/C++ compilers is a |
|
249 common problem. |
|
250 Similarly, compilation problems related to changes to the |
|
251 <tt>/usr/include</tt> or system header files is also a |
|
252 common problem with newer or unreleased OS versions. |
|
253 Please report these types of problems as bugs so that they |
|
254 can be dealt with accordingly. |
|
255 </blockquote> |
|
256 <!-- ------------------------------------------------------ --> |
|
257 <hr> |
|
258 <h2><a name="SDBE">Specific Developer Build Environments</a></h2> |
|
259 <blockquote> |
|
260 We won't be listing all the possible environments, but |
|
261 we will try to provide what information we have available to us. |
|
262 </blockquote> |
|
263 <!-- ------------------------------------------------------ --> |
|
264 <h3><a name="fedora">Fedora</a></h3> |
|
265 <blockquote> |
|
266 <h4>Fedora 9</h4> |
|
267 <p> |
|
268 <blockquote> |
321 <blockquote> |
269 After installing <a href="http://fedoraproject.org">Fedora</a> 9 |
322 <b> |
270 you need to install several build dependencies. The simplest |
323 <code> |
271 way to do it is to execute the following commands as user |
324 bash ./configure<br> |
272 <tt>root</tt>: |
325 make all |
273 <p/> |
326 </code> |
274 <code>yum-builddep java-1.6.0-openjdk</code> |
327 </b> |
275 <p/> |
|
276 <code>yum install gcc gcc-c++</code> |
|
277 <p/> |
|
278 In addition, it's necessary to set a few environment variables for the build: |
|
279 |
|
280 <p/> |
|
281 <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk</code> |
|
282 </blockquote> |
328 </blockquote> |
283 <h4>Fedora 10</h4> |
329 Where possible the <code>configure</code> script will attempt to located the |
284 <p> |
330 various components in the default locations or via component |
|
331 specific variable settings. |
|
332 When the normal defaults fail or components cannot be found, |
|
333 additional <code>configure</code> options may be necessary to help <code>configure</code> |
|
334 find the necessary tools for the build, or you may need to |
|
335 re-visit the setup of your system due to missing software |
|
336 packages. |
|
337 <br> |
|
338 <strong>NOTE:</strong> The <code>configure</code> script |
|
339 file does not have |
|
340 execute permissions and will need to be explicitly run with |
|
341 <code>bash</code>, |
|
342 see the <a href="#guidelines">source guidelines</a>. |
|
343 |
|
344 <!-- ====================================================== --> |
|
345 <hr> |
|
346 <h3><a name="setup">System Setup</a></h3> |
285 <blockquote> |
347 <blockquote> |
286 After installing <a href="http://fedoraproject.org">Fedora</a> 10 |
348 Before even attempting to use a system to build the OpenJDK |
287 you need to install several build dependencies. The simplest |
349 there are some very basic system setups needed. |
288 way to do it is to execute the following commands as user |
350 For all systems: |
289 <tt>root</tt>: |
351 <ul> |
290 <p/> |
352 <li> |
291 <code>yum-builddep java-1.6.0-openjdk</code> |
353 Be sure the GNU make utility is version 3.81 or newer, |
292 <p/> |
354 e.g. run "<code>make -version</code>" |
293 <code>yum install gcc gcc-c++</code> |
355 </li> |
294 <p/> |
356 <li> |
295 In addition, it's necessary to set a few environment variables for the build: |
357 Install a |
296 |
358 <a name="bootjdk">Bootstrap JDK</a> |
297 <p/> |
359 <br> |
298 <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk</code> |
360 All OpenJDK builds require access to a previously released |
|
361 JDK, this is often called a bootstrap JDK. |
|
362 Currently, for this JDK release we require |
|
363 JDK 7 Update 7 or newer. |
|
364 The JDK 7 binaries can be downloaded from Oracle's |
|
365 <a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html" |
|
366 target="_blank">JDK 7 download site</a>. |
|
367 For build performance reasons |
|
368 is very important that this bootstrap JDK be made available |
|
369 on the local disk of the machine doing the build. |
|
370 You should add its <code>bin</code> directory |
|
371 to the <code>PATH</code> environment variable. |
|
372 If <code>configure</code> has any issues finding this JDK, you may |
|
373 need to use the <code>configure</code> option |
|
374 <code>--with-boot-jdk</code>. |
|
375 </li> |
|
376 <li> |
|
377 Insure that GNU make, the Bootstrap JDK, |
|
378 and the compilers are all |
|
379 in your PATH environment variable |
|
380 </li> |
|
381 </ul> |
|
382 And for specific systems: |
|
383 <table border="1"> |
|
384 <thead> |
|
385 <tr> |
|
386 <th>Linux</th> |
|
387 <th>Solaris</th> |
|
388 <th>Windows</th> |
|
389 <th>Mac OS X</th> |
|
390 </tr> |
|
391 </thead> |
|
392 <tbody> |
|
393 <tr> |
|
394 <td> |
|
395 Install all the software development |
|
396 packages needed including |
|
397 <a href="#alsa">alsa</a>, |
|
398 <a href="#freetype">freetype</a>, |
|
399 <a href="#cups">cups</a>, and |
|
400 <a href="#xrender">xrender</a>. |
|
401 <br> |
|
402 See |
|
403 <a href="#SDBE">specific system packages</a>. |
|
404 </td> |
|
405 <td> |
|
406 Install all the software development |
|
407 packages needed including |
|
408 <a href="#studio">Studio Compilers</a>, |
|
409 <a href="#freetype">freetype</a>, |
|
410 <a href="#cups">cups</a>, and |
|
411 <a href="#xrender">xrender</a>. |
|
412 <br> |
|
413 See |
|
414 <a href="#SDBE">specific system packages</a>. |
|
415 </td> |
|
416 <td> |
|
417 <ul> |
|
418 <li> |
|
419 Install one of |
|
420 <a href="#cygwin">CYGWIN</a> or |
|
421 <a href="#msys">MinGW/MSYS</a> |
|
422 </li> |
|
423 <li> |
|
424 Install |
|
425 <a href="#vs2010">Visual Studio 2010</a> |
|
426 </li> |
|
427 <li> |
|
428 Install the |
|
429 <a href="#dxsdk">Microsoft DirectX SDK</a> |
|
430 </li> |
|
431 </ul> |
|
432 </td> |
|
433 <td> |
|
434 Install |
|
435 <a href="https://developer.apple.com/xcode/">XCode 4.5.2</a> |
|
436 and also install the "Command line tools" found under the |
|
437 preferences pane "Downloads" |
|
438 </td> |
|
439 </tr> |
|
440 </tbody> |
|
441 </table> |
|
442 |
|
443 <h4><a name="linux">Linux</a></h4> |
|
444 <blockquote> |
|
445 With Linux, try and favor the system packages over |
|
446 building your own |
|
447 or getting packages from other areas. |
|
448 Most Linux builds should be possible with the system's |
|
449 available packages. |
|
450 <br> |
|
451 Note that some Linux systems have a habit of pre-populating |
|
452 your environment variables for you, for example <code>JAVA_HOME</code> |
|
453 might get pre-defined for you to refer to the JDK installed on |
|
454 your Linux system. |
|
455 You will need to unset <code>JAVA_HOME</code>. |
|
456 It's a good idea to run <code>env</code> and verify the |
|
457 environment variables you are getting from the default system |
|
458 settings make sense for building the OpenJDK. |
|
459 |
|
460 </blockquote> |
|
461 |
|
462 <h4><a name="solaris">Solaris</a></h4> |
|
463 <blockquote> |
|
464 <h5><a name="studio">Studio Compilers</a></h5> |
|
465 <blockquote> |
|
466 At a minimum, the |
|
467 <a href="http://www.oracle.com/technetwork/server-storage/solarisstudio/downloads/index.htm" target="_blank"> |
|
468 Studio 12 Update 1 Compilers</a> |
|
469 (containing version 5.10 of the C and C++ compilers) is required, |
|
470 including specific patches. |
|
471 <p> |
|
472 The Solaris SPARC patch list is: |
|
473 <ul> |
|
474 <li> |
|
475 118683-05: SunOS 5.10: Patch for profiling libraries and assembler |
|
476 </li> |
|
477 <li> |
|
478 119963-21: SunOS 5.10: Shared library patch for C++ |
|
479 </li> |
|
480 <li> |
|
481 120753-08: SunOS 5.10: Microtasking libraries (libmtsk) patch |
|
482 </li> |
|
483 <li> |
|
484 128228-09: Sun Studio 12 Update 1: Patch for Sun C++ Compiler |
|
485 </li> |
|
486 <li> |
|
487 141860-03: Sun Studio 12 Update 1: Patch for Compiler Common patch for Sun C C++ F77 F95 |
|
488 </li> |
|
489 <li> |
|
490 141861-05: Sun Studio 12 Update 1: Patch for Sun C Compiler |
|
491 </li> |
|
492 <li> |
|
493 142371-01: Sun Studio 12.1 Update 1: Patch for dbx |
|
494 </li> |
|
495 <li> |
|
496 143384-02: Sun Studio 12 Update 1: Patch for debuginfo handling |
|
497 </li> |
|
498 <li> |
|
499 143385-02: Sun Studio 12 Update 1: Patch for Compiler Common patch for Sun C C++ F77 F95 |
|
500 </li> |
|
501 <li> |
|
502 142369-01: Sun Studio 12.1: Patch for Performance Analyzer Tools |
|
503 </li> |
|
504 </ul> |
|
505 <p> |
|
506 The Solaris X86 patch list is: |
|
507 <ul> |
|
508 <li> |
|
509 119961-07: SunOS 5.10_x86, x64, Patch for profiling libraries and assembler |
|
510 </li> |
|
511 <li> |
|
512 119964-21: SunOS 5.10_x86: Shared library patch for C++_x86 |
|
513 </li> |
|
514 <li> |
|
515 120754-08: SunOS 5.10_x86: Microtasking libraries (libmtsk) patch |
|
516 </li> |
|
517 <li> |
|
518 141858-06: Sun Studio 12 Update 1_x86: Sun Compiler Common patch for x86 backend |
|
519 </li> |
|
520 <li> |
|
521 128229-09: Sun Studio 12 Update 1_x86: Patch for C++ Compiler |
|
522 </li> |
|
523 <li> |
|
524 142363-05: Sun Studio 12 Update 1_x86: Patch for C Compiler |
|
525 </li> |
|
526 <li> |
|
527 142368-01: Sun Studio 12.1_x86: Patch for Performance Analyzer Tools |
|
528 </li> |
|
529 </ul> |
|
530 <p> |
|
531 Place the <code>bin</code> directory in <code>PATH</code>. |
|
532 <p> |
|
533 The Oracle Solaris Studio Express compilers at: |
|
534 <a href="http://www.oracle.com/technetwork/server-storage/solarisstudio/downloads/index-jsp-142582.html" target="_blank"> |
|
535 Oracle Solaris Studio Express Download site</a> |
|
536 are also an option, although these compilers have not |
|
537 been extensively used yet. |
|
538 </blockquote> |
|
539 |
|
540 </blockquote> <!-- Solaris --> |
|
541 |
|
542 <h4><a name="windows">Windows</a></h4> |
|
543 <blockquote> |
|
544 |
|
545 <h5><a name="toolkit">Windows Unix Toolkit</a></h5> |
|
546 <blockquote> |
|
547 Building on Windows requires a Unix-like environment, notably a |
|
548 Unix-like shell. |
|
549 There are several such environments available of which |
|
550 <a href="http://www.cygwin.com/">Cygwin</a> and |
|
551 <a href="http://www.mingw.org/wiki/MSYS">MinGW/MSYS</a> are |
|
552 currently supported for |
|
553 the OpenJDK build. One of the differences of these |
|
554 systems from standard Windows tools is the way |
|
555 they handle Windows path names, particularly path names which contain |
|
556 spaces, backslashes as path separators and possibly drive letters. |
|
557 Depending |
|
558 on the use case and the specifics of each environment these path |
|
559 problems can |
|
560 be solved by a combination of quoting whole paths, translating |
|
561 backslashes to |
|
562 forward slashes, escaping backslashes with additional backslashes and |
|
563 translating the path names to their |
|
564 <a href="http://en.wikipedia.org/wiki/8.3_filename"> |
|
565 "8.3" version</a>. |
|
566 |
|
567 <h6><a name="cygwin">CYGWIN</a></h6> |
|
568 <blockquote> |
|
569 CYGWIN is an open source, Linux-like environment which tries to emulate |
|
570 a complete POSIX layer on Windows. It tries to be smart about path names |
|
571 and can usually handle all kinds of paths if they are correctly quoted |
|
572 or escaped although internally it maps drive letters <code><drive>:</code> |
|
573 to a virtual directory <code>/cygdrive/<drive></code>. |
|
574 <p> |
|
575 You can always use the <code>cygpath</code> utility to map pathnames with spaces |
|
576 or the backslash character into the <code>C:/</code> style of pathname |
|
577 (called 'mixed'), e.g. <code>cygpath -s -m "<i>path</i>"</code>. |
|
578 </p> |
|
579 <p> |
|
580 Note that the use of CYGWIN creates a unique problem with regards to |
|
581 setting <a href="#path"><code>PATH</code></a>. Normally on Windows |
|
582 the <code>PATH</code> variable contains directories |
|
583 separated with the ";" character (Solaris and Linux use ":"). |
|
584 With CYGWIN, it uses ":", but that means that paths like "C:/path" |
|
585 cannot be placed in the CYGWIN version of <code>PATH</code> and |
|
586 instead CYGWIN uses something like <code>/cygdrive/c/path</code> |
|
587 which CYGWIN understands, but only CYGWIN understands. |
|
588 </p> |
|
589 <p> |
|
590 The OpenJDK build requires CYGWIN version 1.7.16 or newer. |
|
591 Information about CYGWIN can |
|
592 be obtained from the CYGWIN website at |
|
593 <a href="http://www.cygwin.com" target="_blank">www.cygwin.com</a>. |
|
594 </p> |
|
595 <p> |
|
596 By default CYGWIN doesn't install all the tools required for building |
|
597 the OpenJDK. |
|
598 Along with the default installation, you need to install |
|
599 the following tools. |
|
600 <blockquote> |
|
601 <table border="1"> |
|
602 <thead> |
|
603 <tr> |
|
604 <td>Binary Name</td> |
|
605 <td>Category</td> |
|
606 <td>Package</td> |
|
607 <td>Description</td> |
|
608 </tr> |
|
609 </thead> |
|
610 <tbody> |
|
611 <tr> |
|
612 <td>ar.exe</td> |
|
613 <td>Devel</td> |
|
614 <td>binutils</td> |
|
615 <td> |
|
616 The GNU assembler, linker and binary utilities |
|
617 </td> |
|
618 </tr> |
|
619 <tr> |
|
620 <td>make.exe</td> |
|
621 <td>Devel</td> |
|
622 <td>make</td> |
|
623 <td> |
|
624 The GNU version of the 'make' utility built for CYGWIN |
|
625 </td> |
|
626 </tr> |
|
627 <tr> |
|
628 <td>m4.exe</td> |
|
629 <td>Interpreters</td> |
|
630 <td>m4</td> |
|
631 <td> |
|
632 GNU implementation of the traditional Unix macro |
|
633 processor |
|
634 </td> |
|
635 </tr> |
|
636 <tr> |
|
637 <td>cpio.exe</td> |
|
638 <td>Utils</td> |
|
639 <td>cpio</td> |
|
640 <td> |
|
641 A program to manage archives of files |
|
642 </td> |
|
643 </tr> |
|
644 <tr> |
|
645 <td>gawk.exe</td> |
|
646 <td>Utils</td> |
|
647 <td>awk</td> |
|
648 <td> |
|
649 Pattern-directed scanning and processing language |
|
650 </td> |
|
651 </tr> |
|
652 <tr> |
|
653 <td>file.exe</td> |
|
654 <td>Utils</td> |
|
655 <td>file</td> |
|
656 <td> |
|
657 Determines file type using 'magic' numbers |
|
658 </td> |
|
659 </tr> |
|
660 <tr> |
|
661 <td>zip.exe</td> |
|
662 <td>Archive</td> |
|
663 <td>zip</td> |
|
664 <td> |
|
665 Package and compress (archive) files |
|
666 </td> |
|
667 </tr> |
|
668 <tr> |
|
669 <td>unzip.exe</td> |
|
670 <td>Archive</td> |
|
671 <td>unzip</td> |
|
672 <td> |
|
673 Extract compressed files in a ZIP archive |
|
674 </td> |
|
675 </tr> |
|
676 <tr> |
|
677 <td>free.exe</td> |
|
678 <td>System</td> |
|
679 <td>procps</td> |
|
680 <td> |
|
681 Display amount of free and used memory in the system |
|
682 </td> |
|
683 </tr> |
|
684 </tbody> |
|
685 </table> |
|
686 </blockquote> |
|
687 Note that the CYGWIN software can conflict with other non-CYGWIN |
|
688 software on your Windows system. |
|
689 CYGWIN provides a |
|
690 <a href="http://cygwin.com/faq/faq.using.html" target="_blank">FAQ</a> for |
|
691 known issues and problems, of particular interest is the |
|
692 section on |
|
693 <a href="http://cygwin.com/faq/faq.using.html#faq.using.bloda" target="_blank"> |
|
694 BLODA (applications that interfere with CYGWIN)</a>. |
|
695 </blockquote> |
|
696 |
|
697 <h6><a name="msys">MinGW/MSYS</a></h6> |
|
698 <blockquote> |
|
699 MinGW ("Minimalist GNU for Windows") is a collection of free Windows |
|
700 specific header files and import libraries combined with GNU toolsets that |
|
701 allow one to produce native Windows programs that do not rely on any |
|
702 3rd-party C runtime DLLs. MSYS is a supplement to MinGW which allows building |
|
703 applications and programs which rely on traditional UNIX tools to |
|
704 be present. Among others this includes tools like <code>bash</code> |
|
705 and <code>make</code>. |
|
706 See <a href="http://www.mingw.org/wiki/MSYS" target="_blank">MinGW/MSYS</a> |
|
707 for more information. |
|
708 <p> |
|
709 Like Cygwin, MinGW/MSYS can handle different types of path formats. They |
|
710 are internally converted to paths with forward slashes and drive letters |
|
711 <code><drive>:</code> replaced by a virtual |
|
712 directory <code>/<drive></code>. Additionally, MSYS automatically |
|
713 detects binaries compiled for the MSYS environment and feeds them with the |
|
714 internal, Unix-style path names. If native Windows applications are called |
|
715 from within MSYS programs their path arguments are automatically converted |
|
716 back to Windows style path names with drive letters and backslashes as |
|
717 path separators. This may cause problems for Windows applications which |
|
718 use forward slashes as parameter separator (e.g. <code>cl /nologo /I</code>) |
|
719 because MSYS may wrongly <a href="http://mingw.org/wiki/Posix_path_conversion"> |
|
720 replace such parameters by drive letters</a>. |
|
721 </p> |
|
722 <p> |
|
723 In addition to the tools which will be installed |
|
724 by default, you have |
|
725 to manually install the |
|
726 <code>msys-zip</code> and |
|
727 <code>msys-unzip</code> packages. |
|
728 This can be easily done with the MinGW command line installer: |
|
729 <blockquote> |
|
730 <code>mingw-get.exe install msys-zip</code> |
|
731 <br> |
|
732 <code>mingw-get.exe install msys-unzip</code> |
|
733 </blockquote> |
|
734 </blockquote> |
|
735 |
|
736 </blockquote> |
|
737 |
|
738 <h5><a name="vs2010">Visual Studio 2010 Compilers</a></h5> |
|
739 <blockquote> |
|
740 <p> |
|
741 The 32-bit and 64-bit OpenJDK Windows build requires |
|
742 Microsoft Visual Studio C++ 2010 (VS2010) Professional |
|
743 Edition or Express compiler. |
|
744 The compiler and other tools are expected to reside |
|
745 in the location defined by the variable |
|
746 <code>VS100COMNTOOLS</code> which |
|
747 is set by the Microsoft Visual Studio installer. |
|
748 </p> |
|
749 <p> |
|
750 Only the C++ part of VS2010 is needed. |
|
751 Try to let the installation go to the default |
|
752 install directory. |
|
753 Always reboot your system after installing VS2010. |
|
754 The system environment variable VS100COMNTOOLS |
|
755 should be |
|
756 set in your environment. |
|
757 </p> |
|
758 <p> |
|
759 Make sure that TMP and TEMP are also set |
|
760 in the environment |
|
761 and refer to Windows paths that exist, |
|
762 like <code>C:\temp</code>, |
|
763 not <code>/tmp</code>, not <code>/cygdrive/c/temp</code>, |
|
764 and not <code>C:/temp</code>. |
|
765 <code>C:\temp</code> is just an example, |
|
766 it is assumed that this area is |
|
767 private to the user, so by default |
|
768 after installs you should |
|
769 see a unique user path in these variables. |
|
770 </p> |
|
771 </blockquote> |
|
772 |
|
773 |
|
774 </blockquote> <!-- Windows --> |
|
775 |
|
776 <h4><a name="macosx">Mac OS X</a></h4> |
|
777 <blockquote> |
|
778 Make sure you get the right XCode version. |
|
779 </blockquote> <!-- Mac OS X --> |
|
780 |
299 </blockquote> |
781 </blockquote> |
300 <h4>Fedora 11</h4> |
782 |
301 <p> |
783 <!-- ====================================================== --> |
|
784 <hr> |
|
785 <h3><a name="configure">Configure</a></h3> |
302 <blockquote> |
786 <blockquote> |
303 After installing <a href="http://fedoraproject.org">Fedora</a> 11 |
787 The basic invocation of the <code>configure</code> script |
304 you need to install several build dependencies. The simplest |
788 looks like: |
305 way to do it is to execute the following commands as user |
789 <blockquote> |
306 <tt>root</tt>: |
790 <b><code>bash ./configure [<i>options</i>]</code></b> |
307 <p/> |
791 </blockquote> |
308 <code>yum-builddep java-1.6.0-openjdk</code> |
792 This will create an output directory containing the |
309 <p/> |
793 "configuration" and setup an area for the build result. |
310 <code>yum install gcc gcc-c++</code> |
794 This directory typically looks like: |
311 <p/> |
795 <blockquote> |
312 In addition, it's necessary to set a few environment variables for the build: |
796 <b><code>build/linux-x64-normal-server-release</code></b> |
313 |
797 </blockquote> |
314 <p/> |
798 <code>configure</code> will try to figure out what system you are running on |
315 <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk</code> |
799 and where all necessary build components are. |
|
800 If you have all prerequisites for building installed, |
|
801 it should find everything. |
|
802 If it fails to detect any component automatically, |
|
803 it will exit and inform you about the problem. |
|
804 When this happens, read more below in |
|
805 <a href="#configureoptions">the <code>configure</code> options</a>. |
|
806 <p> |
|
807 Some examples: |
|
808 </p> |
|
809 <table border="1"> |
|
810 <thead> |
|
811 <tr> |
|
812 <th>Description</th> |
|
813 <th>Configure Command Line</th> |
|
814 </tr> |
|
815 </thead> |
|
816 <tbody> |
|
817 <tr> |
|
818 <td>Windows 32bit build with freetype specified</td> |
|
819 <td> |
|
820 <code>bash ./configure --with-freetype=/cygdrive/c/freetype-i586 --with-target-bits=32</code> |
|
821 </td> |
|
822 </tr> |
|
823 <tr> |
|
824 <td>Debug 64bit Build</td> |
|
825 <td> |
|
826 <code>bash ./configure --enable-debug --with-target-bits=64</code> |
|
827 </td> |
|
828 </tr> |
|
829 </tbody> |
|
830 </table> |
|
831 |
|
832 <!-- ====================================================== --> |
|
833 <h4><a name="configureoptions">Configure Options</a></h4> |
|
834 <blockquote> |
|
835 Complete details on all the OpenJDK <code>configure</code> options can |
|
836 be seen with: |
|
837 <blockquote> |
|
838 <b><code>bash ./configure --help=short</code></b> |
|
839 </blockquote> |
|
840 Use <code>-help</code> to see all the <code>configure</code> options |
|
841 available. |
|
842 |
|
843 You can generate any number of different configurations, |
|
844 e.g. debug, release, 32, 64, etc. |
|
845 |
|
846 Some of the more commonly used <code>configure</code> options are: |
|
847 |
|
848 <table border="1"> |
|
849 <thead> |
|
850 <tr> |
|
851 <th width="300">OpenJDK Configure Option</th> |
|
852 <th>Description</th> |
|
853 </tr> |
|
854 </thead> |
|
855 <tbody> |
|
856 <tr> |
|
857 <td><b><code>--enable-debug</code></b></td> |
|
858 <td> |
|
859 set the debug level to fastdebug (this is a shorthand for |
|
860 <code>--with-debug-level=fastdebug</code>) |
|
861 </td> |
|
862 </tr> |
|
863 <tr> |
|
864 <td><b><code>--with-alsa=</code></b><i>path</i></td> |
|
865 <td> |
|
866 select the location of the |
|
867 <a name="alsa">Advanced Linux Sound Architecture (ALSA)</a> |
|
868 <br> |
|
869 Version 0.9.1 or newer of the ALSA files are |
|
870 required for building the OpenJDK on Linux. |
|
871 These Linux files are usually available from an "alsa" |
|
872 of "libasound" |
|
873 development package, |
|
874 and it's highly recommended that you try and use |
|
875 the package provided by the particular version of Linux that |
|
876 you are using. |
|
877 </td> |
|
878 </tr> |
|
879 <tr> |
|
880 <td><b><code>--with-boot-jdk=</code></b><i>path</i></td> |
|
881 <td> |
|
882 select the <a href="#bootjdk">Bootstrap JDK</a> |
|
883 </td> |
|
884 </tr> |
|
885 <tr> |
|
886 <td><b><code>--with-boot-jdk-jvmargs=</code></b>"<i>args</i>"</td> |
|
887 <td> |
|
888 provide the JVM options to be used to run the |
|
889 <a href="#bootjdk">Bootstrap JDK</a> |
|
890 </td> |
|
891 </tr> |
|
892 <tr> |
|
893 <td><b><code>--with-cacerts=</code></b><i>path</i></td> |
|
894 <td> |
|
895 select the path to the cacerts file. |
|
896 <br> |
|
897 See <a href="http://en.wikipedia.org/wiki/Certificate_Authority" target="_blank"> |
|
898 http://en.wikipedia.org/wiki/Certificate_Authority</a> |
|
899 for a better understanding of the Certificate Authority (CA). |
|
900 A certificates file named "cacerts" |
|
901 represents a system-wide keystore with CA certificates. |
|
902 In JDK and JRE |
|
903 binary bundles, the "cacerts" file contains root CA certificates from |
|
904 several public CAs (e.g., VeriSign, Thawte, and Baltimore). |
|
905 The source contain a cacerts file |
|
906 without CA root certificates. |
|
907 Formal JDK builders will need to secure |
|
908 permission from each public CA and include the certificates into their |
|
909 own custom cacerts file. |
|
910 Failure to provide a populated cacerts file |
|
911 will result in verification errors of a certificate chain during runtime. |
|
912 By default an empty cacerts file is provided and that should be |
|
913 fine for most JDK developers. |
|
914 </td> |
|
915 </tr> |
|
916 <tr> |
|
917 <td><b><code>--with-cups=</code></b><i>path</i></td> |
|
918 <td> |
|
919 select the CUPS install location |
|
920 <br> |
|
921 The |
|
922 <a name="cups">Common UNIX Printing System (CUPS) Headers</a> |
|
923 are required for building the |
|
924 OpenJDK on Solaris and Linux. |
|
925 The Solaris header files can be obtained by installing |
|
926 the package <strong>SFWcups</strong> from the Solaris Software |
|
927 Companion CD/DVD, these often will be installed into the |
|
928 directory <code>/opt/sfw/cups</code>. |
|
929 <br> |
|
930 The CUPS header files can always be downloaded from |
|
931 <a href="http://www.cups.org" target="_blank">www.cups.org</a>. |
|
932 </td> |
|
933 </tr> |
|
934 <tr> |
|
935 <td><b><code>--with-cups-include=</code></b><i>path</i></td> |
|
936 <td> |
|
937 select the CUPS include directory location |
|
938 </td> |
|
939 </tr> |
|
940 <tr> |
|
941 <td><b><code>--with-debug-level=</code></b><i>level</i></td> |
|
942 <td> |
|
943 select the debug information level of release, |
|
944 fastdebug, or slowdebug |
|
945 </td> |
|
946 </tr> |
|
947 <tr> |
|
948 <td><b><code>--with-dev-kit=</code></b><i>path</i></td> |
|
949 <td> |
|
950 select location of the compiler install or |
|
951 developer install location |
|
952 </td> |
|
953 </tr> |
|
954 <tr> |
|
955 <td><b><code>--with-dxsdk=</code></b><i>path</i></td> |
|
956 <td> |
|
957 select location of the Windows Direct X SDK install |
|
958 <br> |
|
959 The <a name="dxsdk">Microsoft DirectX 9.0 SDK</a> |
|
960 header files and libraries |
|
961 from the Summer 2004 edition |
|
962 are required for building OpenJDK. |
|
963 This SDK can be downloaded from |
|
964 <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=FD044A42-9912-42A3-9A9E-D857199F888E&displaylang=en" target="_blank"> |
|
965 Microsoft DirectX 9.0 SDK (Summer 2004)</a>. |
|
966 If the link above becomes obsolete, the SDK can be found from |
|
967 <a href="http://download.microsoft.com" target="_blank">the Microsoft Download Site</a> |
|
968 (search with "DirectX 9.0 SDK Update Summer 2004"). |
|
969 Installation usually will set the environment variable |
|
970 <code>DXSDK_DIR</code> to it's install location. |
|
971 </td> |
|
972 </tr> |
|
973 <tr> |
|
974 <td><b><code>--with-freetype=</code></b><i>path</i></td> |
|
975 <td> |
|
976 select the freetype files to use. |
|
977 <br> |
|
978 Expecting the |
|
979 <a name="freetype">freetype</a> libraries under |
|
980 <code>lib/</code> and the |
|
981 headers under <code>include/</code>. |
|
982 <br> |
|
983 Version 2.3 or newer of FreeType is required. |
|
984 On Unix systems required files can be available as part of your |
|
985 distribution (while you still may need to upgrade them). |
|
986 Note that you need development version of package that |
|
987 includes both the FreeType library and header files. |
|
988 <br> |
|
989 You can always download latest FreeType version from the |
|
990 <a href="http://www.freetype.org" target="_blank">FreeType website</a>. |
|
991 <br> |
|
992 Building the freetype 2 libraries from scratch is also possible, |
|
993 however on Windows refer to the |
|
994 <a href="http://freetype.freedesktop.org/wiki/FreeType_DLL"> |
|
995 Windows FreeType DLL build instructions</a>. |
|
996 <br> |
|
997 Note that by default FreeType is built with byte code hinting |
|
998 support disabled due to licensing restrictions. |
|
999 In this case, text appearance and metrics are expected to |
|
1000 differ from Sun's official JDK build. |
|
1001 See |
|
1002 <a href="http://freetype.sourceforge.net/freetype2/index.html"> |
|
1003 the SourceForge FreeType2 Home Page |
|
1004 </a> |
|
1005 for more information. |
|
1006 </td> |
|
1007 </tr> |
|
1008 <tr> |
|
1009 <td><b><code>--with-import-hotspot=</code></b><i>path</i></td> |
|
1010 <td> |
|
1011 select the location to find hotspot |
|
1012 binaries from a previous build to avoid building |
|
1013 hotspot |
|
1014 </td> |
|
1015 </tr> |
|
1016 <tr> |
|
1017 <td><b><code>--with-target-bits=</code></b><i>arg</i></td> |
|
1018 <td> |
|
1019 select 32 or 64 bit build |
|
1020 </td> |
|
1021 </tr> |
|
1022 <tr> |
|
1023 <td><b><code>--with-jvm-variants=</code></b><i>variants</i></td> |
|
1024 <td> |
|
1025 select the JVM variants to build from, comma |
|
1026 separated list that can include: |
|
1027 server, client, kernel, zero and zeroshark |
|
1028 </td> |
|
1029 </tr> |
|
1030 <tr> |
|
1031 <td><b><code>--with-memory-size=</code></b><i>size</i></td> |
|
1032 <td> |
|
1033 select the RAM size that GNU make will think |
|
1034 this system has |
|
1035 </td> |
|
1036 </tr> |
|
1037 <tr> |
|
1038 <td><a name="msvcrNN"><b><code>--with-msvcr-dll=</code></b><i>path</i></a></td> |
|
1039 <td> |
|
1040 select the <code>msvcr100.dll</code> |
|
1041 file to include in the |
|
1042 Windows builds (C/C++ runtime library for |
|
1043 Visual Studio). |
|
1044 <br> |
|
1045 This is usually picked up automatically |
|
1046 from the redist |
|
1047 directories of Visual Studio 2010. |
|
1048 </td> |
|
1049 </tr> |
|
1050 <tr> |
|
1051 <td><b><code>--with-num-cores=</code></b><i>cores</i></td> |
|
1052 <td> |
|
1053 select the number of cores to use (processor |
|
1054 count or CPU count) |
|
1055 </td> |
|
1056 </tr> |
|
1057 <tr> |
|
1058 <td><b><code>--with-x=</code></b><i>path</i></td> |
|
1059 <td> |
|
1060 select the location of the X11 and xrender files. |
|
1061 <br> |
|
1062 The |
|
1063 <a name="xrender">XRender Extension Headers</a> |
|
1064 are required for building the |
|
1065 OpenJDK on Solaris and Linux. |
|
1066 <br> |
|
1067 The Linux header files are usually available from a "Xrender" |
|
1068 development package, it's recommended that you try and use |
|
1069 the package provided by the particular distribution of Linux that |
|
1070 you are using. |
|
1071 <br> |
|
1072 The Solaris XRender header files is |
|
1073 included with the other X11 header files |
|
1074 in the package <strong>SFWxwinc</strong> |
|
1075 on new enough versions of |
|
1076 Solaris and will be installed in |
|
1077 <code>/usr/X11/include/X11/extensions/Xrender.h</code> or |
|
1078 <code>/usr/openwin/share/include/X11/extensions/Xrender.h</code> |
|
1079 </td> |
|
1080 </tr> |
|
1081 </tbody> |
|
1082 </table> |
|
1083 </blockquote> |
|
1084 |
|
1085 </blockquote> |
|
1086 |
|
1087 <!-- ====================================================== --> |
|
1088 <hr> |
|
1089 <h3><a name="make">Make</a></h3> |
|
1090 <blockquote> |
|
1091 The basic invocation of the <code>make</code> utility |
|
1092 looks like: |
|
1093 <blockquote> |
|
1094 <b><code>make all</code></b> |
|
1095 </blockquote> |
|
1096 This will start the build to the output directory containing the |
|
1097 "configuration" that was created by the <code>configure</code> |
|
1098 script. Run <code>make help</code> for more information on |
|
1099 the available targets. |
|
1100 <br> |
|
1101 There are some of the make targets that |
|
1102 are of general interest: |
|
1103 <table border="1"> |
|
1104 <thead> |
|
1105 <tr> |
|
1106 <th>Make Target</th> |
|
1107 <th>Description</th> |
|
1108 </tr> |
|
1109 </thead> |
|
1110 <tbody> |
|
1111 <tr> |
|
1112 <td><i>empty</i></td> |
|
1113 <td>build everything but no images</td> |
|
1114 </tr> |
|
1115 <tr> |
|
1116 <td><b><code>all</code></b></td> |
|
1117 <td>build everything including images</td> |
|
1118 </tr> |
|
1119 <tr> |
|
1120 <td><b><code>all-conf</code></b></td> |
|
1121 <td>build all configurations</td> |
|
1122 </tr> |
|
1123 <tr> |
|
1124 <td><b><code>images</code></b></td> |
|
1125 <td>create complete j2sdk and j2re images</td> |
|
1126 </tr> |
|
1127 <tr> |
|
1128 <td><b><code>install</code></b></td> |
|
1129 <td>install the generated images locally, |
|
1130 typically in <code>/usr/local</code></td> |
|
1131 </tr> |
|
1132 <tr> |
|
1133 <td><b><code>clean</code></b></td> |
|
1134 <td>remove all files generated by make, |
|
1135 but not those generated by <code>configure</code></td> |
|
1136 </tr> |
|
1137 <tr> |
|
1138 <td><b><code>dist-clean</code></b></td> |
|
1139 <td>remove all files generated by both |
|
1140 and <code>configure</code> (basically killing the configuration)</td> |
|
1141 </tr> |
|
1142 <tr> |
|
1143 <td><b><code>help</code></b></td> |
|
1144 <td>give some help on using <code>make</code>, |
|
1145 including some interesting make targets</td> |
|
1146 </tr> |
|
1147 </tbody> |
|
1148 </table> |
316 </blockquote> |
1149 </blockquote> |
317 </blockquote> |
1150 </blockquote> |
318 <!-- ------------------------------------------------------ --> |
1151 |
319 <h3><a name="centos">CentOS 5.5</a></h3> |
1152 <!-- ====================================================== --> |
|
1153 <hr> |
|
1154 <h2><a name="testing">Testing</a></h2> |
320 <blockquote> |
1155 <blockquote> |
321 After installing |
1156 When the build is completed, you should see the generated |
322 <a href="http://www.centos.org/">CentOS 5.5</a> |
1157 binaries and associated files in the <code>j2sdk-image</code> |
323 you need to make sure you have |
1158 directory in the output directory. |
324 the following Development bundles installed: |
1159 In particular, the |
|
1160 <code>build/<i>*</i>/images/j2sdk-image/bin</code> |
|
1161 directory should contain executables for the |
|
1162 OpenJDK tools and utilities for that configuration. |
|
1163 The testing tool <code>jtreg</code> will be needed |
|
1164 and can be found at: |
|
1165 <a href="http://openjdk.java.net/jtreg/" target="_blank"> |
|
1166 the jtreg site</a>. |
|
1167 The provided regression tests in the repositories |
|
1168 can be run with the command: |
325 <blockquote> |
1169 <blockquote> |
326 <ul> |
1170 <code><b>cd test && make PRODUCT_HOME=`pwd`/../build/*/images/j2sdk-image all</b></code> |
327 <li>Development Libraries</li> |
|
328 <li>Development Tools</li> |
|
329 <li>Java Development</li> |
|
330 <li>X Software Development (Including XFree86-devel)</li> |
|
331 </ul> |
|
332 </blockquote> |
|
333 <p> |
|
334 Plus the following packages: |
|
335 <blockquote> |
|
336 <ul> |
|
337 <li>cups devel: Cups Development Package</li> |
|
338 <li>alsa devel: Alsa Development Package</li> |
|
339 <li>ant: Ant Package</li> |
|
340 <li>Xi devel: libXi.so Development Package</li> |
|
341 </ul> |
|
342 </blockquote> |
|
343 <p> |
|
344 The freetype 2.3 packages don't seem to be available, |
|
345 but the freetype 2.3 sources can be downloaded, built, |
|
346 and installed easily enough from |
|
347 <a href="http://downloads.sourceforge.net/freetype"> |
|
348 the freetype site</a>. |
|
349 Build and install with something like: |
|
350 <blockquote> |
|
351 <tt>./configure && make && sudo -u root make install</tt> |
|
352 </blockquote> |
|
353 <p> |
|
354 Mercurial packages could not be found easily, but a Google |
|
355 search should find ones, and they usually include Python if |
|
356 it's needed. |
|
357 </blockquote> |
|
358 <!-- ------------------------------------------------------ --> |
|
359 <h3><a name="debian">Debian</a></h3> |
|
360 <blockquote> |
|
361 <h4>Debian 5.0 (Lenny)</h4> |
|
362 <p> |
|
363 <blockquote> |
|
364 After installing <a href="http://debian.org">Debian</a> 5 |
|
365 you need to install several build dependencies. |
|
366 The simplest way to install the build dependencies is to |
|
367 execute the following commands as user <tt>root</tt>: |
|
368 <p/> |
|
369 <code>aptitude build-dep openjdk-6</code> |
|
370 <p/> |
|
371 <code>aptitude install openjdk-6-jdk libmotif-dev</code> |
|
372 <p/> |
|
373 In addition, it's necessary to set a few environment variables for the build: |
|
374 <p/> |
|
375 <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code> |
|
376 </blockquote> |
1171 </blockquote> |
377 </blockquote> |
1172 </blockquote> |
|
1173 |
378 <!-- ====================================================== --> |
1174 <!-- ====================================================== --> |
379 <h3><a name="ubuntu">Ubuntu</a></h3> |
1175 <!-- ====================================================== --> |
|
1176 <!-- ====================================================== --> |
|
1177 <!-- ====================================================== --> |
|
1178 <!-- ====================================================== --> |
|
1179 <!-- ====================================================== --> |
|
1180 <!-- ====================================================== --> |
|
1181 <!-- ====================================================== --> |
|
1182 <!-- ====================================================== --> |
|
1183 |
|
1184 <!-- ====================================================== --> |
|
1185 <hr> |
|
1186 <h2><a name="hints">Appendix A: Hints and Tips</a></h2> |
380 <blockquote> |
1187 <blockquote> |
381 <h4>Ubuntu 8.04</h4> |
1188 |
382 <p> |
1189 <h3><a name="faq">FAQ</a></h3> |
383 <blockquote> |
1190 <blockquote> |
384 After installing <a href="http://ubuntu.org">Ubuntu</a> 8.04 |
1191 |
385 you need to install several build dependencies. |
|
386 <p/> |
|
387 First, you need to enable the universe repository in the |
|
388 Software Sources application and reload the repository |
|
389 information. The Software Sources application is available |
|
390 under the System/Administration menu. |
|
391 <p/> |
|
392 The simplest way to install the build dependencies is to |
|
393 execute the following commands: |
|
394 <p/> |
|
395 <code>sudo aptitude build-dep openjdk-6</code> |
|
396 <p/> |
|
397 <code>sudo aptitude install openjdk-6-jdk</code> |
|
398 <p/> |
|
399 In addition, it's necessary to set a few environment variables for the build: |
|
400 <p/> |
|
401 <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code> |
|
402 </blockquote> |
|
403 <h4>Ubuntu 8.10</h4> |
|
404 <p> |
|
405 <blockquote> |
|
406 After installing <a href="http://ubuntu.org">Ubuntu</a> 8.10 |
|
407 you need to install several build dependencies. The simplest |
|
408 way to do it is to execute the following commands: |
|
409 <p/> |
|
410 <code>sudo aptitude build-dep openjdk-6</code> |
|
411 <p/> |
|
412 <code>sudo aptitude install openjdk-6-jdk</code> |
|
413 <p/> |
|
414 In addition, it's necessary to set a few environment variables for the build: |
|
415 <p/> |
|
416 <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code> |
|
417 </blockquote> |
|
418 <h4>Ubuntu 9.04</h4> |
|
419 <p> |
|
420 <blockquote> |
|
421 After installing <a href="http://ubuntu.org">Ubuntu</a> 9.04 |
|
422 you need to install several build dependencies. The simplest |
|
423 way to do it is to execute the following commands: |
|
424 <p/> |
|
425 <code>sudo aptitude build-dep openjdk-6</code> |
|
426 <p/> |
|
427 <code>sudo aptitude install openjdk-6-jdk</code> |
|
428 <p/> |
|
429 In addition, it's necessary to set a few environment variables for the build: |
|
430 <p/> |
|
431 <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code> |
|
432 </blockquote> |
|
433 </blockquote> |
|
434 <!-- ====================================================== --> |
|
435 <h3><a name="opensuse">OpenSUSE</a></h3> |
|
436 <blockquote> |
|
437 <h4>OpenSUSE 11.1</h4> |
|
438 <p> |
|
439 <blockquote> |
|
440 After installing <a href="http://opensuse.org">OpenSUSE</a> 11.1 |
|
441 you need to install several build dependencies. |
|
442 The simplest way to install the build dependencies is to |
|
443 execute the following commands: |
|
444 <p/> |
|
445 <code>sudo zypper source-install -d java-1_6_0-openjdk</code> |
|
446 <p/> |
|
447 <code>sudo zypper install make</code> |
|
448 <p/> |
|
449 In addition, it is necessary to set a few environment variables for the build: |
|
450 <p/> |
|
451 <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-1.6.0-openjdk</code> |
|
452 <p/> |
|
453 Finally, you need to unset the <code>JAVA_HOME</code> environment variable: |
|
454 <p/> |
|
455 <code>export -n JAVA_HOME</code> |
|
456 </blockquote> |
|
457 </blockquote> |
|
458 <!-- ====================================================== --> |
|
459 <h3><a name="mandriva">Mandriva</a></h3> |
|
460 <blockquote> |
|
461 <h4>Mandriva Linux One 2009 Spring</h4> |
|
462 <p> |
|
463 <blockquote> |
|
464 After installing <a href="http://mandriva.org">Mandriva</a> Linux One 2009 Spring |
|
465 you need to install several build dependencies. |
|
466 The simplest way to install the build dependencies is to |
|
467 execute the following commands as user <tt>root</tt>: |
|
468 <p/> |
|
469 <code>urpmi java-1.6.0-openjdk-devel ant make gcc gcc-c++ freetype-devel zip unzip libcups2-devel libxrender1-devel libalsa2-devel libstc++-static-devel libxtst6-devel libxi-devel</code> |
|
470 <p/> |
|
471 In addition, it is necessary to set a few environment variables for the build: |
|
472 <p/> |
|
473 <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-1.6.0-openjdk</code> |
|
474 </blockquote> |
|
475 </blockquote> |
|
476 <!-- ====================================================== --> |
|
477 <h3><a name="opensolaris">OpenSolaris</a></h3> |
|
478 <blockquote> |
|
479 <h4>OpenSolaris 2009.06</h4> |
|
480 <p> |
|
481 <blockquote> |
|
482 After installing <a href="http://opensolaris.org">OpenSolaris</a> 2009.06 |
|
483 you need to install several build dependencies. |
|
484 The simplest way to install the build dependencies is to |
|
485 execute the following commands: |
|
486 <p/> |
|
487 <code>pfexec pkg install SUNWgmake SUNWj6dev SUNWant sunstudioexpress SUNWcups SUNWzip SUNWunzip SUNWxwhl SUNWxorg-headers SUNWaudh SUNWfreetype2</code> |
|
488 <p/> |
|
489 In addition, it is necessary to set a few environment variables for the build: |
|
490 <p/> |
|
491 <code>export LANG=C ALT_COMPILER_PATH=/opt/SunStudioExpress/bin/ ALT_CUPS_HEADERS_PATH=/usr/include/</code> |
|
492 <p/> |
|
493 Finally, you need to make sure that the build process can find the Sun Studio compilers: |
|
494 <p/> |
|
495 <code>export PATH=$PATH:/opt/SunStudioExpress/bin/</code> |
|
496 </blockquote> |
|
497 </blockquote> |
|
498 <!-- ------------------------------------------------------ --> |
|
499 <hr> |
|
500 <h2><a name="directories">Source Directory Structure</a></h2> |
|
501 <blockquote> |
|
502 <p> |
|
503 The source code for the OpenJDK is delivered in a set of |
|
504 directories: |
|
505 <tt>hotspot</tt>, |
|
506 <tt>langtools</tt>, |
|
507 <tt>corba</tt>, |
|
508 <tt>jaxws</tt>, |
|
509 <tt>jaxp</tt>, |
|
510 and |
|
511 <tt>jdk</tt>. |
|
512 The <tt>hotspot</tt> directory contains the source code and make |
|
513 files for building the OpenJDK Hotspot Virtual Machine. |
|
514 The <tt>langtools</tt> directory contains the source code and make |
|
515 files for building the OpenJDK javac and language tools. |
|
516 The <tt>corba</tt> directory contains the source code and make |
|
517 files for building the OpenJDK Corba files. |
|
518 The <tt>jaxws</tt> directory contains the source code and make |
|
519 files for building the OpenJDK JAXWS files. |
|
520 The <tt>jaxp</tt> directory contains the source code and make |
|
521 files for building the OpenJDK JAXP files. |
|
522 The <tt>jdk</tt> directory contains the source code and make files for |
|
523 building the OpenJDK runtime libraries and misc files. |
|
524 The top level <tt>Makefile</tt> |
|
525 is used to build the entire OpenJDK. |
|
526 |
|
527 <h3><a name="drops">Managing the Source Drops</a></h3> |
|
528 <blockquote> |
|
529 <p> |
1192 <p> |
530 The repositories <tt>jaxp</tt> and <tt>jaxws</tt> actually |
1193 <b>Q:</b> The <code>configure</code> file looks horrible! |
531 do not contain the sources for JAXP or JAX-WS. |
1194 How are you going to edit it? |
532 These products have their own open source procedures at their |
|
533 <a href="http://jaxp.java.net/">JAXP</a> and |
|
534 <a href="http://jax-ws.java.net/">JAX-WS</a> home pages. |
|
535 The OpenJDK project does need access to these sources to build |
|
536 a complete JDK image because JAXP and JAX-WS are part of the JDK. |
|
537 The current process for delivery of the JAXP and JAX-WS sources |
|
538 involves so called "source drop bundles" downloaded from a public |
|
539 website. |
|
540 There are many reasons for this current mechanism, and it is |
|
541 understood that this is not ideal for the open source community. |
|
542 It is possible this process could change in the future. |
|
543 <br> |
1195 <br> |
544 <b>NOTE:</b> The <a href="http://download.java.net/openjdk/jdk8/"> |
1196 <b>A:</b> The <code>configure</code> file is generated (think |
545 Complete OpenJDK Source Bundles</a> <u>will</u> contain the JAXP and |
1197 "compiled") by the autoconf tools. The source code is |
546 JAX-WS sources. |
1198 in <code>configure.ac</code> various .m4 files in common/autoconf, |
|
1199 which are |
|
1200 much more readable. |
547 </p> |
1201 </p> |
548 |
1202 |
549 <h4><a name="dropcreation">Creation of New Source Drop Bundles</a></h4> |
1203 <p> |
|
1204 <b>Q:</b> |
|
1205 Why is the <code>configure</code> file checked in, |
|
1206 if it is generated? |
|
1207 <br> |
|
1208 <b>A:</b> |
|
1209 If it was not generated, every user would need to have the autoconf |
|
1210 tools installed, and re-generate the <code>configure</code> file |
|
1211 as the first step. |
|
1212 Our goal is to minimize the work needed to be done by the user |
|
1213 to start building OpenJDK, and to minimize |
|
1214 the number of external dependencies required. |
|
1215 </p> |
|
1216 |
|
1217 <p> |
|
1218 <b>Q:</b> |
|
1219 Do you require a specific version of autoconf for regenerating |
|
1220 <code>configure</code>? |
|
1221 <br> |
|
1222 <b>A:</b> |
|
1223 Currently, no, but this will likely be the case when things have |
|
1224 settled down a bit more. (The reason for this is to avoid |
|
1225 large spurious changes in <code>configure</code> |
|
1226 in commits that made small changes to <code>configure.ac</code>). |
|
1227 </p> |
|
1228 |
|
1229 <p> |
|
1230 <b>Q:</b> |
|
1231 What are the files in <code>common/makefiles/support/*</code> for? |
|
1232 They look like gibberish. |
|
1233 <br> |
|
1234 <b>A:</b> |
|
1235 They are a somewhat ugly hack to compensate for command line length |
|
1236 limitations on certain platforms (Windows, Solaris). |
|
1237 Due to a combination of limitations in make and the shell, |
|
1238 command lines containing too many files will not work properly. |
|
1239 These |
|
1240 helper files are part of an elaborate hack that will compress the |
|
1241 command line in the makefile and then uncompress it safely. |
|
1242 We're |
|
1243 not proud of it, but it does fix the problem. |
|
1244 If you have any better suggestions, we're all ears! :-) |
|
1245 </p> |
|
1246 |
|
1247 <p> |
|
1248 <b>Q:</b> |
|
1249 I want to see the output of the commands that make runs, |
|
1250 like in the old build. How do I do that? |
|
1251 <br> |
|
1252 <b>A:</b> |
|
1253 You specify the <code>LOG</code> variable to make. There are |
|
1254 several log levels: |
|
1255 </p> |
550 <blockquote> |
1256 <blockquote> |
551 <ol> |
1257 <ul> |
552 <li> |
1258 <li> |
553 The JAXP or JAX-WS team prepares a new zip bundle, |
1259 <b><code>warn</code></b> — Default and very quiet. |
554 places a copy in a public download area on java.net, |
|
555 sends us a link and a list of CRs (Change Request Numbers). |
|
556 The older download bundles should not be deleted. |
|
557 It is the responsibility of the JAXP and JAX-WS team to |
|
558 place the proper GPL legal notices on the sources |
|
559 and do any filtering or java re-packaging for the |
|
560 OpenJDK instances of these classes. |
|
561 </li> |
1260 </li> |
562 <li> |
1261 <li> |
563 The OpenJDK team copies this new bundle into shared |
1262 <b><code>info</code></b> — Shows more progress information |
564 area (e.g. <tt>/java/devtools/share/jdk8-drops</tt>). |
1263 than warn. |
565 Older bundles are never deleted so we retain the history. |
|
566 </li> |
1264 </li> |
567 <li> |
1265 <li> |
568 The OpenJDK team edits the ant property file |
1266 <b><code>debug</code></b> — Echos all command lines and |
569 <tt>jaxp/jaxp.properties</tt> or |
1267 prints all macro calls for compilation definitions. |
570 <tt>jaxws/jaxws.properties</tt> to update the |
|
571 base URL, the zip bundle name, and the MD5 checksum |
|
572 of the zip bundle |
|
573 (on Solaris: <tt>sum -c md5 <i>bundlename</i></tt>) |
|
574 </li> |
1268 </li> |
575 <li> |
1269 <li> |
576 OpenJDK team reviews and commits those changes with the |
1270 <b><code>trace</code></b> — Echos all $(shell) command |
577 given CRs. |
1271 lines as well. |
578 </li> |
1272 </li> |
579 </ol> |
1273 </ul> |
580 </blockquote> |
1274 </blockquote> |
581 |
1275 |
582 <h4><a name="dropusage">Using Source Drop Bundles</a></h4> |
1276 <p> |
|
1277 <b>Q:</b> |
|
1278 When do I have to re-run <code>configure</code>? |
|
1279 <br> |
|
1280 <b>A:</b> |
|
1281 Normally you will run <code>configure</code> only once for creating a |
|
1282 configuration. |
|
1283 You need to re-run configuration only if you want to change any |
|
1284 configuration options, |
|
1285 or if you pull down changes to the <code>configure</code> script. |
|
1286 </p> |
|
1287 |
|
1288 <p> |
|
1289 <b>Q:</b> |
|
1290 I have added a new source file. Do I need to modify the makefiles? |
|
1291 <br> |
|
1292 <b>A:</b> |
|
1293 Normally, no. If you want to create e.g. a new native |
|
1294 library, |
|
1295 you will need to modify the makefiles. But for normal file |
|
1296 additions or removals, no changes are needed. There are certan |
|
1297 exceptions for some native libraries where the source files are spread |
|
1298 over many directories which also contain courses for other |
|
1299 libraries. In these cases it was simply easier to create include lists |
|
1300 rather thane excludes. |
|
1301 </p> |
|
1302 |
|
1303 <p> |
|
1304 <b>Q:</b> |
|
1305 When I run <code>configure --help</code>, I see many strange options, |
|
1306 like <code>--dvidir</code>. What is this? |
|
1307 <br> |
|
1308 <b>A:</b> |
|
1309 Configure provides a slew of options by default, to all projects |
|
1310 that use autoconf. Most of them are not used in OpenJDK, |
|
1311 so you can safely ignore them. To list only OpenJDK specific features, |
|
1312 use <code>configure --help=short</code> instead. |
|
1313 </p> |
|
1314 |
|
1315 <p> |
|
1316 <b>Q:</b> |
|
1317 <code>configure</code> provides OpenJDK-specific features such as |
|
1318 <code>--enable-jigsaw</code> or <code>--with-builddeps-server</code> |
|
1319 that are not described in this document. What about those? |
|
1320 <br> |
|
1321 <b>A:</b> |
|
1322 Try them out if you like! But be aware that most of these are |
|
1323 experimental features. |
|
1324 Many of them don't do anything at all at the moment; the option |
|
1325 is just a placeholder. Other depends on |
|
1326 pieces of code or infrastructure that is currently |
|
1327 not ready for prime time. |
|
1328 </p> |
|
1329 |
|
1330 <p> |
|
1331 <b>Q:</b> |
|
1332 How will you make sure you don't break anything? |
|
1333 <br> |
|
1334 <b>A:</b> |
|
1335 We have a script that compares the result of the new build system |
|
1336 with the result of the old. For most part, we aim for (and achieve) |
|
1337 byte-by-byte identical output. There are however technical issues |
|
1338 with e.g. native binaries, which might differ in a byte-by-byte |
|
1339 comparison, even |
|
1340 when building twice with the old build system. |
|
1341 For these, we compare relevant aspects |
|
1342 (e.g. the symbol table and file size). |
|
1343 Note that we still don't have 100% |
|
1344 equivalence, but we're close. |
|
1345 </p> |
|
1346 |
|
1347 <p> |
|
1348 <b>Q:</b> |
|
1349 I noticed this thing X in the build that looks very broken by design. |
|
1350 Why don't you fix it? |
|
1351 <br> |
|
1352 <b>A:</b> |
|
1353 Our goal is to produce a build output that is as close as |
|
1354 technically possible to the old build output. |
|
1355 If things were weird in the old build, |
|
1356 they will be weird in the new build. |
|
1357 Often, things were weird before due to obscurity, |
|
1358 but in the new build system the weird stuff comes up to the surface. |
|
1359 The plan is to attack these things at a later stage, |
|
1360 after the new build system is established. |
|
1361 </p> |
|
1362 |
|
1363 <p> |
|
1364 <b>Q:</b> |
|
1365 The code in the new build system is not that well-structured. |
|
1366 Will you fix this? |
|
1367 <br> |
|
1368 <b>A:</b> |
|
1369 Yes! The new build system has grown bit by bit as we converted |
|
1370 the old system. When all of the old build system is converted, |
|
1371 we can take a step back and clean up the structure of the new build |
|
1372 system. Some of this we plan to do before replacing the old build |
|
1373 system and some will need to wait until after. |
|
1374 </p> |
|
1375 |
|
1376 <p> |
|
1377 <b>Q:</b> What is @GenerateNativeHeaders? |
|
1378 <br> |
|
1379 <b>A:</b> |
|
1380 To speed up compilation, we added a flag to javac which makes it |
|
1381 do the job of javah as well, as a by-product; that is, generating |
|
1382 native .h header files. These files are only generated |
|
1383 if a class contains native methods. However, sometimes |
|
1384 a class contains no native method, |
|
1385 but still contains constants that native code needs to use. |
|
1386 The new GenerateNativeHeaders annotation tells javac to |
|
1387 force generation of a |
|
1388 header file in these cases. (We don't want to generate |
|
1389 native headers for all classes that contains constants |
|
1390 but no native methods, since |
|
1391 that would slow down the compilation process needlessly.) |
|
1392 </p> |
|
1393 |
|
1394 <p> |
|
1395 <b>Q:</b> |
|
1396 Is anything able to use the results of the new build's default make target? |
|
1397 <br> |
|
1398 <b>A:</b> |
|
1399 Yes, this is the minimal (or roughly minimal) |
|
1400 set of compiled output needed for a developer to actually |
|
1401 execute the newly built JDK. The idea is that in an incremental |
|
1402 development fashion, when doing a normal make, |
|
1403 you should only spend time recompiling what's changed |
|
1404 (making it purely incremental) and only do the work that's |
|
1405 needed to actually run and test your code. |
|
1406 The packaging stuff that is part of the <code>images</code> |
|
1407 target is not needed for a normal developer who wants to |
|
1408 test his new code. Even if it's quite fast, it's still unnecessary. |
|
1409 We're targeting sub-second incremental rebuilds! ;-) |
|
1410 (Or, well, at least single-digit seconds...) |
|
1411 </p> |
|
1412 |
|
1413 <p> |
|
1414 <b>Q:</b> |
|
1415 I usually set a specific environment variable when building, |
|
1416 but I can't find the equivalent in the new build. |
|
1417 What should I do? |
|
1418 <br> |
|
1419 <b>A:</b> |
|
1420 It might very well be that we have missed to add support for |
|
1421 an option that was actually used from outside the build system. |
|
1422 Email us and we will |
|
1423 add support for it! |
|
1424 </p> |
|
1425 |
|
1426 </blockquote> |
|
1427 |
|
1428 <h3><a name="performance">Build Performance Tips</a></h3> |
|
1429 <blockquote> |
|
1430 |
|
1431 <p>Building OpenJDK requires a lot of horsepower. |
|
1432 Some of the build tools can be adjusted to utilize more or less |
|
1433 of resources such as |
|
1434 parallel threads and memory. |
|
1435 The <code>configure</code> script analyzes your system and selects reasonable |
|
1436 values for such options based on your hardware. |
|
1437 If you encounter resource problems, such as out of memory conditions, |
|
1438 you can modify the detected values with:</p> |
|
1439 |
|
1440 <ul> |
|
1441 <li> |
|
1442 <b><code>--with-num-cores</code></b> |
|
1443 — |
|
1444 number of cores in the build system, |
|
1445 e.g. <code>--with-num-cores=8</code> |
|
1446 </li> |
|
1447 <li> |
|
1448 <b><code>--with-memory-size</code></b> |
|
1449 — memory (in MB) available in the build system, |
|
1450 e.g. <code>--with-memory-size=1024</code> |
|
1451 </li> |
|
1452 </ul> |
|
1453 |
|
1454 <p>It might also be necessary to specify the JVM arguments passed |
|
1455 to the Bootstrap JDK, using e.g. |
|
1456 <code>--with-boot-jdk-jvmargs="-Xmx8G -enableassertions"</code>. |
|
1457 Doing this will override the default JVM arguments |
|
1458 passed to the Bootstrap JDK.</p> |
|
1459 |
|
1460 |
|
1461 <p>One of the top goals of the new build system is to improve the |
|
1462 build performance and decrease the time needed to build. This will |
|
1463 soon also apply to the java compilation when the Smart Javac wrapper |
|
1464 is making its way into jdk8. It can be tried in the build-infra |
|
1465 repository already. You are likely to find that the new build system |
|
1466 is faster than the old one even without this feature.</p> |
|
1467 |
|
1468 <p>At the end of a successful execution of <code>configure</code>, |
|
1469 you will get a performance summary, |
|
1470 indicating how well the build will perform. Here you will |
|
1471 also get performance hints. |
|
1472 If you want to build fast, pay attention to those!</p> |
|
1473 |
|
1474 <h4>Building with ccache</h4> |
|
1475 |
|
1476 <p>A simple way to radically speed up compilation of native code |
|
1477 (typically hotspot and native libraries in JDK) is to install |
|
1478 ccache. This will cache and reuse prior compilation results, if the |
|
1479 source code is unchanged. However, ccache versions prior to 3.1.4 |
|
1480 does not work correctly with the precompiled headers used in |
|
1481 OpenJDK. So if your platform supports ccache at 3.1.4 or later, we |
|
1482 highly recommend installing it. This is currently only supported on |
|
1483 linux.</p> |
|
1484 |
|
1485 <h4>Building on local disk</h4> |
|
1486 |
|
1487 <p>If you are using network shares, e.g. via NFS, for your source code, |
|
1488 make sure the build directory is situated on local disk. |
|
1489 The performance |
|
1490 penalty is extremely high for building on a network share, |
|
1491 close to unusable.</p> |
|
1492 |
|
1493 <h4>Building only one JVM</h4> |
|
1494 |
|
1495 <p>The old build builds multiple JVMs on 32-bit systems (client and |
|
1496 server; and on Windows kernel as well). In the new build we have |
|
1497 changed this default to only build server when it's available. This |
|
1498 improves build times for those not interested in multiple JVMs. To |
|
1499 mimic the old behavior on platforms that support it, |
|
1500 use <code>--with-jvm-variants=client,server</code>.</p> |
|
1501 |
|
1502 <h4>Selecting the number of cores to build on</h4> |
|
1503 |
|
1504 <p>By default, <code>configure</code> will analyze your machine and run the make |
|
1505 process in parallel with as many threads as you have cores. This |
|
1506 behavior can be overridden, either "permanently" (on a <code>configure</code> |
|
1507 basis) using <code>--with-num-cores=N</code> or for a single build |
|
1508 only (on a make basis), using <code>make JOBS=N</code>.</p> |
|
1509 |
|
1510 <p>If you want to make a slower build just this time, to save some CPU |
|
1511 power for other processes, you can run |
|
1512 e.g. <code>make JOBS=2</code>. This will force the makefiles |
|
1513 to only run 2 parallel processes, or even <code>make JOBS=1</code> |
|
1514 which will disable parallelism.</p> |
|
1515 |
|
1516 <p>If you want to have it the other way round, namely having slow |
|
1517 builds default and override with fast if you're |
|
1518 impatient, you should call <code>configure</code> with |
|
1519 <code>--with-num-cores=2</code>, making 2 the default. |
|
1520 If you want to run with more |
|
1521 cores, run <code>make JOBS=8</code></p> |
|
1522 |
|
1523 </blockquote> |
|
1524 |
|
1525 <h3><a name="troubleshooting">Troubleshooting</a></h3> |
|
1526 <blockquote> |
|
1527 |
|
1528 <h4>Solving build problems</h4> |
|
1529 |
583 <blockquote> |
1530 <blockquote> |
584 <p> |
1531 If the build fails (and it's not due to a compilation error in |
585 The ant scripts that build <tt>jaxp</tt> and <tt>jaxws</tt> |
1532 a source file you've changed), the first thing you should do |
586 will attempt to locate these zip bundles from the directory |
1533 is to re-run the build with more verbosity. |
587 in the environment variable |
1534 Do this by adding <code>LOG=debug</code> to your make command line. |
588 <tt><a href="#ALT_DROPS_DIR">ALT_DROPS_DIR</a></tt>. |
1535 <br> |
589 The checksums protect from getting the wrong, corrupted, or |
1536 The build log (with both stdout and stderr intermingled, |
590 improperly modified sources. |
1537 basically the same as you see on your console) can be found as |
591 Once the sources are made available, the population will not |
1538 <code>build.log</code> in your build directory. |
592 happen again unless a <tt>make clobber</tt> is requested |
1539 <br> |
593 or the <tt>jaxp/drop/</tt> or <tt>jaxws/drop/</tt> |
1540 You can ask for help on build problems with the new build system |
594 directory is explicitly deleted. |
1541 on either the |
595 <br> |
1542 <a href="http://mail.openjdk.java.net/mailman/listinfo/build-dev"> |
596 <b>NOTE:</b> The default Makefile and ant script behavior |
1543 build-dev</a> |
597 is to NOT download these bundles from the public http site. |
1544 or the |
598 In general, doing downloads |
1545 <a href="http://mail.openjdk.java.net/mailman/listinfo/build-infra-dev"> |
599 during the build process is not advised, it creates too much |
1546 build-infra-dev</a> |
600 unpredictability in the build process. |
1547 mailing lists. Please include the relevant parts |
601 However, you can use <tt>make ALLOW_DOWNLOADS=true</tt> to |
1548 of the build log. |
602 tell the ant script that the download of the zip bundle is |
1549 <br> |
603 acceptable. |
1550 A build can fail for any number of reasons. |
604 </p> |
1551 Most failures |
605 <p> |
1552 are a result of trying to build in an environment in which all the |
606 The recommended procedure for keeping a cache of these |
1553 pre-build requirements have not been met. |
607 source bundles would be to download them once, place them |
1554 The first step in |
608 in a directory outside the repositories, and then set |
1555 troubleshooting a build failure is to recheck that you have satisfied |
609 <tt><a href="#ALT_DROPS_DIR">ALT_DROPS_DIR</a></tt> to refer |
1556 all the pre-build requirements for your platform. |
610 to that directory. |
1557 Scanning the <code>configure</code> log is a good first step, making |
611 These drop bundles do change occasionally, so the newer |
1558 sure that what it found makes sense for your system. |
612 bundles may need to be added to this area from time to time. |
1559 Look for strange error messages or any difficulties that |
613 </p> |
1560 <code>configure</code> had in finding things. |
|
1561 <br> |
|
1562 Some of the more common problems with builds are briefly |
|
1563 described |
|
1564 below, with suggestions for remedies. |
|
1565 <ul> |
|
1566 <li> |
|
1567 <b>Corrupted Bundles on Windows:</b> |
|
1568 <blockquote> |
|
1569 Some virus scanning software has been known to |
|
1570 corrupt the |
|
1571 downloading of zip bundles. |
|
1572 It may be necessary to disable the 'on access' or |
|
1573 'real time' |
|
1574 virus scanning features to prevent this corruption. |
|
1575 This type of "real time" virus scanning can also |
|
1576 slow down the |
|
1577 build process significantly. |
|
1578 Temporarily disabling the feature, or excluding the build |
|
1579 output directory may be necessary to get correct and |
|
1580 faster builds. |
|
1581 </blockquote> |
|
1582 </li> |
|
1583 <li> |
|
1584 <b>Slow Builds:</b> |
|
1585 <blockquote> |
|
1586 If your build machine seems to be overloaded from too many |
|
1587 simultaneous C++ compiles, try setting the |
|
1588 <code>JOBS=1</code> on the <code>make</code> command line. |
|
1589 Then try increasing the count slowly to an acceptable |
|
1590 level for your system. Also: |
|
1591 <blockquote> |
|
1592 Creating the javadocs can be very slow, |
|
1593 if you are running |
|
1594 javadoc, consider skipping that step. |
|
1595 <br> |
|
1596 Faster CPUs, more RAM, and a faster DISK usually helps. |
|
1597 The VM build tends to be CPU intensive |
|
1598 (many C++ compiles), |
|
1599 and the rest of the JDK will often be disk intensive. |
|
1600 <br> |
|
1601 Faster compiles are possible using a tool called |
|
1602 <a href="http://ccache.samba.org/" target="_blank">ccache</a>. |
|
1603 </blockquote> |
|
1604 </blockquote> |
|
1605 </li> |
|
1606 <li> |
|
1607 <b>File time issues:</b> |
|
1608 <blockquote> |
|
1609 If you see warnings that refer to file time stamps, e.g. |
|
1610 <blockquote> |
|
1611 <i>Warning message:</i><code> |
|
1612 File `xxx' has modification time in |
|
1613 the future.</code> |
|
1614 <br> |
|
1615 <i>Warning message:</i> <code> Clock skew detected. |
|
1616 Your build may |
|
1617 be incomplete.</code> |
|
1618 </blockquote> |
|
1619 These warnings can occur when the clock on the build |
|
1620 machine is out of |
|
1621 sync with the timestamps on the source files. |
|
1622 Other errors, apparently |
|
1623 unrelated but in fact caused by the clock skew, |
|
1624 can occur along with |
|
1625 the clock skew warnings. |
|
1626 These secondary errors may tend to obscure the |
|
1627 fact that the true root cause of the problem |
|
1628 is an out-of-sync clock. |
|
1629 <p> |
|
1630 If you see these warnings, reset the clock on the |
|
1631 build |
|
1632 machine, run "<code><i>gmake</i> clobber</code>" |
|
1633 or delete the directory |
|
1634 containing the build output, and restart the |
|
1635 build from the beginning. |
|
1636 </blockquote> |
|
1637 </li> |
|
1638 <li> |
|
1639 <b>Error message: |
|
1640 <code>Trouble writing out table to disk</code></b> |
|
1641 <blockquote> |
|
1642 Increase the amount of swap space on your build machine. |
|
1643 This could be caused by overloading the system and |
|
1644 it may be necessary to use: |
|
1645 <blockquote> |
|
1646 <code>make JOBS=1</code> |
|
1647 </blockquote> |
|
1648 to reduce the load on the system. |
|
1649 </blockquote> |
|
1650 </li> |
|
1651 <li> |
|
1652 <b>Error Message: |
|
1653 <code>libstdc++ not found:</code></b> |
|
1654 <blockquote> |
|
1655 This is caused by a missing libstdc++.a library. |
|
1656 This is installed as part of a specific package |
|
1657 (e.g. libstdc++.so.devel.386). |
|
1658 By default some 64-bit Linux versions (e.g. Fedora) |
|
1659 only install the 64-bit version of the libstdc++ package. |
|
1660 Various parts of the JDK build require a static |
|
1661 link of the C++ runtime libraries to allow for maximum |
|
1662 portability of the built images. |
|
1663 </blockquote> |
|
1664 </li> |
|
1665 <li> |
|
1666 <b>Linux Error Message: |
|
1667 <code>cannot restore segment prot after reloc</code></b> |
|
1668 <blockquote> |
|
1669 This is probably an issue with SELinux (See |
|
1670 <a href="http://en.wikipedia.org/wiki/SELinux" target="_blank"> |
|
1671 http://en.wikipedia.org/wiki/SELinux</a>). |
|
1672 Parts of the VM is built without the <code>-fPIC</code> for |
|
1673 performance reasons. |
|
1674 <p> |
|
1675 To completely disable SELinux: |
|
1676 <ol> |
|
1677 <li><code>$ su root</code></li> |
|
1678 <li><code># system-config-securitylevel</code></li> |
|
1679 <li><code>In the window that appears, select the SELinux tab</code></li> |
|
1680 <li><code>Disable SELinux</code></li> |
|
1681 </ol> |
|
1682 <p> |
|
1683 Alternatively, instead of completely disabling it you could |
|
1684 disable just this one check. |
|
1685 <ol> |
|
1686 <li>Select System->Administration->SELinux Management</li> |
|
1687 <li>In the SELinux Management Tool which appears, |
|
1688 select "Boolean" from the menu on the left</li> |
|
1689 <li>Expand the "Memory Protection" group</li> |
|
1690 <li>Check the first item, labeled |
|
1691 "Allow all unconfined executables to use |
|
1692 libraries requiring text relocation ..."</li> |
|
1693 </ol> |
|
1694 </blockquote> |
|
1695 </li> |
|
1696 <li> |
|
1697 <b>Windows Error Messages:</b> |
|
1698 <br> |
|
1699 <code>*** fatal error - couldn't allocate heap, ... </code> |
|
1700 <br> |
|
1701 <code>rm fails with "Directory not empty"</code> |
|
1702 <br> |
|
1703 <code>unzip fails with "cannot create ... Permission denied"</code> |
|
1704 <br> |
|
1705 <code>unzip fails with "cannot create ... Error 50"</code> |
|
1706 <br> |
|
1707 <blockquote> |
|
1708 The CYGWIN software can conflict with other non-CYGWIN |
|
1709 software. See the CYGWIN FAQ section on |
|
1710 <a href="http://cygwin.com/faq/faq.using.html#faq.using.bloda" target="_blank"> |
|
1711 BLODA (applications that interfere with CYGWIN)</a>. |
|
1712 </blockquote> |
|
1713 </li> |
|
1714 <li> |
|
1715 <b>Windows Error Message: <code>spawn failed</code></b> |
|
1716 <blockquote> |
|
1717 Try rebooting the system, or there could be some kind of |
|
1718 issue with the disk or disk partition being used. |
|
1719 Sometimes it comes with a "Permission Denied" message. |
|
1720 </blockquote> |
|
1721 </li> |
|
1722 </ul> |
614 </blockquote> |
1723 </blockquote> |
615 </blockquote> |
1724 |
616 </blockquote> |
1725 </blockquote> <!-- Troubleshooting --> |
617 <!-- ------------------------------------------------------ --> |
1726 |
|
1727 </blockquote> <!-- Appendix A --> |
|
1728 |
|
1729 <!-- ====================================================== --> |
618 <hr> |
1730 <hr> |
619 <h2><a name="building">Build Information</a></h2> |
1731 <h2><a name="gmake">Appendix B: GNU make</a></h2> |
620 <blockquote> |
1732 <blockquote> |
621 Building the OpenJDK |
1733 |
622 is done with a <a href="#gmake">GNU <tt>make</tt></a> command line |
|
623 and various |
|
624 environment or make variable settings that direct the makefile rules |
|
625 to where various components have been installed. |
|
626 Where possible the makefiles will attempt to located the various |
|
627 components in the default locations or any component specific |
|
628 variable settings. |
|
629 When the normal defaults fail or components cannot be found, |
|
630 the various |
|
631 <tt>ALT_*</tt> variables (alternates) |
|
632 can be used to help the makefiles locate components. |
|
633 <p> |
|
634 Refer to the bash/sh/ksh setup file |
|
635 <tt>jdk/make/jdk_generic_profile.sh</tt> |
|
636 if you need help in setting up your environment variables. |
|
637 A build could be as simple as: |
|
638 <blockquote> |
|
639 <pre><tt> |
|
640 bash |
|
641 . jdk/make/jdk_generic_profile.sh |
|
642 <a href="#gmake"><tt>make</tt></a> sanity && <a href="#gmake"><tt>make</tt></a> |
|
643 </tt></pre> |
|
644 </blockquote> |
|
645 <p> |
|
646 Of course ksh or sh would work too. |
|
647 But some customization will probably be necessary. |
|
648 The <tt>sanity</tt> rule will make some basic checks on build |
|
649 dependencies and generate appropriate warning messages |
|
650 regarding missing, out of date, or newer than expected components |
|
651 found on your system. |
|
652 </blockquote> |
|
653 <!-- ------------------------------------------------------ --> |
|
654 <hr> |
|
655 <h3><a name="gmake">GNU make (<tt><i>gmake</i></tt>)</a></h3> |
|
656 <blockquote> |
|
657 The Makefiles in the OpenJDK are only valid when used with the |
1734 The Makefiles in the OpenJDK are only valid when used with the |
658 GNU version of the utility command <tt>make</tt> |
1735 GNU version of the utility command <code>make</code> |
659 (<tt><i>gmake</i></tt>). |
1736 (usually called <code>gmake</code> on Solaris). |
660 A few notes about using GNU make: |
1737 A few notes about using GNU make: |
661 <ul> |
1738 <ul> |
662 <li> |
1739 <li> |
663 You need GNU make version 3.81 or newer. |
1740 You need GNU make version 3.81 or newer. |
|
1741 If the GNU make utility on your systems is not |
|
1742 3.81 or newer, |
|
1743 see <a href="#buildgmake">"Building GNU make"</a>. |
664 </li> |
1744 </li> |
665 <li> |
1745 <li> |
666 Place the location of the GNU make binary in the <tt>PATH</tt>. |
1746 Place the location of the GNU make binary in the |
667 </li> |
1747 <code>PATH</code>. |
668 <li> |
|
669 <strong>Linux:</strong> |
|
670 The <tt>/usr/bin/make</tt> should be 3.81 or newer |
|
671 and should work fine for you. |
|
672 If this version is not 3.81 or newer, |
|
673 see the <a href="#buildgmake">"Building GNU make"</a> section. |
|
674 </li> |
1748 </li> |
675 <li> |
1749 <li> |
676 <strong>Solaris:</strong> |
1750 <strong>Solaris:</strong> |
677 Do NOT use <tt>/usr/bin/make</tt> on Solaris. |
1751 Do NOT use <code>/usr/bin/make</code> on Solaris. |
678 If your Solaris system has the software |
1752 If your Solaris system has the software |
679 from the Solaris Companion CD installed, |
1753 from the Solaris Developer Companion CD installed, |
680 you should try and use <tt>gmake</tt> |
1754 you should try and use <code>gmake</code> |
681 which will be located in either the <tt>/opt/sfw/bin</tt> or |
1755 which will be located in either the |
682 <tt>/usr/sfw/bin</tt> directory. |
1756 <code>/usr/bin</code>, <code>/opt/sfw/bin</code> or |
683 In more recent versions of Solaris GNU make might be found |
1757 <code>/usr/sfw/bin</code> directory. |
684 at <tt>/usr/bin/gmake</tt>.<br> |
|
685 <b>NOTE:</b> It is very likely that this <tt>gmake</tt> |
|
686 could be 3.80, you need 3.81, in which case, |
|
687 see the <a href="#buildgmake">"Building GNU make"</a> section. |
|
688 </li> |
1758 </li> |
689 <li> |
1759 <li> |
690 <strong>Windows:</strong> |
1760 <strong>Windows:</strong> |
691 Make sure you start your build inside a bash/sh/ksh shell and are |
1761 Make sure you start your build inside a bash shell. |
692 using a <tt>make.exe</tt> utility built for that environment.<br/> |
1762 </li> |
693 <strong>MKS</strong> builds need a native Windows version of GNU make |
1763 <li> |
694 (see <a href="#buildgmake">Building GNU make</a>).<br/> |
1764 <strong>Mac OS X:</strong> |
695 <strong>Cygwin</strong> builds need |
1765 The XCode "command line tools" must be installed on your Mac. |
696 a make version which was specially compiled for the Cygwin environment |
|
697 (see <a href="#buildgmake">Building GNU make</a>). <strong>WARNING:</strong> |
|
698 the OpenJDK build with the make utility provided by Cygwin will <strong>not</strong> |
|
699 work because it does not support drive letters in paths. Make sure that |
|
700 your version of make will be found before the Cygwins default make by |
|
701 setting an appropriate <tt>PATH</tt> environment variable or by removing |
|
702 Cygwin's make after you built your own make version.<br/> |
|
703 <strong>MinGW/MSYS</strong> builds can use the default make which |
|
704 comes with the environment. |
|
705 </li> |
1766 </li> |
706 </ul> |
1767 </ul> |
707 <p> |
1768 <p> |
708 Information on GNU make, and access to ftp download sites, are |
1769 Information on GNU make, and access to ftp download sites, are |
709 available on the |
1770 available on the |
712 </a>. |
1773 </a>. |
713 The latest source to GNU make is available at |
1774 The latest source to GNU make is available at |
714 <a href="http://ftp.gnu.org/pub/gnu/make/" target="_blank"> |
1775 <a href="http://ftp.gnu.org/pub/gnu/make/" target="_blank"> |
715 ftp.gnu.org/pub/gnu/make/</a>. |
1776 ftp.gnu.org/pub/gnu/make/</a>. |
716 </p> |
1777 </p> |
717 <!-- ------------------------------------------------------ --> |
1778 |
718 <h4><a name="buildgmake">Building GNU make</a></h4> |
1779 <h3><a name="buildgmake">Building GNU make</a></h3> |
719 <blockquote> |
1780 <blockquote> |
720 First step is to get the GNU make 3.81 (or newer) source from |
1781 First step is to get the GNU make 3.81 or newer source from |
721 <a href="http://ftp.gnu.org/pub/gnu/make/" target="_blank"> |
1782 <a href="http://ftp.gnu.org/pub/gnu/make/" target="_blank"> |
722 ftp.gnu.org/pub/gnu/make/</a>. |
1783 ftp.gnu.org/pub/gnu/make/</a>. |
723 Building is a little different depending on the OS and unix toolset |
1784 Building is a little different depending on the OS but is |
724 on Windows: |
1785 basically done with: |
725 <ul> |
|
726 <li> |
|
727 <strong>Linux:</strong> |
|
728 <tt>./configure && make</tt> |
|
729 </li> |
|
730 <li> |
|
731 <strong>Solaris:</strong> |
|
732 <tt>./configure && gmake CC=gcc</tt> |
|
733 </li> |
|
734 <li> |
|
735 <strong>Windows for CYGWIN:</strong><br/> |
|
736 <tt>./configure</tt><br/> |
|
737 Add the line <tt>#define HAVE_CYGWIN_SHELL 1</tt> to the end of <tt>config.h</tt><br/> |
|
738 <tt>make</tt><br/> |
|
739 <br/> |
|
740 This should produce <tt>make.exe</tt> in the current directory. |
|
741 </li> |
|
742 <li> |
|
743 <strong>Windows for MKS:</strong><br/> |
|
744 Edit <tt>config.h.W32</tt> and uncomment the line <tt>#define HAVE_MKS_SHELL 1</tt><br/> |
|
745 Set the environment for your native compiler (e.g. by calling:<br/> |
|
746 <tt>"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /Release /xp /x64)</tt> |
|
747 <tt>nmake -f NMakefile.win32</tt> |
|
748 <br/> |
|
749 This should produce <tt>WinDebug/make.exe</tt> and <tt>WinRel/make.exe</tt> |
|
750 <br/> |
|
751 If you get the error: <tt>NMAKE : fatal error U1045: spawn failed : Permission denied</tt> |
|
752 you have to set the <tt>Read & execute</tt> permission for the file <tt>subproc.bat</tt>. |
|
753 </li> |
|
754 </ul> |
|
755 </blockquote> |
|
756 </blockquote> |
|
757 <!-- ------------------------------------------------------ --> |
|
758 <hr> |
|
759 <h3><a name="linux">Basic Linux System Setup</a></h3> |
|
760 <blockquote> |
|
761 <strong>i586 only:</strong> |
|
762 The minimum recommended hardware for building the Linux version |
|
763 is a Pentium class processor or better, at least 256 MB of RAM, and |
|
764 approximately 1.5 GB of free disk space. |
|
765 <p> |
|
766 <strong>X64 only:</strong> |
|
767 The minimum recommended hardware for building the Linux |
|
768 version is an AMD Opteron class processor, at least 512 MB of RAM, and |
|
769 approximately 4 GB of free disk space. |
|
770 <p> |
|
771 The build will use the tools contained in |
|
772 <tt>/bin</tt> and |
|
773 <tt>/usr/bin</tt> |
|
774 of a standard installation of the Linux operating environment. |
|
775 You should ensure that these directories are in your |
|
776 <tt>PATH</tt>. |
|
777 <p> |
|
778 Note that some Linux systems have a habit of pre-populating |
|
779 your environment variables for you, for example <tt>JAVA_HOME</tt> |
|
780 might get pre-defined for you to refer to the JDK installed on |
|
781 your Linux system. |
|
782 You will need to unset <tt>JAVA_HOME</tt>. |
|
783 It's a good idea to run <tt>env</tt> and verify the |
|
784 environment variables you are getting from the default system |
|
785 settings make sense for building the |
|
786 OpenJDK. |
|
787 </blockquote> |
|
788 <!-- ------------------------------------------------------ --> |
|
789 <h4><a name="linux_checklist">Basic Linux Check List</a></h4> |
|
790 <blockquote> |
|
791 <ol> |
|
792 <li> |
|
793 Install the |
|
794 <a href="#bootjdk">Bootstrap JDK</a>, set |
|
795 <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>. |
|
796 </li> |
|
797 <li> |
|
798 <a href="#importjdk">Optional Import JDK</a>, set |
|
799 <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>. |
|
800 </li> |
|
801 <li> |
|
802 Install or upgrade the <a href="#freetype">FreeType development |
|
803 package</a>. |
|
804 </li> |
|
805 <li> |
|
806 Install |
|
807 <a href="#ant">Ant 1.7.1 or newer</a>, |
|
808 make sure it is in your PATH. |
|
809 </li> |
|
810 </ol> |
|
811 </blockquote> |
|
812 <!-- ------------------------------------------------------ --> |
|
813 <hr> |
|
814 <h3><a name="solaris">Basic Solaris System Setup</a></h3> |
|
815 <blockquote> |
|
816 The minimum recommended hardware for building the |
|
817 Solaris SPARC version is an UltraSPARC with 512 MB of RAM. |
|
818 For building |
|
819 the Solaris x86 version, a Pentium class processor or better and at |
|
820 least 512 MB of RAM are recommended. |
|
821 Approximately 1.4 GB of free disk |
|
822 space is needed for a 32-bit build. |
|
823 <p> |
|
824 If you are building the 64-bit version, you should |
|
825 run the command "isainfo -v" to verify that you have a |
|
826 64-bit installation, it should say <tt>sparcv9</tt> or |
|
827 <tt>amd64</tt>. |
|
828 An additional 7 GB of free disk space is needed |
|
829 for a 64-bit build. |
|
830 <p> |
|
831 The build uses the tools contained in <tt>/usr/ccs/bin</tt> |
|
832 and <tt>/usr/bin</tt> of a standard developer or full installation of |
|
833 the Solaris operating environment. |
|
834 <p> |
|
835 Solaris patches specific to the JDK can be downloaded from the |
|
836 <a href="http://sunsolve.sun.com/show.do?target=patches/JavaSE" target="_blank"> |
|
837 SunSolve JDK Solaris patches download page</a>. |
|
838 You should ensure that the latest patch cluster for |
|
839 your version of the Solaris operating environment has also |
|
840 been installed. |
|
841 </blockquote> |
|
842 <!-- ------------------------------------------------------ --> |
|
843 <h4><a name="solaris_checklist">Basic Solaris Check List</a></h4> |
|
844 <blockquote> |
|
845 <ol> |
|
846 <li> |
|
847 Install the |
|
848 <a href="#bootjdk">Bootstrap JDK</a>, set |
|
849 <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>. |
|
850 </li> |
|
851 <li> |
|
852 <a href="#importjdk">Optional Import JDK</a>, set |
|
853 <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>. |
|
854 </li> |
|
855 <li> |
|
856 Install the |
|
857 <a href="#studio">Sun Studio Compilers</a>, set |
|
858 <a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a>. |
|
859 </li> |
|
860 <li> |
|
861 Install the |
|
862 <a href="#cups">CUPS Include files</a>, set |
|
863 <tt><a href="#ALT_CUPS_HEADERS_PATH">ALT_CUPS_HEADERS_PATH</a></tt>. |
|
864 </li> |
|
865 <li> |
|
866 Install the <a href="#xrender">XRender Include files</a>. |
|
867 </li> |
|
868 <li> |
|
869 Install |
|
870 <a href="#ant">Ant 1.7.1 or newer</a>, |
|
871 make sure it is in your PATH. |
|
872 </li> |
|
873 </ol> |
|
874 </blockquote> |
|
875 <!-- ------------------------------------------------------ --> |
|
876 <hr> |
|
877 <h3><a name="windows">Basic Windows System Setup</a></h3> |
|
878 <blockquote> |
|
879 <strong>i586 only:</strong> |
|
880 The minimum recommended hardware for building the 32-bit or X86 |
|
881 Windows version is an Pentium class processor or better, at least |
|
882 512 MB of RAM, and approximately 600 MB of free disk space. |
|
883 <strong> |
|
884 NOTE: The Windows build machines need to use the |
|
885 file system NTFS. |
|
886 Build machines formatted to FAT32 will not work |
|
887 because FAT32 doesn't support case-sensitivity in file names. |
|
888 </strong> |
|
889 <p> |
|
890 <strong>X64 only:</strong> |
|
891 The minimum recommended hardware for building |
|
892 the Windows X64 version is an AMD Opteron class processor, at least 1 |
|
893 GB of RAM, and approximately 10 GB of free disk space. |
|
894 </blockquote> |
|
895 <!-- ------------------------------------------------------ --> |
|
896 <h4><a name="paths">Windows Paths</a></h4> |
|
897 <blockquote> |
|
898 <strong>Windows:</strong> |
|
899 Note that GNU make, the shell and other Unix-tools required during the build |
|
900 do not tolerate the Windows habit |
|
901 of having spaces in pathnames or the use of the <tt>\</tt>characters in pathnames. |
|
902 Luckily on most Windows systems, you can use <tt>/</tt>instead of <tt>\</tt>, and |
|
903 there is always a short <a href="http://en.wikipedia.org/wiki/8.3_filename"> |
|
904 "8.3" pathname</a> without spaces for any path that contains spaces. |
|
905 Unfortunately, this short pathname is somewhat dynamic (i.e. dependant on the |
|
906 other files and directories inside a given directory) and can not be |
|
907 algorithmicly calculated by only looking at a specific path name. |
|
908 <p> |
|
909 The makefiles will try to translate any pathnames supplied |
|
910 to it into the <tt>C:/</tt> style automatically. |
|
911 </p> |
|
912 <p> |
|
913 Special care has to be taken if native Windows applications |
|
914 like <tt>nmake</tt> or <tt>cl</tt> are called with file arguments processed |
|
915 by Unix-tools like <tt>make</tt> or <tt>sh</tt>! |
|
916 </p> |
|
917 </blockquote> |
|
918 <!-- ------------------------------------------------------ --> |
|
919 <h4><a name="paths">Windows build environments</a></h4> |
|
920 <blockquote> |
|
921 Building on Windows requires a Unix-like environment, notably a Unix-like shell. |
|
922 There are several such environments available of which |
|
923 <a href="http://www.mkssoftware.com/products/tk/ds_tkdev.asp">MKS</a>, |
|
924 <a href="http://www.cygwin.com/">Cygwin</a> and |
|
925 <a href="http://www.mingw.org/wiki/MSYS">MinGW/MSYS</a> are currently supported for |
|
926 the OpenJDK build. One of the differences of these three systems is the way |
|
927 they handle Windows path names, particularly path names which contain |
|
928 spaces, backslashes as path separators and possibly drive letters. Depending |
|
929 on the use case and the specifics of each environment these path problems can |
|
930 be solved by a combination of quoting whole paths, translating backslashes to |
|
931 forward slashes, escaping backslashes with additional backslashes and |
|
932 translating the path names to their <a href="http://en.wikipedia.org/wiki/8.3_filename"> |
|
933 "8.3" version</a>. |
|
934 <p> |
|
935 As of this writing (MKS ver. 9.4, Cygwin ver. 1.7.9, MinGW/MSYS 1.0.17), |
|
936 MKS builds are known to be the fastest Windows builds while MingGW/MSYS |
|
937 builds are slightly slower (about 10%) than MKS builds and Cygwin builds |
|
938 require nearly twice the time (about 180%) of MKS builds (e.g. on a |
|
939 DualCore i7 notebook with 8GB of RAM, HDD and 64-bit Windows 7 operating system |
|
940 the complete OpenJDK 8 product build takes about 49min with MKS, 54min with |
|
941 MinGW/MSYS and 88min with Cygwin). |
|
942 </p> |
|
943 <p> |
|
944 Mixing tools from the different Unix emulation environments is not a good |
|
945 idea and will probably not work! |
|
946 </p> |
|
947 <p> |
|
948 <strong>MKS:</strong> is a commercial product which includes |
|
949 all the Unix utilities which are required to build the OpenJDK except GNU |
|
950 make. In pre-OpenJDK times it was the only supported build environment on |
|
951 Windows. The MKS tools support Windows paths with drive letters and |
|
952 forward slashes as path separator. Paths in environment variables like (for |
|
953 example) <tt>PATH</tt> are separated by semicolon '<tt>;</tt>'. |
|
954 </p> |
|
955 <p> |
|
956 Recent versions of MKS provide the <tt>dosname</tt> utility to convert paths |
|
957 with spaces to short (8.3) path names,e .g. |
|
958 <tt>dosname -s "<i>path</i>"</tt>. |
|
959 </p> |
|
960 <p> |
|
961 If you are using the MKS environment, you need a native Windows version |
|
962 of Gnu make <a href="#buildgmake">which you can easily build yourself</a>. |
|
963 </p> |
|
964 <p> |
|
965 <strong>Cygwin:</strong> |
|
966 is an open source, Linux-like environment which tries to emulate |
|
967 a complete POSIX layer on Windows. It tries to be smart about path names |
|
968 and can usually handle all kinds of paths if they are correctly quoted |
|
969 or escaped although internally it maps drive letters <tt><drive>:</tt> |
|
970 to a virtual directory <tt>/cygdrive/<drive></tt>. |
|
971 </p> |
|
972 <p> |
|
973 You can always use the <tt>cygpath</tt> utility to map pathnames with spaces |
|
974 or the backslash character into the <tt>C:/</tt> style of pathname |
|
975 (called 'mixed'), e.g. <tt>cygpath -s -m "<i>path</i>"</tt>. |
|
976 </p> |
|
977 <p> |
|
978 Note that the use of CYGWIN creates a unique problem with regards to |
|
979 setting <a href="#path"><tt>PATH</tt></a>. Normally on Windows |
|
980 the <tt>PATH</tt> variable contains directories |
|
981 separated with the ";" character (Solaris and Linux use ":"). |
|
982 With CYGWIN, it uses ":", but that means that paths like "C:/path" |
|
983 cannot be placed in the CYGWIN version of <tt>PATH</tt> and |
|
984 instead CYGWIN uses something like <tt>/cygdrive/c/path</tt> |
|
985 which CYGWIN understands, but only CYGWIN understands. |
|
986 </p> |
|
987 <p> |
|
988 If you are using the Cygwin environment, you need to |
|
989 <a href="#buildgmake">compile your own version</a> |
|
990 of GNU make because the default Cygwin make can not handle drive letters in paths. |
|
991 </p> |
|
992 <p> |
|
993 <strong>MinGW/MSYS:</strong> |
|
994 MinGW ("Minimalist GNU for Windows") is a collection of free Windows |
|
995 specific header files and import libraries combined with GNU toolsets that |
|
996 allow one to produce native Windows programs that do not rely on any |
|
997 3rd-party C runtime DLLs. MSYS is a supplement to MinGW which allows building |
|
998 applications and programs which rely on traditional UNIX tools to |
|
999 be present. Among others this includes tools like <tt>bash</tt> and <tt>make</tt>. |
|
1000 </p> |
|
1001 <p> |
|
1002 Like Cygwin, MinGW/MSYS can handle different types of path formats. They |
|
1003 are internally converted to paths with forward slashes and drive letters |
|
1004 <tt><drive>:</tt> replaced by a virtual |
|
1005 directory <tt>/<drive></tt>. Additionally, MSYS automatically |
|
1006 detects binaries compiled for the MSYS environment and feeds them with the |
|
1007 internal, Unix-style path names. If native Windows applications are called |
|
1008 from within MSYS programs their path arguments are automatically converted |
|
1009 back to Windows style path names with drive letters and backslashes as |
|
1010 path separators. This may cause problems for Windows applications which |
|
1011 use forward slashes as parameter separator (e.g. <tt>cl /nologo /I</tt>) |
|
1012 because MSYS may wrongly <a href="http://mingw.org/wiki/Posix_path_conversion"> |
|
1013 replace such parameters by drive letters</a>. |
|
1014 </p> |
|
1015 <p> |
|
1016 If you are using the MinGW/MSYS system you can use the default make |
|
1017 version supplied by the environment. |
|
1018 </p> |
|
1019 </blockquote> |
|
1020 <!-- ------------------------------------------------------ --> |
|
1021 <h4><a name="windows_checklist">Basic Windows Check List</a></h4> |
|
1022 <blockquote> |
|
1023 <ol> |
|
1024 <li> |
|
1025 Install one of the |
|
1026 <a href="#cygwin">CYGWIN</a>, <a href="#msys">MinGW/MSYS</a> or |
|
1027 <a href="http://www.mkssoftware.com/products/tk/ds_tkdev.asp">MKS</a> environments. |
|
1028 </li> |
|
1029 <li> |
|
1030 Install the |
|
1031 <a href="#bootjdk">Bootstrap JDK</a>, set |
|
1032 <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>. |
|
1033 </li> |
|
1034 <li> |
|
1035 <a href="#importjdk">Optional Import JDK</a>, set |
|
1036 <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>. |
|
1037 </li> |
|
1038 <li> |
|
1039 Install the |
|
1040 <a href="#msvc32">Microsoft Visual Studio Compilers</a>). |
|
1041 </li> |
|
1042 <li> |
|
1043 Setup all environment variables for compilers |
|
1044 (see <a href="#msvc32">compilers</a>). |
|
1045 </li> |
|
1046 <li> |
|
1047 Install |
|
1048 <a href="#dxsdk">Microsoft DirectX SDK</a>. |
|
1049 </li> |
|
1050 <li> |
|
1051 Install |
|
1052 <a href="#ant">Ant 1.7.1 or newer</a>, |
|
1053 make sure it is in your PATH and set |
|
1054 <tt><a href="#ANT_HOME">ANT_HOME</a></tt>. |
|
1055 </li> |
|
1056 </ol> |
|
1057 </blockquote> |
|
1058 <!-- ------------------------------------------------------ --> |
|
1059 <hr> |
|
1060 <h3><a name="macosx">Basic Mac OS X System Setup</a></h3> |
|
1061 <blockquote> |
|
1062 <strong>X64 only:</strong> |
|
1063 The minimum recommended hardware for building |
|
1064 the Mac OS X version is any 64-bit capable Intel processor, at least 2 |
|
1065 GB of RAM, and approximately 3 GB of free disk space. You should also |
|
1066 have OS X Lion 10.7.3 installed. |
|
1067 </blockquote> |
|
1068 <!-- ------------------------------------------------------ --> |
|
1069 |
|
1070 <h4><a name="macosx_checklist">Basic Mac OS X Check List</a></h4> |
|
1071 <blockquote> |
|
1072 <ol> |
|
1073 <li> |
|
1074 Install <a href="https://developer.apple.com/xcode/">XCode 4.1</a> or newer. |
|
1075 If you install XCode 4.3 or newer, make sure you also install |
|
1076 "Command line tools" found under the preferences pane "Downloads". |
|
1077 </li> |
|
1078 <li> |
|
1079 Install <a href="http://support.apple.com/kb/dl1421" target="_blank">"Java for OS X Lion Update 1"</a>, |
|
1080 set <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a> to <code>`/usr/libexec/java_home -v 1.6`</code></tt> |
|
1081 </li> |
|
1082 <li> |
|
1083 <a href="#importjdk">Optional Import JDK</a>, set |
|
1084 <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>. |
|
1085 </li> |
|
1086 </ol> |
|
1087 </blockquote> |
|
1088 <!-- ------------------------------------------------------ --> |
|
1089 <hr> |
|
1090 <h3><a name="dependencies">Build Dependencies</a></h3> |
|
1091 <blockquote> |
|
1092 Depending on the platform, the OpenJDK build process has some basic |
|
1093 dependencies on components not part of the OpenJDK sources. |
|
1094 Some of these are specific to a platform, some even specific to |
|
1095 an architecture. |
|
1096 Each dependency will have a set of ALT variables that can be set |
|
1097 to tell the makefiles where to locate the component. |
|
1098 In most cases setting these ALT variables may not be necessary |
|
1099 and the makefiles will find defaults on the system in standard |
|
1100 install locations or through component specific variables. |
|
1101 <!-- ------------------------------------------------------ --> |
|
1102 <h4><a name="bootjdk">Bootstrap JDK</a></h4> |
|
1103 <blockquote> |
|
1104 All OpenJDK builds require access to the previously released |
|
1105 JDK 6, this is often called a bootstrap JDK. |
|
1106 The JDK 6 binaries can be downloaded from Sun's |
|
1107 <a href="http://java.sun.com/javase/downloads/index.jsp" |
|
1108 target="_blank">JDK 6 download site</a>. |
|
1109 For build performance reasons |
|
1110 is very important that this bootstrap JDK be made available on the |
|
1111 local disk of the machine doing the build. |
|
1112 You should always set |
|
1113 <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt> |
|
1114 to point to the location of |
|
1115 the bootstrap JDK installation, this is the directory pathname |
|
1116 that contains a <tt>bin, lib, and include</tt> |
|
1117 It's also a good idea to also place its <tt>bin</tt> directory |
|
1118 in the <tt>PATH</tt> environment variable, although it's |
|
1119 not required. |
|
1120 <p> |
|
1121 <strong>Solaris:</strong> |
|
1122 Some pre-installed JDK images may be available to you in the |
|
1123 directory <tt>/usr/jdk/instances</tt>. |
|
1124 If you don't set |
|
1125 <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt> |
|
1126 the makefiles will look in that location for a JDK it can use. |
|
1127 </blockquote> |
|
1128 <!-- ------------------------------------------------------ --> |
|
1129 <h4><a name="importjdk">Optional Import JDK</a></h4> |
|
1130 <blockquote> |
|
1131 The <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt> |
|
1132 setting is only needed if you are not building the entire |
|
1133 JDK. For example, if you have built the entire JDK once, and |
|
1134 wanted to avoid repeatedly building the Hotspot VM, you could |
|
1135 set this to the location of the previous JDK install image |
|
1136 and the build will copy the needed files from this import area. |
|
1137 </blockquote> |
|
1138 <!-- ------------------------------------------------------ --> |
|
1139 <h4><a name="ant">Ant</a></h4> |
|
1140 <blockquote> |
|
1141 All OpenJDK builds require access to least Ant 1.7.1. |
|
1142 The Ant tool is available from the |
|
1143 <a href="http://archive.apache.org/dist/ant/binaries/apache-ant-1.7.1-bin.zip" target="_blank"> |
|
1144 Ant 1.7.1 archive download site</a>. |
|
1145 You should always make sure <tt>ant</tt> is in your PATH, and |
|
1146 on Windows you may also need to set |
|
1147 <tt><a href="#ANT_HOME">ANT_HOME</a></tt> |
|
1148 to point to the location of |
|
1149 the Ant installation, this is the directory pathname |
|
1150 that contains a <tt>bin and lib</tt>. |
|
1151 <br> |
|
1152 <b>WARNING:</b> Ant versions used from IDE tools like NetBeans |
|
1153 or installed via system packages may not operate the same |
|
1154 as the one obtained from the Ant download bundles. |
|
1155 These system and IDE installers sometimes choose to change |
|
1156 the ant installation enough to cause differences. |
|
1157 </blockquote> |
|
1158 <!-- ------------------------------------------------------ --> |
|
1159 <h4><a name="cacerts">Certificate Authority File (cacert)</a></h4> |
|
1160 <blockquote> |
|
1161 See <a href="http://en.wikipedia.org/wiki/Certificate_Authority" target="_blank"> |
|
1162 http://en.wikipedia.org/wiki/Certificate_Authority</a> |
|
1163 for a better understanding of the Certificate Authority (CA). |
|
1164 A certificates file named "cacerts" |
|
1165 represents a system-wide keystore with CA certificates. |
|
1166 In JDK and JRE |
|
1167 binary bundles, the "cacerts" file contains root CA certificates from |
|
1168 several public CAs (e.g., VeriSign, Thawte, and Baltimore). |
|
1169 The source contain a cacerts file |
|
1170 without CA root certificates. |
|
1171 Formal JDK builders will need to secure |
|
1172 permission from each public CA and include the certificates into their |
|
1173 own custom cacerts file. |
|
1174 Failure to provide a populated cacerts file |
|
1175 will result in verification errors of a certificate chain during runtime. |
|
1176 The variable |
|
1177 <tt><a href="#ALT_CACERTS_FILE">ALT_CACERTS_FILE</a></tt> |
|
1178 can be used to override the default location of the |
|
1179 cacerts file that will get placed in your build. |
|
1180 By default an empty cacerts file is provided and that should be |
|
1181 fine for most JDK developers. |
|
1182 </blockquote> |
|
1183 <!-- ------------------------------------------------------ --> |
|
1184 <h4><a name="compilers">Compilers</a></h4> |
|
1185 <blockquote> |
|
1186 <strong><a name="gcc">Linux gcc/binutils</a></strong> |
|
1187 <blockquote> |
1786 <blockquote> |
1188 The GNU gcc compiler version should be 4.3 or newer. |
1787 <code>bash ./configure</code> |
1189 The compiler used should be the default compiler installed |
1788 <br> |
1190 in <tt>/usr/bin</tt>. |
1789 <code>make</code> |
1191 </blockquote> |
|
1192 <strong><a name="studio">Solaris: Sun Studio</a></strong> |
|
1193 <blockquote> |
|
1194 At a minimum, the |
|
1195 <a href="http://www.oracle.com/technetwork/server-storage/solarisstudio/downloads/index.htm" target="_blank"> |
|
1196 Sun Studio 12 Update 1 Compilers</a> |
|
1197 (containing version 5.10 of the C and C++ compilers) is required, |
|
1198 including specific patches. |
|
1199 <p> |
|
1200 The Solaris SPARC patch list is: |
|
1201 <ul> |
|
1202 <li> |
|
1203 118683-05: SunOS 5.10: Patch for profiling libraries and assembler |
|
1204 </li> |
|
1205 <li> |
|
1206 119963-21: SunOS 5.10: Shared library patch for C++ |
|
1207 </li> |
|
1208 <li> |
|
1209 120753-08: SunOS 5.10: Microtasking libraries (libmtsk) patch |
|
1210 </li> |
|
1211 <li> |
|
1212 128228-09: Sun Studio 12 Update 1: Patch for Sun C++ Compiler |
|
1213 </li> |
|
1214 <li> |
|
1215 141860-03: Sun Studio 12 Update 1: Patch for Compiler Common patch for Sun C C++ F77 F95 |
|
1216 </li> |
|
1217 <li> |
|
1218 141861-05: Sun Studio 12 Update 1: Patch for Sun C Compiler |
|
1219 </li> |
|
1220 <li> |
|
1221 142371-01: Sun Studio 12.1 Update 1: Patch for dbx |
|
1222 </li> |
|
1223 <li> |
|
1224 143384-02: Sun Studio 12 Update 1: Patch for debuginfo handling |
|
1225 </li> |
|
1226 <li> |
|
1227 143385-02: Sun Studio 12 Update 1: Patch for Compiler Common patch for Sun C C++ F77 F95 |
|
1228 </li> |
|
1229 <li> |
|
1230 142369-01: Sun Studio 12.1: Patch for Performance Analyzer Tools |
|
1231 </li> |
|
1232 </ul> |
|
1233 <p> |
|
1234 The Solaris X86 patch list is: |
|
1235 <ul> |
|
1236 <li> |
|
1237 119961-07: SunOS 5.10_x86, x64, Patch for profiling libraries and assembler |
|
1238 </li> |
|
1239 <li> |
|
1240 119964-21: SunOS 5.10_x86: Shared library patch for C++_x86 |
|
1241 </li> |
|
1242 <li> |
|
1243 120754-08: SunOS 5.10_x86: Microtasking libraries (libmtsk) patch |
|
1244 </li> |
|
1245 <li> |
|
1246 141858-06: Sun Studio 12 Update 1_x86: Sun Compiler Common patch for x86 backend |
|
1247 </li> |
|
1248 <li> |
|
1249 128229-09: Sun Studio 12 Update 1_x86: Patch for C++ Compiler |
|
1250 </li> |
|
1251 <li> |
|
1252 142363-05: Sun Studio 12 Update 1_x86: Patch for C Compiler |
|
1253 </li> |
|
1254 <li> |
|
1255 142368-01: Sun Studio 12.1_x86: Patch for Performance Analyzer Tools |
|
1256 </li> |
|
1257 </ul> |
|
1258 <p> |
|
1259 Set |
|
1260 <a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a> |
|
1261 to point to the location of |
|
1262 the compiler binaries, and place this location in the <tt>PATH</tt>. |
|
1263 <p> |
|
1264 The Oracle Solaris Studio Express compilers at: |
|
1265 <a href="http://developers.sun.com/sunstudio/downloads/express.jsp" target="_blank"> |
|
1266 Oracle Solaris Studio Express Download site</a> |
|
1267 are also an option, although these compilers have not |
|
1268 been extensively used yet. |
|
1269 </blockquote> |
|
1270 <strong><a name="msvc32">Windows i586: Microsoft Visual Studio 2010 Compilers</a></strong> |
|
1271 <blockquote> |
|
1272 <p> |
|
1273 <b>BEGIN WARNING</b>: JDK 7 has transitioned to |
|
1274 use the newest VS2010 Microsoft compilers. |
|
1275 No other compilers are known to build the entire JDK, |
|
1276 including non-open portions. |
|
1277 Visual Studio 2010 Express compilers are now able to build all the |
|
1278 open source repositories, but this is 32 bit only. To build 64 bit |
|
1279 Windows binaries use the the 7.1 Windows SDK. |
|
1280 <b>END WARNING.</b> |
|
1281 <p> |
|
1282 The 32-bit OpenJDK Windows build requires |
|
1283 Microsoft Visual Studio C++ 2010 (VS2010) Professional |
|
1284 Edition or Express compiler. |
|
1285 The compiler and other tools are expected to reside |
|
1286 in the location defined by the variable |
|
1287 <tt>VS100COMNTOOLS</tt> which |
|
1288 is set by the Microsoft Visual Studio installer. |
|
1289 <p> |
|
1290 Once the compiler is installed, |
|
1291 it is recommended that you run <tt>VCVARS32.BAT</tt> |
|
1292 to set the compiler environment variables |
|
1293 <tt>INCLUDE</tt>, |
|
1294 <tt>LIB</tt>, and |
|
1295 <tt>PATH</tt> |
|
1296 prior to building the |
|
1297 OpenJDK. |
|
1298 The above environment variables <b>MUST</b> be set. |
|
1299 This compiler also contains the Windows SDK v 7.0a, |
|
1300 which is an update to the Windows 7 SDK. |
|
1301 <p> |
|
1302 <b>WARNING:</b> Make sure you check out the |
|
1303 <a href="#cygwin">CYGWIN link.exe WARNING</a>. |
|
1304 The path <tt>/usr/bin</tt> must be after the path to the |
|
1305 Visual Studio product. |
|
1306 </blockquote> |
|
1307 <strong><a name="msvc64">Windows x64: Microsoft Visual Studio 2010 Professional Compiler</a></strong> |
|
1308 <blockquote> |
|
1309 For <b>X64</b>, the set up is much the same as 32 bit |
|
1310 except that you run <tt>amd64\VCVARS64.BAT</tt> |
|
1311 to set the compiler environment variables. |
|
1312 Previously 64 bit builds had to use the 64 bit compiler in |
|
1313 an unbundled Windows SDK but this is no longer necessary if |
|
1314 you have VS2010 Professional. |
|
1315 </blockquote> |
|
1316 <strong><a name="mssdk64">Windows x64: Microsoft Windows 7.1 SDK 64 bit compilers.</a></strong> |
|
1317 For a free alternative for 64 bit builds, use the 7.1 SDK. |
|
1318 Microsoft say that to set up your paths for this run |
|
1319 <pre> |
|
1320 c:\Program Files\Microsoft SDKs\Windows\v7.1\bin\setenv.cmd /x64. |
|
1321 </pre> |
|
1322 What was tested is just directly setting up LIB, INCLUDE, |
|
1323 PATH and based on the installation directories using the |
|
1324 DOS short name appropriate for the system, (you will |
|
1325 need to set them for yours, not just blindly copy this) eg : |
|
1326 <pre> |
|
1327 set VSINSTALLDIR=c:\PROGRA~2\MICROS~1.0 |
|
1328 set WindowsSdkDir=c:\PROGRA~1\MICROS~1\Windows\v7.1 |
|
1329 set PATH=%VSINSTALLDIR%\vc\bin\amd64;%VSINSTALLDIR%\Common7\IDE;%WindowsSdkDir%\bin;%PATH% |
|
1330 set INCLUDE=%VSINSTALLDIR%\vc\include;%WindowsSdkDir%\include |
|
1331 set LIB=%VSINSTALLDIR%\vc\lib\amd64;%WindowsSdkDir%\lib\x64 |
|
1332 </pre> |
|
1333 <strong><a name="llvmgcc">OS X Lion 10.7.3: LLVM GCC</a></strong> |
|
1334 <blockquote> |
|
1335 LLVM GCC is bundled with XCode. The version should be at least 4.2.1. |
|
1336 </blockquote> |
1790 </blockquote> |
1337 </blockquote> |
1791 </blockquote> |
1338 <!-- ------------------------------------------------------ --> |
1792 |
1339 <h4><a name="zip">Zip and Unzip</a></h4> |
1793 </blockquote> <!-- Appendix B --> |
|
1794 |
|
1795 <!-- ====================================================== --> |
|
1796 <hr> |
|
1797 <h2><a name="buildenvironments">Appendix C: Build Environments</a></h2> |
|
1798 <blockquote> |
|
1799 |
|
1800 <h3><a name="MBE">Minimum Build Environments</a></h3> |
1340 <blockquote> |
1801 <blockquote> |
1341 Version 2.2 (November 3rd 1997) or newer of the zip utility |
1802 This file often describes specific requirements for what we |
1342 and version 5.12 or newer of the unzip utility is needed |
1803 call the |
1343 to build the JDK. |
1804 "minimum build environments" (MBE) for this |
1344 With Solaris, Linux, and Windows CYGWIN, the zip and unzip |
1805 specific release of the JDK. |
1345 utilities installed on the system should be fine. |
1806 What is listed below is what the Oracle Release |
1346 Information and the source code for |
1807 Engineering Team will use to build the Oracle JDK product. |
1347 ZIP.EXE and UNZIP.EXE is available on the |
1808 Building with the MBE will hopefully generate the most compatible |
1348 <a href="http://www.info-zip.org" |
1809 bits that install on, and run correctly on, the most variations |
1349 target="_blank">info-zip web site</a>. |
1810 of the same base OS and hardware architecture. |
|
1811 In some cases, these represent what is often called the |
|
1812 least common denominator, but each Operating System has different |
|
1813 aspects to it. |
|
1814 <p> |
|
1815 In all cases, the Bootstrap JDK version minimum is critical, |
|
1816 we cannot guarantee builds will work with older Bootstrap JDK's. |
|
1817 Also in all cases, more RAM and more processors is better, |
|
1818 the minimums listed below are simply recommendations. |
|
1819 <p> |
|
1820 With Solaris and Mac OS X, the version listed below is the |
|
1821 oldest release we can guarantee builds and works, and the |
|
1822 specific version of the compilers used could be critical. |
|
1823 <p> |
|
1824 With Windows the critical aspect is the Visual Studio compiler |
|
1825 used, which due to it's runtime, generally dictates what Windows |
|
1826 systems can do the builds and where the resulting bits can |
|
1827 be used.<br> |
|
1828 <b>NOTE: We expect a change here off these older Windows OS releases |
|
1829 and to a 'less older' one, probably Windows 2008R2 X64.</b> |
|
1830 <p> |
|
1831 With Linux, it was just a matter of picking a |
|
1832 stable distribution that is a good representative for Linux |
|
1833 in general.<br> |
|
1834 <b>NOTE: We expect a change here from Fedora 9 to something else, |
|
1835 but it has not been completely determined yet, possibly |
|
1836 Ubuntu 12.04 X64, unbiased community feedback would be welcome on |
|
1837 what a good choice would be here.</b> |
|
1838 <p> |
|
1839 It is understood that most developers will NOT be using these |
|
1840 specific versions, and in fact creating these specific versions |
|
1841 may be difficult due to the age of some of this software. |
|
1842 It is expected that developers are more often using the more |
|
1843 recent releases and distributions of these operating systems. |
|
1844 <p> |
|
1845 Compilation problems with newer or different C/C++ compilers is a |
|
1846 common problem. |
|
1847 Similarly, compilation problems related to changes to the |
|
1848 <code>/usr/include</code> or system header files is also a |
|
1849 common problem with older, newer, or unreleased OS versions. |
|
1850 Please report these types of problems as bugs so that they |
|
1851 can be dealt with accordingly. |
|
1852 </p> |
|
1853 <table border="1"> |
|
1854 <thead> |
|
1855 <tr> |
|
1856 <th>Base OS and Architecture</th> |
|
1857 <th>OS</th> |
|
1858 <th>C/C++ Compiler</th> |
|
1859 <th>Bootstrap JDK</th> |
|
1860 <th>Processors</th> |
|
1861 <th>RAM Minimum</th> |
|
1862 <th>DISK Needs</th> |
|
1863 </tr> |
|
1864 </thead> |
|
1865 <tbody> |
|
1866 <tr> |
|
1867 <td>Linux X86 (32-bit) and X64 (64-bit)</td> |
|
1868 <td>Fedora 9</td> |
|
1869 <td>gcc 4.3 </td> |
|
1870 <td>JDK 7u7</td> |
|
1871 <td>2 or more</td> |
|
1872 <td>1 GB</td> |
|
1873 <td>6 GB</td> |
|
1874 </tr> |
|
1875 <tr> |
|
1876 <td>Solaris SPARC (32-bit) and SPARCV9 (64-bit)</td> |
|
1877 <td>Solaris 10 Update 6</td> |
|
1878 <td>Studio 12 Update 1 + patches</td> |
|
1879 <td>JDK 7u7</td> |
|
1880 <td>4 or more</td> |
|
1881 <td>4 GB</td> |
|
1882 <td>8 GB</td> |
|
1883 </tr> |
|
1884 <tr> |
|
1885 <td>Solaris X86 (32-bit) and X64 (64-bit)</td> |
|
1886 <td>Solaris 10 Update 6</td> |
|
1887 <td>Studio 12 Update 1 + patches</td> |
|
1888 <td>JDK 7u7</td> |
|
1889 <td>4 or more</td> |
|
1890 <td>4 GB</td> |
|
1891 <td>8 GB</td> |
|
1892 </tr> |
|
1893 <tr> |
|
1894 <td>Windows X86 (32-bit)</td> |
|
1895 <td>Windows XP</td> |
|
1896 <td>Microsoft Visual Studio C++ 2010 Professional Edition</td> |
|
1897 <td>JDK 7u7</td> |
|
1898 <td>2 or more</td> |
|
1899 <td>2 GB</td> |
|
1900 <td>6 GB</td> |
|
1901 </tr> |
|
1902 <tr> |
|
1903 <td>Windows X64 (64-bit)</td> |
|
1904 <td>Windows Server 2003 - Enterprise x64 Edition</td> |
|
1905 <td>Microsoft Visual Studio C++ 2010 Professional Edition</td> |
|
1906 <td>JDK 7u7</td> |
|
1907 <td>2 or more</td> |
|
1908 <td>2 GB</td> |
|
1909 <td>6 GB</td> |
|
1910 </tr> |
|
1911 <tr> |
|
1912 <td>Mac OS X X64 (64-bit)</td> |
|
1913 <td>Mac OS X 10.7 "Lion"</td> |
|
1914 <td>XCode 4.5.2 or newer</td> |
|
1915 <td>JDK 7u7</td> |
|
1916 <td>2 or more</td> |
|
1917 <td>4 GB</td> |
|
1918 <td>6 GB</td> |
|
1919 </tr> |
|
1920 </tbody> |
|
1921 </table> |
1350 </blockquote> |
1922 </blockquote> |
1351 <!-- ------------------------------------------------------ --> |
1923 |
1352 <h4><a name="cups">Common UNIX Printing System (CUPS) Headers (Solaris & Linux)</a></h4> |
1924 <!-- ====================================================== --> |
|
1925 <hr> |
|
1926 <h3><a name="SDBE">Specific Developer Build Environments</a></h3> |
1353 <blockquote> |
1927 <blockquote> |
1354 <strong>Solaris:</strong> |
1928 We won't be listing all the possible environments, but |
1355 CUPS header files are required for building the |
1929 we will try to provide what information we have available to us. |
1356 OpenJDK on Solaris. |
|
1357 The Solaris header files can be obtained by installing |
|
1358 the package <strong>SFWcups</strong> from the Solaris Software |
|
1359 Companion CD/DVD, these often will be installed into |
|
1360 <tt>/opt/sfw/cups</tt>. |
|
1361 <p> |
1930 <p> |
1362 <strong>Linux:</strong> |
1931 <strong>NOTE: The community can help out by updating |
1363 CUPS header files are required for building the |
1932 this part of the document. |
1364 OpenJDK on Linux. |
1933 </strong> |
1365 The Linux header files are usually available from a "cups" |
1934 |
1366 development package, it's recommended that you try and use |
1935 <h4><a name="fedora">Fedora</a></h4> |
1367 the package provided by the particular version of Linux that |
1936 <blockquote> |
1368 you are using. |
1937 After installing the latest |
1369 <p> |
1938 <a href="http://fedoraproject.org">Fedora</a> |
1370 The CUPS header files can always be downloaded from |
1939 you need to install several build dependencies. |
1371 <a href="http://www.cups.org" target="_blank">www.cups.org</a>. |
1940 The simplest way to do it is to execute the |
1372 The variable |
1941 following commands as user <code>root</code>: |
1373 <tt><a href="#ALT_CUPS_HEADERS_PATH">ALT_CUPS_HEADERS_PATH</a></tt> |
1942 <blockquote> |
1374 can be used to override the default location of the |
1943 <code>yum-builddep java-1.7.0-openjdk</code> |
1375 CUPS Header files. |
1944 <br> |
|
1945 <code>yum install gcc gcc-c++</code> |
|
1946 </blockquote> |
|
1947 <p> |
|
1948 In addition, it's necessary to set a few environment |
|
1949 variables for the build: |
|
1950 <blockquote> |
|
1951 <code>export LANG=C</code> |
|
1952 <br> |
|
1953 <code>export PATH="/usr/lib/jvm/java-openjdk/bin:${PATH}"</code> |
|
1954 </blockquote> |
|
1955 </blockquote> |
|
1956 |
|
1957 |
|
1958 <h4><a name="centos">CentOS 5.5</a></h4> |
|
1959 <blockquote> |
|
1960 After installing |
|
1961 <a href="http://www.centos.org/">CentOS 5.5</a> |
|
1962 you need to make sure you have |
|
1963 the following Development bundles installed: |
|
1964 <blockquote> |
|
1965 <ul> |
|
1966 <li>Development Libraries</li> |
|
1967 <li>Development Tools</li> |
|
1968 <li>Java Development</li> |
|
1969 <li>X Software Development (Including XFree86-devel)</li> |
|
1970 </ul> |
|
1971 </blockquote> |
|
1972 <p> |
|
1973 Plus the following packages: |
|
1974 <blockquote> |
|
1975 <ul> |
|
1976 <li>cups devel: Cups Development Package</li> |
|
1977 <li>alsa devel: Alsa Development Package</li> |
|
1978 <li>Xi devel: libXi.so Development Package</li> |
|
1979 </ul> |
|
1980 </blockquote> |
|
1981 <p> |
|
1982 The freetype 2.3 packages don't seem to be available, |
|
1983 but the freetype 2.3 sources can be downloaded, built, |
|
1984 and installed easily enough from |
|
1985 <a href="http://downloads.sourceforge.net/freetype"> |
|
1986 the freetype site</a>. |
|
1987 Build and install with something like: |
|
1988 <blockquote> |
|
1989 <code>bash ./configure</code> |
|
1990 <br> |
|
1991 <code>make</code> |
|
1992 <br> |
|
1993 <code>sudo -u root make install</code> |
|
1994 </blockquote> |
|
1995 <p> |
|
1996 Mercurial packages could not be found easily, but a Google |
|
1997 search should find ones, and they usually include Python if |
|
1998 it's needed. |
|
1999 </blockquote> |
|
2000 |
|
2001 <h4><a name="debian">Debian 5.0 (Lenny)</a></h4> |
|
2002 <blockquote> |
|
2003 After installing <a href="http://debian.org">Debian</a> 5 |
|
2004 you need to install several build dependencies. |
|
2005 The simplest way to install the build dependencies is to |
|
2006 execute the following commands as user <code>root</code>: |
|
2007 <blockquote> |
|
2008 <code>aptitude build-dep openjdk-7</code> |
|
2009 <br> |
|
2010 <code>aptitude install openjdk-7-jdk libmotif-dev</code> |
|
2011 </blockquote> |
|
2012 <p> |
|
2013 In addition, it's necessary to set a few environment |
|
2014 variables for the build: |
|
2015 <blockquote> |
|
2016 <code>export LANG=C</code> |
|
2017 <br> |
|
2018 <code>export PATH="/usr/lib/jvm/java-7-openjdk/bin:${PATH}"</code> |
|
2019 </blockquote> |
|
2020 </blockquote> |
|
2021 |
|
2022 <h4><a name="ubuntu">Ubuntu 12.04</a></h4> |
|
2023 <blockquote> |
|
2024 After installing <a href="http://ubuntu.org">Ubuntu</a> 12.04 |
|
2025 you need to install several build dependencies. The simplest |
|
2026 way to do it is to execute the following commands: |
|
2027 <blockquote> |
|
2028 <code>sudo aptitude build-dep openjdk-7</code> |
|
2029 <br> |
|
2030 <code>sudo aptitude install openjdk-7-jdk</code> |
|
2031 </blockquote> |
|
2032 <p> |
|
2033 In addition, it's necessary to set a few environment |
|
2034 variables for the build: |
|
2035 <blockquote> |
|
2036 <code>export LANG=C</code> |
|
2037 <br> |
|
2038 <code>export PATH="/usr/lib/jvm/java-7-openjdk/bin:${PATH}"</code> |
|
2039 </blockquote> |
|
2040 </blockquote> |
|
2041 |
|
2042 <h4><a name="opensuse">OpenSUSE 11.1</a></h4> |
|
2043 <blockquote> |
|
2044 After installing <a href="http://opensuse.org">OpenSUSE</a> 11.1 |
|
2045 you need to install several build dependencies. |
|
2046 The simplest way to install the build dependencies is to |
|
2047 execute the following commands: |
|
2048 <blockquote> |
|
2049 <code>sudo zypper source-install -d java-1_7_0-openjdk</code> |
|
2050 <br> |
|
2051 <code>sudo zypper install make</code> |
|
2052 </blockquote> |
|
2053 <p> |
|
2054 In addition, it is necessary to set a few environment |
|
2055 variables for the build: |
|
2056 <blockquote> |
|
2057 <code>export LANG=C</code> |
|
2058 <br> |
|
2059 <code>export PATH="/usr/lib/jvm/java-1.7.0-openjdk/bin:$[PATH}"</code> |
|
2060 </blockquote> |
|
2061 <p> |
|
2062 Finally, you need to unset the <code>JAVA_HOME</code> |
|
2063 environment variable: |
|
2064 <blockquote> |
|
2065 <code>export -n JAVA_HOME</code> |
|
2066 </blockquote> |
|
2067 </blockquote> |
|
2068 |
|
2069 <h4><a name="mandriva">Mandriva Linux One 2009 Spring</a></h4> |
|
2070 <blockquote> |
|
2071 After installing <a href="http://mandriva.org">Mandriva</a> |
|
2072 Linux One 2009 Spring |
|
2073 you need to install several build dependencies. |
|
2074 The simplest way to install the build dependencies is to |
|
2075 execute the following commands as user <code>root</code>: |
|
2076 <blockquote> |
|
2077 <code>urpmi java-1.7.0-openjdk-devel make gcc gcc-c++ |
|
2078 freetype-devel zip unzip libcups2-devel libxrender1-devel |
|
2079 libalsa2-devel libstc++-static-devel libxtst6-devel |
|
2080 libxi-devel</code> |
|
2081 </blockquote> |
|
2082 <p> |
|
2083 In addition, it is necessary to set a few environment |
|
2084 variables for the build: |
|
2085 <blockquote> |
|
2086 <code>export LANG=C</code> |
|
2087 <br> |
|
2088 <code>export PATH="/usr/lib/jvm/java-1.7.0-openjdk/bin:${PATH}"</code> |
|
2089 </blockquote> |
|
2090 </blockquote> |
|
2091 |
|
2092 <h4><a name="opensolaris">OpenSolaris 2009.06</a></h4> |
|
2093 <blockquote> |
|
2094 After installing <a href="http://opensolaris.org">OpenSolaris</a> 2009.06 |
|
2095 you need to install several build dependencies. |
|
2096 The simplest way to install the build dependencies is to |
|
2097 execute the following commands: |
|
2098 <blockquote> |
|
2099 <code>pfexec pkg install SUNWgmake SUNWj7dev |
|
2100 sunstudioexpress SUNWcups SUNWzip SUNWunzip SUNWxwhl |
|
2101 SUNWxorg-headers SUNWaudh SUNWfreetype2</code> |
|
2102 </blockquote> |
|
2103 <p> |
|
2104 In addition, it is necessary to set a few environment |
|
2105 variables for the build: |
|
2106 <blockquote> |
|
2107 <code>export LANG=C</code> |
|
2108 <br> |
|
2109 <code>export PATH="/opt/SunStudioExpress/bin:${PATH}"</code> |
|
2110 </blockquote> |
|
2111 </blockquote> |
|
2112 |
1376 </blockquote> |
2113 </blockquote> |
1377 <!-- ------------------------------------------------------ --> |
2114 |
1378 <h4><a name="xrender">XRender Extension Headers (Solaris & Linux)</a></h4> |
2115 </blockquote> <!-- Appendix C --> |
1379 <blockquote> |
2116 |
1380 <p> |
2117 <!-- ====================================================== --> |
1381 <strong>Solaris:</strong> |
2118 |
1382 XRender header files are required for building the |
2119 <!-- Leave out Appendix D -- |
1383 OpenJDK on Solaris. |
2120 |
1384 The XRender header file is included with the other X11 header files |
2121 <hr> |
1385 in the package <strong>SFWxwinc</strong> on new enough versions of |
2122 <h2><a name="mapping">Appendix D: Mapping Old to New</a></h2> |
1386 Solaris and will be installed in |
2123 <blockquote> |
1387 <tt>/usr/X11/include/X11/extensions/Xrender.h</tt> or |
2124 <p>This table will help you convert some idioms of the old build |
1388 <tt>/usr/openwin/share/include/X11/extensions/Xrender.h</tt> |
2125 system to the new build system.</p> |
1389 </p><p> |
2126 <table summary="Cheat sheet for converting from old to new build system"> |
1390 <strong>Linux:</strong> |
2127 <tr valign="top"> |
1391 XRender header files are required for building the |
2128 <th>In the old build system, you used to...</th> |
1392 OpenJDK on Linux. |
2129 <th>In the new build system, you should ...</th> |
1393 The Linux header files are usually available from a "Xrender" |
2130 </tr> |
1394 development package, it's recommended that you try and use |
2131 <tr valign="top"> |
1395 the package provided by the particular distribution of Linux that |
2132 <td>run <code>make sanity</code></td> |
1396 you are using. |
2133 <td>run <code>bash ./configure</code></td> |
1397 </p> |
2134 </tr> |
1398 </blockquote> |
2135 <tr valign="top"> |
1399 <!-- ------------------------------------------------------ --> |
2136 <td>set <code>ALT_OUTPUTDIR=build/my-special-output</code></td> |
1400 <h4><a name="freetype">FreeType 2</a></h4> |
2137 <td>before building the first time: |
1401 <blockquote> |
2138 <br> |
1402 Version 2.3 or newer of FreeType is required for building the OpenJDK. |
2139 <code>cd build/my-special-output</code> |
1403 On Unix systems required files can be available as part of your |
2140 <br> |
1404 distribution (while you still may need to upgrade them). |
2141 <code>bash ../../configure</code> |
1405 Note that you need development version of package that |
2142 <br> |
1406 includes both FreeType library and header files. |
2143 to build: |
1407 <p> |
2144 <br> |
1408 You can always download latest FreeType version from the |
2145 <code>cd build/my-special-output</code> |
1409 <a href="http://www.freetype.org" target="_blank">FreeType website</a>. |
2146 <br> |
1410 <p> |
2147 <code>make</code> |
1411 Makefiles will try to pick FreeType from /usr/lib and /usr/include. |
2148 </td> |
1412 In case it is installed elsewhere you will need to set environment |
2149 </tr> |
1413 variables |
2150 <tr valign="top"> |
1414 <tt><a href="#ALT_FREETYPE_LIB_PATH">ALT_FREETYPE_LIB_PATH</a></tt> |
2151 <td>set <code>ALT_BOOTDIR=/opt/java/jdk7</code></td> |
1415 and |
2152 <td>run <code>configure --with-boot-jdk=/opt/java/jdk7</code></td> |
1416 <tt><a href="#ALT_FREETYPE_HEADERS_PATH">ALT_FREETYPE_HEADERS_PATH</a></tt> |
2153 </tr> |
1417 to refer to place where library and header files are installed. |
2154 <tr valign="top"> |
1418 <p> |
2155 <td>run <code>make ARCH_DATA_MODEL=32</code></td> |
1419 Building the freetype 2 libraries from scratch is also possible, |
2156 <td>run <code>configure --with-target-bits=32</code></td> |
1420 however on Windows refer to the |
2157 </tr> |
1421 <a href="http://freetype.freedesktop.org/wiki/FreeType_DLL"> |
2158 <tr valign="top"> |
1422 Windows FreeType DLL build instructions</a>. |
2159 <td>set <code>BUILD_CLIENT_ONLY=true</code></td> |
1423 <p> |
2160 <td>run <code>configure --with-jvm-variants=client</code></td> |
1424 Note that by default FreeType is built with byte code hinting |
2161 </tr> |
1425 support disabled due to licensing restrictions. |
2162 <tr valign="top"> |
1426 In this case, text appearance and metrics are expected to |
2163 <td>set <code>ALT_FREETYPE_LIB_PATH=/opt/freetype/lib</code> |
1427 differ from Sun's official JDK build. |
2164 and <code>ALT_FREETYPE_HEADERS_PATH=/opt/freetype/include</code></td> |
1428 See |
2165 <td>run <code>configure --with-freetype=/opt/freetype</code></td> |
1429 <a href="http://freetype.sourceforge.net/freetype2/index.html"> |
2166 </tr> |
1430 the SourceForge FreeType2 Home Page |
2167 <tr valign="top"> |
1431 </a> |
2168 <td>set <code>ALT_CUPS_HEADERS_PATH=/opt/cups/include</code></td> |
1432 for more information. |
2169 <td>run <code>configure --with-cups=/opt/cups</code></td> |
1433 </blockquote> |
2170 </tr> |
1434 <!-- ------------------------------------------------------ --> |
2171 <tr valign="top"> |
1435 <h4><a name="alsa">Advanced Linux Sound Architecture (ALSA) (Linux only)</a></h4> |
2172 <td>set <code>ALT_OPENWIN_HOME=/opt/X11R6</code></td> |
1436 <blockquote> |
2173 <td>run <code>configure --with-x=/opt/X11R6</code></td> |
1437 <strong>Linux only:</strong> |
2174 </tr> |
1438 Version 0.9.1 or newer of the ALSA files are |
2175 <tr valign="top"> |
1439 required for building the OpenJDK on Linux. |
2176 <td>set <code>ALT_MSVCRNN_DLL_PATH=c:/vc_redist</code></td> |
1440 These Linux files are usually available from an "alsa" |
2177 <td>run <code>configure --with-msvcr100dll=/cygdrive/c/vc_redist</code></td> |
1441 of "libasound" |
2178 </tr> |
1442 development package, it's highly recommended that you try and use |
2179 <tr valign="top"> |
1443 the package provided by the particular version of Linux that |
2180 <td>set <code>ALT_COMPILER_PATH=/opt/my-gcc/bin/gcc</code></td> |
1444 you are using. |
2181 <td>run <code>CC=/opt/my-gcc/bin/gcc configure</code> |
1445 The makefiles will check this emit a sanity error if it is |
2182 or <code>CXX=/opt/my-gcc/bin/g++ configure</code> |
1446 missing or the wrong version. |
2183 </td> |
1447 <p> |
2184 </tr> |
1448 In particular, older Linux systems will likely not have the |
2185 <tr valign="top"> |
1449 right version of ALSA installed, for example |
2186 <td>set <code>BUILD_HEADLESS_ONLY=true</code></td> |
1450 Redhat AS 2.1 U2 and SuSE 8.1 do not include a sufficiently |
2187 <td>run <code>configure --disable-headful</code></td> |
1451 recent ALSA distribution. |
2188 </tr> |
1452 On rpm-based systems, you can see if ALSA is installed by |
2189 <tr valign="top"> |
1453 running this command: |
2190 <td>set <code>ALT_DEVTOOLS_PATH=/opt/mytools</code></td> |
1454 <pre> |
2191 <td>just run <code>configure</code>, |
1455 <tt>rpm -qa | grep alsa</tt> |
2192 your tools should be detected automatically. |
1456 </pre> |
2193 If you have an unusual configuration, |
1457 Both <tt>alsa</tt> and <tt>alsa-devel</tt> packages are needed. |
2194 add the tools directory to your <code>PATH</code>. |
1458 <p> |
2195 </td> |
1459 If your distribution does not come with ALSA, and you can't |
2196 </tr> |
1460 find ALSA packages built for your particular system, |
2197 <tr valign="top"> |
1461 you can try to install the pre-built ALSA rpm packages from |
2198 <td>set <code>ALT_DROPS_DIR=/home/user/dropdir</code></td> |
1462 <a href="http://www.freshrpms.net/" target="_blank"> |
2199 <td>source drops are not used anymore</td> |
1463 <tt>www.freshrpms.net</tt></a>. |
2200 </tr> |
1464 Note that installing a newer ALSA could |
2201 <tr valign="top"> |
1465 break sound output if an older version of ALSA was previously |
2202 <td>set <code>USE_ONLY_BOOTDIR_TOOLS=true</code></td> |
1466 installed on the system, but it will enable JDK compilation. |
2203 <td>not needed, <code>configure</code> should always do the Right Thing automatically</td> |
1467 <blockquote> |
2204 </tr> |
1468 Installation: execute as root<br> |
2205 <tr valign="top"> |
1469 [i586]: <code>rpm -Uv --force alsa-lib-devel-0.9.1-rh61.i386.rpm</code><br> |
2206 <td>set <code>ALT_JDK_IMPORT_PATH=/opt/java/import-jdk</code> |
1470 [x64]: <code>rpm -Uv --force alsa-lib-devel-0.9.8-amd64.x86_64.rpm</code><br> |
2207 or <code>ALT_BUILD_JDK_IMPORT_PATH=/opt/java/import-jdk</code> |
1471 Uninstallation:<br> |
2208 </td> |
1472 [i586]: <code>rpm -ev alsa-lib-devel-0.9.1-rh61</code><br> |
2209 <td>Importing JDKs is no longer possible, |
1473 [x64]:<code>rpm -ev alsa-lib-devel-0.9.8-amd64</code><br> |
2210 but hotspot can be imported using |
1474 Make sure that you do not link to the static library |
2211 <code>--with-import-hotspot</code>. |
1475 (<tt>libasound.a</tt>), |
2212 Documentation on how to achieve a |
1476 by verifying that the dynamic library (<tt>libasound.so</tt>) is |
2213 similar solution will come soon! |
1477 correctly installed in <tt>/usr/lib</tt>. |
2214 </td> |
1478 </blockquote> |
2215 </tr> |
1479 As a last resort you can go to the |
2216 <tr valign="top"> |
1480 <a href="http://www.alsa-project.org" target="_blank"> |
2217 <td>set <code>EXTRA_CFLAGS=-Xfoo</code></td> |
1481 Advanced Linux Sound Architecture Site</a> and build it from |
2218 <td>run <code>CFLAGS=-Xfoo configure</code></td> |
1482 source. |
2219 </tr> |
1483 <blockquote> |
2220 <tr valign="top"> |
1484 Download driver and library |
2221 <td>set <code>CROSS_COMPILE_ARCH=i586</code></td> |
1485 source tarballs from |
2222 <td>see <a href="#sec7.3"> section 7.3, Cross-compilation</a></td> |
1486 <a href="http://www.alsa-project.org" target="_blank">ALSA's homepage</a>. |
2223 </tr> |
1487 As root, execute the following |
2224 <tr valign="top"> |
1488 commands (you may need to adapt the version number): |
2225 <td>set <code>SKIP_BOOT_CYCLE=false</code></td> |
1489 <pre> |
2226 <td>Run <code>make bootcycle-images</code>.</td> |
1490 <tt> |
2227 </tr> |
1491 $ tar xjf alsa-driver-0.9.1.tar.bz2 |
2228 </table> |
1492 $ cd alsa-driver-0.9.1 |
2229 |
1493 $ ./configure |
2230 <h3><a name="variables">Environment/Make Variables</a></h3> |
1494 $ make install |
2231 <p> |
1495 $ cd .. |
2232 Some of the |
1496 $ tar xjf alsa-lib-0.9.1.tar.bz2 |
2233 environment or make variables (just called <b>variables</b> in this |
1497 $ cd alsa-lib-0.9.1 |
2234 document) that can impact the build are: |
1498 $ ./configure |
2235 <blockquote> |
1499 $ make install |
2236 <dl> |
1500 </tt> |
2237 <dt><a name="path"><code>PATH</code></a> </dt> |
1501 </pre> |
2238 <dd>Typically you want to set the <code>PATH</code> to include: |
1502 Should one of the above steps fail, refer to the documentation on |
2239 <ul> |
1503 ALSA's home page. |
2240 <li>The location of the GNU make binary</li> |
1504 </blockquote> |
2241 <li>The location of the Bootstrap JDK <code>java</code> |
1505 Note that this is a minimum install that enables |
2242 (see <a href="#bootjdk">Bootstrap JDK</a>)</li> |
1506 building the JDK platform. To actually use ALSA sound drivers, more |
2243 <li>The location of the C/C++ compilers |
1507 steps are necessary as outlined in the documentation on ALSA's homepage. |
2244 (see <a href="#compilers"><code>compilers</code></a>)</li> |
1508 <p> |
2245 <li>The location or locations for the Unix command utilities |
1509 ALSA can be uninstalled by executing <tt>make uninstall</tt> first in |
2246 (e.g. <code>/usr/bin</code>)</li> |
1510 the <tt>alsa-lib-0.9.1</tt> directory and then in |
2247 </ul> |
1511 <tt>alsa-driver-0.9.1</tt>. |
2248 </dd> |
1512 </blockquote> |
2249 <dt><code>MILESTONE</code> </dt> |
1513 There are no ALT* variables to change the assumed locations of ALSA, |
2250 <dd> |
1514 the makefiles will expect to find the ALSA include files and library at: |
2251 The milestone name for the build (<i>e.g.</i>"beta"). |
1515 <tt>/usr/include/alsa</tt> and <tt>/usr/lib/libasound.so</tt>. |
2252 The default value is "internal". |
1516 </blockquote> |
2253 </dd> |
1517 <!-- ------------------------------------------------------ --> |
2254 <dt><code>BUILD_NUMBER</code> </dt> |
1518 <h4>Windows Specific Dependencies</h4> |
2255 <dd> |
1519 <blockquote> |
2256 The build number for the build (<i>e.g.</i> "b27"). |
1520 <strong>Unix Command Tools (<a name="cygwin">CYGWIN</a>)</strong> |
2257 The default value is "b00". |
1521 <blockquote> |
2258 </dd> |
1522 The OpenJDK requires access to a set of unix command tools |
2259 <dt><a name="arch_data_model"><code>ARCH_DATA_MODEL</code></a></dt> |
1523 on Windows which can be supplied by |
2260 <dd>The <code>ARCH_DATA_MODEL</code> variable |
1524 <a href="http://www.cygwin.com" target="_blank">CYGWIN</a>. |
2261 is used to specify whether the build is to generate 32-bit or 64-bit |
1525 <p> |
2262 binaries. |
1526 The OpenJDK build requires CYGWIN version 1.5.12 or newer. |
2263 The Solaris build supports either 32-bit or 64-bit builds, but |
1527 Information about CYGWIN can |
2264 Windows and Linux will support only one, depending on the specific |
1528 be obtained from the CYGWIN website at |
2265 OS being used. |
1529 <a href="http://www.cygwin.com" target="_blank">www.cygwin.com</a>. |
2266 Normally, setting this variable is only necessary on Solaris. |
1530 <p> |
2267 Set <code>ARCH_DATA_MODEL</code> to <code>32</code> for generating 32-bit binaries, |
1531 By default CYGWIN doesn't install all the tools required for building |
2268 or to <code>64</code> for generating 64-bit binaries. |
1532 the OpenJDK. |
2269 </dd> |
1533 Along with the default installation, you need to install |
2270 <dt><a name="ALT_BOOTDIR"><code>ALT_BOOTDIR</code></a></dt> |
1534 the following tools. |
2271 <dd> |
1535 <blockquote> |
2272 The location of the bootstrap JDK installation. |
1536 <table border="1"> |
2273 See <a href="#bootjdk">Bootstrap JDK</a> for more information. |
1537 <thead> |
2274 You should always install your own local Bootstrap JDK and |
1538 <tr> |
2275 always set <code>ALT_BOOTDIR</code> explicitly. |
1539 <td>Binary Name</td> |
2276 </dd> |
1540 <td>Category</td> |
2277 <dt><a name="ALT_OUTPUTDIR"><code>ALT_OUTPUTDIR</code></a> </dt> |
1541 <td>Package</td> |
2278 <dd> |
1542 <td>Description</td> |
2279 An override for specifying the (absolute) path of where the |
1543 </tr> |
2280 build output is to go. |
1544 </thead> |
2281 The default output directory will be build/<i>platform</i>. |
1545 <tbody> |
2282 </dd> |
1546 <tr> |
2283 <dt><a name="ALT_COMPILER_PATH"><code>ALT_COMPILER_PATH</code></a> </dt> |
1547 <td>ar.exe</td> |
2284 <dd> |
1548 <td>Devel</td> |
2285 The location of the C/C++ compiler. |
1549 <td>binutils</td> |
2286 The default varies depending on the platform. |
1550 <td>The GNU assembler, linker and binary |
2287 </dd> |
1551 utilities</td> |
2288 <dt><code><a name="ALT_CACERTS_FILE">ALT_CACERTS_FILE</a></code></dt> |
1552 </tr> |
2289 <dd> |
1553 <tr> |
2290 The location of the <a href="#cacerts">cacerts</a> file. |
1554 <td>make.exe</td> |
2291 The default will refer to |
1555 <td>Devel</td> |
2292 <code>jdk/src/share/lib/security/cacerts</code>. |
1556 <td>make</td> |
2293 </dd> |
1557 <td>The GNU version of the 'make' utility built for CYGWIN.<br> |
2294 <dt><a name="ALT_CUPS_HEADERS_PATH"><code>ALT_CUPS_HEADERS_PATH</code></a> </dt> |
1558 <b>NOTE</b>: the Cygwin make can not be used to build the |
2295 <dd> |
1559 OpenJDK. You only need it to build your own version of make |
2296 The location of the CUPS header files. |
1560 (see <a href="#gmake">the GNU make section</a>)</td> |
2297 See <a href="#cups">CUPS information</a> for more information. |
1561 </tr> |
2298 If this path does not exist the fallback path is |
1562 <tr> |
2299 <code>/usr/include</code>. |
1563 <td>m4.exe</td> |
2300 </dd> |
1564 <td>Interpreters</td> |
2301 <dt><a name="ALT_FREETYPE_LIB_PATH"><code>ALT_FREETYPE_LIB_PATH</code></a></dt> |
1565 <td>m4</td> |
2302 <dd> |
1566 <td>GNU implementation of the traditional Unix macro |
2303 The location of the FreeType shared library. |
1567 processor</td> |
2304 See <a href="#freetype">FreeType information</a> for details. |
1568 </tr> |
2305 </dd> |
1569 <tr> |
2306 <dt><a name="ALT_FREETYPE_HEADERS_PATH"><code>ALT_FREETYPE_HEADERS_PATH</code></a></dt> |
1570 <td>cpio.exe</td> |
2307 <dd> |
1571 <td>Utils</td> |
2308 The location of the FreeType header files. |
1572 <td>cpio</td> |
2309 See <a href="#freetype">FreeType information</a> for details. |
1573 <td>A program to manage archives of files</td> |
2310 </dd> |
1574 </tr> |
2311 <dt><a name="ALT_JDK_DEVTOOLS_PATH"><code>ALT_JDK_DEVTOOLS_PATH</code></a></dt> |
1575 <tr> |
2312 <dd> |
1576 <td>gawk.exe</td> |
2313 The default root location of the devtools. |
1577 <td>Utils</td> |
2314 The default value is |
1578 <td>awk</td> |
2315 <code>$(ALT_SLASH_JAVA)/devtools</code>. |
1579 <td>Pattern-directed scanning and processing language</td> |
2316 </dd> |
1580 </tr> |
2317 <dt><code><a name="ALT_DEVTOOLS_PATH">ALT_DEVTOOLS_PATH</a></code> </dt> |
1581 <tr> |
2318 <dd> |
1582 <td>file.exe</td> |
2319 The location of tools like the |
1583 <td>Utils</td> |
2320 <a href="#zip"><code>zip</code> and <code>unzip</code></a> |
1584 <td>file</td> |
2321 binaries, but might also contain the GNU make utility |
1585 <td>Determines file type using 'magic' numbers</td> |
2322 (<code><i>gmake</i></code>). |
1586 </tr> |
2323 So this area is a bit of a grab bag, especially on Windows. |
1587 <tr> |
2324 The default value depends on the platform and |
1588 <td>zip.exe</td> |
2325 Unix Commands being used. |
1589 <td>Archive</td> |
2326 On Linux the default will be |
1590 <td>zip</td> |
2327 <code>$(ALT_JDK_DEVTOOLS_PATH)/linux/bin</code>, |
1591 <td>Package and compress (archive) files</td> |
2328 on Solaris |
1592 </tr> |
2329 <code>$(ALT_JDK_DEVTOOLS_PATH)/<i>{sparc,i386}</i>/bin</code>, |
1593 <tr> |
2330 and on Windows with CYGWIN |
1594 <td>unzip.exe</td> |
2331 <code>/usr/bin</code>. |
1595 <td>Archive</td> |
2332 </dd> |
1596 <td>unzip</td> |
2333 <dt><a name="ALT_UNIXCCS_PATH"><code>ALT_UNIXCCS_PATH</code></a></dt> |
1597 <td>Extract compressed files in a ZIP archive</td> |
2334 <dd> |
1598 </tr> |
2335 <strong>Solaris only:</strong> |
1599 <tr> |
2336 An override for specifying where the Unix CCS |
1600 <td>free.exe</td> |
2337 command set are located. |
1601 <td>System</td> |
2338 The default location is <code>/usr/ccs/bin</code> |
1602 <td>procps</td> |
2339 </dd> |
1603 <td>Display amount of free and used memory in the system</td> |
2340 <dt><a name="ALT_SLASH_JAVA"><code>ALT_SLASH_JAVA</code></a></dt> |
1604 </tr> |
2341 <dd> |
1605 </tbody> |
2342 The default root location for many of the ALT path locations |
1606 </table> |
2343 of the following ALT variables. |
1607 </blockquote> |
2344 The default value is |
1608 <p> |
2345 <code>"/java"</code> on Solaris and Linux, |
1609 Note that the CYGWIN software can conflict with other non-CYGWIN |
2346 <code>"J:"</code> on Windows. |
1610 software on your Windows system. |
2347 </dd> |
1611 CYGWIN provides a |
2348 |
1612 <a href="http://cygwin.com/faq/faq.using.html" target="_blank">FAQ</a> for |
2349 <dt><a name="ALT_OPENWIN_HOME"><code>ALT_OPENWIN_HOME</code></a></dt> |
1613 known issues and problems, of particular interest is the |
2350 <dd> |
1614 section on |
2351 The top-level directory of the libraries and include files |
1615 <a href="http://cygwin.com/faq/faq.using.html#faq.using.bloda" target="_blank"> |
2352 for the platform's |
1616 BLODA (applications that interfere with CYGWIN)</a>. |
2353 graphical programming environment. |
1617 <p> |
2354 The default location is platform specific. |
1618 <b>WARNING:</b> |
2355 For example, on Linux it defaults to <code>/usr/X11R6/</code>. |
1619 Be very careful with <b><tt>link.exe</tt></b>, it will conflict |
2356 </dd> |
1620 with the Visual Studio version. You need the Visual Studio |
2357 <dt><strong>Windows specific:</strong></dt> |
1621 version of <tt>link.exe</tt>, not the CYGWIN one. |
2358 <dd> |
1622 So it's important that the Visual Studio paths in PATH preceed |
2359 <dl> |
1623 the CYGWIN path <tt>/usr/bin</tt>. |
2360 <dt><a name="ALT_WINDOWSSDKDIR"><code>ALT_WINDOWSSDKDIR</code></a> </dt> |
1624 </blockquote> |
2361 <dd> |
1625 <strong> Minimalist GNU for Windows (<a name="msys">MinGW/MSYS</a>)</strong> |
2362 The location of the |
1626 <blockquote> |
2363 Microsoft Windows SDK where some tools will be |
1627 Alternatively, the set of unix command tools for the OpenJDK build on |
2364 located. |
1628 Windows can be supplied by |
2365 The default is whatever WINDOWSSDKDIR is set to |
1629 <a href="http://www.mingw.org/wiki/MSYS" target="_blank">MinGW/MSYS</a>. |
2366 (or WindowsSdkDir) or the path |
1630 <p> |
2367 <br> |
1631 In addition to the tools which will be installed by default, you have |
2368 <code>c:\Program Files\Microsoft SDKs\Windows\v7.0a</code> |
1632 to manually install the <tt>msys-zip</tt> and <tt>msys-unzip</tt> packages. |
2369 </dd> |
1633 This can be easily done with the MinGW command line installer:<br/> |
2370 <dt><code><a name="ALT_DXSDK_PATH">ALT_DXSDK_PATH</a></code> </dt> |
1634 <tt><br/> |
2371 <dd> |
1635 mingw-get.exe install msys-zip<br/> |
2372 The location of the |
1636 mingw-get.exe install msys-unzip<br/> |
2373 <a href="#dxsdk">Microsoft DirectX 9 SDK</a>. |
1637 </tt> |
2374 The default will be to try and use the DirectX environment |
1638 </p> |
2375 variable <code>DXSDK_DIR</code>, |
1639 </blockquote> |
2376 failing that, look in <code>C:/DXSDK</code>. |
1640 <strong><a name="dxsdk">Microsoft DirectX 9.0 SDK header files and libraries</a></strong> |
2377 </dd> |
1641 <blockquote> |
2378 <dt><code><a name="ALT_MSVCRNN_DLL_PATH">ALT_MSVCRNN_DLL_PATH</a></code> </dt> |
1642 Microsoft DirectX 9.0 SDK (Summer 2004) |
2379 <dd> |
1643 headers are required for building |
2380 The location of the |
1644 OpenJDK. |
2381 <a href="#msvcrNN"><code>MSVCR100.DLL</code></a>. |
1645 This SDK can be downloaded from |
2382 </dd> |
1646 <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=FD044A42-9912-42A3-9A9E-D857199F888E&displaylang=en" target="_blank"> |
2383 </dl> |
1647 Microsoft DirectX 9.0 SDK (Summer 2004)</a>. |
2384 </dd> |
1648 If the link above becomes obsolete, the SDK can be found from |
2385 <dt><strong>Cross-Compilation Support:</strong></dt> |
1649 <a href="http://download.microsoft.com" target="_blank">the Microsoft Download Site</a> |
2386 <dd> |
1650 (search with "DirectX 9.0 SDK Update Summer 2004"). |
2387 <dl> |
1651 The location of this SDK can be set with |
2388 <dt><a name="CROSS_COMPILE_ARCH"><code>CROSS_COMPILE_ARCH</code></a> </dt> |
1652 <tt><a href="#ALT_DXSDK_PATH">ALT_DXSDK_PATH</a></tt> |
2389 <dd> |
1653 but it's normally found via the DirectX environment variable |
2390 Set to the target architecture of a |
1654 <tt>DXSDK_DIR</tt>. |
2391 cross-compilation build. If set, this |
1655 </blockquote> |
2392 variable is used to signify that we are |
1656 <strong><a name="msvcrNN"><tt>MSVCR100.DLL</tt></a></strong> |
2393 cross-compiling. The expectation |
1657 <blockquote> |
2394 is that |
1658 The OpenJDK build requires access to a redistributable |
2395 <a href="#ALT_COMPILER_PATH"><code>ALT_COMPILER_PATH</code></a> |
1659 <tt>MSVCR100.DLL</tt>. |
2396 is set |
1660 This is usually picked up automatically from the redist |
2397 to point to the cross-compiler and that any |
1661 directories of Visual Studio 2010. |
2398 cross-compilation specific flags |
1662 If this cannot be found set the |
2399 are passed using |
1663 <a href="#ALT_MSVCRNN_DLL_PATH"><tt>ALT_MSVCRNN_DLL_PATH</tt></a> |
2400 <a href="#EXTRA_CFLAGS"><code>EXTRA_CFLAGS</code></a>. |
1664 variable to the location of this file. |
2401 The <a href="#ALT_OPENWIN_HOME"><code>ALT_OPENWIN_HOME</code></a> |
1665 <p> |
2402 variable should |
1666 </blockquote> |
2403 also be set to point to the graphical header files |
1667 </blockquote> |
2404 (e.g. X11) provided with |
1668 <!-- ------------------------------------------------------ --> |
2405 the cross-compiler. |
|
2406 When cross-compiling we skip execution of any demos |
|
2407 etc that may be built, and |
|
2408 also skip binary-file verification. |
|
2409 </dd> |
|
2410 <dt><code><a name="EXTRA_CFLAGS">EXTRA_CFLAGS</a></code> </dt> |
|
2411 <dd> |
|
2412 Used to pass cross-compilation options to the |
|
2413 cross-compiler. |
|
2414 These are added to the <code>CFLAGS</code> |
|
2415 and <code>CXXFLAGS</code> variables. |
|
2416 </dd> |
|
2417 <dt><code><a name="USE_ONLY_BOOTDIR_TOOLS">USE_ONLY_BOOTDIR_TOOLS</a></code> </dt> |
|
2418 <dd> |
|
2419 Used primarily for cross-compilation builds |
|
2420 (and always set in that case) |
|
2421 this variable indicates that tools from the |
|
2422 boot JDK should be used during |
|
2423 the build process, not the tools |
|
2424 (<code>javac</code>, <code>javah</code>, <code>jar</code>) |
|
2425 just built (which can't execute on the build host). |
|
2426 </dd> |
|
2427 <dt><code><a name="HOST_CC">HOST_CC</a></code> </dt> |
|
2428 <dd> |
|
2429 The location of the C compiler to generate programs |
|
2430 to run on the build host. |
|
2431 Some parts of the build generate programs that are |
|
2432 then compiled and executed |
|
2433 to produce other parts of the build. Normally the |
|
2434 primary C compiler is used |
|
2435 to do this, but when cross-compiling that would be |
|
2436 the cross-compiler and the |
|
2437 resulting program could not be executed. |
|
2438 On Linux this defaults to <code>/usr/bin/gcc</code>; |
|
2439 on other platforms it must be |
|
2440 set explicitly. |
|
2441 </dd> |
|
2442 </dl> |
|
2443 <dt><strong>Specialized Build Options:</strong></dt> |
|
2444 <dd> |
|
2445 Some build variables exist to support specialized build |
|
2446 environments and/or specialized |
|
2447 build products. Their use is only supported in those contexts: |
|
2448 <dl> |
|
2449 <dt><code><a name="BUILD_CLIENT_ONLY">BUILD_CLIENT_ONLY</a></code> </dt> |
|
2450 <dd> |
|
2451 Indicates this build will only contain the |
|
2452 Hotspot client VM. In addition to |
|
2453 controlling the Hotspot build target, |
|
2454 it ensures that we don't try to copy |
|
2455 any server VM files/directories, |
|
2456 and defines a default <code>jvm.cfg</code> file |
|
2457 suitable for a client-only environment. |
|
2458 Using this in a 64-bit build will |
|
2459 generate a sanity warning as 64-bit client |
|
2460 builds are not directly supported. |
|
2461 </dd> |
|
2462 <dt><code><a name="BUILD_HEADLESS_ONLY"></a>BUILD_HEADLESS_ONLY</code> </dt> |
|
2463 <dd> |
|
2464 Used when the build environment has no graphical |
|
2465 capabilities at all. This |
|
2466 excludes building anything that requires graphical |
|
2467 libraries to be available. |
|
2468 </dd> |
|
2469 <dt><code><a name="JAVASE_EMBEDDED"></a>JAVASE_EMBEDDED</code> </dt> |
|
2470 <dd> |
|
2471 Used to indicate this is a build of the Oracle |
|
2472 Java SE Embedded product. |
|
2473 This will enable the directives included in the |
|
2474 SE-Embedded specific build |
|
2475 files. |
|
2476 </dd> |
|
2477 <dt><code><a name="LIBZIP_CAN_USE_MMAP">LIBZIP_CAN_USE_MMAP</a></code> </dt> |
|
2478 <dd> |
|
2479 If set to false, disables the use of mmap by the |
|
2480 zip utility. Otherwise, |
|
2481 mmap will be used. |
|
2482 </dd> |
|
2483 <dt><code><a name="COMPRESS_JARS"></a>COMPRESS_JARS</code> </dt> |
|
2484 <dd> |
|
2485 If set to true, causes certain jar files that |
|
2486 would otherwise be built without |
|
2487 compression, to use compression. |
|
2488 </dd> |
|
2489 </dl> |
|
2490 </dd> |
|
2491 </dl> |
|
2492 </blockquote> |
|
2493 |
|
2494 </blockquote> <!-- Appendix D --> |
|
2495 |
|
2496 <!-- ====================================================== --> |
1669 <hr> |
2497 <hr> |
1670 <h2><a name="creating">Creating the Build</a></h2> |
2498 <p>End of OpenJDK README-builds.html document.<br>Please come again! |
1671 <blockquote> |
|
1672 Once a machine is setup to build the OpenJDK, |
|
1673 the steps to create the build are fairly simple. |
|
1674 The various ALT settings can either be made into variables |
|
1675 or can be supplied on the |
|
1676 <a href="#gmake"><tt><i>gmake</i></tt></a> |
|
1677 command. |
|
1678 <ol> |
|
1679 <li>Use the sanity rule to double check all the ALT settings: |
|
1680 <blockquote> |
|
1681 <tt> |
|
1682 <i>gmake</i> |
|
1683 sanity |
|
1684 [ARCH_DATA_MODEL=<i>32 or 64</i>] |
|
1685 [other "ALT_" overrides] |
|
1686 </tt> |
|
1687 </blockquote> |
|
1688 </li> |
|
1689 <li>Start the build with the command: |
|
1690 <blockquote> |
|
1691 <tt> |
|
1692 <i>gmake</i> |
|
1693 [ARCH_DATA_MODEL=<i>32 or 64</i>] |
|
1694 [ALT_OUTPUTDIR=<i>output_directory</i>] |
|
1695 [other "ALT_" overrides] |
|
1696 </tt> |
|
1697 </blockquote> |
|
1698 </li> |
|
1699 </ol> |
|
1700 <p> |
|
1701 <strong>Solaris:</strong> |
|
1702 Note that ARCH_DATA_MODEL is really only needed on Solaris to |
|
1703 indicate you want to built the 64-bit version. |
|
1704 And before the Solaris 64-bit binaries can be used, they |
|
1705 must be merged with the binaries from a separate 32-bit build. |
|
1706 The merged binaries may then be used in either 32-bit or 64-bit mode, with |
|
1707 the selection occurring at runtime |
|
1708 with the <tt>-d32</tt> or <tt>-d64</tt> options. |
|
1709 </blockquote> |
|
1710 <!-- ------------------------------------------------------ --> |
|
1711 <hr> |
2499 <hr> |
1712 <h2><a name="testing">Testing the Build</a></h2> |
2500 |
1713 <blockquote> |
|
1714 When the build is completed, you should see the generated |
|
1715 binaries and associated files in the <tt>j2sdk-image</tt> |
|
1716 directory in the output directory. |
|
1717 The default output directory is |
|
1718 <tt>build/<i>platform</i></tt>, |
|
1719 where <tt><i>platform</i></tt> is one of |
|
1720 <blockquote> |
|
1721 <ul> |
|
1722 <li><tt>solaris-sparc</tt></li> |
|
1723 <li><tt>solaris-sparcv9</tt></li> |
|
1724 <li><tt>solaris-i586</tt></li> |
|
1725 <li><tt>solaris-amd64</tt></li> |
|
1726 <li><tt>linux-i586</tt></li> |
|
1727 <li><tt>linux-amd64</tt></li> |
|
1728 <li><tt>windows-i586</tt></li> |
|
1729 <li><tt>windows-amd64</tt></li> |
|
1730 </ul> |
|
1731 </blockquote> |
|
1732 In particular, the |
|
1733 <tt>build/<i>platform</i>/j2sdk-image/bin</tt> |
|
1734 directory should contain executables for the |
|
1735 OpenJDK tools and utilities. |
|
1736 <p> |
|
1737 You can test that the build completed properly by using the build |
|
1738 to run the various demos that you will find in the |
|
1739 <tt>build/<i>platform</i>/j2sdk-image/demo</tt> |
|
1740 directory. |
|
1741 <p> |
|
1742 The provided regression tests can be run with the <tt>jtreg</tt> |
|
1743 utility from |
|
1744 <a href="http://openjdk.java.net/jtreg/" target="_blank">the jtreg site</a>. |
|
1745 </blockquote> |
|
1746 <!-- ------------------------------------------------------ --> |
|
1747 <hr> |
|
1748 <h2><a name="variables">Environment/Make Variables</a></h2> |
|
1749 <p> |
|
1750 Some of the |
|
1751 environment or make variables (just called <b>variables</b> in this |
|
1752 document) that can impact the build are: |
|
1753 <blockquote> |
|
1754 <dl> |
|
1755 <dt><a name="path"><tt>PATH</tt></a> </dt> |
|
1756 <dd>Typically you want to set the <tt>PATH</tt> to include: |
|
1757 <ul> |
|
1758 <li>The location of the GNU make binary</li> |
|
1759 <li>The location of the Bootstrap JDK <tt>java</tt> |
|
1760 (see <a href="#bootjdk">Bootstrap JDK</a>)</li> |
|
1761 <li>The location of the C/C++ compilers |
|
1762 (see <a href="#compilers"><tt>compilers</tt></a>)</li> |
|
1763 <li>The location or locations for the Unix command utilities |
|
1764 (e.g. <tt>/usr/bin</tt>)</li> |
|
1765 </ul> |
|
1766 </dd> |
|
1767 <dt><tt>MILESTONE</tt> </dt> |
|
1768 <dd> |
|
1769 The milestone name for the build (<i>e.g.</i>"beta"). |
|
1770 The default value is "internal". |
|
1771 </dd> |
|
1772 <dt><tt>BUILD_NUMBER</tt> </dt> |
|
1773 <dd> |
|
1774 The build number for the build (<i>e.g.</i> "b27"). |
|
1775 The default value is "b00". |
|
1776 </dd> |
|
1777 <dt><a name="arch_data_model"><tt>ARCH_DATA_MODEL</tt></a></dt> |
|
1778 <dd>The <tt>ARCH_DATA_MODEL</tt> variable |
|
1779 is used to specify whether the build is to generate 32-bit or 64-bit |
|
1780 binaries. |
|
1781 The Solaris build supports either 32-bit or 64-bit builds, but |
|
1782 Windows and Linux will support only one, depending on the specific |
|
1783 OS being used. |
|
1784 Normally, setting this variable is only necessary on Solaris. |
|
1785 Set <tt>ARCH_DATA_MODEL</tt> to <tt>32</tt> for generating 32-bit binaries, |
|
1786 or to <tt>64</tt> for generating 64-bit binaries. |
|
1787 </dd> |
|
1788 <dt><a name="ALT_BOOTDIR"><tt>ALT_BOOTDIR</tt></a></dt> |
|
1789 <dd> |
|
1790 The location of the bootstrap JDK installation. |
|
1791 See <a href="#bootjdk">Bootstrap JDK</a> for more information. |
|
1792 You should always install your own local Bootstrap JDK and |
|
1793 always set <tt>ALT_BOOTDIR</tt> explicitly. |
|
1794 </dd> |
|
1795 <dt><a name="ALT_JDK_IMPORT_PATH"><tt>ALT_JDK_IMPORT_PATH</tt></a></dt> |
|
1796 <dd> |
|
1797 The location of a previously built JDK installation. |
|
1798 See <a href="#importjdk">Optional Import JDK</a> for more information. |
|
1799 </dd> |
|
1800 <dt><a name="ALT_OUTPUTDIR"><tt>ALT_OUTPUTDIR</tt></a> </dt> |
|
1801 <dd> |
|
1802 An override for specifying the (absolute) path of where the |
|
1803 build output is to go. |
|
1804 The default output directory will be build/<i>platform</i>. |
|
1805 </dd> |
|
1806 <dt><a name="ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a> </dt> |
|
1807 <dd> |
|
1808 The location of the C/C++ compiler. |
|
1809 The default varies depending on the platform. |
|
1810 </dd> |
|
1811 <dt><tt><a name="ALT_CACERTS_FILE">ALT_CACERTS_FILE</a></tt></dt> |
|
1812 <dd> |
|
1813 The location of the <a href="#cacerts">cacerts</a> file. |
|
1814 The default will refer to |
|
1815 <tt>jdk/src/share/lib/security/cacerts</tt>. |
|
1816 </dd> |
|
1817 <dt><a name="ALT_CUPS_HEADERS_PATH"><tt>ALT_CUPS_HEADERS_PATH</tt></a> </dt> |
|
1818 <dd> |
|
1819 The location of the CUPS header files. |
|
1820 See <a href="#cups">CUPS information</a> for more information. |
|
1821 If this path does not exist the fallback path is |
|
1822 <tt>/usr/include</tt>. |
|
1823 </dd> |
|
1824 <dt><a name="ALT_FREETYPE_LIB_PATH"><tt>ALT_FREETYPE_LIB_PATH</tt></a></dt> |
|
1825 <dd> |
|
1826 The location of the FreeType shared library. |
|
1827 See <a href="#freetype">FreeType information</a> for details. |
|
1828 </dd> |
|
1829 <dt><a name="ALT_FREETYPE_HEADERS_PATH"><tt>ALT_FREETYPE_HEADERS_PATH</tt></a></dt> |
|
1830 <dd> |
|
1831 The location of the FreeType header files. |
|
1832 See <a href="#freetype">FreeType information</a> for details. |
|
1833 </dd> |
|
1834 <dt><a name="ALT_JDK_DEVTOOLS_PATH"><tt>ALT_JDK_DEVTOOLS_PATH</tt></a></dt> |
|
1835 <dd> |
|
1836 The default root location of the devtools. |
|
1837 The default value is |
|
1838 <tt>$(ALT_SLASH_JAVA)/devtools</tt>. |
|
1839 </dd> |
|
1840 <dt><tt><a name="ALT_DEVTOOLS_PATH">ALT_DEVTOOLS_PATH</a></tt> </dt> |
|
1841 <dd> |
|
1842 The location of tools like the |
|
1843 <a href="#zip"><tt>zip</tt> and <tt>unzip</tt></a> |
|
1844 binaries, but might also contain the GNU make utility |
|
1845 (<tt><i>gmake</i></tt>). |
|
1846 So this area is a bit of a grab bag, especially on Windows. |
|
1847 The default value depends on the platform and |
|
1848 Unix Commands being used. |
|
1849 On Linux the default will be |
|
1850 <tt>$(ALT_JDK_DEVTOOLS_PATH)/linux/bin</tt>, |
|
1851 on Solaris |
|
1852 <tt>$(ALT_JDK_DEVTOOLS_PATH)/<i>{sparc,i386}</i>/bin</tt>, |
|
1853 and on Windows with CYGWIN |
|
1854 <tt>/usr/bin</tt>. |
|
1855 </dd> |
|
1856 <dt><tt><a name="ALT_DROPS_DIR">ALT_DROPS_DIR</a></tt> </dt> |
|
1857 <dd> |
|
1858 The location of any source drop bundles |
|
1859 (see <a href="#drops">Managing the Source Drops</a>). |
|
1860 The default will be |
|
1861 <tt>$(ALT_JDK_DEVTOOLS_PATH)/share/jdk8-drops</tt>. |
|
1862 </dd> |
|
1863 <dt><a name="ALT_UNIXCCS_PATH"><tt>ALT_UNIXCCS_PATH</tt></a></dt> |
|
1864 <dd> |
|
1865 <strong>Solaris only:</strong> |
|
1866 An override for specifying where the Unix CCS |
|
1867 command set are located. |
|
1868 The default location is <tt>/usr/ccs/bin</tt> |
|
1869 </dd> |
|
1870 <dt><a name="ALT_SLASH_JAVA"><tt>ALT_SLASH_JAVA</tt></a></dt> |
|
1871 <dd> |
|
1872 The default root location for many of the ALT path locations |
|
1873 of the following ALT variables. |
|
1874 The default value is |
|
1875 <tt>"/java"</tt> on Solaris and Linux, |
|
1876 <tt>"J:"</tt> on Windows. |
|
1877 </dd> |
|
1878 <dt><a name="ALT_BUILD_JDK_IMPORT_PATH"><tt>ALT_BUILD_JDK_IMPORT_PATH</tt></a></dt> |
|
1879 <dd> |
|
1880 These are useful in managing builds on multiple platforms. |
|
1881 The default network location for all of the import JDK images |
|
1882 for all platforms. |
|
1883 If <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt> |
|
1884 is not set, this directory will be used and should contain |
|
1885 the following directories: |
|
1886 <tt>solaris-sparc</tt>, |
|
1887 <tt>solaris-i586</tt>, |
|
1888 <tt>solaris-sparcv9</tt>, |
|
1889 <tt>solaris-amd64</tt>, |
|
1890 <tt>linux-i586</tt>, |
|
1891 <tt>linux-amd64</tt>, |
|
1892 <tt>windows-i586</tt>, |
|
1893 and |
|
1894 <tt>windows-amd64</tt>. |
|
1895 Where each of these directories contain the import JDK image |
|
1896 for that platform. |
|
1897 </dd> |
|
1898 <dt><a name="ALT_OPENWIN_HOME"><tt>ALT_OPENWIN_HOME</tt></a></dt> |
|
1899 <dd> |
|
1900 The top-level directory of the libraries and include files for the platform's |
|
1901 graphical programming environment. The default location is platform specific. |
|
1902 For example, on Linux it defaults to <tt>/usr/X11R6/</tt>. |
|
1903 </dd> |
|
1904 <dt><strong>Windows specific:</strong></dt> |
|
1905 <dd> |
|
1906 <dl> |
|
1907 <dt><a name="ALT_WINDOWSSDKDIR"><tt>ALT_WINDOWSSDKDIR</tt></a> </dt> |
|
1908 <dd> |
|
1909 The location of the |
|
1910 Microsoft Windows SDK where some tools will be |
|
1911 located. |
|
1912 The default is whatever WINDOWSSDKDIR is set to |
|
1913 (or WindowsSdkDir) or the path |
|
1914 <br> |
|
1915 <tt>c:\Program Files\Microsoft SDKs\Windows\v7.0a</tt> |
|
1916 </dd> |
|
1917 <dt><tt><a name="ALT_DXSDK_PATH">ALT_DXSDK_PATH</a></tt> </dt> |
|
1918 <dd> |
|
1919 The location of the |
|
1920 <a href="#dxsdk">Microsoft DirectX 9 SDK</a>. |
|
1921 The default will be to try and use the DirectX environment |
|
1922 variable <tt>DXSDK_DIR</tt>, |
|
1923 failing that, look in <tt>C:/DXSDK</tt>. |
|
1924 </dd> |
|
1925 <dt><tt><a name="ALT_MSVCRNN_DLL_PATH">ALT_MSVCRNN_DLL_PATH</a></tt> </dt> |
|
1926 <dd> |
|
1927 The location of the |
|
1928 <a href="#msvcrNN"><tt>MSVCR100.DLL</tt></a>. |
|
1929 </dd> |
|
1930 </dl> |
|
1931 </dd> |
|
1932 <dt><strong>Cross-Compilation Support:</strong></dt> |
|
1933 <dd> |
|
1934 <dl> |
|
1935 <dt><a name="CROSS_COMPILE_ARCH"><tt>CROSS_COMPILE_ARCH</tt></a> </dt> |
|
1936 <dd> |
|
1937 Set to the target architecture of a cross-compilation build. If set, this |
|
1938 variable is used to signify that we are cross-compiling. The expectation |
|
1939 is that <a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a> is set |
|
1940 to point to the cross-compiler and that any cross-compilation specific flags |
|
1941 are passed using <a href="#EXTRA_CFLAGS"><tt>EXTRA_CFLAGS</tt></a>. |
|
1942 The <a href="#ALT_OPENWIN_HOME"><tt>ALT_OPENWIN_HOME</tt></a> variable should |
|
1943 also be set to point to the graphical header files (e.g. X11) provided with |
|
1944 the cross-compiler. |
|
1945 When cross-compiling we skip execution of any demos etc that may be built, and |
|
1946 also skip binary-file verification. |
|
1947 </dd> |
|
1948 <dt><tt><a name="EXTRA_CFLAGS">EXTRA_CFLAGS</a></tt> </dt> |
|
1949 <dd> |
|
1950 Used to pass cross-compilation options to the cross-compiler. |
|
1951 These are added to the <tt>CFLAGS</tt> and <tt>CXXFLAGS</tt> variables. |
|
1952 </dd> |
|
1953 <dt><tt><a name="USE_ONLY_BOOTDIR_TOOLS">USE_ONLY_BOOTDIR_TOOLS</a></tt> </dt> |
|
1954 <dd> |
|
1955 Used primarily for cross-compilation builds (and always set in that case) |
|
1956 this variable indicates that tools from the boot JDK should be used during |
|
1957 the build process, not the tools (<tt>javac</tt>, <tt>javah</tt>, <tt>jar</tt>) |
|
1958 just built (which can't execute on the build host). |
|
1959 </dd> |
|
1960 <dt><tt><a name="HOST_CC">HOST_CC</a></tt> </dt> |
|
1961 <dd> |
|
1962 The location of the C compiler to generate programs to run on the build host. |
|
1963 Some parts of the build generate programs that are then compiled and executed |
|
1964 to produce other parts of the build. Normally the primary C compiler is used |
|
1965 to do this, but when cross-compiling that would be the cross-compiler and the |
|
1966 resulting program could not be executed. |
|
1967 On Linux this defaults to <tt>/usr/bin/gcc</tt>; on other platforms it must be |
|
1968 set explicitly. |
|
1969 </dd> |
|
1970 </dl> |
|
1971 <dt><strong>Specialized Build Options:</strong></dt> |
|
1972 <dd> |
|
1973 Some build variables exist to support specialized build environments and/or specialized |
|
1974 build products. Their use is only supported in those contexts: |
|
1975 <dl> |
|
1976 <dt><tt><a name="BUILD_CLIENT_ONLY">BUILD_CLIENT_ONLY</a></tt> </dt> |
|
1977 <dd> |
|
1978 Indicates this build will only contain the Hotspot client VM. In addition to |
|
1979 controlling the Hotspot build target, it ensures that we don't try to copy |
|
1980 any server VM files/directories, and defines a default <tt>jvm.cfg</tt> file |
|
1981 suitable for a client-only environment. Using this in a 64-bit build will |
|
1982 generate a sanity warning as 64-bit client builds are not directly supported. |
|
1983 </dd> |
|
1984 <dt><tt><a name="BUILD_HEADLESS_ONLY"></a>BUILD_HEADLESS_ONLY</tt> </dt> |
|
1985 <dd> |
|
1986 Used when the build environment has no graphical capabilities at all. This |
|
1987 excludes building anything that requires graphical libraries to be available. |
|
1988 </dd> |
|
1989 <dt><tt><a name="JAVASE_EMBEDDED"></a>JAVASE_EMBEDDED</tt> </dt> |
|
1990 <dd> |
|
1991 Used to indicate this is a build of the Oracle Java SE Embedded product. |
|
1992 This will enable the directives included in the SE-Embedded specific build |
|
1993 files. |
|
1994 </dd> |
|
1995 <dt><tt><a name="LIBZIP_CAN_USE_MMAP">LIBZIP_CAN_USE_MMAP</a></tt> </dt> |
|
1996 <dd> |
|
1997 If set to false, disables the use of mmap by the zip utility. Otherwise, |
|
1998 mmap will be used. |
|
1999 </dd> |
|
2000 <dt><tt><a name="COMPRESS_JARS"></a>COMPRESS_JARS</tt> </dt> |
|
2001 <dd> |
|
2002 If set to true, causes certain jar files that would otherwise be built without |
|
2003 compression, to use compression. |
|
2004 </dd> |
|
2005 </dl> |
|
2006 </dd> |
|
2007 </dl> |
|
2008 </blockquote> |
|
2009 <!-- ------------------------------------------------------ --> |
|
2010 <hr> |
|
2011 <h2><a name="hints">Hints and Tips</a></h2> |
|
2012 <blockquote> |
|
2013 You don't have to use all these hints and tips, and in fact people do actually |
|
2014 build with systems that contradict these, but they might prove to be |
|
2015 helpful to some. |
|
2016 <ul> |
|
2017 <li> |
|
2018 If <tt>make sanity</tt> does not work, find out why, fix that |
|
2019 before going any further. Or at least understand what the |
|
2020 complaints are from it. |
|
2021 </li> |
|
2022 <li> |
|
2023 JDK: Keep in mind that you are building a JDK, but you need |
|
2024 a JDK (BOOTDIR JDK) to build this JDK. |
|
2025 </li> |
|
2026 <li> |
|
2027 Ant: The ant utility is a java application and besides having |
|
2028 ant available to you, it's important that ant finds the right |
|
2029 java to run with. Make sure you can type <tt>ant -version</tt> |
|
2030 and get clean results with no error messages. |
|
2031 </li> |
|
2032 <li> |
|
2033 Linux: Try and favor the system packages over building your own |
|
2034 or getting packages from other areas. |
|
2035 Most Linux builds should be possible with the system's |
|
2036 available packages. |
|
2037 </li> |
|
2038 <li> |
|
2039 Solaris: Typically you will need to get compilers on your systems |
|
2040 and occasionally GNU make 3.81 if a gmake binary is not available. |
|
2041 The gmake binary might not be 3.81, be careful. |
|
2042 </li> |
|
2043 <li> |
|
2044 Windows VS2010: |
|
2045 <ul> |
|
2046 <li> |
|
2047 Only the C++ part of VS2010 is needed. |
|
2048 Try to let the installation go to the default install directory. |
|
2049 Always reboot your system after installing VS2010. |
|
2050 The system environment variable VS100COMNTOOLS should be |
|
2051 set in your environment. |
|
2052 </li> |
|
2053 <li> |
|
2054 Make sure that TMP and TEMP are also set in the environment |
|
2055 and refer to Windows paths that exist, like <tt>C:\temp</tt>, |
|
2056 not <tt>/tmp</tt>, not <tt>/cygdrive/c/temp</tt>, and not <tt>C:/temp</tt>. |
|
2057 <tt>C:\temp</tt> is just an example, it is assumed that this area is |
|
2058 private to the user, so by default after installs you should |
|
2059 see a unique user path in these variables. |
|
2060 </li> |
|
2061 <li> |
|
2062 You need to use vsvars32.bat or vsvars64.bat to get the |
|
2063 PATH, INCLUDE, LIB, LIBPATH, and WINDOWSSDKDIR |
|
2064 variables set in your shell environment. |
|
2065 These bat files are not easy to use from a shell environment. |
|
2066 However, there is a script placed in the root jdk8 repository called |
|
2067 vsvars.sh that can help, it should only be done once in a shell |
|
2068 that will be doing the build, e.g.<br> |
|
2069 <tt>sh ./make/scripts/vsvars.sh -v10 > settings<br> |
|
2070 eval `cat settings`</tt><br> |
|
2071 Or just <tt>eval `sh ./make/scripts/vsvars.sh -v10`</tt>. |
|
2072 </li> |
|
2073 </ul> |
|
2074 </li> |
|
2075 <li> |
|
2076 Windows: PATH order is critical, see the |
|
2077 <a href="#paths">paths</a> section for more information. |
|
2078 </li> |
|
2079 <li> |
|
2080 Windows 64bit builds: Use ARCH_DATA_MODEL=64. |
|
2081 </li> |
|
2082 </ul> |
|
2083 </blockquote> |
|
2084 <!-- ------------------------------------------------------ --> |
|
2085 <hr> |
|
2086 <h2><a name="troubleshooting">Troubleshooting</a></h2> |
|
2087 <blockquote> |
|
2088 A build can fail for any number of reasons. |
|
2089 Most failures |
|
2090 are a result of trying to build in an environment in which all the |
|
2091 pre-build requirements have not been met. |
|
2092 The first step in |
|
2093 troubleshooting a build failure is to recheck that you have satisfied |
|
2094 all the pre-build requirements for your platform. |
|
2095 Look for the check list of the platform you are building on in the |
|
2096 <a href="#contents">Table of Contents</a>. |
|
2097 <p> |
|
2098 You can validate your build environment by using the <tt>sanity</tt> |
|
2099 target. |
|
2100 Any errors listed |
|
2101 will stop the build from starting, and any warnings may result in |
|
2102 a flawed product build. |
|
2103 We strongly encourage you to evaluate every |
|
2104 sanity check warning and fix it if required, before you proceed |
|
2105 further with your build. |
|
2106 <p> |
|
2107 Some of the more common problems with builds are briefly described |
|
2108 below, with suggestions for remedies. |
|
2109 <ul> |
|
2110 <li> |
|
2111 <b>Corrupted Bundles on Windows:</b> |
|
2112 <blockquote> |
|
2113 Some virus scanning software has been known to corrupt the |
|
2114 downloading of zip bundles. |
|
2115 It may be necessary to disable the 'on access' or 'real time' |
|
2116 virus scanning features to prevent this corruption. |
|
2117 This type of "real time" virus scanning can also slow down the |
|
2118 build process significantly. |
|
2119 Temporarily disabling the feature, or excluding the build |
|
2120 output directory may be necessary to get correct and faster builds. |
|
2121 </blockquote> |
|
2122 </li> |
|
2123 <li> |
|
2124 <b>Slow Builds:</b> |
|
2125 <blockquote> |
|
2126 If your build machine seems to be overloaded from too many |
|
2127 simultaneous C++ compiles, try setting the <tt>HOTSPOT_BUILD_JOBS</tt> |
|
2128 variable to <tt>1</tt> (if you're using a multiple CPU |
|
2129 machine, setting it to more than the the number of CPUs is probably |
|
2130 not a good idea). |
|
2131 <p> |
|
2132 Creating the javadocs can be very slow, if you are running |
|
2133 javadoc, consider skipping that step. |
|
2134 <p> |
|
2135 Faster hardware and more RAM always helps too. |
|
2136 The VM build tends to be CPU intensive (many C++ compiles), |
|
2137 and the rest of the JDK will often be disk intensive. |
|
2138 <p> |
|
2139 Faster compiles are possible using a tool called |
|
2140 <a href="http://ccache.samba.org/" target="_blank">ccache</a>. |
|
2141 </blockquote> |
|
2142 </li> |
|
2143 <li> |
|
2144 <b>File time issues:</b> |
|
2145 <blockquote> |
|
2146 If you see warnings that refer to file time stamps, e.g. |
|
2147 <blockquote> |
|
2148 <i>Warning message:</i><tt> File `xxx' has modification time in |
|
2149 the future.</tt> |
|
2150 <br> |
|
2151 <i>Warning message:</i> <tt> Clock skew detected. Your build may |
|
2152 be incomplete.</tt> |
|
2153 </blockquote> |
|
2154 These warnings can occur when the clock on the build machine is out of |
|
2155 sync with the timestamps on the source files. Other errors, apparently |
|
2156 unrelated but in fact caused by the clock skew, can occur along with |
|
2157 the clock skew warnings. These secondary errors may tend to obscure the |
|
2158 fact that the true root cause of the problem is an out-of-sync clock. |
|
2159 For example, an out-of-sync clock has been known to cause an old |
|
2160 version of javac to be used to compile some files, resulting in errors |
|
2161 when the pre-1.4 compiler ran across the new <tt>assert</tt> keyword |
|
2162 in the 1.4 source code. |
|
2163 <p> |
|
2164 If you see these warnings, reset the clock on the build |
|
2165 machine, run "<tt><i>gmake</i> clobber</tt>" or delete the directory |
|
2166 containing the build output, and restart the build from the beginning. |
|
2167 </blockquote> |
|
2168 </li> |
|
2169 <li> |
|
2170 <b>Error message: <tt>Trouble writing out table to disk</tt></b> |
|
2171 <blockquote> |
|
2172 Increase the amount of swap space on your build machine. |
|
2173 </blockquote> |
|
2174 </li> |
|
2175 <li> |
|
2176 <b>Error Message: <tt>libstdc++ not found:</tt></b> |
|
2177 <blockquote> |
|
2178 This is caused by a missing libstdc++.a library. |
|
2179 This is installed as part of a specific package |
|
2180 (e.g. libstdc++.so.devel.386). |
|
2181 By default some 64-bit Linux versions (e.g. Fedora) |
|
2182 only install the 64-bit version of the libstdc++ package. |
|
2183 Various parts of the JDK build require a static |
|
2184 link of the C++ runtime libraries to allow for maximum |
|
2185 portability of the built images. |
|
2186 </blockquote> |
|
2187 </li> |
|
2188 <li> |
|
2189 <b>Error Message: <tt>cannot restore segment prot after reloc</tt></b> |
|
2190 <blockquote> |
|
2191 This is probably an issue with SELinux (See |
|
2192 <a href="http://en.wikipedia.org/wiki/SELinux" target="_blank"> |
|
2193 http://en.wikipedia.org/wiki/SELinux</a>). |
|
2194 Parts of the VM is built without the <tt>-fPIC</tt> for |
|
2195 performance reasons. |
|
2196 <p> |
|
2197 To completely disable SELinux: |
|
2198 <ol> |
|
2199 <li><tt>$ su root</tt></li> |
|
2200 <li><tt># system-config-securitylevel</tt></li> |
|
2201 <li><tt>In the window that appears, select the SELinux tab</tt></li> |
|
2202 <li><tt>Disable SELinux</tt></li> |
|
2203 </ol> |
|
2204 <p> |
|
2205 Alternatively, instead of completely disabling it you could |
|
2206 disable just this one check. |
|
2207 <ol> |
|
2208 <li>Select System->Administration->SELinux Management</li> |
|
2209 <li>In the SELinux Management Tool which appears, |
|
2210 select "Boolean" from the menu on the left</li> |
|
2211 <li>Expand the "Memory Protection" group</li> |
|
2212 <li>Check the first item, labeled |
|
2213 "Allow all unconfined executables to use libraries requiring text relocation ..."</li> |
|
2214 </ol> |
|
2215 </blockquote> |
|
2216 </li> |
|
2217 <li> |
|
2218 <b>Windows Error Messages:</b><br> |
|
2219 <tt>*** fatal error - couldn't allocate heap, ... </tt><br> |
|
2220 <tt>rm fails with "Directory not empty"</tt><br> |
|
2221 <tt>unzip fails with "cannot create ... Permission denied"</tt><br> |
|
2222 <tt>unzip fails with "cannot create ... Error 50"</tt><br> |
|
2223 <blockquote> |
|
2224 The CYGWIN software can conflict with other non-CYGWIN |
|
2225 software. See the CYGWIN FAQ section on |
|
2226 <a href="http://cygwin.com/faq/faq.using.html#faq.using.bloda" target="_blank"> |
|
2227 BLODA (applications that interfere with CYGWIN)</a>. |
|
2228 </blockquote> |
|
2229 </li> |
|
2230 <li> |
|
2231 <b>Windows Error Message: <tt>spawn failed</tt></b> |
|
2232 <blockquote> |
|
2233 Try rebooting the system, or there could be some kind of |
|
2234 issue with the disk or disk partition being used. |
|
2235 Sometimes it comes with a "Permission Denied" message. |
|
2236 </blockquote> |
|
2237 </li> |
|
2238 </ul> |
|
2239 </blockquote> |
|
2240 <!-- ------------------------------------------------------ --> |
|
2241 <hr> |
|
2242 <h2><a name="newbuild">The New Build</a></h2> |
|
2243 <blockquote> |
|
2244 The <a href="http://openjdk.java.net/projects/build-infra/"> |
|
2245 Build Infrastructure project</a> is working on a new |
|
2246 build. For information on how to try it out, please see the |
|
2247 <a href="http://openjdk.java.net/projects/build-infra/guide.html"> |
|
2248 Build Infra User Guide</a> |
|
2249 </blockquote> |
|
2250 <hr> |
|
2251 </body> |
2501 </body> |
2252 </html> |
2502 </html> |