README-builds.html

Tue, 09 Apr 2019 09:53:28 +0800

author
aoqi
date
Tue, 09 Apr 2019 09:53:28 +0800
changeset 2385
d6f497dfee73
parent 1133
50aaf272884f
permissions
-rw-r--r--

Added tag mips64el-jdk8u202-b09 for changeset b45bf475c2ca

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

mercurial