blob: 438c9907a9df6704db830320329636bb25824205 [file] [log] [blame]
J. Duke686d76f2007-12-01 00:00:00 +00001<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
J. Duke686d76f2007-12-01 00:00:00 +00002<html>
Kelly O'Hairbf8a41a2008-04-30 19:35:26 -07003 <head>
4 <title>OpenJDK Build README</title>
5 </head>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08006 <body style="background-color:aquamarine">
7
Kelly O'Hairbf8a41a2008-04-30 19:35:26 -07008 <!-- ====================================================== -->
Kelly O'Hair2928b812008-09-17 13:30:32 -07009 <table width="100%">
Kelly O'Hairbf8a41a2008-04-30 19:35:26 -070010 <tr>
11 <td align="center">
Kelly O'Hair634c79b2008-07-09 15:42:00 -070012 <img alt="OpenJDK"
13 src="http://openjdk.java.net/images/openjdk.png"
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -080014 width=256>
Kelly O'Hairbf8a41a2008-04-30 19:35:26 -070015 </td>
16 </tr>
17 <tr>
18 <td align=center>
19 <h1>OpenJDK Build README</h1>
20 </td>
21 </tr>
J. Duke686d76f2007-12-01 00:00:00 +000022 </table>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -080023
24 <!-- ====================================================== -->
Kelly O'Hairbf8a41a2008-04-30 19:35:26 -070025 <hr>
26 <h2><a name="introduction">Introduction</a></h2>
27 <blockquote>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -080028 This README file contains build instructions for the
29 <a href="http://openjdk.java.net" target="_blank">OpenJDK</a>.
30 Building the source code for the
31 OpenJDK
32 requires
33 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 &amp;&amp; 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>
Kelly O'Hairbf8a41a2008-04-30 19:35:26 -070071 </blockquote>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -080072
73 <!-- ====================================================== -->
Kelly O'Hairbf8a41a2008-04-30 19:35:26 -070074 <hr>
75 <h2><a name="contents">Contents</a></h2>
76 <blockquote>
J. Duke686d76f2007-12-01 00:00:00 +000077 <ul>
Kelly O'Hairbf8a41a2008-04-30 19:35:26 -070078 <li><a href="#introduction">Introduction</a></li>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -080079
Kelly O'Hair213481a2010-12-22 12:25:52 -080080 <li><a href="#hg">Use of Mercurial</a>
81 <ul>
82 <li><a href="#get_source">Getting the Source</a></li>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -080083 <li><a href="#repositories">Repositories</a></li>
Kelly O'Hair213481a2010-12-22 12:25:52 -080084 </ul>
85 </li>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -080086
87 <li><a href="#building">Building</a>
Kelly O'Hair2928b812008-09-17 13:30:32 -070088 <ul>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -080089 <li><a href="#setup">System Setup</a>
Kelly O'Hair213481a2010-12-22 12:25:52 -080090 <ul>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -080091 <li><a href="#linux">Linux</a></li>
92 <li><a href="#solaris">Solaris</a></li>
93 <li><a href="#macosx">Mac OS X</a></li>
94 <li><a href="#windows">Windows</a></li>
Kelly O'Hair213481a2010-12-22 12:25:52 -080095 </ul>
96 </li>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -080097 <li><a href="#configure">Configure</a></li>
98 <li><a href="#make">Make</a></li>
Kelly O'Hairbf8a41a2008-04-30 19:35:26 -070099 </ul>
100 </li>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -0800101 <li><a href="#testing">Testing</a></li>
102 </ul>
103 <hr>
104 <ul>
105 <li><a href="#hints">Appendix A: Hints and Tips</a>
106 <ul>
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>
110 </ul>
111 </li>
112 <li><a href="#gmake">Appendix B: GNU Make Information</a></li>
113 <li><a href="#buildenvironments">Appendix C: Build Environments</a></li>
114
115 <!-- Leave out
116 <li><a href="#mapping">Appendix D: Mapping Old Builds to the New Builds</a></li>
117 -->
118
J. Duke686d76f2007-12-01 00:00:00 +0000119 </ul>
Kelly O'Hairbf8a41a2008-04-30 19:35:26 -0700120 </blockquote>
Kelly O'Hair213481a2010-12-22 12:25:52 -0800121
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -0800122 <!-- ====================================================== -->
Kelly O'Hair213481a2010-12-22 12:25:52 -0800123 <hr>
124 <h2><a name="hg">Use of Mercurial</a></h2>
125 <blockquote>
126 The OpenJDK sources are maintained with the revision control system
127 <a href="http://mercurial.selenic.com/wiki/Mercurial">Mercurial</a>.
128 If you are new to Mercurial, please see the
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -0800129 <a href="http://mercurial.selenic.com/wiki/BeginnersGuides">
130 Beginner Guides</a>
131 or refer to the <a href="http://hgbook.red-bean.com/">
132 Mercurial Book</a>.
Kelly O'Hair213481a2010-12-22 12:25:52 -0800133 The first few chapters of the book provide an excellent overview of
134 Mercurial, what it is and how it works.
135 <br>
136 For using Mercurial with the OpenJDK refer to the
Kelly O'Hairf240c002011-03-22 08:15:39 -0700137 <a href="http://openjdk.java.net/guide/repositories.html#installConfig">
138 Developer Guide: Installing and Configuring Mercurial</a>
Kelly O'Hair213481a2010-12-22 12:25:52 -0800139 section for more information.
Kelly O'Hair213481a2010-12-22 12:25:52 -0800140
Kelly O'Hair213481a2010-12-22 12:25:52 -0800141 <h3><a name="get_source">Getting the Source</a></h3>
142 <blockquote>
143 To get the entire set of OpenJDK Mercurial repositories
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -0800144 use the script <code>get_source.sh</code> located in the
145 root repository:
Kelly O'Hair213481a2010-12-22 12:25:52 -0800146 <blockquote>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -0800147 <code>
Erik Joelssonfad4dbf2014-04-24 10:21:58 +0200148 hg clone http://hg.openjdk.java.net/jdk9/jdk9
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -0800149 <i>YourOpenJDK</i>
150 <br>
Kelly O'Hair213481a2010-12-22 12:25:52 -0800151 cd <i>YourOpenJDK</i>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -0800152 <br>
153 bash ./get_source.sh
154 </code>
155 </blockquote>
156 Once you have all the repositories, keep in mind that each
Erik Joelssonf771ef42013-08-26 13:43:27 +0200157 repository is its own independent repository.
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -0800158 You can also re-run <code>./get_source.sh</code> anytime to
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.
166 <blockquote>
167 <code>
168 cd <i>YourOpenJDK</i>
169 <br>
170 bash ./make/scripts/hgforest.sh status
171 </code>
Kelly O'Hair213481a2010-12-22 12:25:52 -0800172 </blockquote>
Kelly O'Hair213481a2010-12-22 12:25:52 -0800173 </blockquote>
174
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -0800175 <h3><a name="repositories">Repositories</a></h3>
Kelly O'Hair213481a2010-12-22 12:25:52 -0800176 <blockquote>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -0800177 <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>
Erik Joelssonf771ef42013-08-26 13:43:27 +0200244 <tr>
245 <td>
246 nashorn
247 </td>
248 <td>
249 source code for the OpenJDK JavaScript implementation
250 </td>
251 </tr>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -0800252 </tbody>
253 </table>
Kelly O'Hair2928b812008-09-17 13:30:32 -0700254 </blockquote>
Dalibor Topic73e9e342009-09-23 20:06:01 +0200255
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -0800256 <h3><a name="guidelines">Repository Source Guidelines</a></h3>
Kelly O'Hair213481a2010-12-22 12:25:52 -0800257 <blockquote>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -0800258 There are some very basic guidelines:
Kelly O'Hair2928b812008-09-17 13:30:32 -0700259 <ul>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -0800260 <li>
261 Use of whitespace in source files
262 (.java, .c, .h, .cpp, and .hpp files)
263 is restricted.
264 No TABs, no trailing whitespace on lines, and files
265 should not terminate in more than one blank line.
266 </li>
267 <li>
268 Files with execute permissions should not be added
269 to the source repositories.
270 </li>
271 <li>
272 All generated files need to be kept isolated from
273 the files
274 maintained or managed by the source control system.
275 The standard area for generated files is the top level
276 <code>build/</code> directory.
277 </li>
278 <li>
279 The default build process should be to build the product
280 and nothing else, in one form, e.g. a product (optimized),
281 debug (non-optimized, -g plus assert logic), or
282 fastdebug (optimized, -g plus assert logic).
283 </li>
284 <li>
285 The <tt>.hgignore</tt> file in each repository
286 must exist and should
287 include <tt>^build/</tt>, <tt>^dist/</tt> and
288 optionally any
289 <tt>nbproject/private</tt> directories.
290 <strong>It should NEVER</strong> include
291 anything in the
292 <tt>src/</tt> or <tt>test/</tt>
293 or any managed directory area of a repository.
294 </li>
295 <li>
296 Directory names and file names should never contain
297 blanks or
298 non-printing characters.
299 </li>
300 <li>
301 Generated source or binary files should NEVER be added to
302 the repository (that includes <tt>javah</tt> output).
303 There are some exceptions to this rule, in particular
304 with some of the generated configure scripts.
305 </li>
306 <li>
307 Files not needed for typical building
308 or testing of the repository
309 should not be added to the repository.
310 </li>
Kelly O'Hair2928b812008-09-17 13:30:32 -0700311 </ul>
312 </blockquote>
Kelly O'Hairf240c002011-03-22 08:15:39 -0700313
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -0800314 </blockquote>
315
316 <!-- ====================================================== -->
317 <hr>
318 <h2><a name="building">Building</a></h2>
319 <blockquote>
320 The very first step in building the OpenJDK is making sure the
321 system itself has everything it needs to do OpenJDK builds.
322 Once a system is setup, it generally doesn't need to be done again.
323 <br>
324 Building the OpenJDK is now done with running a
325 <a href="#configure"><code>configure</code></a>
326 script which will try and find and verify you have everything
327 you need, followed by running
328 <a href="#gmake"><code>make</code></a>, e.g.
Kelly O'Hairf240c002011-03-22 08:15:39 -0700329 <blockquote>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -0800330 <b>
331 <code>
332 bash ./configure<br>
333 make all
334 </code>
335 </b>
336 </blockquote>
337 Where possible the <code>configure</code> script will attempt to located the
338 various components in the default locations or via component
339 specific variable settings.
340 When the normal defaults fail or components cannot be found,
341 additional <code>configure</code> options may be necessary to help <code>configure</code>
342 find the necessary tools for the build, or you may need to
343 re-visit the setup of your system due to missing software
344 packages.
345 <br>
346 <strong>NOTE:</strong> The <code>configure</code> script
347 file does not have
348 execute permissions and will need to be explicitly run with
349 <code>bash</code>,
350 see the <a href="#guidelines">source guidelines</a>.
351
352 <!-- ====================================================== -->
353 <hr>
354 <h3><a name="setup">System Setup</a></h3>
355 <blockquote>
356 Before even attempting to use a system to build the OpenJDK
357 there are some very basic system setups needed.
358 For all systems:
359 <ul>
360 <li>
361 Be sure the GNU make utility is version 3.81 or newer,
362 e.g. run "<code>make -version</code>"
363 </li>
364 <li>
365 Install a
Stuart Markse1dd7522013-06-18 17:18:46 -0700366 <a name="bootjdk">Bootstrap JDK</a>.
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -0800367 All OpenJDK builds require access to a previously released
Stuart Markse1dd7522013-06-18 17:18:46 -0700368 JDK called the <i>bootstrap JDK</i> or <i>boot JDK.</i>
369 The general rule is that the bootstrap JDK
370 must be an instance of the previous major
371 release of the JDK. In addition, there may be
372 a requirement to use a release at or beyond a
373 particular update level.
374 <br>&nbsp;<br>
375
Erik Joelssonfad4dbf2014-04-24 10:21:58 +0200376 <b><i>Building JDK 9 requires JDK 8. JDK 9
377 developers should not use JDK 9 as the boot
378 JDK, to ensure that JDK 9 dependencies are
Stuart Markse1dd7522013-06-18 17:18:46 -0700379 not introduced into the parts of the system
Erik Joelssonfad4dbf2014-04-24 10:21:58 +0200380 that are built with JDK 8.</i></b>
Stuart Markse1dd7522013-06-18 17:18:46 -0700381
382 <br>&nbsp;<br>
Erik Joelssonfad4dbf2014-04-24 10:21:58 +0200383 The JDK 8 binaries can be downloaded from Oracle's
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -0800384 <a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html"
Erik Joelssonfad4dbf2014-04-24 10:21:58 +0200385 target="_blank">JDK 8 download site</a>.
386 For build performance reasons it
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -0800387 is very important that this bootstrap JDK be made available
388 on the local disk of the machine doing the build.
389 You should add its <code>bin</code> directory
390 to the <code>PATH</code> environment variable.
391 If <code>configure</code> has any issues finding this JDK, you may
392 need to use the <code>configure</code> option
393 <code>--with-boot-jdk</code>.
394 </li>
395 <li>
Erik Joelssonf771ef42013-08-26 13:43:27 +0200396 Ensure that GNU make, the Bootstrap JDK,
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -0800397 and the compilers are all
398 in your PATH environment variable
399 </li>
400 </ul>
401 And for specific systems:
402 <table border="1">
403 <thead>
404 <tr>
405 <th>Linux</th>
406 <th>Solaris</th>
407 <th>Windows</th>
408 <th>Mac OS X</th>
409 </tr>
410 </thead>
411 <tbody>
412 <tr>
413 <td>
414 Install all the software development
415 packages needed including
416 <a href="#alsa">alsa</a>,
417 <a href="#freetype">freetype</a>,
418 <a href="#cups">cups</a>, and
419 <a href="#xrender">xrender</a>.
420 <br>
421 See
422 <a href="#SDBE">specific system packages</a>.
423 </td>
424 <td>
425 Install all the software development
426 packages needed including
427 <a href="#studio">Studio Compilers</a>,
428 <a href="#freetype">freetype</a>,
429 <a href="#cups">cups</a>, and
430 <a href="#xrender">xrender</a>.
431 <br>
432 See
433 <a href="#SDBE">specific system packages</a>.
434 </td>
435 <td>
436 <ul>
437 <li>
438 Install one of
439 <a href="#cygwin">CYGWIN</a> or
440 <a href="#msys">MinGW/MSYS</a>
441 </li>
442 <li>
443 Install
444 <a href="#vs2010">Visual Studio 2010</a>
445 </li>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -0800446 </ul>
447 </td>
448 <td>
449 Install
450 <a href="https://developer.apple.com/xcode/">XCode 4.5.2</a>
451 and also install the "Command line tools" found under the
452 preferences pane "Downloads"
453 </td>
454 </tr>
455 </tbody>
456 </table>
457
458 <h4><a name="linux">Linux</a></h4>
459 <blockquote>
460 With Linux, try and favor the system packages over
461 building your own
462 or getting packages from other areas.
463 Most Linux builds should be possible with the system's
464 available packages.
Kelly O'Hairf240c002011-03-22 08:15:39 -0700465 <br>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -0800466 Note that some Linux systems have a habit of pre-populating
467 your environment variables for you, for example <code>JAVA_HOME</code>
468 might get pre-defined for you to refer to the JDK installed on
469 your Linux system.
470 You will need to unset <code>JAVA_HOME</code>.
471 It's a good idea to run <code>env</code> and verify the
472 environment variables you are getting from the default system
473 settings make sense for building the OpenJDK.
474
475 </blockquote>
476
477 <h4><a name="solaris">Solaris</a></h4>
478 <blockquote>
479 <h5><a name="studio">Studio Compilers</a></h5>
480 <blockquote>
481 At a minimum, the
482 <a href="http://www.oracle.com/technetwork/server-storage/solarisstudio/downloads/index.htm" target="_blank">
483 Studio 12 Update 1 Compilers</a>
484 (containing version 5.10 of the C and C++ compilers) is required,
485 including specific patches.
486 <p>
487 The Solaris SPARC patch list is:
488 <ul>
489 <li>
490 118683-05: SunOS 5.10: Patch for profiling libraries and assembler
491 </li>
492 <li>
493 119963-21: SunOS 5.10: Shared library patch for C++
494 </li>
495 <li>
496 120753-08: SunOS 5.10: Microtasking libraries (libmtsk) patch
497 </li>
498 <li>
499 128228-09: Sun Studio 12 Update 1: Patch for Sun C++ Compiler
500 </li>
501 <li>
502 141860-03: Sun Studio 12 Update 1: Patch for Compiler Common patch for Sun C C++ F77 F95
503 </li>
504 <li>
505 141861-05: Sun Studio 12 Update 1: Patch for Sun C Compiler
506 </li>
507 <li>
508 142371-01: Sun Studio 12.1 Update 1: Patch for dbx
509 </li>
510 <li>
511 143384-02: Sun Studio 12 Update 1: Patch for debuginfo handling
512 </li>
513 <li>
514 143385-02: Sun Studio 12 Update 1: Patch for Compiler Common patch for Sun C C++ F77 F95
515 </li>
516 <li>
517 142369-01: Sun Studio 12.1: Patch for Performance Analyzer Tools
518 </li>
519 </ul>
520 <p>
521 The Solaris X86 patch list is:
522 <ul>
523 <li>
524 119961-07: SunOS 5.10_x86, x64, Patch for profiling libraries and assembler
525 </li>
526 <li>
527 119964-21: SunOS 5.10_x86: Shared library patch for C++_x86
528 </li>
529 <li>
530 120754-08: SunOS 5.10_x86: Microtasking libraries (libmtsk) patch
531 </li>
532 <li>
533 141858-06: Sun Studio 12 Update 1_x86: Sun Compiler Common patch for x86 backend
534 </li>
535 <li>
536 128229-09: Sun Studio 12 Update 1_x86: Patch for C++ Compiler
537 </li>
538 <li>
539 142363-05: Sun Studio 12 Update 1_x86: Patch for C Compiler
540 </li>
541 <li>
542 142368-01: Sun Studio 12.1_x86: Patch for Performance Analyzer Tools
543 </li>
544 </ul>
545 <p>
546 Place the <code>bin</code> directory in <code>PATH</code>.
547 <p>
548 The Oracle Solaris Studio Express compilers at:
549 <a href="http://www.oracle.com/technetwork/server-storage/solarisstudio/downloads/index-jsp-142582.html" target="_blank">
550 Oracle Solaris Studio Express Download site</a>
551 are also an option, although these compilers have not
552 been extensively used yet.
553 </blockquote>
554
555 </blockquote> <!-- Solaris -->
556
557 <h4><a name="windows">Windows</a></h4>
558 <blockquote>
559
560 <h5><a name="toolkit">Windows Unix Toolkit</a></h5>
561 <blockquote>
562 Building on Windows requires a Unix-like environment, notably a
563 Unix-like shell.
564 There are several such environments available of which
565 <a href="http://www.cygwin.com/">Cygwin</a> and
566 <a href="http://www.mingw.org/wiki/MSYS">MinGW/MSYS</a> are
567 currently supported for
568 the OpenJDK build. One of the differences of these
569 systems from standard Windows tools is the way
570 they handle Windows path names, particularly path names which contain
571 spaces, backslashes as path separators and possibly drive letters.
572 Depending
573 on the use case and the specifics of each environment these path
574 problems can
575 be solved by a combination of quoting whole paths, translating
576 backslashes to
577 forward slashes, escaping backslashes with additional backslashes and
578 translating the path names to their
579 <a href="http://en.wikipedia.org/wiki/8.3_filename">
580 "8.3" version</a>.
581
582 <h6><a name="cygwin">CYGWIN</a></h6>
583 <blockquote>
584 CYGWIN is an open source, Linux-like environment which tries to emulate
585 a complete POSIX layer on Windows. It tries to be smart about path names
586 and can usually handle all kinds of paths if they are correctly quoted
587 or escaped although internally it maps drive letters <code>&lt;drive&gt;:</code>
588 to a virtual directory <code>/cygdrive/&lt;drive&gt;</code>.
589 <p>
590 You can always use the <code>cygpath</code> utility to map pathnames with spaces
591 or the backslash character into the <code>C:/</code> style of pathname
592 (called 'mixed'), e.g. <code>cygpath -s -m "<i>path</i>"</code>.
593 </p>
594 <p>
595 Note that the use of CYGWIN creates a unique problem with regards to
596 setting <a href="#path"><code>PATH</code></a>. Normally on Windows
597 the <code>PATH</code> variable contains directories
598 separated with the ";" character (Solaris and Linux use ":").
599 With CYGWIN, it uses ":", but that means that paths like "C:/path"
600 cannot be placed in the CYGWIN version of <code>PATH</code> and
601 instead CYGWIN uses something like <code>/cygdrive/c/path</code>
602 which CYGWIN understands, but only CYGWIN understands.
603 </p>
604 <p>
605 The OpenJDK build requires CYGWIN version 1.7.16 or newer.
606 Information about CYGWIN can
607 be obtained from the CYGWIN website at
608 <a href="http://www.cygwin.com" target="_blank">www.cygwin.com</a>.
609 </p>
610 <p>
611 By default CYGWIN doesn't install all the tools required for building
612 the OpenJDK.
613 Along with the default installation, you need to install
614 the following tools.
615 <blockquote>
616 <table border="1">
617 <thead>
618 <tr>
619 <td>Binary Name</td>
620 <td>Category</td>
621 <td>Package</td>
622 <td>Description</td>
623 </tr>
624 </thead>
625 <tbody>
626 <tr>
627 <td>ar.exe</td>
628 <td>Devel</td>
629 <td>binutils</td>
630 <td>
631 The GNU assembler, linker and binary utilities
632 </td>
633 </tr>
634 <tr>
635 <td>make.exe</td>
636 <td>Devel</td>
637 <td>make</td>
638 <td>
639 The GNU version of the 'make' utility built for CYGWIN
640 </td>
641 </tr>
642 <tr>
643 <td>m4.exe</td>
644 <td>Interpreters</td>
645 <td>m4</td>
646 <td>
647 GNU implementation of the traditional Unix macro
648 processor
649 </td>
650 </tr>
651 <tr>
652 <td>cpio.exe</td>
653 <td>Utils</td>
654 <td>cpio</td>
655 <td>
656 A program to manage archives of files
657 </td>
658 </tr>
659 <tr>
660 <td>gawk.exe</td>
661 <td>Utils</td>
662 <td>awk</td>
663 <td>
664 Pattern-directed scanning and processing language
665 </td>
666 </tr>
667 <tr>
668 <td>file.exe</td>
669 <td>Utils</td>
670 <td>file</td>
671 <td>
672 Determines file type using 'magic' numbers
673 </td>
674 </tr>
675 <tr>
676 <td>zip.exe</td>
677 <td>Archive</td>
678 <td>zip</td>
679 <td>
680 Package and compress (archive) files
681 </td>
682 </tr>
683 <tr>
684 <td>unzip.exe</td>
685 <td>Archive</td>
686 <td>unzip</td>
687 <td>
688 Extract compressed files in a ZIP archive
689 </td>
690 </tr>
691 <tr>
692 <td>free.exe</td>
693 <td>System</td>
694 <td>procps</td>
695 <td>
696 Display amount of free and used memory in the system
697 </td>
698 </tr>
699 </tbody>
700 </table>
701 </blockquote>
702 Note that the CYGWIN software can conflict with other non-CYGWIN
703 software on your Windows system.
704 CYGWIN provides a
705 <a href="http://cygwin.com/faq/faq.using.html" target="_blank">FAQ</a> for
706 known issues and problems, of particular interest is the
707 section on
708 <a href="http://cygwin.com/faq/faq.using.html#faq.using.bloda" target="_blank">
709 BLODA (applications that interfere with CYGWIN)</a>.
710 </blockquote>
711
712 <h6><a name="msys">MinGW/MSYS</a></h6>
713 <blockquote>
714 MinGW ("Minimalist GNU for Windows") is a collection of free Windows
715 specific header files and import libraries combined with GNU toolsets that
716 allow one to produce native Windows programs that do not rely on any
717 3rd-party C runtime DLLs. MSYS is a supplement to MinGW which allows building
718 applications and programs which rely on traditional UNIX tools to
719 be present. Among others this includes tools like <code>bash</code>
720 and <code>make</code>.
721 See <a href="http://www.mingw.org/wiki/MSYS" target="_blank">MinGW/MSYS</a>
722 for more information.
723 <p>
724 Like Cygwin, MinGW/MSYS can handle different types of path formats. They
725 are internally converted to paths with forward slashes and drive letters
726 <code>&lt;drive&gt;:</code> replaced by a virtual
727 directory <code>/&lt;drive&gt;</code>. Additionally, MSYS automatically
728 detects binaries compiled for the MSYS environment and feeds them with the
729 internal, Unix-style path names. If native Windows applications are called
730 from within MSYS programs their path arguments are automatically converted
731 back to Windows style path names with drive letters and backslashes as
732 path separators. This may cause problems for Windows applications which
733 use forward slashes as parameter separator (e.g. <code>cl /nologo /I</code>)
734 because MSYS may wrongly <a href="http://mingw.org/wiki/Posix_path_conversion">
735 replace such parameters by drive letters</a>.
736 </p>
737 <p>
738 In addition to the tools which will be installed
739 by default, you have
740 to manually install the
741 <code>msys-zip</code> and
742 <code>msys-unzip</code> packages.
743 This can be easily done with the MinGW command line installer:
744 <blockquote>
745 <code>mingw-get.exe install msys-zip</code>
746 <br>
747 <code>mingw-get.exe install msys-unzip</code>
748 </blockquote>
749 </blockquote>
750
751 </blockquote>
752
753 <h5><a name="vs2010">Visual Studio 2010 Compilers</a></h5>
754 <blockquote>
755 <p>
756 The 32-bit and 64-bit OpenJDK Windows build requires
757 Microsoft Visual Studio C++ 2010 (VS2010) Professional
758 Edition or Express compiler.
759 The compiler and other tools are expected to reside
760 in the location defined by the variable
761 <code>VS100COMNTOOLS</code> which
762 is set by the Microsoft Visual Studio installer.
763 </p>
764 <p>
765 Only the C++ part of VS2010 is needed.
766 Try to let the installation go to the default
767 install directory.
768 Always reboot your system after installing VS2010.
769 The system environment variable VS100COMNTOOLS
770 should be
771 set in your environment.
772 </p>
773 <p>
774 Make sure that TMP and TEMP are also set
775 in the environment
776 and refer to Windows paths that exist,
777 like <code>C:\temp</code>,
778 not <code>/tmp</code>, not <code>/cygdrive/c/temp</code>,
779 and not <code>C:/temp</code>.
780 <code>C:\temp</code> is just an example,
781 it is assumed that this area is
782 private to the user, so by default
783 after installs you should
784 see a unique user path in these variables.
785 </p>
786 </blockquote>
787
788
789 </blockquote> <!-- Windows -->
790
791 <h4><a name="macosx">Mac OS X</a></h4>
792 <blockquote>
793 Make sure you get the right XCode version.
794 </blockquote> <!-- Mac OS X -->
795
796 </blockquote>
797
798 <!-- ====================================================== -->
799 <hr>
800 <h3><a name="configure">Configure</a></h3>
801 <blockquote>
802 The basic invocation of the <code>configure</code> script
803 looks like:
804 <blockquote>
805 <b><code>bash ./configure [<i>options</i>]</code></b>
806 </blockquote>
807 This will create an output directory containing the
808 "configuration" and setup an area for the build result.
809 This directory typically looks like:
810 <blockquote>
811 <b><code>build/linux-x64-normal-server-release</code></b>
812 </blockquote>
813 <code>configure</code> will try to figure out what system you are running on
814 and where all necessary build components are.
815 If you have all prerequisites for building installed,
816 it should find everything.
817 If it fails to detect any component automatically,
818 it will exit and inform you about the problem.
819 When this happens, read more below in
820 <a href="#configureoptions">the <code>configure</code> options</a>.
821 <p>
822 Some examples:
823 </p>
824 <table border="1">
825 <thead>
826 <tr>
827 <th>Description</th>
828 <th>Configure Command Line</th>
829 </tr>
830 </thead>
831 <tbody>
832 <tr>
833 <td>Windows 32bit build with freetype specified</td>
834 <td>
835 <code>bash ./configure --with-freetype=/cygdrive/c/freetype-i586 --with-target-bits=32</code>
836 </td>
837 </tr>
838 <tr>
839 <td>Debug 64bit Build</td>
840 <td>
841 <code>bash ./configure --enable-debug --with-target-bits=64</code>
842 </td>
843 </tr>
844 </tbody>
845 </table>
846
847 <!-- ====================================================== -->
848 <h4><a name="configureoptions">Configure Options</a></h4>
849 <blockquote>
850 Complete details on all the OpenJDK <code>configure</code> options can
851 be seen with:
852 <blockquote>
853 <b><code>bash ./configure --help=short</code></b>
854 </blockquote>
855 Use <code>-help</code> to see all the <code>configure</code> options
856 available.
857
858 You can generate any number of different configurations,
859 e.g. debug, release, 32, 64, etc.
860
861 Some of the more commonly used <code>configure</code> options are:
862
863 <table border="1">
864 <thead>
865 <tr>
866 <th width="300">OpenJDK Configure Option</th>
867 <th>Description</th>
868 </tr>
869 </thead>
870 <tbody>
871 <tr>
872 <td><b><code>--enable-debug</code></b></td>
873 <td>
874 set the debug level to fastdebug (this is a shorthand for
875 <code>--with-debug-level=fastdebug</code>)
876 </td>
877 </tr>
878 <tr>
879 <td><b><code>--with-alsa=</code></b><i>path</i></td>
880 <td>
881 select the location of the
882 <a name="alsa">Advanced Linux Sound Architecture (ALSA)</a>
883 <br>
884 Version 0.9.1 or newer of the ALSA files are
885 required for building the OpenJDK on Linux.
886 These Linux files are usually available from an "alsa"
887 of "libasound"
888 development package,
889 and it's highly recommended that you try and use
890 the package provided by the particular version of Linux that
891 you are using.
892 </td>
893 </tr>
894 <tr>
895 <td><b><code>--with-boot-jdk=</code></b><i>path</i></td>
896 <td>
897 select the <a href="#bootjdk">Bootstrap JDK</a>
898 </td>
899 </tr>
900 <tr>
901 <td><b><code>--with-boot-jdk-jvmargs=</code></b>"<i>args</i>"</td>
902 <td>
903 provide the JVM options to be used to run the
904 <a href="#bootjdk">Bootstrap JDK</a>
905 </td>
906 </tr>
907 <tr>
908 <td><b><code>--with-cacerts=</code></b><i>path</i></td>
909 <td>
910 select the path to the cacerts file.
911 <br>
912 See <a href="http://en.wikipedia.org/wiki/Certificate_Authority" target="_blank">
913 http://en.wikipedia.org/wiki/Certificate_Authority</a>
914 for a better understanding of the Certificate Authority (CA).
915 A certificates file named "cacerts"
916 represents a system-wide keystore with CA certificates.
917 In JDK and JRE
918 binary bundles, the "cacerts" file contains root CA certificates from
919 several public CAs (e.g., VeriSign, Thawte, and Baltimore).
920 The source contain a cacerts file
921 without CA root certificates.
922 Formal JDK builders will need to secure
923 permission from each public CA and include the certificates into their
924 own custom cacerts file.
925 Failure to provide a populated cacerts file
926 will result in verification errors of a certificate chain during runtime.
927 By default an empty cacerts file is provided and that should be
928 fine for most JDK developers.
929 </td>
930 </tr>
931 <tr>
932 <td><b><code>--with-cups=</code></b><i>path</i></td>
933 <td>
934 select the CUPS install location
935 <br>
936 The
937 <a name="cups">Common UNIX Printing System (CUPS) Headers</a>
938 are required for building the
939 OpenJDK on Solaris and Linux.
940 The Solaris header files can be obtained by installing
941 the package <strong>SFWcups</strong> from the Solaris Software
942 Companion CD/DVD, these often will be installed into the
943 directory <code>/opt/sfw/cups</code>.
944 <br>
945 The CUPS header files can always be downloaded from
946 <a href="http://www.cups.org" target="_blank">www.cups.org</a>.
947 </td>
948 </tr>
949 <tr>
950 <td><b><code>--with-cups-include=</code></b><i>path</i></td>
951 <td>
952 select the CUPS include directory location
953 </td>
954 </tr>
955 <tr>
956 <td><b><code>--with-debug-level=</code></b><i>level</i></td>
957 <td>
958 select the debug information level of release,
959 fastdebug, or slowdebug
960 </td>
961 </tr>
962 <tr>
963 <td><b><code>--with-dev-kit=</code></b><i>path</i></td>
964 <td>
965 select location of the compiler install or
966 developer install location
967 </td>
968 </tr>
969 <tr>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -0800970 <td><b><code>--with-freetype=</code></b><i>path</i></td>
971 <td>
972 select the freetype files to use.
973 <br>
974 Expecting the
975 <a name="freetype">freetype</a> libraries under
976 <code>lib/</code> and the
977 headers under <code>include/</code>.
978 <br>
979 Version 2.3 or newer of FreeType is required.
980 On Unix systems required files can be available as part of your
981 distribution (while you still may need to upgrade them).
982 Note that you need development version of package that
983 includes both the FreeType library and header files.
984 <br>
985 You can always download latest FreeType version from the
986 <a href="http://www.freetype.org" target="_blank">FreeType website</a>.
987 <br>
988 Building the freetype 2 libraries from scratch is also possible,
989 however on Windows refer to the
990 <a href="http://freetype.freedesktop.org/wiki/FreeType_DLL">
991 Windows FreeType DLL build instructions</a>.
992 <br>
993 Note that by default FreeType is built with byte code hinting
994 support disabled due to licensing restrictions.
995 In this case, text appearance and metrics are expected to
996 differ from Sun's official JDK build.
997 See
998 <a href="http://freetype.sourceforge.net/freetype2/index.html">
999 the SourceForge FreeType2 Home Page
1000 </a>
1001 for more information.
1002 </td>
1003 </tr>
1004 <tr>
1005 <td><b><code>--with-import-hotspot=</code></b><i>path</i></td>
1006 <td>
1007 select the location to find hotspot
1008 binaries from a previous build to avoid building
1009 hotspot
1010 </td>
1011 </tr>
1012 <tr>
1013 <td><b><code>--with-target-bits=</code></b><i>arg</i></td>
1014 <td>
1015 select 32 or 64 bit build
1016 </td>
1017 </tr>
1018 <tr>
1019 <td><b><code>--with-jvm-variants=</code></b><i>variants</i></td>
1020 <td>
1021 select the JVM variants to build from, comma
1022 separated list that can include:
1023 server, client, kernel, zero and zeroshark
1024 </td>
1025 </tr>
1026 <tr>
1027 <td><b><code>--with-memory-size=</code></b><i>size</i></td>
1028 <td>
1029 select the RAM size that GNU make will think
1030 this system has
1031 </td>
1032 </tr>
1033 <tr>
1034 <td><a name="msvcrNN"><b><code>--with-msvcr-dll=</code></b><i>path</i></a></td>
1035 <td>
1036 select the <code>msvcr100.dll</code>
1037 file to include in the
1038 Windows builds (C/C++ runtime library for
1039 Visual Studio).
1040 <br>
1041 This is usually picked up automatically
1042 from the redist
1043 directories of Visual Studio 2010.
1044 </td>
1045 </tr>
1046 <tr>
1047 <td><b><code>--with-num-cores=</code></b><i>cores</i></td>
1048 <td>
1049 select the number of cores to use (processor
1050 count or CPU count)
1051 </td>
1052 </tr>
1053 <tr>
1054 <td><b><code>--with-x=</code></b><i>path</i></td>
1055 <td>
1056 select the location of the X11 and xrender files.
1057 <br>
1058 The
1059 <a name="xrender">XRender Extension Headers</a>
1060 are required for building the
1061 OpenJDK on Solaris and Linux.
1062 <br>
1063 The Linux header files are usually available from a "Xrender"
1064 development package, it's recommended that you try and use
1065 the package provided by the particular distribution of Linux that
1066 you are using.
1067 <br>
1068 The Solaris XRender header files is
1069 included with the other X11 header files
1070 in the package <strong>SFWxwinc</strong>
1071 on new enough versions of
1072 Solaris and will be installed in
1073 <code>/usr/X11/include/X11/extensions/Xrender.h</code> or
1074 <code>/usr/openwin/share/include/X11/extensions/Xrender.h</code>
1075 </td>
1076 </tr>
1077 </tbody>
1078 </table>
1079 </blockquote>
1080
1081 </blockquote>
1082
1083 <!-- ====================================================== -->
1084 <hr>
1085 <h3><a name="make">Make</a></h3>
1086 <blockquote>
1087 The basic invocation of the <code>make</code> utility
1088 looks like:
1089 <blockquote>
1090 <b><code>make all</code></b>
1091 </blockquote>
1092 This will start the build to the output directory containing the
1093 "configuration" that was created by the <code>configure</code>
1094 script. Run <code>make help</code> for more information on
1095 the available targets.
1096 <br>
1097 There are some of the make targets that
1098 are of general interest:
1099 <table border="1">
1100 <thead>
1101 <tr>
1102 <th>Make Target</th>
1103 <th>Description</th>
1104 </tr>
1105 </thead>
1106 <tbody>
1107 <tr>
1108 <td><i>empty</i></td>
1109 <td>build everything but no images</td>
1110 </tr>
1111 <tr>
1112 <td><b><code>all</code></b></td>
1113 <td>build everything including images</td>
1114 </tr>
1115 <tr>
1116 <td><b><code>all-conf</code></b></td>
1117 <td>build all configurations</td>
1118 </tr>
1119 <tr>
1120 <td><b><code>images</code></b></td>
1121 <td>create complete j2sdk and j2re images</td>
1122 </tr>
1123 <tr>
1124 <td><b><code>install</code></b></td>
1125 <td>install the generated images locally,
1126 typically in <code>/usr/local</code></td>
1127 </tr>
1128 <tr>
1129 <td><b><code>clean</code></b></td>
1130 <td>remove all files generated by make,
1131 but not those generated by <code>configure</code></td>
1132 </tr>
1133 <tr>
1134 <td><b><code>dist-clean</code></b></td>
1135 <td>remove all files generated by both
1136 and <code>configure</code> (basically killing the configuration)</td>
1137 </tr>
1138 <tr>
1139 <td><b><code>help</code></b></td>
1140 <td>give some help on using <code>make</code>,
1141 including some interesting make targets</td>
1142 </tr>
1143 </tbody>
1144 </table>
1145 </blockquote>
1146 </blockquote>
1147
1148 <!-- ====================================================== -->
1149 <hr>
1150 <h2><a name="testing">Testing</a></h2>
1151 <blockquote>
1152 When the build is completed, you should see the generated
1153 binaries and associated files in the <code>j2sdk-image</code>
1154 directory in the output directory.
1155 In particular, the
1156 <code>build/<i>*</i>/images/j2sdk-image/bin</code>
1157 directory should contain executables for the
1158 OpenJDK tools and utilities for that configuration.
1159 The testing tool <code>jtreg</code> will be needed
1160 and can be found at:
1161 <a href="http://openjdk.java.net/jtreg/" target="_blank">
1162 the jtreg site</a>.
1163 The provided regression tests in the repositories
1164 can be run with the command:
1165 <blockquote>
1166 <code><b>cd test &amp;&amp; make PRODUCT_HOME=`pwd`/../build/*/images/j2sdk-image all</b></code>
1167 </blockquote>
1168 </blockquote>
1169
1170 <!-- ====================================================== -->
1171 <!-- ====================================================== -->
1172 <!-- ====================================================== -->
1173 <!-- ====================================================== -->
1174 <!-- ====================================================== -->
1175 <!-- ====================================================== -->
1176 <!-- ====================================================== -->
1177 <!-- ====================================================== -->
1178 <!-- ====================================================== -->
1179
1180 <!-- ====================================================== -->
1181 <hr>
1182 <h2><a name="hints">Appendix A: Hints and Tips</a></h2>
1183 <blockquote>
1184
1185 <h3><a name="faq">FAQ</a></h3>
1186 <blockquote>
1187
1188 <p>
Erik Joelsson7b50e2e2013-08-30 10:13:25 +02001189 <b>Q:</b> The <code>generated-configure.sh</code> file looks horrible!
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001190 How are you going to edit it?
1191 <br>
Erik Joelsson7b50e2e2013-08-30 10:13:25 +02001192 <b>A:</b> The <code>generated-configure.sh</code> file is generated (think
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001193 "compiled") by the autoconf tools. The source code is
Erik Joelsson7b50e2e2013-08-30 10:13:25 +02001194 in <code>configure.ac</code> and various .m4 files in common/autoconf,
1195 which are much more readable.
Kelly O'Hairf240c002011-03-22 08:15:39 -07001196 </p>
1197
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001198 <p>
1199 <b>Q:</b>
Erik Joelsson7b50e2e2013-08-30 10:13:25 +02001200 Why is the <code>generated-configure.sh</code> file checked in,
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001201 if it is generated?
1202 <br>
1203 <b>A:</b>
1204 If it was not generated, every user would need to have the autoconf
1205 tools installed, and re-generate the <code>configure</code> file
1206 as the first step.
1207 Our goal is to minimize the work needed to be done by the user
1208 to start building OpenJDK, and to minimize
1209 the number of external dependencies required.
1210 </p>
1211
1212 <p>
1213 <b>Q:</b>
1214 Do you require a specific version of autoconf for regenerating
Erik Joelsson7b50e2e2013-08-30 10:13:25 +02001215 <code>generated-configure.sh</code>?
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001216 <br>
1217 <b>A:</b>
Erik Joelsson7b50e2e2013-08-30 10:13:25 +02001218 Yes, version 2.69 is required and should be easy
1219 enough to aquire on all supported operating
1220 systems. The reason for this is to avoid
1221 large spurious changes in <code>generated-configure.sh</code>.
1222 </p>
1223
1224 <p>
1225 <b>Q:</b>
1226 How do you regenerate <code>generated-configure.sh</code>
1227 after making changes to the input files?
1228 <br>
1229 <b>A:</b>
1230 Regnerating <code>generated-configure.sh</code>
1231 should always be done using the
1232 script <code>common/autoconf/autogen.sh</code> to
1233 ensure that the correct files get updated. This
1234 script should also be run after mercurial tries to
1235 merge <code>generated-configure.sh</code> as a
1236 merge of the generated file is not guaranteed to
1237 be correct.
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001238 </p>
1239
1240 <p>
1241 <b>Q:</b>
1242 What are the files in <code>common/makefiles/support/*</code> for?
1243 They look like gibberish.
1244 <br>
1245 <b>A:</b>
1246 They are a somewhat ugly hack to compensate for command line length
1247 limitations on certain platforms (Windows, Solaris).
1248 Due to a combination of limitations in make and the shell,
1249 command lines containing too many files will not work properly.
1250 These
1251 helper files are part of an elaborate hack that will compress the
1252 command line in the makefile and then uncompress it safely.
1253 We're
1254 not proud of it, but it does fix the problem.
1255 If you have any better suggestions, we're all ears! :-)
1256 </p>
1257
1258 <p>
1259 <b>Q:</b>
1260 I want to see the output of the commands that make runs,
1261 like in the old build. How do I do that?
1262 <br>
1263 <b>A:</b>
1264 You specify the <code>LOG</code> variable to make. There are
1265 several log levels:
1266 </p>
Kelly O'Hairf240c002011-03-22 08:15:39 -07001267 <blockquote>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001268 <ul>
Kelly O'Hairf240c002011-03-22 08:15:39 -07001269 <li>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001270 <b><code>warn</code></b> &mdash; Default and very quiet.
Kelly O'Hairf240c002011-03-22 08:15:39 -07001271 </li>
1272 <li>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001273 <b><code>info</code></b> &mdash; Shows more progress information
1274 than warn.
Kelly O'Hairf240c002011-03-22 08:15:39 -07001275 </li>
1276 <li>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001277 <b><code>debug</code></b> &mdash; Echos all command lines and
1278 prints all macro calls for compilation definitions.
Kelly O'Hairf240c002011-03-22 08:15:39 -07001279 </li>
1280 <li>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001281 <b><code>trace</code></b> &mdash; Echos all $(shell) command
1282 lines as well.
Kelly O'Hairf240c002011-03-22 08:15:39 -07001283 </li>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001284 </ul>
Kelly O'Hairf240c002011-03-22 08:15:39 -07001285 </blockquote>
1286
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001287 <p>
1288 <b>Q:</b>
1289 When do I have to re-run <code>configure</code>?
1290 <br>
1291 <b>A:</b>
1292 Normally you will run <code>configure</code> only once for creating a
1293 configuration.
1294 You need to re-run configuration only if you want to change any
1295 configuration options,
1296 or if you pull down changes to the <code>configure</code> script.
1297 </p>
1298
1299 <p>
1300 <b>Q:</b>
1301 I have added a new source file. Do I need to modify the makefiles?
1302 <br>
1303 <b>A:</b>
1304 Normally, no. If you want to create e.g. a new native
1305 library,
1306 you will need to modify the makefiles. But for normal file
1307 additions or removals, no changes are needed. There are certan
1308 exceptions for some native libraries where the source files are spread
Erik Joelssonf771ef42013-08-26 13:43:27 +02001309 over many directories which also contain sources for other
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001310 libraries. In these cases it was simply easier to create include lists
Erik Joelssonf771ef42013-08-26 13:43:27 +02001311 rather than excludes.
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001312 </p>
1313
1314 <p>
1315 <b>Q:</b>
1316 When I run <code>configure --help</code>, I see many strange options,
1317 like <code>--dvidir</code>. What is this?
1318 <br>
1319 <b>A:</b>
1320 Configure provides a slew of options by default, to all projects
1321 that use autoconf. Most of them are not used in OpenJDK,
1322 so you can safely ignore them. To list only OpenJDK specific features,
1323 use <code>configure --help=short</code> instead.
1324 </p>
1325
1326 <p>
1327 <b>Q:</b>
1328 <code>configure</code> provides OpenJDK-specific features such as
Erik Joelssonf771ef42013-08-26 13:43:27 +02001329 <code>--with-builddeps-server</code> that are not
1330 described in this document. What about those?
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001331 <br>
1332 <b>A:</b>
1333 Try them out if you like! But be aware that most of these are
1334 experimental features.
1335 Many of them don't do anything at all at the moment; the option
Erik Joelssonf771ef42013-08-26 13:43:27 +02001336 is just a placeholder. Others depend on
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001337 pieces of code or infrastructure that is currently
1338 not ready for prime time.
1339 </p>
1340
1341 <p>
1342 <b>Q:</b>
1343 How will you make sure you don't break anything?
1344 <br>
1345 <b>A:</b>
1346 We have a script that compares the result of the new build system
1347 with the result of the old. For most part, we aim for (and achieve)
1348 byte-by-byte identical output. There are however technical issues
1349 with e.g. native binaries, which might differ in a byte-by-byte
1350 comparison, even
1351 when building twice with the old build system.
1352 For these, we compare relevant aspects
1353 (e.g. the symbol table and file size).
1354 Note that we still don't have 100%
1355 equivalence, but we're close.
1356 </p>
1357
1358 <p>
1359 <b>Q:</b>
1360 I noticed this thing X in the build that looks very broken by design.
1361 Why don't you fix it?
1362 <br>
1363 <b>A:</b>
1364 Our goal is to produce a build output that is as close as
1365 technically possible to the old build output.
1366 If things were weird in the old build,
1367 they will be weird in the new build.
1368 Often, things were weird before due to obscurity,
1369 but in the new build system the weird stuff comes up to the surface.
1370 The plan is to attack these things at a later stage,
1371 after the new build system is established.
1372 </p>
1373
1374 <p>
1375 <b>Q:</b>
1376 The code in the new build system is not that well-structured.
1377 Will you fix this?
1378 <br>
1379 <b>A:</b>
1380 Yes! The new build system has grown bit by bit as we converted
1381 the old system. When all of the old build system is converted,
1382 we can take a step back and clean up the structure of the new build
1383 system. Some of this we plan to do before replacing the old build
1384 system and some will need to wait until after.
1385 </p>
1386
1387 <p>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001388 <b>Q:</b>
1389 Is anything able to use the results of the new build's default make target?
1390 <br>
1391 <b>A:</b>
1392 Yes, this is the minimal (or roughly minimal)
1393 set of compiled output needed for a developer to actually
1394 execute the newly built JDK. The idea is that in an incremental
1395 development fashion, when doing a normal make,
1396 you should only spend time recompiling what's changed
1397 (making it purely incremental) and only do the work that's
1398 needed to actually run and test your code.
1399 The packaging stuff that is part of the <code>images</code>
1400 target is not needed for a normal developer who wants to
1401 test his new code. Even if it's quite fast, it's still unnecessary.
1402 We're targeting sub-second incremental rebuilds! ;-)
1403 (Or, well, at least single-digit seconds...)
1404 </p>
1405
1406 <p>
1407 <b>Q:</b>
1408 I usually set a specific environment variable when building,
1409 but I can't find the equivalent in the new build.
1410 What should I do?
1411 <br>
1412 <b>A:</b>
Erik Joelssonf771ef42013-08-26 13:43:27 +02001413 It might very well be that we have neglected to add support for
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001414 an option that was actually used from outside the build system.
Erik Joelssonf771ef42013-08-26 13:43:27 +02001415 Email us and we will add support for it!
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001416 </p>
1417
Kelly O'Hairf240c002011-03-22 08:15:39 -07001418 </blockquote>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001419
1420 <h3><a name="performance">Build Performance Tips</a></h3>
Kelly O'Hairbf8a41a2008-04-30 19:35:26 -07001421 <blockquote>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001422
1423 <p>Building OpenJDK requires a lot of horsepower.
1424 Some of the build tools can be adjusted to utilize more or less
1425 of resources such as
1426 parallel threads and memory.
1427 The <code>configure</code> script analyzes your system and selects reasonable
1428 values for such options based on your hardware.
1429 If you encounter resource problems, such as out of memory conditions,
1430 you can modify the detected values with:</p>
1431
1432 <ul>
1433 <li>
1434 <b><code>--with-num-cores</code></b>
1435 &mdash;
1436 number of cores in the build system,
1437 e.g. <code>--with-num-cores=8</code>
1438 </li>
1439 <li>
1440 <b><code>--with-memory-size</code></b>
1441 &mdash; memory (in MB) available in the build system,
1442 e.g. <code>--with-memory-size=1024</code>
1443 </li>
1444 </ul>
1445
1446 <p>It might also be necessary to specify the JVM arguments passed
1447 to the Bootstrap JDK, using e.g.
1448 <code>--with-boot-jdk-jvmargs="-Xmx8G -enableassertions"</code>.
1449 Doing this will override the default JVM arguments
1450 passed to the Bootstrap JDK.</p>
1451
1452
1453 <p>One of the top goals of the new build system is to improve the
1454 build performance and decrease the time needed to build. This will
1455 soon also apply to the java compilation when the Smart Javac wrapper
Erik Joelssonfad4dbf2014-04-24 10:21:58 +02001456 is fully supported.</p>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001457
1458 <p>At the end of a successful execution of <code>configure</code>,
1459 you will get a performance summary,
1460 indicating how well the build will perform. Here you will
1461 also get performance hints.
1462 If you want to build fast, pay attention to those!</p>
1463
1464 <h4>Building with ccache</h4>
1465
1466 <p>A simple way to radically speed up compilation of native code
1467 (typically hotspot and native libraries in JDK) is to install
1468 ccache. This will cache and reuse prior compilation results, if the
1469 source code is unchanged. However, ccache versions prior to 3.1.4
1470 does not work correctly with the precompiled headers used in
1471 OpenJDK. So if your platform supports ccache at 3.1.4 or later, we
1472 highly recommend installing it. This is currently only supported on
1473 linux.</p>
1474
1475 <h4>Building on local disk</h4>
1476
1477 <p>If you are using network shares, e.g. via NFS, for your source code,
1478 make sure the build directory is situated on local disk.
1479 The performance
1480 penalty is extremely high for building on a network share,
1481 close to unusable.</p>
1482
1483 <h4>Building only one JVM</h4>
1484
1485 <p>The old build builds multiple JVMs on 32-bit systems (client and
1486 server; and on Windows kernel as well). In the new build we have
1487 changed this default to only build server when it's available. This
1488 improves build times for those not interested in multiple JVMs. To
1489 mimic the old behavior on platforms that support it,
1490 use <code>--with-jvm-variants=client,server</code>.</p>
1491
1492 <h4>Selecting the number of cores to build on</h4>
1493
1494 <p>By default, <code>configure</code> will analyze your machine and run the make
1495 process in parallel with as many threads as you have cores. This
1496 behavior can be overridden, either "permanently" (on a <code>configure</code>
1497 basis) using <code>--with-num-cores=N</code> or for a single build
1498 only (on a make basis), using <code>make JOBS=N</code>.</p>
1499
1500 <p>If you want to make a slower build just this time, to save some CPU
1501 power for other processes, you can run
1502 e.g. <code>make JOBS=2</code>. This will force the makefiles
1503 to only run 2 parallel processes, or even <code>make JOBS=1</code>
1504 which will disable parallelism.</p>
1505
1506 <p>If you want to have it the other way round, namely having slow
1507 builds default and override with fast if you're
1508 impatient, you should call <code>configure</code> with
1509 <code>--with-num-cores=2</code>, making 2 the default.
1510 If you want to run with more
1511 cores, run <code>make JOBS=8</code></p>
1512
J. Duke686d76f2007-12-01 00:00:00 +00001513 </blockquote>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001514
1515 <h3><a name="troubleshooting">Troubleshooting</a></h3>
1516 <blockquote>
1517
1518 <h4>Solving build problems</h4>
1519
1520 <blockquote>
1521 If the build fails (and it's not due to a compilation error in
1522 a source file you've changed), the first thing you should do
1523 is to re-run the build with more verbosity.
1524 Do this by adding <code>LOG=debug</code> to your make command line.
1525 <br>
1526 The build log (with both stdout and stderr intermingled,
1527 basically the same as you see on your console) can be found as
1528 <code>build.log</code> in your build directory.
1529 <br>
1530 You can ask for help on build problems with the new build system
1531 on either the
1532 <a href="http://mail.openjdk.java.net/mailman/listinfo/build-dev">
1533 build-dev</a>
1534 or the
1535 <a href="http://mail.openjdk.java.net/mailman/listinfo/build-infra-dev">
1536 build-infra-dev</a>
1537 mailing lists. Please include the relevant parts
1538 of the build log.
1539 <br>
1540 A build can fail for any number of reasons.
1541 Most failures
1542 are a result of trying to build in an environment in which all the
1543 pre-build requirements have not been met.
1544 The first step in
1545 troubleshooting a build failure is to recheck that you have satisfied
1546 all the pre-build requirements for your platform.
1547 Scanning the <code>configure</code> log is a good first step, making
1548 sure that what it found makes sense for your system.
1549 Look for strange error messages or any difficulties that
1550 <code>configure</code> had in finding things.
1551 <br>
1552 Some of the more common problems with builds are briefly
1553 described
1554 below, with suggestions for remedies.
1555 <ul>
1556 <li>
1557 <b>Corrupted Bundles on Windows:</b>
1558 <blockquote>
1559 Some virus scanning software has been known to
1560 corrupt the
1561 downloading of zip bundles.
1562 It may be necessary to disable the 'on access' or
1563 'real time'
1564 virus scanning features to prevent this corruption.
1565 This type of "real time" virus scanning can also
1566 slow down the
1567 build process significantly.
1568 Temporarily disabling the feature, or excluding the build
1569 output directory may be necessary to get correct and
1570 faster builds.
1571 </blockquote>
1572 </li>
1573 <li>
1574 <b>Slow Builds:</b>
1575 <blockquote>
1576 If your build machine seems to be overloaded from too many
1577 simultaneous C++ compiles, try setting the
1578 <code>JOBS=1</code> on the <code>make</code> command line.
1579 Then try increasing the count slowly to an acceptable
1580 level for your system. Also:
1581 <blockquote>
1582 Creating the javadocs can be very slow,
1583 if you are running
1584 javadoc, consider skipping that step.
1585 <br>
1586 Faster CPUs, more RAM, and a faster DISK usually helps.
1587 The VM build tends to be CPU intensive
1588 (many C++ compiles),
1589 and the rest of the JDK will often be disk intensive.
1590 <br>
1591 Faster compiles are possible using a tool called
1592 <a href="http://ccache.samba.org/" target="_blank">ccache</a>.
1593 </blockquote>
1594 </blockquote>
1595 </li>
1596 <li>
1597 <b>File time issues:</b>
1598 <blockquote>
1599 If you see warnings that refer to file time stamps, e.g.
1600 <blockquote>
1601 <i>Warning message:</i><code>
1602 File `xxx' has modification time in
1603 the future.</code>
1604 <br>
1605 <i>Warning message:</i> <code> Clock skew detected.
1606 Your build may
1607 be incomplete.</code>
1608 </blockquote>
1609 These warnings can occur when the clock on the build
1610 machine is out of
1611 sync with the timestamps on the source files.
1612 Other errors, apparently
1613 unrelated but in fact caused by the clock skew,
1614 can occur along with
1615 the clock skew warnings.
1616 These secondary errors may tend to obscure the
1617 fact that the true root cause of the problem
1618 is an out-of-sync clock.
1619 <p>
1620 If you see these warnings, reset the clock on the
1621 build
1622 machine, run "<code><i>gmake</i> clobber</code>"
1623 or delete the directory
1624 containing the build output, and restart the
1625 build from the beginning.
1626 </blockquote>
1627 </li>
1628 <li>
1629 <b>Error message:
1630 <code>Trouble writing out table to disk</code></b>
1631 <blockquote>
1632 Increase the amount of swap space on your build machine.
1633 This could be caused by overloading the system and
1634 it may be necessary to use:
1635 <blockquote>
1636 <code>make JOBS=1</code>
1637 </blockquote>
1638 to reduce the load on the system.
1639 </blockquote>
1640 </li>
1641 <li>
1642 <b>Error Message:
1643 <code>libstdc++ not found:</code></b>
1644 <blockquote>
1645 This is caused by a missing libstdc++.a library.
1646 This is installed as part of a specific package
1647 (e.g. libstdc++.so.devel.386).
1648 By default some 64-bit Linux versions (e.g. Fedora)
1649 only install the 64-bit version of the libstdc++ package.
1650 Various parts of the JDK build require a static
1651 link of the C++ runtime libraries to allow for maximum
1652 portability of the built images.
1653 </blockquote>
1654 </li>
1655 <li>
1656 <b>Linux Error Message:
1657 <code>cannot restore segment prot after reloc</code></b>
1658 <blockquote>
1659 This is probably an issue with SELinux (See
1660 <a href="http://en.wikipedia.org/wiki/SELinux" target="_blank">
1661 http://en.wikipedia.org/wiki/SELinux</a>).
1662 Parts of the VM is built without the <code>-fPIC</code> for
1663 performance reasons.
1664 <p>
1665 To completely disable SELinux:
1666 <ol>
1667 <li><code>$ su root</code></li>
1668 <li><code># system-config-securitylevel</code></li>
1669 <li><code>In the window that appears, select the SELinux tab</code></li>
1670 <li><code>Disable SELinux</code></li>
1671 </ol>
1672 <p>
1673 Alternatively, instead of completely disabling it you could
1674 disable just this one check.
1675 <ol>
1676 <li>Select System->Administration->SELinux Management</li>
1677 <li>In the SELinux Management Tool which appears,
1678 select "Boolean" from the menu on the left</li>
1679 <li>Expand the "Memory Protection" group</li>
1680 <li>Check the first item, labeled
1681 "Allow all unconfined executables to use
1682 libraries requiring text relocation ..."</li>
1683 </ol>
1684 </blockquote>
1685 </li>
1686 <li>
1687 <b>Windows Error Messages:</b>
1688 <br>
1689 <code>*** fatal error - couldn't allocate heap, ... </code>
1690 <br>
1691 <code>rm fails with "Directory not empty"</code>
1692 <br>
1693 <code>unzip fails with "cannot create ... Permission denied"</code>
1694 <br>
1695 <code>unzip fails with "cannot create ... Error 50"</code>
1696 <br>
1697 <blockquote>
1698 The CYGWIN software can conflict with other non-CYGWIN
1699 software. See the CYGWIN FAQ section on
1700 <a href="http://cygwin.com/faq/faq.using.html#faq.using.bloda" target="_blank">
1701 BLODA (applications that interfere with CYGWIN)</a>.
1702 </blockquote>
1703 </li>
1704 <li>
1705 <b>Windows Error Message: <code>spawn failed</code></b>
1706 <blockquote>
1707 Try rebooting the system, or there could be some kind of
1708 issue with the disk or disk partition being used.
1709 Sometimes it comes with a "Permission Denied" message.
1710 </blockquote>
1711 </li>
1712 </ul>
1713 </blockquote>
1714
1715 </blockquote> <!-- Troubleshooting -->
1716
1717 </blockquote> <!-- Appendix A -->
1718
1719 <!-- ====================================================== -->
Kelly O'Hairbf8a41a2008-04-30 19:35:26 -07001720 <hr>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001721 <h2><a name="gmake">Appendix B: GNU make</a></h2>
J. Duke686d76f2007-12-01 00:00:00 +00001722 <blockquote>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001723
Kelly O'Hairbf8a41a2008-04-30 19:35:26 -07001724 The Makefiles in the OpenJDK are only valid when used with the
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001725 GNU version of the utility command <code>make</code>
1726 (usually called <code>gmake</code> on Solaris).
Kelly O'Hairbf8a41a2008-04-30 19:35:26 -07001727 A few notes about using GNU make:
1728 <ul>
1729 <li>
Kelly O'Hairf240c002011-03-22 08:15:39 -07001730 You need GNU make version 3.81 or newer.
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001731 If the GNU make utility on your systems is not
1732 3.81 or newer,
1733 see <a href="#buildgmake">"Building GNU make"</a>.
Kelly O'Hairbf8a41a2008-04-30 19:35:26 -07001734 </li>
1735 <li>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001736 Place the location of the GNU make binary in the
1737 <code>PATH</code>.
Kelly O'Hairbf8a41a2008-04-30 19:35:26 -07001738 </li>
1739 <li>
1740 <strong>Solaris:</strong>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001741 Do NOT use <code>/usr/bin/make</code> on Solaris.
Kelly O'Hairbf8a41a2008-04-30 19:35:26 -07001742 If your Solaris system has the software
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001743 from the Solaris Developer Companion CD installed,
1744 you should try and use <code>gmake</code>
1745 which will be located in either the
1746 <code>/usr/bin</code>, <code>/opt/sfw/bin</code> or
1747 <code>/usr/sfw/bin</code> directory.
Kelly O'Hairbf8a41a2008-04-30 19:35:26 -07001748 </li>
1749 <li>
1750 <strong>Windows:</strong>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001751 Make sure you start your build inside a bash shell.
1752 </li>
1753 <li>
1754 <strong>Mac OS X:</strong>
1755 The XCode "command line tools" must be installed on your Mac.
Kelly O'Hairbf8a41a2008-04-30 19:35:26 -07001756 </li>
1757 </ul>
J. Duke686d76f2007-12-01 00:00:00 +00001758 <p>
Kelly O'Hair213481a2010-12-22 12:25:52 -08001759 Information on GNU make, and access to ftp download sites, are
1760 available on the
1761 <a href="http://www.gnu.org/software/make/make.html" target="_blank">
1762 GNU make web site
1763 </a>.
1764 The latest source to GNU make is available at
1765 <a href="http://ftp.gnu.org/pub/gnu/make/" target="_blank">
1766 ftp.gnu.org/pub/gnu/make/</a>.
Kelly O'Hairf240c002011-03-22 08:15:39 -07001767 </p>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001768
1769 <h3><a name="buildgmake">Building GNU make</a></h3>
Kelly O'Hairf240c002011-03-22 08:15:39 -07001770 <blockquote>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001771 First step is to get the GNU make 3.81 or newer source from
Kelly O'Hairf240c002011-03-22 08:15:39 -07001772 <a href="http://ftp.gnu.org/pub/gnu/make/" target="_blank">
1773 ftp.gnu.org/pub/gnu/make/</a>.
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001774 Building is a little different depending on the OS but is
1775 basically done with:
1776 <blockquote>
1777 <code>bash ./configure</code>
1778 <br>
1779 <code>make</code>
1780 </blockquote>
Kelly O'Hairf240c002011-03-22 08:15:39 -07001781 </blockquote>
Edvard Wendelin1f736c82012-05-03 14:17:30 +02001782
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001783 </blockquote> <!-- Appendix B -->
1784
1785 <!-- ====================================================== -->
Edvard Wendelin1f736c82012-05-03 14:17:30 +02001786 <hr>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001787 <h2><a name="buildenvironments">Appendix C: Build Environments</a></h2>
Kelly O'Hairbf8a41a2008-04-30 19:35:26 -07001788 <blockquote>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001789
1790 <h3><a name="MBE">Minimum Build Environments</a></h3>
J. Duke686d76f2007-12-01 00:00:00 +00001791 <blockquote>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001792 This file often describes specific requirements for what we
1793 call the
1794 "minimum build environments" (MBE) for this
1795 specific release of the JDK.
1796 What is listed below is what the Oracle Release
1797 Engineering Team will use to build the Oracle JDK product.
1798 Building with the MBE will hopefully generate the most compatible
1799 bits that install on, and run correctly on, the most variations
1800 of the same base OS and hardware architecture.
1801 In some cases, these represent what is often called the
1802 least common denominator, but each Operating System has different
1803 aspects to it.
J. Duke686d76f2007-12-01 00:00:00 +00001804 <p>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001805 In all cases, the Bootstrap JDK version minimum is critical,
1806 we cannot guarantee builds will work with older Bootstrap JDK's.
1807 Also in all cases, more RAM and more processors is better,
1808 the minimums listed below are simply recommendations.
1809 <p>
1810 With Solaris and Mac OS X, the version listed below is the
1811 oldest release we can guarantee builds and works, and the
1812 specific version of the compilers used could be critical.
1813 <p>
1814 With Windows the critical aspect is the Visual Studio compiler
1815 used, which due to it's runtime, generally dictates what Windows
1816 systems can do the builds and where the resulting bits can
1817 be used.<br>
1818 <b>NOTE: We expect a change here off these older Windows OS releases
1819 and to a 'less older' one, probably Windows 2008R2 X64.</b>
1820 <p>
1821 With Linux, it was just a matter of picking a
1822 stable distribution that is a good representative for Linux
1823 in general.<br>
1824 <b>NOTE: We expect a change here from Fedora 9 to something else,
1825 but it has not been completely determined yet, possibly
1826 Ubuntu 12.04 X64, unbiased community feedback would be welcome on
1827 what a good choice would be here.</b>
1828 <p>
1829 It is understood that most developers will NOT be using these
1830 specific versions, and in fact creating these specific versions
1831 may be difficult due to the age of some of this software.
1832 It is expected that developers are more often using the more
1833 recent releases and distributions of these operating systems.
1834 <p>
1835 Compilation problems with newer or different C/C++ compilers is a
1836 common problem.
1837 Similarly, compilation problems related to changes to the
1838 <code>/usr/include</code> or system header files is also a
1839 common problem with older, newer, or unreleased OS versions.
1840 Please report these types of problems as bugs so that they
1841 can be dealt with accordingly.
1842 </p>
1843 <table border="1">
1844 <thead>
1845 <tr>
1846 <th>Base OS and Architecture</th>
1847 <th>OS</th>
1848 <th>C/C++ Compiler</th>
1849 <th>Bootstrap JDK</th>
1850 <th>Processors</th>
1851 <th>RAM Minimum</th>
1852 <th>DISK Needs</th>
1853 </tr>
1854 </thead>
1855 <tbody>
1856 <tr>
1857 <td>Linux X86 (32-bit) and X64 (64-bit)</td>
1858 <td>Fedora 9</td>
1859 <td>gcc 4.3 </td>
1860 <td>JDK 7u7</td>
1861 <td>2 or more</td>
1862 <td>1 GB</td>
1863 <td>6 GB</td>
1864 </tr>
1865 <tr>
1866 <td>Solaris SPARC (32-bit) and SPARCV9 (64-bit)</td>
1867 <td>Solaris 10 Update 6</td>
1868 <td>Studio 12 Update 1 + patches</td>
1869 <td>JDK 7u7</td>
1870 <td>4 or more</td>
1871 <td>4 GB</td>
1872 <td>8 GB</td>
1873 </tr>
1874 <tr>
1875 <td>Solaris X86 (32-bit) and X64 (64-bit)</td>
1876 <td>Solaris 10 Update 6</td>
1877 <td>Studio 12 Update 1 + patches</td>
1878 <td>JDK 7u7</td>
1879 <td>4 or more</td>
1880 <td>4 GB</td>
1881 <td>8 GB</td>
1882 </tr>
1883 <tr>
1884 <td>Windows X86 (32-bit)</td>
1885 <td>Windows XP</td>
1886 <td>Microsoft Visual Studio C++ 2010 Professional Edition</td>
1887 <td>JDK 7u7</td>
1888 <td>2 or more</td>
1889 <td>2 GB</td>
1890 <td>6 GB</td>
1891 </tr>
1892 <tr>
1893 <td>Windows X64 (64-bit)</td>
1894 <td>Windows Server 2003 - Enterprise x64 Edition</td>
1895 <td>Microsoft Visual Studio C++ 2010 Professional Edition</td>
1896 <td>JDK 7u7</td>
1897 <td>2 or more</td>
1898 <td>2 GB</td>
1899 <td>6 GB</td>
1900 </tr>
1901 <tr>
1902 <td>Mac OS X X64 (64-bit)</td>
1903 <td>Mac OS X 10.7 "Lion"</td>
1904 <td>XCode 4.5.2 or newer</td>
1905 <td>JDK 7u7</td>
1906 <td>2 or more</td>
1907 <td>4 GB</td>
1908 <td>6 GB</td>
1909 </tr>
1910 </tbody>
1911 </table>
J. Duke686d76f2007-12-01 00:00:00 +00001912 </blockquote>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001913
1914 <!-- ====================================================== -->
1915 <hr>
1916 <h3><a name="SDBE">Specific Developer Build Environments</a></h3>
Kelly O'Hairbf8a41a2008-04-30 19:35:26 -07001917 <blockquote>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08001918 We won't be listing all the possible environments, but
1919 we will try to provide what information we have available to us.
1920 <p>
1921 <strong>NOTE: The community can help out by updating
1922 this part of the document.
1923 </strong>
1924
1925 <h4><a name="fedora">Fedora</a></h4>
1926 <blockquote>
1927 After installing the latest
1928 <a href="http://fedoraproject.org">Fedora</a>
1929 you need to install several build dependencies.
1930 The simplest way to do it is to execute the
1931 following commands as user <code>root</code>:
1932 <blockquote>
1933 <code>yum-builddep java-1.7.0-openjdk</code>
1934 <br>
1935 <code>yum install gcc gcc-c++</code>
1936 </blockquote>
1937 <p>
1938 In addition, it's necessary to set a few environment
1939 variables for the build:
1940 <blockquote>
1941 <code>export LANG=C</code>
1942 <br>
1943 <code>export PATH="/usr/lib/jvm/java-openjdk/bin:${PATH}"</code>
1944 </blockquote>
1945 </blockquote>
1946
1947
1948 <h4><a name="centos">CentOS 5.5</a></h4>
1949 <blockquote>
1950 After installing
1951 <a href="http://www.centos.org/">CentOS 5.5</a>
1952 you need to make sure you have
1953 the following Development bundles installed:
1954 <blockquote>
1955 <ul>
1956 <li>Development Libraries</li>
1957 <li>Development Tools</li>
1958 <li>Java Development</li>
1959 <li>X Software Development (Including XFree86-devel)</li>
1960 </ul>
1961 </blockquote>
1962 <p>
1963 Plus the following packages:
1964 <blockquote>
1965 <ul>
1966 <li>cups devel: Cups Development Package</li>
1967 <li>alsa devel: Alsa Development Package</li>
1968 <li>Xi devel: libXi.so Development Package</li>
1969 </ul>
1970 </blockquote>
1971 <p>
1972 The freetype 2.3 packages don't seem to be available,
1973 but the freetype 2.3 sources can be downloaded, built,
1974 and installed easily enough from
1975 <a href="http://downloads.sourceforge.net/freetype">
1976 the freetype site</a>.
1977 Build and install with something like:
1978 <blockquote>
1979 <code>bash ./configure</code>
1980 <br>
1981 <code>make</code>
1982 <br>
1983 <code>sudo -u root make install</code>
1984 </blockquote>
1985 <p>
1986 Mercurial packages could not be found easily, but a Google
1987 search should find ones, and they usually include Python if
1988 it's needed.
1989 </blockquote>
1990
1991 <h4><a name="debian">Debian 5.0 (Lenny)</a></h4>
1992 <blockquote>
1993 After installing <a href="http://debian.org">Debian</a> 5
1994 you need to install several build dependencies.
1995 The simplest way to install the build dependencies is to
1996 execute the following commands as user <code>root</code>:
1997 <blockquote>
1998 <code>aptitude build-dep openjdk-7</code>
1999 <br>
2000 <code>aptitude install openjdk-7-jdk libmotif-dev</code>
2001 </blockquote>
2002 <p>
2003 In addition, it's necessary to set a few environment
2004 variables for the build:
2005 <blockquote>
2006 <code>export LANG=C</code>
2007 <br>
2008 <code>export PATH="/usr/lib/jvm/java-7-openjdk/bin:${PATH}"</code>
2009 </blockquote>
2010 </blockquote>
2011
2012 <h4><a name="ubuntu">Ubuntu 12.04</a></h4>
2013 <blockquote>
2014 After installing <a href="http://ubuntu.org">Ubuntu</a> 12.04
2015 you need to install several build dependencies. The simplest
2016 way to do it is to execute the following commands:
2017 <blockquote>
2018 <code>sudo aptitude build-dep openjdk-7</code>
2019 <br>
2020 <code>sudo aptitude install openjdk-7-jdk</code>
2021 </blockquote>
2022 <p>
2023 In addition, it's necessary to set a few environment
2024 variables for the build:
2025 <blockquote>
2026 <code>export LANG=C</code>
2027 <br>
2028 <code>export PATH="/usr/lib/jvm/java-7-openjdk/bin:${PATH}"</code>
2029 </blockquote>
2030 </blockquote>
2031
2032 <h4><a name="opensuse">OpenSUSE 11.1</a></h4>
2033 <blockquote>
2034 After installing <a href="http://opensuse.org">OpenSUSE</a> 11.1
2035 you need to install several build dependencies.
2036 The simplest way to install the build dependencies is to
2037 execute the following commands:
2038 <blockquote>
2039 <code>sudo zypper source-install -d java-1_7_0-openjdk</code>
2040 <br>
2041 <code>sudo zypper install make</code>
2042 </blockquote>
2043 <p>
2044 In addition, it is necessary to set a few environment
2045 variables for the build:
2046 <blockquote>
2047 <code>export LANG=C</code>
2048 <br>
2049 <code>export PATH="/usr/lib/jvm/java-1.7.0-openjdk/bin:$[PATH}"</code>
2050 </blockquote>
2051 <p>
2052 Finally, you need to unset the <code>JAVA_HOME</code>
2053 environment variable:
2054 <blockquote>
2055 <code>export -n JAVA_HOME</code>
2056 </blockquote>
2057 </blockquote>
2058
2059 <h4><a name="mandriva">Mandriva Linux One 2009 Spring</a></h4>
2060 <blockquote>
2061 After installing <a href="http://mandriva.org">Mandriva</a>
2062 Linux One 2009 Spring
2063 you need to install several build dependencies.
2064 The simplest way to install the build dependencies is to
2065 execute the following commands as user <code>root</code>:
2066 <blockquote>
2067 <code>urpmi java-1.7.0-openjdk-devel make gcc gcc-c++
2068 freetype-devel zip unzip libcups2-devel libxrender1-devel
2069 libalsa2-devel libstc++-static-devel libxtst6-devel
2070 libxi-devel</code>
2071 </blockquote>
2072 <p>
2073 In addition, it is necessary to set a few environment
2074 variables for the build:
2075 <blockquote>
2076 <code>export LANG=C</code>
2077 <br>
2078 <code>export PATH="/usr/lib/jvm/java-1.7.0-openjdk/bin:${PATH}"</code>
2079 </blockquote>
2080 </blockquote>
2081
2082 <h4><a name="opensolaris">OpenSolaris 2009.06</a></h4>
2083 <blockquote>
2084 After installing <a href="http://opensolaris.org">OpenSolaris</a> 2009.06
2085 you need to install several build dependencies.
2086 The simplest way to install the build dependencies is to
2087 execute the following commands:
2088 <blockquote>
2089 <code>pfexec pkg install SUNWgmake SUNWj7dev
2090 sunstudioexpress SUNWcups SUNWzip SUNWunzip SUNWxwhl
2091 SUNWxorg-headers SUNWaudh SUNWfreetype2</code>
2092 </blockquote>
2093 <p>
2094 In addition, it is necessary to set a few environment
2095 variables for the build:
2096 <blockquote>
2097 <code>export LANG=C</code>
2098 <br>
2099 <code>export PATH="/opt/SunStudioExpress/bin:${PATH}"</code>
2100 </blockquote>
2101 </blockquote>
2102
Kelly O'Hairbf8a41a2008-04-30 19:35:26 -07002103 </blockquote>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08002104
2105 </blockquote> <!-- Appendix C -->
2106
2107 <!-- ====================================================== -->
2108
2109 <!-- Leave out Appendix D --
2110
2111<hr>
2112<h2><a name="mapping">Appendix D: Mapping Old to New</a></h2>
2113<blockquote>
2114 <p>This table will help you convert some idioms of the old build
2115 system to the new build system.</p>
2116 <table summary="Cheat sheet for converting from old to new build system">
2117 <tr valign="top">
2118 <th>In the old build system, you used to...</th>
2119 <th>In the new build system, you should ...</th>
2120 </tr>
2121 <tr valign="top">
2122 <td>run <code>make sanity</code></td>
2123 <td>run <code>bash ./configure</code></td>
2124 </tr>
2125 <tr valign="top">
2126 <td>set <code>ALT_OUTPUTDIR=build/my-special-output</code></td>
2127 <td>before building the first time:
Kelly O'Hairf240c002011-03-22 08:15:39 -07002128 <br>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08002129 <code>cd build/my-special-output</code>
2130 <br>
2131 <code>bash ../../configure</code>
2132 <br>
2133 to build:
2134 <br>
2135 <code>cd build/my-special-output</code>
2136 <br>
2137 <code>make</code>
2138 </td>
2139 </tr>
2140 <tr valign="top">
2141 <td>set <code>ALT_BOOTDIR=/opt/java/jdk7</code></td>
2142 <td>run <code>configure --with-boot-jdk=/opt/java/jdk7</code></td>
2143 </tr>
2144 <tr valign="top">
2145 <td>run <code>make ARCH_DATA_MODEL=32</code></td>
2146 <td>run <code>configure --with-target-bits=32</code></td>
2147 </tr>
2148 <tr valign="top">
2149 <td>set <code>BUILD_CLIENT_ONLY=true</code></td>
2150 <td>run <code>configure --with-jvm-variants=client</code></td>
2151 </tr>
2152 <tr valign="top">
2153 <td>set <code>ALT_FREETYPE_LIB_PATH=/opt/freetype/lib</code>
2154 and <code>ALT_FREETYPE_HEADERS_PATH=/opt/freetype/include</code></td>
2155 <td>run <code>configure --with-freetype=/opt/freetype</code></td>
2156 </tr>
2157 <tr valign="top">
2158 <td>set <code>ALT_CUPS_HEADERS_PATH=/opt/cups/include</code></td>
2159 <td>run <code>configure --with-cups=/opt/cups</code></td>
2160 </tr>
2161 <tr valign="top">
2162 <td>set <code>ALT_OPENWIN_HOME=/opt/X11R6</code></td>
2163 <td>run <code>configure --with-x=/opt/X11R6</code></td>
2164 </tr>
2165 <tr valign="top">
2166 <td>set <code>ALT_MSVCRNN_DLL_PATH=c:/vc_redist</code></td>
2167 <td>run <code>configure --with-msvcr100dll=/cygdrive/c/vc_redist</code></td>
2168 </tr>
2169 <tr valign="top">
2170 <td>set <code>ALT_COMPILER_PATH=/opt/my-gcc/bin/gcc</code></td>
2171 <td>run <code>CC=/opt/my-gcc/bin/gcc configure</code>
2172 or <code>CXX=/opt/my-gcc/bin/g++ configure</code>
2173 </td>
2174 </tr>
2175 <tr valign="top">
2176 <td>set <code>BUILD_HEADLESS_ONLY=true</code></td>
2177 <td>run <code>configure --disable-headful</code></td>
2178 </tr>
2179 <tr valign="top">
2180 <td>set <code>ALT_DEVTOOLS_PATH=/opt/mytools</code></td>
2181 <td>just run <code>configure</code>,
2182 your tools should be detected automatically.
2183 If you have an unusual configuration,
2184 add the tools directory to your <code>PATH</code>.
2185 </td>
2186 </tr>
2187 <tr valign="top">
2188 <td>set <code>ALT_DROPS_DIR=/home/user/dropdir</code></td>
2189 <td>source drops are not used anymore</td>
2190 </tr>
2191 <tr valign="top">
2192 <td>set <code>USE_ONLY_BOOTDIR_TOOLS=true</code></td>
2193 <td>not needed, <code>configure</code> should always do the Right Thing automatically</td>
2194 </tr>
2195 <tr valign="top">
2196 <td>set <code>ALT_JDK_IMPORT_PATH=/opt/java/import-jdk</code>
2197 or <code>ALT_BUILD_JDK_IMPORT_PATH=/opt/java/import-jdk</code>
2198 </td>
2199 <td>Importing JDKs is no longer possible,
2200 but hotspot can be imported using
2201 <code>--with-import-hotspot</code>.
2202 Documentation on how to achieve a
2203 similar solution will come soon!
2204 </td>
2205 </tr>
2206 <tr valign="top">
2207 <td>set <code>EXTRA_CFLAGS=-Xfoo</code></td>
2208 <td>run <code>CFLAGS=-Xfoo configure</code></td>
2209 </tr>
2210 <tr valign="top">
2211 <td>set <code>CROSS_COMPILE_ARCH=i586</code></td>
2212 <td>see <a href="#sec7.3"> section 7.3, Cross-compilation</a></td>
2213 </tr>
2214 <tr valign="top">
2215 <td>set <code>SKIP_BOOT_CYCLE=false</code></td>
2216 <td>Run <code>make bootcycle-images</code>.</td>
2217 </tr>
2218 </table>
2219
2220 <h3><a name="variables">Environment/Make Variables</a></h3>
2221 <p>
2222 Some of the
2223 environment or make variables (just called <b>variables</b> in this
2224 document) that can impact the build are:
2225 <blockquote>
2226 <dl>
2227 <dt><a name="path"><code>PATH</code></a> </dt>
2228 <dd>Typically you want to set the <code>PATH</code> to include:
Kelly O'Hair213481a2010-12-22 12:25:52 -08002229 <ul>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08002230 <li>The location of the GNU make binary</li>
2231 <li>The location of the Bootstrap JDK <code>java</code>
2232 (see <a href="#bootjdk">Bootstrap JDK</a>)</li>
2233 <li>The location of the C/C++ compilers
2234 (see <a href="#compilers"><code>compilers</code></a>)</li>
2235 <li>The location or locations for the Unix command utilities
2236 (e.g. <code>/usr/bin</code>)</li>
Kelly O'Hair213481a2010-12-22 12:25:52 -08002237 </ul>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08002238 </dd>
2239 <dt><code>MILESTONE</code> </dt>
2240 <dd>
2241 The milestone name for the build (<i>e.g.</i>"beta").
2242 The default value is "internal".
2243 </dd>
2244 <dt><code>BUILD_NUMBER</code> </dt>
2245 <dd>
2246 The build number for the build (<i>e.g.</i> "b27").
2247 The default value is "b00".
2248 </dd>
2249 <dt><a name="arch_data_model"><code>ARCH_DATA_MODEL</code></a></dt>
2250 <dd>The <code>ARCH_DATA_MODEL</code> variable
2251 is used to specify whether the build is to generate 32-bit or 64-bit
2252 binaries.
2253 The Solaris build supports either 32-bit or 64-bit builds, but
2254 Windows and Linux will support only one, depending on the specific
2255 OS being used.
2256 Normally, setting this variable is only necessary on Solaris.
2257 Set <code>ARCH_DATA_MODEL</code> to <code>32</code> for generating 32-bit binaries,
2258 or to <code>64</code> for generating 64-bit binaries.
2259 </dd>
2260 <dt><a name="ALT_BOOTDIR"><code>ALT_BOOTDIR</code></a></dt>
2261 <dd>
2262 The location of the bootstrap JDK installation.
2263 See <a href="#bootjdk">Bootstrap JDK</a> for more information.
2264 You should always install your own local Bootstrap JDK and
2265 always set <code>ALT_BOOTDIR</code> explicitly.
2266 </dd>
2267 <dt><a name="ALT_OUTPUTDIR"><code>ALT_OUTPUTDIR</code></a> </dt>
2268 <dd>
2269 An override for specifying the (absolute) path of where the
2270 build output is to go.
2271 The default output directory will be build/<i>platform</i>.
2272 </dd>
2273 <dt><a name="ALT_COMPILER_PATH"><code>ALT_COMPILER_PATH</code></a> </dt>
2274 <dd>
2275 The location of the C/C++ compiler.
2276 The default varies depending on the platform.
2277 </dd>
2278 <dt><code><a name="ALT_CACERTS_FILE">ALT_CACERTS_FILE</a></code></dt>
2279 <dd>
2280 The location of the <a href="#cacerts">cacerts</a> file.
2281 The default will refer to
2282 <code>jdk/src/share/lib/security/cacerts</code>.
2283 </dd>
2284 <dt><a name="ALT_CUPS_HEADERS_PATH"><code>ALT_CUPS_HEADERS_PATH</code></a> </dt>
2285 <dd>
2286 The location of the CUPS header files.
2287 See <a href="#cups">CUPS information</a> for more information.
2288 If this path does not exist the fallback path is
2289 <code>/usr/include</code>.
2290 </dd>
2291 <dt><a name="ALT_FREETYPE_LIB_PATH"><code>ALT_FREETYPE_LIB_PATH</code></a></dt>
2292 <dd>
2293 The location of the FreeType shared library.
2294 See <a href="#freetype">FreeType information</a> for details.
2295 </dd>
2296 <dt><a name="ALT_FREETYPE_HEADERS_PATH"><code>ALT_FREETYPE_HEADERS_PATH</code></a></dt>
2297 <dd>
2298 The location of the FreeType header files.
2299 See <a href="#freetype">FreeType information</a> for details.
2300 </dd>
2301 <dt><a name="ALT_JDK_DEVTOOLS_PATH"><code>ALT_JDK_DEVTOOLS_PATH</code></a></dt>
2302 <dd>
2303 The default root location of the devtools.
2304 The default value is
2305 <code>$(ALT_SLASH_JAVA)/devtools</code>.
2306 </dd>
2307 <dt><code><a name="ALT_DEVTOOLS_PATH">ALT_DEVTOOLS_PATH</a></code> </dt>
2308 <dd>
2309 The location of tools like the
2310 <a href="#zip"><code>zip</code> and <code>unzip</code></a>
2311 binaries, but might also contain the GNU make utility
2312 (<code><i>gmake</i></code>).
2313 So this area is a bit of a grab bag, especially on Windows.
2314 The default value depends on the platform and
2315 Unix Commands being used.
2316 On Linux the default will be
2317 <code>$(ALT_JDK_DEVTOOLS_PATH)/linux/bin</code>,
2318 on Solaris
2319 <code>$(ALT_JDK_DEVTOOLS_PATH)/<i>{sparc,i386}</i>/bin</code>,
2320 and on Windows with CYGWIN
2321 <code>/usr/bin</code>.
2322 </dd>
2323 <dt><a name="ALT_UNIXCCS_PATH"><code>ALT_UNIXCCS_PATH</code></a></dt>
2324 <dd>
2325 <strong>Solaris only:</strong>
2326 An override for specifying where the Unix CCS
2327 command set are located.
2328 The default location is <code>/usr/ccs/bin</code>
2329 </dd>
2330 <dt><a name="ALT_SLASH_JAVA"><code>ALT_SLASH_JAVA</code></a></dt>
2331 <dd>
2332 The default root location for many of the ALT path locations
2333 of the following ALT variables.
2334 The default value is
2335 <code>"/java"</code> on Solaris and Linux,
2336 <code>"J:"</code> on Windows.
2337 </dd>
2338
2339 <dt><a name="ALT_OPENWIN_HOME"><code>ALT_OPENWIN_HOME</code></a></dt>
2340 <dd>
2341 The top-level directory of the libraries and include files
2342 for the platform's
2343 graphical programming environment.
2344 The default location is platform specific.
2345 For example, on Linux it defaults to <code>/usr/X11R6/</code>.
2346 </dd>
2347 <dt><strong>Windows specific:</strong></dt>
2348 <dd>
2349 <dl>
2350 <dt><a name="ALT_WINDOWSSDKDIR"><code>ALT_WINDOWSSDKDIR</code></a> </dt>
2351 <dd>
2352 The location of the
2353 Microsoft Windows SDK where some tools will be
2354 located.
2355 The default is whatever WINDOWSSDKDIR is set to
2356 (or WindowsSdkDir) or the path
2357 <br>
2358 <code>c:\Program Files\Microsoft SDKs\Windows\v7.0a</code>
2359 </dd>
2360 <dt><code><a name="ALT_DXSDK_PATH">ALT_DXSDK_PATH</a></code> </dt>
2361 <dd>
2362 The location of the
2363 <a href="#dxsdk">Microsoft DirectX 9 SDK</a>.
2364 The default will be to try and use the DirectX environment
2365 variable <code>DXSDK_DIR</code>,
2366 failing that, look in <code>C:/DXSDK</code>.
2367 </dd>
2368 <dt><code><a name="ALT_MSVCRNN_DLL_PATH">ALT_MSVCRNN_DLL_PATH</a></code> </dt>
2369 <dd>
2370 The location of the
2371 <a href="#msvcrNN"><code>MSVCR100.DLL</code></a>.
2372 </dd>
2373 </dl>
2374 </dd>
2375 <dt><strong>Cross-Compilation Support:</strong></dt>
2376 <dd>
2377 <dl>
2378 <dt><a name="CROSS_COMPILE_ARCH"><code>CROSS_COMPILE_ARCH</code></a> </dt>
2379 <dd>
2380 Set to the target architecture of a
2381 cross-compilation build. If set, this
2382 variable is used to signify that we are
2383 cross-compiling. The expectation
2384 is that
2385 <a href="#ALT_COMPILER_PATH"><code>ALT_COMPILER_PATH</code></a>
2386 is set
2387 to point to the cross-compiler and that any
2388 cross-compilation specific flags
2389 are passed using
2390 <a href="#EXTRA_CFLAGS"><code>EXTRA_CFLAGS</code></a>.
2391 The <a href="#ALT_OPENWIN_HOME"><code>ALT_OPENWIN_HOME</code></a>
2392 variable should
2393 also be set to point to the graphical header files
2394 (e.g. X11) provided with
2395 the cross-compiler.
2396 When cross-compiling we skip execution of any demos
2397 etc that may be built, and
2398 also skip binary-file verification.
2399 </dd>
2400 <dt><code><a name="EXTRA_CFLAGS">EXTRA_CFLAGS</a></code> </dt>
2401 <dd>
2402 Used to pass cross-compilation options to the
2403 cross-compiler.
2404 These are added to the <code>CFLAGS</code>
2405 and <code>CXXFLAGS</code> variables.
2406 </dd>
2407 <dt><code><a name="USE_ONLY_BOOTDIR_TOOLS">USE_ONLY_BOOTDIR_TOOLS</a></code> </dt>
2408 <dd>
2409 Used primarily for cross-compilation builds
2410 (and always set in that case)
2411 this variable indicates that tools from the
2412 boot JDK should be used during
2413 the build process, not the tools
2414 (<code>javac</code>, <code>javah</code>, <code>jar</code>)
2415 just built (which can't execute on the build host).
2416 </dd>
2417 <dt><code><a name="HOST_CC">HOST_CC</a></code> </dt>
2418 <dd>
2419 The location of the C compiler to generate programs
2420 to run on the build host.
2421 Some parts of the build generate programs that are
2422 then compiled and executed
2423 to produce other parts of the build. Normally the
2424 primary C compiler is used
2425 to do this, but when cross-compiling that would be
2426 the cross-compiler and the
2427 resulting program could not be executed.
2428 On Linux this defaults to <code>/usr/bin/gcc</code>;
2429 on other platforms it must be
2430 set explicitly.
2431 </dd>
2432 </dl>
2433 <dt><strong>Specialized Build Options:</strong></dt>
2434 <dd>
2435 Some build variables exist to support specialized build
2436 environments and/or specialized
2437 build products. Their use is only supported in those contexts:
2438 <dl>
2439 <dt><code><a name="BUILD_CLIENT_ONLY">BUILD_CLIENT_ONLY</a></code> </dt>
2440 <dd>
2441 Indicates this build will only contain the
2442 Hotspot client VM. In addition to
2443 controlling the Hotspot build target,
2444 it ensures that we don't try to copy
2445 any server VM files/directories,
2446 and defines a default <code>jvm.cfg</code> file
2447 suitable for a client-only environment.
2448 Using this in a 64-bit build will
2449 generate a sanity warning as 64-bit client
2450 builds are not directly supported.
2451 </dd>
2452 <dt><code><a name="BUILD_HEADLESS_ONLY"></a>BUILD_HEADLESS_ONLY</code> </dt>
2453 <dd>
2454 Used when the build environment has no graphical
2455 capabilities at all. This
2456 excludes building anything that requires graphical
2457 libraries to be available.
2458 </dd>
2459 <dt><code><a name="JAVASE_EMBEDDED"></a>JAVASE_EMBEDDED</code> </dt>
2460 <dd>
2461 Used to indicate this is a build of the Oracle
2462 Java SE Embedded product.
2463 This will enable the directives included in the
2464 SE-Embedded specific build
2465 files.
2466 </dd>
2467 <dt><code><a name="LIBZIP_CAN_USE_MMAP">LIBZIP_CAN_USE_MMAP</a></code> </dt>
2468 <dd>
2469 If set to false, disables the use of mmap by the
2470 zip utility. Otherwise,
2471 mmap will be used.
2472 </dd>
2473 <dt><code><a name="COMPRESS_JARS"></a>COMPRESS_JARS</code> </dt>
2474 <dd>
2475 If set to true, causes certain jar files that
2476 would otherwise be built without
2477 compression, to use compression.
2478 </dd>
2479 </dl>
2480 </dd>
2481 </dl>
2482 </blockquote>
2483
2484</blockquote> <!-- Appendix D -->
2485
2486 <!-- ====================================================== -->
Kelly O'Hairbf8a41a2008-04-30 19:35:26 -07002487 <hr>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08002488 <p>End of OpenJDK README-builds.html document.<br>Please come again!
Kelly O'Hairbf8a41a2008-04-30 19:35:26 -07002489 <hr>
Kelly O'Hair2ff5bb12013-02-23 10:47:01 -08002490
Kelly O'Hairbf8a41a2008-04-30 19:35:26 -07002491 </body>
2492</html>