README-builds.html

Thu, 25 Apr 2013 09:23:51 -0700

author
katleman
date
Thu, 25 Apr 2013 09:23:51 -0700
changeset 694
c29b583938b1
parent 632
d3e3d5b06f45
child 744
b9587f41fd55
permissions
-rw-r--r--

Added tag jdk8-b87 for changeset b9415faa7066

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

mercurial