1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/README-builds.html Wed Apr 27 01:39:08 2016 +0800 1.3 @@ -0,0 +1,2495 @@ 1.4 +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 1.5 +<html> 1.6 + <head> 1.7 + <title>OpenJDK Build README</title> 1.8 + </head> 1.9 + <body style="background-color:aquamarine"> 1.10 + 1.11 + <!-- ====================================================== --> 1.12 + <table width="100%"> 1.13 + <tr> 1.14 + <td align="center"> 1.15 + <img alt="OpenJDK" 1.16 + src="http://openjdk.java.net/images/openjdk.png" 1.17 + width=256> 1.18 + </td> 1.19 + </tr> 1.20 + <tr> 1.21 + <td align=center> 1.22 + <h1>OpenJDK Build README</h1> 1.23 + </td> 1.24 + </tr> 1.25 + </table> 1.26 + 1.27 + <!-- ====================================================== --> 1.28 + <hr> 1.29 + <h2><a name="introduction">Introduction</a></h2> 1.30 + <blockquote> 1.31 + This README file contains build instructions for the 1.32 + <a href="http://openjdk.java.net" target="_blank">OpenJDK</a>. 1.33 + Building the source code for the 1.34 + OpenJDK 1.35 + requires 1.36 + a certain degree of technical expertise. 1.37 + 1.38 + <!-- ====================================================== --> 1.39 + <h3>!!!!!!!!!!!!!!! THIS IS A MAJOR RE-WRITE of this document. !!!!!!!!!!!!!</h3> 1.40 + <blockquote> 1.41 + Some Headlines: 1.42 + <ul> 1.43 + <li> 1.44 + The build is now a "<code>configure && make</code>" style build 1.45 + </li> 1.46 + <li> 1.47 + Any GNU make 3.81 or newer should work 1.48 + </li> 1.49 + <li> 1.50 + The build should scale, i.e. more processors should 1.51 + cause the build to be done in less wall-clock time 1.52 + </li> 1.53 + <li> 1.54 + Nested or recursive make invocations have been significantly 1.55 + reduced, as has the total fork/exec or spawning 1.56 + of sub processes during the build 1.57 + </li> 1.58 + <li> 1.59 + Windows MKS usage is no longer supported 1.60 + </li> 1.61 + <li> 1.62 + Windows Visual Studio <code>vsvars*.bat</code> and 1.63 + <code>vcvars*.bat</code> files are run automatically 1.64 + </li> 1.65 + <li> 1.66 + Ant is no longer used when building the OpenJDK 1.67 + </li> 1.68 + <li> 1.69 + Use of ALT_* environment variables for configuring the 1.70 + build is no longer supported 1.71 + </li> 1.72 + </ul> 1.73 + </blockquote> 1.74 + </blockquote> 1.75 + 1.76 + <!-- ====================================================== --> 1.77 + <hr> 1.78 + <h2><a name="contents">Contents</a></h2> 1.79 + <blockquote> 1.80 + <ul> 1.81 + <li><a href="#introduction">Introduction</a></li> 1.82 + 1.83 + <li><a href="#hg">Use of Mercurial</a> 1.84 + <ul> 1.85 + <li><a href="#get_source">Getting the Source</a></li> 1.86 + <li><a href="#repositories">Repositories</a></li> 1.87 + </ul> 1.88 + </li> 1.89 + 1.90 + <li><a href="#building">Building</a> 1.91 + <ul> 1.92 + <li><a href="#setup">System Setup</a> 1.93 + <ul> 1.94 + <li><a href="#linux">Linux</a></li> 1.95 + <li><a href="#solaris">Solaris</a></li> 1.96 + <li><a href="#macosx">Mac OS X</a></li> 1.97 + <li><a href="#windows">Windows</a></li> 1.98 + </ul> 1.99 + </li> 1.100 + <li><a href="#configure">Configure</a></li> 1.101 + <li><a href="#make">Make</a></li> 1.102 + </ul> 1.103 + </li> 1.104 + <li><a href="#testing">Testing</a></li> 1.105 + </ul> 1.106 + <hr> 1.107 + <ul> 1.108 + <li><a href="#hints">Appendix A: Hints and Tips</a> 1.109 + <ul> 1.110 + <li><a href="#faq">FAQ</a></li> 1.111 + <li><a href="#performance">Build Performance Tips</a></li> 1.112 + <li><a href="#troubleshooting">Troubleshooting</a></li> 1.113 + </ul> 1.114 + </li> 1.115 + <li><a href="#gmake">Appendix B: GNU Make Information</a></li> 1.116 + <li><a href="#buildenvironments">Appendix C: Build Environments</a></li> 1.117 + 1.118 + <!-- Leave out 1.119 + <li><a href="#mapping">Appendix D: Mapping Old Builds to the New Builds</a></li> 1.120 + --> 1.121 + 1.122 + </ul> 1.123 + </blockquote> 1.124 + 1.125 + <!-- ====================================================== --> 1.126 + <hr> 1.127 + <h2><a name="hg">Use of Mercurial</a></h2> 1.128 + <blockquote> 1.129 + The OpenJDK sources are maintained with the revision control system 1.130 + <a href="http://mercurial.selenic.com/wiki/Mercurial">Mercurial</a>. 1.131 + If you are new to Mercurial, please see the 1.132 + <a href="http://mercurial.selenic.com/wiki/BeginnersGuides"> 1.133 + Beginner Guides</a> 1.134 + or refer to the <a href="http://hgbook.red-bean.com/"> 1.135 + Mercurial Book</a>. 1.136 + The first few chapters of the book provide an excellent overview of 1.137 + Mercurial, what it is and how it works. 1.138 + <br> 1.139 + For using Mercurial with the OpenJDK refer to the 1.140 + <a href="http://openjdk.java.net/guide/repositories.html#installConfig"> 1.141 + Developer Guide: Installing and Configuring Mercurial</a> 1.142 + section for more information. 1.143 + 1.144 + <h3><a name="get_source">Getting the Source</a></h3> 1.145 + <blockquote> 1.146 + To get the entire set of OpenJDK Mercurial repositories 1.147 + use the script <code>get_source.sh</code> located in the 1.148 + root repository: 1.149 + <blockquote> 1.150 + <code> 1.151 + hg clone http://hg.openjdk.java.net/jdk8/jdk8 1.152 + <i>YourOpenJDK</i> 1.153 + <br> 1.154 + cd <i>YourOpenJDK</i> 1.155 + <br> 1.156 + bash ./get_source.sh 1.157 + </code> 1.158 + </blockquote> 1.159 + Once you have all the repositories, keep in mind that each 1.160 + repository is its own independent repository. 1.161 + You can also re-run <code>./get_source.sh</code> anytime to 1.162 + pull over all the latest changesets in all the repositories. 1.163 + This set of nested repositories has been given the term 1.164 + "forest" and there are various ways to apply the same 1.165 + <code>hg</code> command to each of the repositories. 1.166 + For example, the script <code>make/scripts/hgforest.sh</code> 1.167 + can be used to repeat the same <code>hg</code> 1.168 + command on every repository, e.g. 1.169 + <blockquote> 1.170 + <code> 1.171 + cd <i>YourOpenJDK</i> 1.172 + <br> 1.173 + bash ./make/scripts/hgforest.sh status 1.174 + </code> 1.175 + </blockquote> 1.176 + </blockquote> 1.177 + 1.178 + <h3><a name="repositories">Repositories</a></h3> 1.179 + <blockquote> 1.180 + <p>The set of repositories and what they contain:</p> 1.181 + <table border="1"> 1.182 + <thead> 1.183 + <tr> 1.184 + <th>Repository</th> 1.185 + <th>Contains</th> 1.186 + </tr> 1.187 + </thead> 1.188 + <tbody> 1.189 + <tr> 1.190 + <td> 1.191 + . (root) 1.192 + </td> 1.193 + <td> 1.194 + common configure and makefile logic 1.195 + </td> 1.196 + </tr> 1.197 + <tr> 1.198 + <td> 1.199 + hotspot 1.200 + </td> 1.201 + <td> 1.202 + source code and make files for building 1.203 + the OpenJDK Hotspot Virtual Machine 1.204 + </td> 1.205 + </tr> 1.206 + <tr> 1.207 + <td> 1.208 + langtools 1.209 + </td> 1.210 + <td> 1.211 + source code for the OpenJDK javac and language tools 1.212 + </td> 1.213 + </tr> 1.214 + <tr> 1.215 + <td> 1.216 + jdk 1.217 + </td> 1.218 + <td> 1.219 + source code and make files for building 1.220 + the OpenJDK runtime libraries and misc files 1.221 + </td> 1.222 + </tr> 1.223 + <tr> 1.224 + <td> 1.225 + jaxp 1.226 + </td> 1.227 + <td> 1.228 + source code for the OpenJDK JAXP functionality 1.229 + </td> 1.230 + </tr> 1.231 + <tr> 1.232 + <td> 1.233 + jaxws 1.234 + </td> 1.235 + <td> 1.236 + source code for the OpenJDK JAX-WS functionality 1.237 + </td> 1.238 + </tr> 1.239 + <tr> 1.240 + <td> 1.241 + corba 1.242 + </td> 1.243 + <td> 1.244 + source code for the OpenJDK Corba functionality 1.245 + </td> 1.246 + </tr> 1.247 + <tr> 1.248 + <td> 1.249 + nashorn 1.250 + </td> 1.251 + <td> 1.252 + source code for the OpenJDK JavaScript implementation 1.253 + </td> 1.254 + </tr> 1.255 + </tbody> 1.256 + </table> 1.257 + </blockquote> 1.258 + 1.259 + <h3><a name="guidelines">Repository Source Guidelines</a></h3> 1.260 + <blockquote> 1.261 + There are some very basic guidelines: 1.262 + <ul> 1.263 + <li> 1.264 + Use of whitespace in source files 1.265 + (.java, .c, .h, .cpp, and .hpp files) 1.266 + is restricted. 1.267 + No TABs, no trailing whitespace on lines, and files 1.268 + should not terminate in more than one blank line. 1.269 + </li> 1.270 + <li> 1.271 + Files with execute permissions should not be added 1.272 + to the source repositories. 1.273 + </li> 1.274 + <li> 1.275 + All generated files need to be kept isolated from 1.276 + the files 1.277 + maintained or managed by the source control system. 1.278 + The standard area for generated files is the top level 1.279 + <code>build/</code> directory. 1.280 + </li> 1.281 + <li> 1.282 + The default build process should be to build the product 1.283 + and nothing else, in one form, e.g. a product (optimized), 1.284 + debug (non-optimized, -g plus assert logic), or 1.285 + fastdebug (optimized, -g plus assert logic). 1.286 + </li> 1.287 + <li> 1.288 + The <tt>.hgignore</tt> file in each repository 1.289 + must exist and should 1.290 + include <tt>^build/</tt>, <tt>^dist/</tt> and 1.291 + optionally any 1.292 + <tt>nbproject/private</tt> directories. 1.293 + <strong>It should NEVER</strong> include 1.294 + anything in the 1.295 + <tt>src/</tt> or <tt>test/</tt> 1.296 + or any managed directory area of a repository. 1.297 + </li> 1.298 + <li> 1.299 + Directory names and file names should never contain 1.300 + blanks or 1.301 + non-printing characters. 1.302 + </li> 1.303 + <li> 1.304 + Generated source or binary files should NEVER be added to 1.305 + the repository (that includes <tt>javah</tt> output). 1.306 + There are some exceptions to this rule, in particular 1.307 + with some of the generated configure scripts. 1.308 + </li> 1.309 + <li> 1.310 + Files not needed for typical building 1.311 + or testing of the repository 1.312 + should not be added to the repository. 1.313 + </li> 1.314 + </ul> 1.315 + </blockquote> 1.316 + 1.317 + </blockquote> 1.318 + 1.319 + <!-- ====================================================== --> 1.320 + <hr> 1.321 + <h2><a name="building">Building</a></h2> 1.322 + <blockquote> 1.323 + The very first step in building the OpenJDK is making sure the 1.324 + system itself has everything it needs to do OpenJDK builds. 1.325 + Once a system is setup, it generally doesn't need to be done again. 1.326 + <br> 1.327 + Building the OpenJDK is now done with running a 1.328 + <a href="#configure"><code>configure</code></a> 1.329 + script which will try and find and verify you have everything 1.330 + you need, followed by running 1.331 + <a href="#gmake"><code>make</code></a>, e.g. 1.332 + <blockquote> 1.333 + <b> 1.334 + <code> 1.335 + bash ./configure<br> 1.336 + make all 1.337 + </code> 1.338 + </b> 1.339 + </blockquote> 1.340 + Where possible the <code>configure</code> script will attempt to located the 1.341 + various components in the default locations or via component 1.342 + specific variable settings. 1.343 + When the normal defaults fail or components cannot be found, 1.344 + additional <code>configure</code> options may be necessary to help <code>configure</code> 1.345 + find the necessary tools for the build, or you may need to 1.346 + re-visit the setup of your system due to missing software 1.347 + packages. 1.348 + <br> 1.349 + <strong>NOTE:</strong> The <code>configure</code> script 1.350 + file does not have 1.351 + execute permissions and will need to be explicitly run with 1.352 + <code>bash</code>, 1.353 + see the <a href="#guidelines">source guidelines</a>. 1.354 + 1.355 + <!-- ====================================================== --> 1.356 + <hr> 1.357 + <h3><a name="setup">System Setup</a></h3> 1.358 + <blockquote> 1.359 + Before even attempting to use a system to build the OpenJDK 1.360 + there are some very basic system setups needed. 1.361 + For all systems: 1.362 + <ul> 1.363 + <li> 1.364 + Be sure the GNU make utility is version 3.81 or newer, 1.365 + e.g. run "<code>make -version</code>" 1.366 + </li> 1.367 + <li> 1.368 + Install a 1.369 + <a name="bootjdk">Bootstrap JDK</a>. 1.370 + All OpenJDK builds require access to a previously released 1.371 + JDK called the <i>bootstrap JDK</i> or <i>boot JDK.</i> 1.372 + The general rule is that the bootstrap JDK 1.373 + must be an instance of the previous major 1.374 + release of the JDK. In addition, there may be 1.375 + a requirement to use a release at or beyond a 1.376 + particular update level. 1.377 + <br> <br> 1.378 + 1.379 + <b><i>Building JDK 8 requires use of a version 1.380 + of JDK 7 that is at Update 7 or newer. JDK 8 1.381 + developers should not use JDK 8 as the boot 1.382 + JDK, to ensure that JDK 8 dependencies are 1.383 + not introduced into the parts of the system 1.384 + that are built with JDK 7.</i></b> 1.385 + 1.386 + <br> <br> 1.387 + The JDK 7 binaries can be downloaded from Oracle's 1.388 + <a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html" 1.389 + target="_blank">JDK 7 download site</a>. 1.390 + For build performance reasons 1.391 + is very important that this bootstrap JDK be made available 1.392 + on the local disk of the machine doing the build. 1.393 + You should add its <code>bin</code> directory 1.394 + to the <code>PATH</code> environment variable. 1.395 + If <code>configure</code> has any issues finding this JDK, you may 1.396 + need to use the <code>configure</code> option 1.397 + <code>--with-boot-jdk</code>. 1.398 + </li> 1.399 + <li> 1.400 + Ensure that GNU make, the Bootstrap JDK, 1.401 + and the compilers are all 1.402 + in your PATH environment variable 1.403 + </li> 1.404 + </ul> 1.405 + And for specific systems: 1.406 + <table border="1"> 1.407 + <thead> 1.408 + <tr> 1.409 + <th>Linux</th> 1.410 + <th>Solaris</th> 1.411 + <th>Windows</th> 1.412 + <th>Mac OS X</th> 1.413 + </tr> 1.414 + </thead> 1.415 + <tbody> 1.416 + <tr> 1.417 + <td> 1.418 + Install all the software development 1.419 + packages needed including 1.420 + <a href="#alsa">alsa</a>, 1.421 + <a href="#freetype">freetype</a>, 1.422 + <a href="#cups">cups</a>, and 1.423 + <a href="#xrender">xrender</a>. 1.424 + <br> 1.425 + See 1.426 + <a href="#SDBE">specific system packages</a>. 1.427 + </td> 1.428 + <td> 1.429 + Install all the software development 1.430 + packages needed including 1.431 + <a href="#studio">Studio Compilers</a>, 1.432 + <a href="#freetype">freetype</a>, 1.433 + <a href="#cups">cups</a>, and 1.434 + <a href="#xrender">xrender</a>. 1.435 + <br> 1.436 + See 1.437 + <a href="#SDBE">specific system packages</a>. 1.438 + </td> 1.439 + <td> 1.440 + <ul> 1.441 + <li> 1.442 + Install one of 1.443 + <a href="#cygwin">CYGWIN</a> or 1.444 + <a href="#msys">MinGW/MSYS</a> 1.445 + </li> 1.446 + <li> 1.447 + Install 1.448 + <a href="#vs2010">Visual Studio 2010</a> 1.449 + </li> 1.450 + </ul> 1.451 + </td> 1.452 + <td> 1.453 + Install 1.454 + <a href="https://developer.apple.com/xcode/">XCode 4.5.2</a> 1.455 + and also install the "Command line tools" found under the 1.456 + preferences pane "Downloads" 1.457 + </td> 1.458 + </tr> 1.459 + </tbody> 1.460 + </table> 1.461 + 1.462 + <h4><a name="linux">Linux</a></h4> 1.463 + <blockquote> 1.464 + With Linux, try and favor the system packages over 1.465 + building your own 1.466 + or getting packages from other areas. 1.467 + Most Linux builds should be possible with the system's 1.468 + available packages. 1.469 + <br> 1.470 + Note that some Linux systems have a habit of pre-populating 1.471 + your environment variables for you, for example <code>JAVA_HOME</code> 1.472 + might get pre-defined for you to refer to the JDK installed on 1.473 + your Linux system. 1.474 + You will need to unset <code>JAVA_HOME</code>. 1.475 + It's a good idea to run <code>env</code> and verify the 1.476 + environment variables you are getting from the default system 1.477 + settings make sense for building the OpenJDK. 1.478 + 1.479 + </blockquote> 1.480 + 1.481 + <h4><a name="solaris">Solaris</a></h4> 1.482 + <blockquote> 1.483 + <h5><a name="studio">Studio Compilers</a></h5> 1.484 + <blockquote> 1.485 + At a minimum, the 1.486 + <a href="http://www.oracle.com/technetwork/server-storage/solarisstudio/downloads/index.htm" target="_blank"> 1.487 + Studio 12 Update 1 Compilers</a> 1.488 + (containing version 5.10 of the C and C++ compilers) is required, 1.489 + including specific patches. 1.490 + <p> 1.491 + The Solaris SPARC patch list is: 1.492 + <ul> 1.493 + <li> 1.494 + 118683-05: SunOS 5.10: Patch for profiling libraries and assembler 1.495 + </li> 1.496 + <li> 1.497 + 119963-21: SunOS 5.10: Shared library patch for C++ 1.498 + </li> 1.499 + <li> 1.500 + 120753-08: SunOS 5.10: Microtasking libraries (libmtsk) patch 1.501 + </li> 1.502 + <li> 1.503 + 128228-09: Sun Studio 12 Update 1: Patch for Sun C++ Compiler 1.504 + </li> 1.505 + <li> 1.506 + 141860-03: Sun Studio 12 Update 1: Patch for Compiler Common patch for Sun C C++ F77 F95 1.507 + </li> 1.508 + <li> 1.509 + 141861-05: Sun Studio 12 Update 1: Patch for Sun C Compiler 1.510 + </li> 1.511 + <li> 1.512 + 142371-01: Sun Studio 12.1 Update 1: Patch for dbx 1.513 + </li> 1.514 + <li> 1.515 + 143384-02: Sun Studio 12 Update 1: Patch for debuginfo handling 1.516 + </li> 1.517 + <li> 1.518 + 143385-02: Sun Studio 12 Update 1: Patch for Compiler Common patch for Sun C C++ F77 F95 1.519 + </li> 1.520 + <li> 1.521 + 142369-01: Sun Studio 12.1: Patch for Performance Analyzer Tools 1.522 + </li> 1.523 + </ul> 1.524 + <p> 1.525 + The Solaris X86 patch list is: 1.526 + <ul> 1.527 + <li> 1.528 + 119961-07: SunOS 5.10_x86, x64, Patch for profiling libraries and assembler 1.529 + </li> 1.530 + <li> 1.531 + 119964-21: SunOS 5.10_x86: Shared library patch for C++_x86 1.532 + </li> 1.533 + <li> 1.534 + 120754-08: SunOS 5.10_x86: Microtasking libraries (libmtsk) patch 1.535 + </li> 1.536 + <li> 1.537 + 141858-06: Sun Studio 12 Update 1_x86: Sun Compiler Common patch for x86 backend 1.538 + </li> 1.539 + <li> 1.540 + 128229-09: Sun Studio 12 Update 1_x86: Patch for C++ Compiler 1.541 + </li> 1.542 + <li> 1.543 + 142363-05: Sun Studio 12 Update 1_x86: Patch for C Compiler 1.544 + </li> 1.545 + <li> 1.546 + 142368-01: Sun Studio 12.1_x86: Patch for Performance Analyzer Tools 1.547 + </li> 1.548 + </ul> 1.549 + <p> 1.550 + Place the <code>bin</code> directory in <code>PATH</code>. 1.551 + <p> 1.552 + The Oracle Solaris Studio Express compilers at: 1.553 + <a href="http://www.oracle.com/technetwork/server-storage/solarisstudio/downloads/index-jsp-142582.html" target="_blank"> 1.554 + Oracle Solaris Studio Express Download site</a> 1.555 + are also an option, although these compilers have not 1.556 + been extensively used yet. 1.557 + </blockquote> 1.558 + 1.559 + </blockquote> <!-- Solaris --> 1.560 + 1.561 + <h4><a name="windows">Windows</a></h4> 1.562 + <blockquote> 1.563 + 1.564 + <h5><a name="toolkit">Windows Unix Toolkit</a></h5> 1.565 + <blockquote> 1.566 + Building on Windows requires a Unix-like environment, notably a 1.567 + Unix-like shell. 1.568 + There are several such environments available of which 1.569 + <a href="http://www.cygwin.com/">Cygwin</a> and 1.570 + <a href="http://www.mingw.org/wiki/MSYS">MinGW/MSYS</a> are 1.571 + currently supported for 1.572 + the OpenJDK build. One of the differences of these 1.573 + systems from standard Windows tools is the way 1.574 + they handle Windows path names, particularly path names which contain 1.575 + spaces, backslashes as path separators and possibly drive letters. 1.576 + Depending 1.577 + on the use case and the specifics of each environment these path 1.578 + problems can 1.579 + be solved by a combination of quoting whole paths, translating 1.580 + backslashes to 1.581 + forward slashes, escaping backslashes with additional backslashes and 1.582 + translating the path names to their 1.583 + <a href="http://en.wikipedia.org/wiki/8.3_filename"> 1.584 + "8.3" version</a>. 1.585 + 1.586 + <h6><a name="cygwin">CYGWIN</a></h6> 1.587 + <blockquote> 1.588 + CYGWIN is an open source, Linux-like environment which tries to emulate 1.589 + a complete POSIX layer on Windows. It tries to be smart about path names 1.590 + and can usually handle all kinds of paths if they are correctly quoted 1.591 + or escaped although internally it maps drive letters <code><drive>:</code> 1.592 + to a virtual directory <code>/cygdrive/<drive></code>. 1.593 + <p> 1.594 + You can always use the <code>cygpath</code> utility to map pathnames with spaces 1.595 + or the backslash character into the <code>C:/</code> style of pathname 1.596 + (called 'mixed'), e.g. <code>cygpath -s -m "<i>path</i>"</code>. 1.597 + </p> 1.598 + <p> 1.599 + Note that the use of CYGWIN creates a unique problem with regards to 1.600 + setting <a href="#path"><code>PATH</code></a>. Normally on Windows 1.601 + the <code>PATH</code> variable contains directories 1.602 + separated with the ";" character (Solaris and Linux use ":"). 1.603 + With CYGWIN, it uses ":", but that means that paths like "C:/path" 1.604 + cannot be placed in the CYGWIN version of <code>PATH</code> and 1.605 + instead CYGWIN uses something like <code>/cygdrive/c/path</code> 1.606 + which CYGWIN understands, but only CYGWIN understands. 1.607 + </p> 1.608 + <p> 1.609 + The OpenJDK build requires CYGWIN version 1.7.16 or newer. 1.610 + Information about CYGWIN can 1.611 + be obtained from the CYGWIN website at 1.612 + <a href="http://www.cygwin.com" target="_blank">www.cygwin.com</a>. 1.613 + </p> 1.614 + <p> 1.615 + By default CYGWIN doesn't install all the tools required for building 1.616 + the OpenJDK. 1.617 + Along with the default installation, you need to install 1.618 + the following tools. 1.619 + <blockquote> 1.620 + <table border="1"> 1.621 + <thead> 1.622 + <tr> 1.623 + <td>Binary Name</td> 1.624 + <td>Category</td> 1.625 + <td>Package</td> 1.626 + <td>Description</td> 1.627 + </tr> 1.628 + </thead> 1.629 + <tbody> 1.630 + <tr> 1.631 + <td>ar.exe</td> 1.632 + <td>Devel</td> 1.633 + <td>binutils</td> 1.634 + <td> 1.635 + The GNU assembler, linker and binary utilities 1.636 + </td> 1.637 + </tr> 1.638 + <tr> 1.639 + <td>make.exe</td> 1.640 + <td>Devel</td> 1.641 + <td>make</td> 1.642 + <td> 1.643 + The GNU version of the 'make' utility built for CYGWIN 1.644 + </td> 1.645 + </tr> 1.646 + <tr> 1.647 + <td>m4.exe</td> 1.648 + <td>Interpreters</td> 1.649 + <td>m4</td> 1.650 + <td> 1.651 + GNU implementation of the traditional Unix macro 1.652 + processor 1.653 + </td> 1.654 + </tr> 1.655 + <tr> 1.656 + <td>cpio.exe</td> 1.657 + <td>Utils</td> 1.658 + <td>cpio</td> 1.659 + <td> 1.660 + A program to manage archives of files 1.661 + </td> 1.662 + </tr> 1.663 + <tr> 1.664 + <td>gawk.exe</td> 1.665 + <td>Utils</td> 1.666 + <td>awk</td> 1.667 + <td> 1.668 + Pattern-directed scanning and processing language 1.669 + </td> 1.670 + </tr> 1.671 + <tr> 1.672 + <td>file.exe</td> 1.673 + <td>Utils</td> 1.674 + <td>file</td> 1.675 + <td> 1.676 + Determines file type using 'magic' numbers 1.677 + </td> 1.678 + </tr> 1.679 + <tr> 1.680 + <td>zip.exe</td> 1.681 + <td>Archive</td> 1.682 + <td>zip</td> 1.683 + <td> 1.684 + Package and compress (archive) files 1.685 + </td> 1.686 + </tr> 1.687 + <tr> 1.688 + <td>unzip.exe</td> 1.689 + <td>Archive</td> 1.690 + <td>unzip</td> 1.691 + <td> 1.692 + Extract compressed files in a ZIP archive 1.693 + </td> 1.694 + </tr> 1.695 + <tr> 1.696 + <td>free.exe</td> 1.697 + <td>System</td> 1.698 + <td>procps</td> 1.699 + <td> 1.700 + Display amount of free and used memory in the system 1.701 + </td> 1.702 + </tr> 1.703 + </tbody> 1.704 + </table> 1.705 + </blockquote> 1.706 + Note that the CYGWIN software can conflict with other non-CYGWIN 1.707 + software on your Windows system. 1.708 + CYGWIN provides a 1.709 + <a href="http://cygwin.com/faq/faq.using.html" target="_blank">FAQ</a> for 1.710 + known issues and problems, of particular interest is the 1.711 + section on 1.712 + <a href="http://cygwin.com/faq/faq.using.html#faq.using.bloda" target="_blank"> 1.713 + BLODA (applications that interfere with CYGWIN)</a>. 1.714 + </blockquote> 1.715 + 1.716 + <h6><a name="msys">MinGW/MSYS</a></h6> 1.717 + <blockquote> 1.718 + MinGW ("Minimalist GNU for Windows") is a collection of free Windows 1.719 + specific header files and import libraries combined with GNU toolsets that 1.720 + allow one to produce native Windows programs that do not rely on any 1.721 + 3rd-party C runtime DLLs. MSYS is a supplement to MinGW which allows building 1.722 + applications and programs which rely on traditional UNIX tools to 1.723 + be present. Among others this includes tools like <code>bash</code> 1.724 + and <code>make</code>. 1.725 + See <a href="http://www.mingw.org/wiki/MSYS" target="_blank">MinGW/MSYS</a> 1.726 + for more information. 1.727 + <p> 1.728 + Like Cygwin, MinGW/MSYS can handle different types of path formats. They 1.729 + are internally converted to paths with forward slashes and drive letters 1.730 + <code><drive>:</code> replaced by a virtual 1.731 + directory <code>/<drive></code>. Additionally, MSYS automatically 1.732 + detects binaries compiled for the MSYS environment and feeds them with the 1.733 + internal, Unix-style path names. If native Windows applications are called 1.734 + from within MSYS programs their path arguments are automatically converted 1.735 + back to Windows style path names with drive letters and backslashes as 1.736 + path separators. This may cause problems for Windows applications which 1.737 + use forward slashes as parameter separator (e.g. <code>cl /nologo /I</code>) 1.738 + because MSYS may wrongly <a href="http://mingw.org/wiki/Posix_path_conversion"> 1.739 + replace such parameters by drive letters</a>. 1.740 + </p> 1.741 + <p> 1.742 + In addition to the tools which will be installed 1.743 + by default, you have 1.744 + to manually install the 1.745 + <code>msys-zip</code> and 1.746 + <code>msys-unzip</code> packages. 1.747 + This can be easily done with the MinGW command line installer: 1.748 + <blockquote> 1.749 + <code>mingw-get.exe install msys-zip</code> 1.750 + <br> 1.751 + <code>mingw-get.exe install msys-unzip</code> 1.752 + </blockquote> 1.753 + </blockquote> 1.754 + 1.755 + </blockquote> 1.756 + 1.757 + <h5><a name="vs2010">Visual Studio 2010 Compilers</a></h5> 1.758 + <blockquote> 1.759 + <p> 1.760 + The 32-bit and 64-bit OpenJDK Windows build requires 1.761 + Microsoft Visual Studio C++ 2010 (VS2010) Professional 1.762 + Edition or Express compiler. 1.763 + The compiler and other tools are expected to reside 1.764 + in the location defined by the variable 1.765 + <code>VS100COMNTOOLS</code> which 1.766 + is set by the Microsoft Visual Studio installer. 1.767 + </p> 1.768 + <p> 1.769 + Only the C++ part of VS2010 is needed. 1.770 + Try to let the installation go to the default 1.771 + install directory. 1.772 + Always reboot your system after installing VS2010. 1.773 + The system environment variable VS100COMNTOOLS 1.774 + should be 1.775 + set in your environment. 1.776 + </p> 1.777 + <p> 1.778 + Make sure that TMP and TEMP are also set 1.779 + in the environment 1.780 + and refer to Windows paths that exist, 1.781 + like <code>C:\temp</code>, 1.782 + not <code>/tmp</code>, not <code>/cygdrive/c/temp</code>, 1.783 + and not <code>C:/temp</code>. 1.784 + <code>C:\temp</code> is just an example, 1.785 + it is assumed that this area is 1.786 + private to the user, so by default 1.787 + after installs you should 1.788 + see a unique user path in these variables. 1.789 + </p> 1.790 + </blockquote> 1.791 + 1.792 + 1.793 + </blockquote> <!-- Windows --> 1.794 + 1.795 + <h4><a name="macosx">Mac OS X</a></h4> 1.796 + <blockquote> 1.797 + Make sure you get the right XCode version. 1.798 + </blockquote> <!-- Mac OS X --> 1.799 + 1.800 + </blockquote> 1.801 + 1.802 + <!-- ====================================================== --> 1.803 + <hr> 1.804 + <h3><a name="configure">Configure</a></h3> 1.805 + <blockquote> 1.806 + The basic invocation of the <code>configure</code> script 1.807 + looks like: 1.808 + <blockquote> 1.809 + <b><code>bash ./configure [<i>options</i>]</code></b> 1.810 + </blockquote> 1.811 + This will create an output directory containing the 1.812 + "configuration" and setup an area for the build result. 1.813 + This directory typically looks like: 1.814 + <blockquote> 1.815 + <b><code>build/linux-x64-normal-server-release</code></b> 1.816 + </blockquote> 1.817 + <code>configure</code> will try to figure out what system you are running on 1.818 + and where all necessary build components are. 1.819 + If you have all prerequisites for building installed, 1.820 + it should find everything. 1.821 + If it fails to detect any component automatically, 1.822 + it will exit and inform you about the problem. 1.823 + When this happens, read more below in 1.824 + <a href="#configureoptions">the <code>configure</code> options</a>. 1.825 + <p> 1.826 + Some examples: 1.827 + </p> 1.828 + <table border="1"> 1.829 + <thead> 1.830 + <tr> 1.831 + <th>Description</th> 1.832 + <th>Configure Command Line</th> 1.833 + </tr> 1.834 + </thead> 1.835 + <tbody> 1.836 + <tr> 1.837 + <td>Windows 32bit build with freetype specified</td> 1.838 + <td> 1.839 + <code>bash ./configure --with-freetype=/cygdrive/c/freetype-i586 --with-target-bits=32</code> 1.840 + </td> 1.841 + </tr> 1.842 + <tr> 1.843 + <td>Debug 64bit Build</td> 1.844 + <td> 1.845 + <code>bash ./configure --enable-debug --with-target-bits=64</code> 1.846 + </td> 1.847 + </tr> 1.848 + </tbody> 1.849 + </table> 1.850 + 1.851 + <!-- ====================================================== --> 1.852 + <h4><a name="configureoptions">Configure Options</a></h4> 1.853 + <blockquote> 1.854 + Complete details on all the OpenJDK <code>configure</code> options can 1.855 + be seen with: 1.856 + <blockquote> 1.857 + <b><code>bash ./configure --help=short</code></b> 1.858 + </blockquote> 1.859 + Use <code>-help</code> to see all the <code>configure</code> options 1.860 + available. 1.861 + 1.862 + You can generate any number of different configurations, 1.863 + e.g. debug, release, 32, 64, etc. 1.864 + 1.865 + Some of the more commonly used <code>configure</code> options are: 1.866 + 1.867 + <table border="1"> 1.868 + <thead> 1.869 + <tr> 1.870 + <th width="300">OpenJDK Configure Option</th> 1.871 + <th>Description</th> 1.872 + </tr> 1.873 + </thead> 1.874 + <tbody> 1.875 + <tr> 1.876 + <td><b><code>--enable-debug</code></b></td> 1.877 + <td> 1.878 + set the debug level to fastdebug (this is a shorthand for 1.879 + <code>--with-debug-level=fastdebug</code>) 1.880 + </td> 1.881 + </tr> 1.882 + <tr> 1.883 + <td><b><code>--with-alsa=</code></b><i>path</i></td> 1.884 + <td> 1.885 + select the location of the 1.886 + <a name="alsa">Advanced Linux Sound Architecture (ALSA)</a> 1.887 + <br> 1.888 + Version 0.9.1 or newer of the ALSA files are 1.889 + required for building the OpenJDK on Linux. 1.890 + These Linux files are usually available from an "alsa" 1.891 + of "libasound" 1.892 + development package, 1.893 + and it's highly recommended that you try and use 1.894 + the package provided by the particular version of Linux that 1.895 + you are using. 1.896 + </td> 1.897 + </tr> 1.898 + <tr> 1.899 + <td><b><code>--with-boot-jdk=</code></b><i>path</i></td> 1.900 + <td> 1.901 + select the <a href="#bootjdk">Bootstrap JDK</a> 1.902 + </td> 1.903 + </tr> 1.904 + <tr> 1.905 + <td><b><code>--with-boot-jdk-jvmargs=</code></b>"<i>args</i>"</td> 1.906 + <td> 1.907 + provide the JVM options to be used to run the 1.908 + <a href="#bootjdk">Bootstrap JDK</a> 1.909 + </td> 1.910 + </tr> 1.911 + <tr> 1.912 + <td><b><code>--with-cacerts=</code></b><i>path</i></td> 1.913 + <td> 1.914 + select the path to the cacerts file. 1.915 + <br> 1.916 + See <a href="http://en.wikipedia.org/wiki/Certificate_Authority" target="_blank"> 1.917 + http://en.wikipedia.org/wiki/Certificate_Authority</a> 1.918 + for a better understanding of the Certificate Authority (CA). 1.919 + A certificates file named "cacerts" 1.920 + represents a system-wide keystore with CA certificates. 1.921 + In JDK and JRE 1.922 + binary bundles, the "cacerts" file contains root CA certificates from 1.923 + several public CAs (e.g., VeriSign, Thawte, and Baltimore). 1.924 + The source contain a cacerts file 1.925 + without CA root certificates. 1.926 + Formal JDK builders will need to secure 1.927 + permission from each public CA and include the certificates into their 1.928 + own custom cacerts file. 1.929 + Failure to provide a populated cacerts file 1.930 + will result in verification errors of a certificate chain during runtime. 1.931 + By default an empty cacerts file is provided and that should be 1.932 + fine for most JDK developers. 1.933 + </td> 1.934 + </tr> 1.935 + <tr> 1.936 + <td><b><code>--with-cups=</code></b><i>path</i></td> 1.937 + <td> 1.938 + select the CUPS install location 1.939 + <br> 1.940 + The 1.941 + <a name="cups">Common UNIX Printing System (CUPS) Headers</a> 1.942 + are required for building the 1.943 + OpenJDK on Solaris and Linux. 1.944 + The Solaris header files can be obtained by installing 1.945 + the package <strong>SFWcups</strong> from the Solaris Software 1.946 + Companion CD/DVD, these often will be installed into the 1.947 + directory <code>/opt/sfw/cups</code>. 1.948 + <br> 1.949 + The CUPS header files can always be downloaded from 1.950 + <a href="http://www.cups.org" target="_blank">www.cups.org</a>. 1.951 + </td> 1.952 + </tr> 1.953 + <tr> 1.954 + <td><b><code>--with-cups-include=</code></b><i>path</i></td> 1.955 + <td> 1.956 + select the CUPS include directory location 1.957 + </td> 1.958 + </tr> 1.959 + <tr> 1.960 + <td><b><code>--with-debug-level=</code></b><i>level</i></td> 1.961 + <td> 1.962 + select the debug information level of release, 1.963 + fastdebug, or slowdebug 1.964 + </td> 1.965 + </tr> 1.966 + <tr> 1.967 + <td><b><code>--with-dev-kit=</code></b><i>path</i></td> 1.968 + <td> 1.969 + select location of the compiler install or 1.970 + developer install location 1.971 + </td> 1.972 + </tr> 1.973 + <tr> 1.974 + <td><b><code>--with-freetype=</code></b><i>path</i></td> 1.975 + <td> 1.976 + select the freetype files to use. 1.977 + <br> 1.978 + Expecting the 1.979 + <a name="freetype">freetype</a> libraries under 1.980 + <code>lib/</code> and the 1.981 + headers under <code>include/</code>. 1.982 + <br> 1.983 + Version 2.3 or newer of FreeType is required. 1.984 + On Unix systems required files can be available as part of your 1.985 + distribution (while you still may need to upgrade them). 1.986 + Note that you need development version of package that 1.987 + includes both the FreeType library and header files. 1.988 + <br> 1.989 + You can always download latest FreeType version from the 1.990 + <a href="http://www.freetype.org" target="_blank">FreeType website</a>. 1.991 + <br> 1.992 + Building the freetype 2 libraries from scratch is also possible, 1.993 + however on Windows refer to the 1.994 + <a href="http://freetype.freedesktop.org/wiki/FreeType_DLL"> 1.995 + Windows FreeType DLL build instructions</a>. 1.996 + <br> 1.997 + Note that by default FreeType is built with byte code hinting 1.998 + support disabled due to licensing restrictions. 1.999 + In this case, text appearance and metrics are expected to 1.1000 + differ from Sun's official JDK build. 1.1001 + See 1.1002 + <a href="http://freetype.sourceforge.net/freetype2/index.html"> 1.1003 + the SourceForge FreeType2 Home Page 1.1004 + </a> 1.1005 + for more information. 1.1006 + </td> 1.1007 + </tr> 1.1008 + <tr> 1.1009 + <td><b><code>--with-import-hotspot=</code></b><i>path</i></td> 1.1010 + <td> 1.1011 + select the location to find hotspot 1.1012 + binaries from a previous build to avoid building 1.1013 + hotspot 1.1014 + </td> 1.1015 + </tr> 1.1016 + <tr> 1.1017 + <td><b><code>--with-target-bits=</code></b><i>arg</i></td> 1.1018 + <td> 1.1019 + select 32 or 64 bit build 1.1020 + </td> 1.1021 + </tr> 1.1022 + <tr> 1.1023 + <td><b><code>--with-jvm-variants=</code></b><i>variants</i></td> 1.1024 + <td> 1.1025 + select the JVM variants to build from, comma 1.1026 + separated list that can include: 1.1027 + server, client, kernel, zero and zeroshark 1.1028 + </td> 1.1029 + </tr> 1.1030 + <tr> 1.1031 + <td><b><code>--with-memory-size=</code></b><i>size</i></td> 1.1032 + <td> 1.1033 + select the RAM size that GNU make will think 1.1034 + this system has 1.1035 + </td> 1.1036 + </tr> 1.1037 + <tr> 1.1038 + <td><a name="msvcrNN"><b><code>--with-msvcr-dll=</code></b><i>path</i></a></td> 1.1039 + <td> 1.1040 + select the <code>msvcr100.dll</code> 1.1041 + file to include in the 1.1042 + Windows builds (C/C++ runtime library for 1.1043 + Visual Studio). 1.1044 + <br> 1.1045 + This is usually picked up automatically 1.1046 + from the redist 1.1047 + directories of Visual Studio 2010. 1.1048 + </td> 1.1049 + </tr> 1.1050 + <tr> 1.1051 + <td><b><code>--with-num-cores=</code></b><i>cores</i></td> 1.1052 + <td> 1.1053 + select the number of cores to use (processor 1.1054 + count or CPU count) 1.1055 + </td> 1.1056 + </tr> 1.1057 + <tr> 1.1058 + <td><b><code>--with-x=</code></b><i>path</i></td> 1.1059 + <td> 1.1060 + select the location of the X11 and xrender files. 1.1061 + <br> 1.1062 + The 1.1063 + <a name="xrender">XRender Extension Headers</a> 1.1064 + are required for building the 1.1065 + OpenJDK on Solaris and Linux. 1.1066 + <br> 1.1067 + The Linux header files are usually available from a "Xrender" 1.1068 + development package, it's recommended that you try and use 1.1069 + the package provided by the particular distribution of Linux that 1.1070 + you are using. 1.1071 + <br> 1.1072 + The Solaris XRender header files is 1.1073 + included with the other X11 header files 1.1074 + in the package <strong>SFWxwinc</strong> 1.1075 + on new enough versions of 1.1076 + Solaris and will be installed in 1.1077 + <code>/usr/X11/include/X11/extensions/Xrender.h</code> or 1.1078 + <code>/usr/openwin/share/include/X11/extensions/Xrender.h</code> 1.1079 + </td> 1.1080 + </tr> 1.1081 + </tbody> 1.1082 + </table> 1.1083 + </blockquote> 1.1084 + 1.1085 + </blockquote> 1.1086 + 1.1087 + <!-- ====================================================== --> 1.1088 + <hr> 1.1089 + <h3><a name="make">Make</a></h3> 1.1090 + <blockquote> 1.1091 + The basic invocation of the <code>make</code> utility 1.1092 + looks like: 1.1093 + <blockquote> 1.1094 + <b><code>make all</code></b> 1.1095 + </blockquote> 1.1096 + This will start the build to the output directory containing the 1.1097 + "configuration" that was created by the <code>configure</code> 1.1098 + script. Run <code>make help</code> for more information on 1.1099 + the available targets. 1.1100 + <br> 1.1101 + There are some of the make targets that 1.1102 + are of general interest: 1.1103 + <table border="1"> 1.1104 + <thead> 1.1105 + <tr> 1.1106 + <th>Make Target</th> 1.1107 + <th>Description</th> 1.1108 + </tr> 1.1109 + </thead> 1.1110 + <tbody> 1.1111 + <tr> 1.1112 + <td><i>empty</i></td> 1.1113 + <td>build everything but no images</td> 1.1114 + </tr> 1.1115 + <tr> 1.1116 + <td><b><code>all</code></b></td> 1.1117 + <td>build everything including images</td> 1.1118 + </tr> 1.1119 + <tr> 1.1120 + <td><b><code>all-conf</code></b></td> 1.1121 + <td>build all configurations</td> 1.1122 + </tr> 1.1123 + <tr> 1.1124 + <td><b><code>images</code></b></td> 1.1125 + <td>create complete j2sdk and j2re images</td> 1.1126 + </tr> 1.1127 + <tr> 1.1128 + <td><b><code>install</code></b></td> 1.1129 + <td>install the generated images locally, 1.1130 + typically in <code>/usr/local</code></td> 1.1131 + </tr> 1.1132 + <tr> 1.1133 + <td><b><code>clean</code></b></td> 1.1134 + <td>remove all files generated by make, 1.1135 + but not those generated by <code>configure</code></td> 1.1136 + </tr> 1.1137 + <tr> 1.1138 + <td><b><code>dist-clean</code></b></td> 1.1139 + <td>remove all files generated by both 1.1140 + and <code>configure</code> (basically killing the configuration)</td> 1.1141 + </tr> 1.1142 + <tr> 1.1143 + <td><b><code>help</code></b></td> 1.1144 + <td>give some help on using <code>make</code>, 1.1145 + including some interesting make targets</td> 1.1146 + </tr> 1.1147 + </tbody> 1.1148 + </table> 1.1149 + </blockquote> 1.1150 + </blockquote> 1.1151 + 1.1152 + <!-- ====================================================== --> 1.1153 + <hr> 1.1154 + <h2><a name="testing">Testing</a></h2> 1.1155 + <blockquote> 1.1156 + When the build is completed, you should see the generated 1.1157 + binaries and associated files in the <code>j2sdk-image</code> 1.1158 + directory in the output directory. 1.1159 + In particular, the 1.1160 + <code>build/<i>*</i>/images/j2sdk-image/bin</code> 1.1161 + directory should contain executables for the 1.1162 + OpenJDK tools and utilities for that configuration. 1.1163 + The testing tool <code>jtreg</code> will be needed 1.1164 + and can be found at: 1.1165 + <a href="http://openjdk.java.net/jtreg/" target="_blank"> 1.1166 + the jtreg site</a>. 1.1167 + The provided regression tests in the repositories 1.1168 + can be run with the command: 1.1169 + <blockquote> 1.1170 + <code><b>cd test && make PRODUCT_HOME=`pwd`/../build/*/images/j2sdk-image all</b></code> 1.1171 + </blockquote> 1.1172 + </blockquote> 1.1173 + 1.1174 + <!-- ====================================================== --> 1.1175 + <!-- ====================================================== --> 1.1176 + <!-- ====================================================== --> 1.1177 + <!-- ====================================================== --> 1.1178 + <!-- ====================================================== --> 1.1179 + <!-- ====================================================== --> 1.1180 + <!-- ====================================================== --> 1.1181 + <!-- ====================================================== --> 1.1182 + <!-- ====================================================== --> 1.1183 + 1.1184 + <!-- ====================================================== --> 1.1185 + <hr> 1.1186 + <h2><a name="hints">Appendix A: Hints and Tips</a></h2> 1.1187 + <blockquote> 1.1188 + 1.1189 + <h3><a name="faq">FAQ</a></h3> 1.1190 + <blockquote> 1.1191 + 1.1192 + <p> 1.1193 + <b>Q:</b> The <code>generated-configure.sh</code> file looks horrible! 1.1194 + How are you going to edit it? 1.1195 + <br> 1.1196 + <b>A:</b> The <code>generated-configure.sh</code> file is generated (think 1.1197 + "compiled") by the autoconf tools. The source code is 1.1198 + in <code>configure.ac</code> and various .m4 files in common/autoconf, 1.1199 + which are much more readable. 1.1200 + </p> 1.1201 + 1.1202 + <p> 1.1203 + <b>Q:</b> 1.1204 + Why is the <code>generated-configure.sh</code> file checked in, 1.1205 + if it is generated? 1.1206 + <br> 1.1207 + <b>A:</b> 1.1208 + If it was not generated, every user would need to have the autoconf 1.1209 + tools installed, and re-generate the <code>configure</code> file 1.1210 + as the first step. 1.1211 + Our goal is to minimize the work needed to be done by the user 1.1212 + to start building OpenJDK, and to minimize 1.1213 + the number of external dependencies required. 1.1214 + </p> 1.1215 + 1.1216 + <p> 1.1217 + <b>Q:</b> 1.1218 + Do you require a specific version of autoconf for regenerating 1.1219 + <code>generated-configure.sh</code>? 1.1220 + <br> 1.1221 + <b>A:</b> 1.1222 + Yes, version 2.69 is required and should be easy 1.1223 + enough to aquire on all supported operating 1.1224 + systems. The reason for this is to avoid 1.1225 + large spurious changes in <code>generated-configure.sh</code>. 1.1226 + </p> 1.1227 + 1.1228 + <p> 1.1229 + <b>Q:</b> 1.1230 + How do you regenerate <code>generated-configure.sh</code> 1.1231 + after making changes to the input files? 1.1232 + <br> 1.1233 + <b>A:</b> 1.1234 + Regnerating <code>generated-configure.sh</code> 1.1235 + should always be done using the 1.1236 + script <code>common/autoconf/autogen.sh</code> to 1.1237 + ensure that the correct files get updated. This 1.1238 + script should also be run after mercurial tries to 1.1239 + merge <code>generated-configure.sh</code> as a 1.1240 + merge of the generated file is not guaranteed to 1.1241 + be correct. 1.1242 + </p> 1.1243 + 1.1244 + <p> 1.1245 + <b>Q:</b> 1.1246 + What are the files in <code>common/makefiles/support/*</code> for? 1.1247 + They look like gibberish. 1.1248 + <br> 1.1249 + <b>A:</b> 1.1250 + They are a somewhat ugly hack to compensate for command line length 1.1251 + limitations on certain platforms (Windows, Solaris). 1.1252 + Due to a combination of limitations in make and the shell, 1.1253 + command lines containing too many files will not work properly. 1.1254 + These 1.1255 + helper files are part of an elaborate hack that will compress the 1.1256 + command line in the makefile and then uncompress it safely. 1.1257 + We're 1.1258 + not proud of it, but it does fix the problem. 1.1259 + If you have any better suggestions, we're all ears! :-) 1.1260 + </p> 1.1261 + 1.1262 + <p> 1.1263 + <b>Q:</b> 1.1264 + I want to see the output of the commands that make runs, 1.1265 + like in the old build. How do I do that? 1.1266 + <br> 1.1267 + <b>A:</b> 1.1268 + You specify the <code>LOG</code> variable to make. There are 1.1269 + several log levels: 1.1270 + </p> 1.1271 + <blockquote> 1.1272 + <ul> 1.1273 + <li> 1.1274 + <b><code>warn</code></b> — Default and very quiet. 1.1275 + </li> 1.1276 + <li> 1.1277 + <b><code>info</code></b> — Shows more progress information 1.1278 + than warn. 1.1279 + </li> 1.1280 + <li> 1.1281 + <b><code>debug</code></b> — Echos all command lines and 1.1282 + prints all macro calls for compilation definitions. 1.1283 + </li> 1.1284 + <li> 1.1285 + <b><code>trace</code></b> — Echos all $(shell) command 1.1286 + lines as well. 1.1287 + </li> 1.1288 + </ul> 1.1289 + </blockquote> 1.1290 + 1.1291 + <p> 1.1292 + <b>Q:</b> 1.1293 + When do I have to re-run <code>configure</code>? 1.1294 + <br> 1.1295 + <b>A:</b> 1.1296 + Normally you will run <code>configure</code> only once for creating a 1.1297 + configuration. 1.1298 + You need to re-run configuration only if you want to change any 1.1299 + configuration options, 1.1300 + or if you pull down changes to the <code>configure</code> script. 1.1301 + </p> 1.1302 + 1.1303 + <p> 1.1304 + <b>Q:</b> 1.1305 + I have added a new source file. Do I need to modify the makefiles? 1.1306 + <br> 1.1307 + <b>A:</b> 1.1308 + Normally, no. If you want to create e.g. a new native 1.1309 + library, 1.1310 + you will need to modify the makefiles. But for normal file 1.1311 + additions or removals, no changes are needed. There are certan 1.1312 + exceptions for some native libraries where the source files are spread 1.1313 + over many directories which also contain sources for other 1.1314 + libraries. In these cases it was simply easier to create include lists 1.1315 + rather than excludes. 1.1316 + </p> 1.1317 + 1.1318 + <p> 1.1319 + <b>Q:</b> 1.1320 + When I run <code>configure --help</code>, I see many strange options, 1.1321 + like <code>--dvidir</code>. What is this? 1.1322 + <br> 1.1323 + <b>A:</b> 1.1324 + Configure provides a slew of options by default, to all projects 1.1325 + that use autoconf. Most of them are not used in OpenJDK, 1.1326 + so you can safely ignore them. To list only OpenJDK specific features, 1.1327 + use <code>configure --help=short</code> instead. 1.1328 + </p> 1.1329 + 1.1330 + <p> 1.1331 + <b>Q:</b> 1.1332 + <code>configure</code> provides OpenJDK-specific features such as 1.1333 + <code>--with-builddeps-server</code> that are not 1.1334 + described in this document. What about those? 1.1335 + <br> 1.1336 + <b>A:</b> 1.1337 + Try them out if you like! But be aware that most of these are 1.1338 + experimental features. 1.1339 + Many of them don't do anything at all at the moment; the option 1.1340 + is just a placeholder. Others depend on 1.1341 + pieces of code or infrastructure that is currently 1.1342 + not ready for prime time. 1.1343 + </p> 1.1344 + 1.1345 + <p> 1.1346 + <b>Q:</b> 1.1347 + How will you make sure you don't break anything? 1.1348 + <br> 1.1349 + <b>A:</b> 1.1350 + We have a script that compares the result of the new build system 1.1351 + with the result of the old. For most part, we aim for (and achieve) 1.1352 + byte-by-byte identical output. There are however technical issues 1.1353 + with e.g. native binaries, which might differ in a byte-by-byte 1.1354 + comparison, even 1.1355 + when building twice with the old build system. 1.1356 + For these, we compare relevant aspects 1.1357 + (e.g. the symbol table and file size). 1.1358 + Note that we still don't have 100% 1.1359 + equivalence, but we're close. 1.1360 + </p> 1.1361 + 1.1362 + <p> 1.1363 + <b>Q:</b> 1.1364 + I noticed this thing X in the build that looks very broken by design. 1.1365 + Why don't you fix it? 1.1366 + <br> 1.1367 + <b>A:</b> 1.1368 + Our goal is to produce a build output that is as close as 1.1369 + technically possible to the old build output. 1.1370 + If things were weird in the old build, 1.1371 + they will be weird in the new build. 1.1372 + Often, things were weird before due to obscurity, 1.1373 + but in the new build system the weird stuff comes up to the surface. 1.1374 + The plan is to attack these things at a later stage, 1.1375 + after the new build system is established. 1.1376 + </p> 1.1377 + 1.1378 + <p> 1.1379 + <b>Q:</b> 1.1380 + The code in the new build system is not that well-structured. 1.1381 + Will you fix this? 1.1382 + <br> 1.1383 + <b>A:</b> 1.1384 + Yes! The new build system has grown bit by bit as we converted 1.1385 + the old system. When all of the old build system is converted, 1.1386 + we can take a step back and clean up the structure of the new build 1.1387 + system. Some of this we plan to do before replacing the old build 1.1388 + system and some will need to wait until after. 1.1389 + </p> 1.1390 + 1.1391 + <p> 1.1392 + <b>Q:</b> 1.1393 + Is anything able to use the results of the new build's default make target? 1.1394 + <br> 1.1395 + <b>A:</b> 1.1396 + Yes, this is the minimal (or roughly minimal) 1.1397 + set of compiled output needed for a developer to actually 1.1398 + execute the newly built JDK. The idea is that in an incremental 1.1399 + development fashion, when doing a normal make, 1.1400 + you should only spend time recompiling what's changed 1.1401 + (making it purely incremental) and only do the work that's 1.1402 + needed to actually run and test your code. 1.1403 + The packaging stuff that is part of the <code>images</code> 1.1404 + target is not needed for a normal developer who wants to 1.1405 + test his new code. Even if it's quite fast, it's still unnecessary. 1.1406 + We're targeting sub-second incremental rebuilds! ;-) 1.1407 + (Or, well, at least single-digit seconds...) 1.1408 + </p> 1.1409 + 1.1410 + <p> 1.1411 + <b>Q:</b> 1.1412 + I usually set a specific environment variable when building, 1.1413 + but I can't find the equivalent in the new build. 1.1414 + What should I do? 1.1415 + <br> 1.1416 + <b>A:</b> 1.1417 + It might very well be that we have neglected to add support for 1.1418 + an option that was actually used from outside the build system. 1.1419 + Email us and we will add support for it! 1.1420 + </p> 1.1421 + 1.1422 + </blockquote> 1.1423 + 1.1424 + <h3><a name="performance">Build Performance Tips</a></h3> 1.1425 + <blockquote> 1.1426 + 1.1427 + <p>Building OpenJDK requires a lot of horsepower. 1.1428 + Some of the build tools can be adjusted to utilize more or less 1.1429 + of resources such as 1.1430 + parallel threads and memory. 1.1431 + The <code>configure</code> script analyzes your system and selects reasonable 1.1432 + values for such options based on your hardware. 1.1433 + If you encounter resource problems, such as out of memory conditions, 1.1434 + you can modify the detected values with:</p> 1.1435 + 1.1436 + <ul> 1.1437 + <li> 1.1438 + <b><code>--with-num-cores</code></b> 1.1439 + — 1.1440 + number of cores in the build system, 1.1441 + e.g. <code>--with-num-cores=8</code> 1.1442 + </li> 1.1443 + <li> 1.1444 + <b><code>--with-memory-size</code></b> 1.1445 + — memory (in MB) available in the build system, 1.1446 + e.g. <code>--with-memory-size=1024</code> 1.1447 + </li> 1.1448 + </ul> 1.1449 + 1.1450 + <p>It might also be necessary to specify the JVM arguments passed 1.1451 + to the Bootstrap JDK, using e.g. 1.1452 + <code>--with-boot-jdk-jvmargs="-Xmx8G -enableassertions"</code>. 1.1453 + Doing this will override the default JVM arguments 1.1454 + passed to the Bootstrap JDK.</p> 1.1455 + 1.1456 + 1.1457 + <p>One of the top goals of the new build system is to improve the 1.1458 + build performance and decrease the time needed to build. This will 1.1459 + soon also apply to the java compilation when the Smart Javac wrapper 1.1460 + is making its way into jdk8. It can be tried in the build-infra 1.1461 + repository already. You are likely to find that the new build system 1.1462 + is faster than the old one even without this feature.</p> 1.1463 + 1.1464 + <p>At the end of a successful execution of <code>configure</code>, 1.1465 + you will get a performance summary, 1.1466 + indicating how well the build will perform. Here you will 1.1467 + also get performance hints. 1.1468 + If you want to build fast, pay attention to those!</p> 1.1469 + 1.1470 + <h4>Building with ccache</h4> 1.1471 + 1.1472 + <p>A simple way to radically speed up compilation of native code 1.1473 + (typically hotspot and native libraries in JDK) is to install 1.1474 + ccache. This will cache and reuse prior compilation results, if the 1.1475 + source code is unchanged. However, ccache versions prior to 3.1.4 1.1476 + does not work correctly with the precompiled headers used in 1.1477 + OpenJDK. So if your platform supports ccache at 3.1.4 or later, we 1.1478 + highly recommend installing it. This is currently only supported on 1.1479 + linux.</p> 1.1480 + 1.1481 + <h4>Building on local disk</h4> 1.1482 + 1.1483 + <p>If you are using network shares, e.g. via NFS, for your source code, 1.1484 + make sure the build directory is situated on local disk. 1.1485 + The performance 1.1486 + penalty is extremely high for building on a network share, 1.1487 + close to unusable.</p> 1.1488 + 1.1489 + <h4>Building only one JVM</h4> 1.1490 + 1.1491 + <p>The old build builds multiple JVMs on 32-bit systems (client and 1.1492 + server; and on Windows kernel as well). In the new build we have 1.1493 + changed this default to only build server when it's available. This 1.1494 + improves build times for those not interested in multiple JVMs. To 1.1495 + mimic the old behavior on platforms that support it, 1.1496 + use <code>--with-jvm-variants=client,server</code>.</p> 1.1497 + 1.1498 + <h4>Selecting the number of cores to build on</h4> 1.1499 + 1.1500 + <p>By default, <code>configure</code> will analyze your machine and run the make 1.1501 + process in parallel with as many threads as you have cores. This 1.1502 + behavior can be overridden, either "permanently" (on a <code>configure</code> 1.1503 + basis) using <code>--with-num-cores=N</code> or for a single build 1.1504 + only (on a make basis), using <code>make JOBS=N</code>.</p> 1.1505 + 1.1506 + <p>If you want to make a slower build just this time, to save some CPU 1.1507 + power for other processes, you can run 1.1508 + e.g. <code>make JOBS=2</code>. This will force the makefiles 1.1509 + to only run 2 parallel processes, or even <code>make JOBS=1</code> 1.1510 + which will disable parallelism.</p> 1.1511 + 1.1512 + <p>If you want to have it the other way round, namely having slow 1.1513 + builds default and override with fast if you're 1.1514 + impatient, you should call <code>configure</code> with 1.1515 + <code>--with-num-cores=2</code>, making 2 the default. 1.1516 + If you want to run with more 1.1517 + cores, run <code>make JOBS=8</code></p> 1.1518 + 1.1519 + </blockquote> 1.1520 + 1.1521 + <h3><a name="troubleshooting">Troubleshooting</a></h3> 1.1522 + <blockquote> 1.1523 + 1.1524 + <h4>Solving build problems</h4> 1.1525 + 1.1526 + <blockquote> 1.1527 + If the build fails (and it's not due to a compilation error in 1.1528 + a source file you've changed), the first thing you should do 1.1529 + is to re-run the build with more verbosity. 1.1530 + Do this by adding <code>LOG=debug</code> to your make command line. 1.1531 + <br> 1.1532 + The build log (with both stdout and stderr intermingled, 1.1533 + basically the same as you see on your console) can be found as 1.1534 + <code>build.log</code> in your build directory. 1.1535 + <br> 1.1536 + You can ask for help on build problems with the new build system 1.1537 + on either the 1.1538 + <a href="http://mail.openjdk.java.net/mailman/listinfo/build-dev"> 1.1539 + build-dev</a> 1.1540 + or the 1.1541 + <a href="http://mail.openjdk.java.net/mailman/listinfo/build-infra-dev"> 1.1542 + build-infra-dev</a> 1.1543 + mailing lists. Please include the relevant parts 1.1544 + of the build log. 1.1545 + <br> 1.1546 + A build can fail for any number of reasons. 1.1547 + Most failures 1.1548 + are a result of trying to build in an environment in which all the 1.1549 + pre-build requirements have not been met. 1.1550 + The first step in 1.1551 + troubleshooting a build failure is to recheck that you have satisfied 1.1552 + all the pre-build requirements for your platform. 1.1553 + Scanning the <code>configure</code> log is a good first step, making 1.1554 + sure that what it found makes sense for your system. 1.1555 + Look for strange error messages or any difficulties that 1.1556 + <code>configure</code> had in finding things. 1.1557 + <br> 1.1558 + Some of the more common problems with builds are briefly 1.1559 + described 1.1560 + below, with suggestions for remedies. 1.1561 + <ul> 1.1562 + <li> 1.1563 + <b>Corrupted Bundles on Windows:</b> 1.1564 + <blockquote> 1.1565 + Some virus scanning software has been known to 1.1566 + corrupt the 1.1567 + downloading of zip bundles. 1.1568 + It may be necessary to disable the 'on access' or 1.1569 + 'real time' 1.1570 + virus scanning features to prevent this corruption. 1.1571 + This type of "real time" virus scanning can also 1.1572 + slow down the 1.1573 + build process significantly. 1.1574 + Temporarily disabling the feature, or excluding the build 1.1575 + output directory may be necessary to get correct and 1.1576 + faster builds. 1.1577 + </blockquote> 1.1578 + </li> 1.1579 + <li> 1.1580 + <b>Slow Builds:</b> 1.1581 + <blockquote> 1.1582 + If your build machine seems to be overloaded from too many 1.1583 + simultaneous C++ compiles, try setting the 1.1584 + <code>JOBS=1</code> on the <code>make</code> command line. 1.1585 + Then try increasing the count slowly to an acceptable 1.1586 + level for your system. Also: 1.1587 + <blockquote> 1.1588 + Creating the javadocs can be very slow, 1.1589 + if you are running 1.1590 + javadoc, consider skipping that step. 1.1591 + <br> 1.1592 + Faster CPUs, more RAM, and a faster DISK usually helps. 1.1593 + The VM build tends to be CPU intensive 1.1594 + (many C++ compiles), 1.1595 + and the rest of the JDK will often be disk intensive. 1.1596 + <br> 1.1597 + Faster compiles are possible using a tool called 1.1598 + <a href="http://ccache.samba.org/" target="_blank">ccache</a>. 1.1599 + </blockquote> 1.1600 + </blockquote> 1.1601 + </li> 1.1602 + <li> 1.1603 + <b>File time issues:</b> 1.1604 + <blockquote> 1.1605 + If you see warnings that refer to file time stamps, e.g. 1.1606 + <blockquote> 1.1607 + <i>Warning message:</i><code> 1.1608 + File `xxx' has modification time in 1.1609 + the future.</code> 1.1610 + <br> 1.1611 + <i>Warning message:</i> <code> Clock skew detected. 1.1612 + Your build may 1.1613 + be incomplete.</code> 1.1614 + </blockquote> 1.1615 + These warnings can occur when the clock on the build 1.1616 + machine is out of 1.1617 + sync with the timestamps on the source files. 1.1618 + Other errors, apparently 1.1619 + unrelated but in fact caused by the clock skew, 1.1620 + can occur along with 1.1621 + the clock skew warnings. 1.1622 + These secondary errors may tend to obscure the 1.1623 + fact that the true root cause of the problem 1.1624 + is an out-of-sync clock. 1.1625 + <p> 1.1626 + If you see these warnings, reset the clock on the 1.1627 + build 1.1628 + machine, run "<code><i>gmake</i> clobber</code>" 1.1629 + or delete the directory 1.1630 + containing the build output, and restart the 1.1631 + build from the beginning. 1.1632 + </blockquote> 1.1633 + </li> 1.1634 + <li> 1.1635 + <b>Error message: 1.1636 + <code>Trouble writing out table to disk</code></b> 1.1637 + <blockquote> 1.1638 + Increase the amount of swap space on your build machine. 1.1639 + This could be caused by overloading the system and 1.1640 + it may be necessary to use: 1.1641 + <blockquote> 1.1642 + <code>make JOBS=1</code> 1.1643 + </blockquote> 1.1644 + to reduce the load on the system. 1.1645 + </blockquote> 1.1646 + </li> 1.1647 + <li> 1.1648 + <b>Error Message: 1.1649 + <code>libstdc++ not found:</code></b> 1.1650 + <blockquote> 1.1651 + This is caused by a missing libstdc++.a library. 1.1652 + This is installed as part of a specific package 1.1653 + (e.g. libstdc++.so.devel.386). 1.1654 + By default some 64-bit Linux versions (e.g. Fedora) 1.1655 + only install the 64-bit version of the libstdc++ package. 1.1656 + Various parts of the JDK build require a static 1.1657 + link of the C++ runtime libraries to allow for maximum 1.1658 + portability of the built images. 1.1659 + </blockquote> 1.1660 + </li> 1.1661 + <li> 1.1662 + <b>Linux Error Message: 1.1663 + <code>cannot restore segment prot after reloc</code></b> 1.1664 + <blockquote> 1.1665 + This is probably an issue with SELinux (See 1.1666 + <a href="http://en.wikipedia.org/wiki/SELinux" target="_blank"> 1.1667 + http://en.wikipedia.org/wiki/SELinux</a>). 1.1668 + Parts of the VM is built without the <code>-fPIC</code> for 1.1669 + performance reasons. 1.1670 + <p> 1.1671 + To completely disable SELinux: 1.1672 + <ol> 1.1673 + <li><code>$ su root</code></li> 1.1674 + <li><code># system-config-securitylevel</code></li> 1.1675 + <li><code>In the window that appears, select the SELinux tab</code></li> 1.1676 + <li><code>Disable SELinux</code></li> 1.1677 + </ol> 1.1678 + <p> 1.1679 + Alternatively, instead of completely disabling it you could 1.1680 + disable just this one check. 1.1681 + <ol> 1.1682 + <li>Select System->Administration->SELinux Management</li> 1.1683 + <li>In the SELinux Management Tool which appears, 1.1684 + select "Boolean" from the menu on the left</li> 1.1685 + <li>Expand the "Memory Protection" group</li> 1.1686 + <li>Check the first item, labeled 1.1687 + "Allow all unconfined executables to use 1.1688 + libraries requiring text relocation ..."</li> 1.1689 + </ol> 1.1690 + </blockquote> 1.1691 + </li> 1.1692 + <li> 1.1693 + <b>Windows Error Messages:</b> 1.1694 + <br> 1.1695 + <code>*** fatal error - couldn't allocate heap, ... </code> 1.1696 + <br> 1.1697 + <code>rm fails with "Directory not empty"</code> 1.1698 + <br> 1.1699 + <code>unzip fails with "cannot create ... Permission denied"</code> 1.1700 + <br> 1.1701 + <code>unzip fails with "cannot create ... Error 50"</code> 1.1702 + <br> 1.1703 + <blockquote> 1.1704 + The CYGWIN software can conflict with other non-CYGWIN 1.1705 + software. See the CYGWIN FAQ section on 1.1706 + <a href="http://cygwin.com/faq/faq.using.html#faq.using.bloda" target="_blank"> 1.1707 + BLODA (applications that interfere with CYGWIN)</a>. 1.1708 + </blockquote> 1.1709 + </li> 1.1710 + <li> 1.1711 + <b>Windows Error Message: <code>spawn failed</code></b> 1.1712 + <blockquote> 1.1713 + Try rebooting the system, or there could be some kind of 1.1714 + issue with the disk or disk partition being used. 1.1715 + Sometimes it comes with a "Permission Denied" message. 1.1716 + </blockquote> 1.1717 + </li> 1.1718 + </ul> 1.1719 + </blockquote> 1.1720 + 1.1721 + </blockquote> <!-- Troubleshooting --> 1.1722 + 1.1723 + </blockquote> <!-- Appendix A --> 1.1724 + 1.1725 + <!-- ====================================================== --> 1.1726 + <hr> 1.1727 + <h2><a name="gmake">Appendix B: GNU make</a></h2> 1.1728 + <blockquote> 1.1729 + 1.1730 + The Makefiles in the OpenJDK are only valid when used with the 1.1731 + GNU version of the utility command <code>make</code> 1.1732 + (usually called <code>gmake</code> on Solaris). 1.1733 + A few notes about using GNU make: 1.1734 + <ul> 1.1735 + <li> 1.1736 + You need GNU make version 3.81 or newer. 1.1737 + If the GNU make utility on your systems is not 1.1738 + 3.81 or newer, 1.1739 + see <a href="#buildgmake">"Building GNU make"</a>. 1.1740 + </li> 1.1741 + <li> 1.1742 + Place the location of the GNU make binary in the 1.1743 + <code>PATH</code>. 1.1744 + </li> 1.1745 + <li> 1.1746 + <strong>Solaris:</strong> 1.1747 + Do NOT use <code>/usr/bin/make</code> on Solaris. 1.1748 + If your Solaris system has the software 1.1749 + from the Solaris Developer Companion CD installed, 1.1750 + you should try and use <code>gmake</code> 1.1751 + which will be located in either the 1.1752 + <code>/usr/bin</code>, <code>/opt/sfw/bin</code> or 1.1753 + <code>/usr/sfw/bin</code> directory. 1.1754 + </li> 1.1755 + <li> 1.1756 + <strong>Windows:</strong> 1.1757 + Make sure you start your build inside a bash shell. 1.1758 + </li> 1.1759 + <li> 1.1760 + <strong>Mac OS X:</strong> 1.1761 + The XCode "command line tools" must be installed on your Mac. 1.1762 + </li> 1.1763 + </ul> 1.1764 + <p> 1.1765 + Information on GNU make, and access to ftp download sites, are 1.1766 + available on the 1.1767 + <a href="http://www.gnu.org/software/make/make.html" target="_blank"> 1.1768 + GNU make web site 1.1769 + </a>. 1.1770 + The latest source to GNU make is available at 1.1771 + <a href="http://ftp.gnu.org/pub/gnu/make/" target="_blank"> 1.1772 + ftp.gnu.org/pub/gnu/make/</a>. 1.1773 + </p> 1.1774 + 1.1775 + <h3><a name="buildgmake">Building GNU make</a></h3> 1.1776 + <blockquote> 1.1777 + First step is to get the GNU make 3.81 or newer source from 1.1778 + <a href="http://ftp.gnu.org/pub/gnu/make/" target="_blank"> 1.1779 + ftp.gnu.org/pub/gnu/make/</a>. 1.1780 + Building is a little different depending on the OS but is 1.1781 + basically done with: 1.1782 + <blockquote> 1.1783 + <code>bash ./configure</code> 1.1784 + <br> 1.1785 + <code>make</code> 1.1786 + </blockquote> 1.1787 + </blockquote> 1.1788 + 1.1789 + </blockquote> <!-- Appendix B --> 1.1790 + 1.1791 + <!-- ====================================================== --> 1.1792 + <hr> 1.1793 + <h2><a name="buildenvironments">Appendix C: Build Environments</a></h2> 1.1794 + <blockquote> 1.1795 + 1.1796 + <h3><a name="MBE">Minimum Build Environments</a></h3> 1.1797 + <blockquote> 1.1798 + This file often describes specific requirements for what we 1.1799 + call the 1.1800 + "minimum build environments" (MBE) for this 1.1801 + specific release of the JDK. 1.1802 + What is listed below is what the Oracle Release 1.1803 + Engineering Team will use to build the Oracle JDK product. 1.1804 + Building with the MBE will hopefully generate the most compatible 1.1805 + bits that install on, and run correctly on, the most variations 1.1806 + of the same base OS and hardware architecture. 1.1807 + In some cases, these represent what is often called the 1.1808 + least common denominator, but each Operating System has different 1.1809 + aspects to it. 1.1810 + <p> 1.1811 + In all cases, the Bootstrap JDK version minimum is critical, 1.1812 + we cannot guarantee builds will work with older Bootstrap JDK's. 1.1813 + Also in all cases, more RAM and more processors is better, 1.1814 + the minimums listed below are simply recommendations. 1.1815 + <p> 1.1816 + With Solaris and Mac OS X, the version listed below is the 1.1817 + oldest release we can guarantee builds and works, and the 1.1818 + specific version of the compilers used could be critical. 1.1819 + <p> 1.1820 + With Windows the critical aspect is the Visual Studio compiler 1.1821 + used, which due to it's runtime, generally dictates what Windows 1.1822 + systems can do the builds and where the resulting bits can 1.1823 + be used.<br> 1.1824 + <b>NOTE: We expect a change here off these older Windows OS releases 1.1825 + and to a 'less older' one, probably Windows 2008R2 X64.</b> 1.1826 + <p> 1.1827 + With Linux, it was just a matter of picking a 1.1828 + stable distribution that is a good representative for Linux 1.1829 + in general.<br> 1.1830 + <b>NOTE: We expect a change here from Fedora 9 to something else, 1.1831 + but it has not been completely determined yet, possibly 1.1832 + Ubuntu 12.04 X64, unbiased community feedback would be welcome on 1.1833 + what a good choice would be here.</b> 1.1834 + <p> 1.1835 + It is understood that most developers will NOT be using these 1.1836 + specific versions, and in fact creating these specific versions 1.1837 + may be difficult due to the age of some of this software. 1.1838 + It is expected that developers are more often using the more 1.1839 + recent releases and distributions of these operating systems. 1.1840 + <p> 1.1841 + Compilation problems with newer or different C/C++ compilers is a 1.1842 + common problem. 1.1843 + Similarly, compilation problems related to changes to the 1.1844 + <code>/usr/include</code> or system header files is also a 1.1845 + common problem with older, newer, or unreleased OS versions. 1.1846 + Please report these types of problems as bugs so that they 1.1847 + can be dealt with accordingly. 1.1848 + </p> 1.1849 + <table border="1"> 1.1850 + <thead> 1.1851 + <tr> 1.1852 + <th>Base OS and Architecture</th> 1.1853 + <th>OS</th> 1.1854 + <th>C/C++ Compiler</th> 1.1855 + <th>Bootstrap JDK</th> 1.1856 + <th>Processors</th> 1.1857 + <th>RAM Minimum</th> 1.1858 + <th>DISK Needs</th> 1.1859 + </tr> 1.1860 + </thead> 1.1861 + <tbody> 1.1862 + <tr> 1.1863 + <td>Linux X86 (32-bit) and X64 (64-bit)</td> 1.1864 + <td>Fedora 9</td> 1.1865 + <td>gcc 4.3 </td> 1.1866 + <td>JDK 7u7</td> 1.1867 + <td>2 or more</td> 1.1868 + <td>1 GB</td> 1.1869 + <td>6 GB</td> 1.1870 + </tr> 1.1871 + <tr> 1.1872 + <td>Solaris SPARC (32-bit) and SPARCV9 (64-bit)</td> 1.1873 + <td>Solaris 10 Update 6</td> 1.1874 + <td>Studio 12 Update 1 + patches</td> 1.1875 + <td>JDK 7u7</td> 1.1876 + <td>4 or more</td> 1.1877 + <td>4 GB</td> 1.1878 + <td>8 GB</td> 1.1879 + </tr> 1.1880 + <tr> 1.1881 + <td>Solaris X86 (32-bit) and X64 (64-bit)</td> 1.1882 + <td>Solaris 10 Update 6</td> 1.1883 + <td>Studio 12 Update 1 + patches</td> 1.1884 + <td>JDK 7u7</td> 1.1885 + <td>4 or more</td> 1.1886 + <td>4 GB</td> 1.1887 + <td>8 GB</td> 1.1888 + </tr> 1.1889 + <tr> 1.1890 + <td>Windows X86 (32-bit)</td> 1.1891 + <td>Windows XP</td> 1.1892 + <td>Microsoft Visual Studio C++ 2010 Professional Edition</td> 1.1893 + <td>JDK 7u7</td> 1.1894 + <td>2 or more</td> 1.1895 + <td>2 GB</td> 1.1896 + <td>6 GB</td> 1.1897 + </tr> 1.1898 + <tr> 1.1899 + <td>Windows X64 (64-bit)</td> 1.1900 + <td>Windows Server 2003 - Enterprise x64 Edition</td> 1.1901 + <td>Microsoft Visual Studio C++ 2010 Professional Edition</td> 1.1902 + <td>JDK 7u7</td> 1.1903 + <td>2 or more</td> 1.1904 + <td>2 GB</td> 1.1905 + <td>6 GB</td> 1.1906 + </tr> 1.1907 + <tr> 1.1908 + <td>Mac OS X X64 (64-bit)</td> 1.1909 + <td>Mac OS X 10.7 "Lion"</td> 1.1910 + <td>XCode 4.5.2 or newer</td> 1.1911 + <td>JDK 7u7</td> 1.1912 + <td>2 or more</td> 1.1913 + <td>4 GB</td> 1.1914 + <td>6 GB</td> 1.1915 + </tr> 1.1916 + </tbody> 1.1917 + </table> 1.1918 + </blockquote> 1.1919 + 1.1920 + <!-- ====================================================== --> 1.1921 + <hr> 1.1922 + <h3><a name="SDBE">Specific Developer Build Environments</a></h3> 1.1923 + <blockquote> 1.1924 + We won't be listing all the possible environments, but 1.1925 + we will try to provide what information we have available to us. 1.1926 + <p> 1.1927 + <strong>NOTE: The community can help out by updating 1.1928 + this part of the document. 1.1929 + </strong> 1.1930 + 1.1931 + <h4><a name="fedora">Fedora</a></h4> 1.1932 + <blockquote> 1.1933 + After installing the latest 1.1934 + <a href="http://fedoraproject.org">Fedora</a> 1.1935 + you need to install several build dependencies. 1.1936 + The simplest way to do it is to execute the 1.1937 + following commands as user <code>root</code>: 1.1938 + <blockquote> 1.1939 + <code>yum-builddep java-1.7.0-openjdk</code> 1.1940 + <br> 1.1941 + <code>yum install gcc gcc-c++</code> 1.1942 + </blockquote> 1.1943 + <p> 1.1944 + In addition, it's necessary to set a few environment 1.1945 + variables for the build: 1.1946 + <blockquote> 1.1947 + <code>export LANG=C</code> 1.1948 + <br> 1.1949 + <code>export PATH="/usr/lib/jvm/java-openjdk/bin:${PATH}"</code> 1.1950 + </blockquote> 1.1951 + </blockquote> 1.1952 + 1.1953 + 1.1954 + <h4><a name="centos">CentOS 5.5</a></h4> 1.1955 + <blockquote> 1.1956 + After installing 1.1957 + <a href="http://www.centos.org/">CentOS 5.5</a> 1.1958 + you need to make sure you have 1.1959 + the following Development bundles installed: 1.1960 + <blockquote> 1.1961 + <ul> 1.1962 + <li>Development Libraries</li> 1.1963 + <li>Development Tools</li> 1.1964 + <li>Java Development</li> 1.1965 + <li>X Software Development (Including XFree86-devel)</li> 1.1966 + </ul> 1.1967 + </blockquote> 1.1968 + <p> 1.1969 + Plus the following packages: 1.1970 + <blockquote> 1.1971 + <ul> 1.1972 + <li>cups devel: Cups Development Package</li> 1.1973 + <li>alsa devel: Alsa Development Package</li> 1.1974 + <li>Xi devel: libXi.so Development Package</li> 1.1975 + </ul> 1.1976 + </blockquote> 1.1977 + <p> 1.1978 + The freetype 2.3 packages don't seem to be available, 1.1979 + but the freetype 2.3 sources can be downloaded, built, 1.1980 + and installed easily enough from 1.1981 + <a href="http://downloads.sourceforge.net/freetype"> 1.1982 + the freetype site</a>. 1.1983 + Build and install with something like: 1.1984 + <blockquote> 1.1985 + <code>bash ./configure</code> 1.1986 + <br> 1.1987 + <code>make</code> 1.1988 + <br> 1.1989 + <code>sudo -u root make install</code> 1.1990 + </blockquote> 1.1991 + <p> 1.1992 + Mercurial packages could not be found easily, but a Google 1.1993 + search should find ones, and they usually include Python if 1.1994 + it's needed. 1.1995 + </blockquote> 1.1996 + 1.1997 + <h4><a name="debian">Debian 5.0 (Lenny)</a></h4> 1.1998 + <blockquote> 1.1999 + After installing <a href="http://debian.org">Debian</a> 5 1.2000 + you need to install several build dependencies. 1.2001 + The simplest way to install the build dependencies is to 1.2002 + execute the following commands as user <code>root</code>: 1.2003 + <blockquote> 1.2004 + <code>aptitude build-dep openjdk-7</code> 1.2005 + <br> 1.2006 + <code>aptitude install openjdk-7-jdk libmotif-dev</code> 1.2007 + </blockquote> 1.2008 + <p> 1.2009 + In addition, it's necessary to set a few environment 1.2010 + variables for the build: 1.2011 + <blockquote> 1.2012 + <code>export LANG=C</code> 1.2013 + <br> 1.2014 + <code>export PATH="/usr/lib/jvm/java-7-openjdk/bin:${PATH}"</code> 1.2015 + </blockquote> 1.2016 + </blockquote> 1.2017 + 1.2018 + <h4><a name="ubuntu">Ubuntu 12.04</a></h4> 1.2019 + <blockquote> 1.2020 + After installing <a href="http://ubuntu.org">Ubuntu</a> 12.04 1.2021 + you need to install several build dependencies. The simplest 1.2022 + way to do it is to execute the following commands: 1.2023 + <blockquote> 1.2024 + <code>sudo aptitude build-dep openjdk-7</code> 1.2025 + <br> 1.2026 + <code>sudo aptitude install openjdk-7-jdk</code> 1.2027 + </blockquote> 1.2028 + <p> 1.2029 + In addition, it's necessary to set a few environment 1.2030 + variables for the build: 1.2031 + <blockquote> 1.2032 + <code>export LANG=C</code> 1.2033 + <br> 1.2034 + <code>export PATH="/usr/lib/jvm/java-7-openjdk/bin:${PATH}"</code> 1.2035 + </blockquote> 1.2036 + </blockquote> 1.2037 + 1.2038 + <h4><a name="opensuse">OpenSUSE 11.1</a></h4> 1.2039 + <blockquote> 1.2040 + After installing <a href="http://opensuse.org">OpenSUSE</a> 11.1 1.2041 + you need to install several build dependencies. 1.2042 + The simplest way to install the build dependencies is to 1.2043 + execute the following commands: 1.2044 + <blockquote> 1.2045 + <code>sudo zypper source-install -d java-1_7_0-openjdk</code> 1.2046 + <br> 1.2047 + <code>sudo zypper install make</code> 1.2048 + </blockquote> 1.2049 + <p> 1.2050 + In addition, it is necessary to set a few environment 1.2051 + variables for the build: 1.2052 + <blockquote> 1.2053 + <code>export LANG=C</code> 1.2054 + <br> 1.2055 + <code>export PATH="/usr/lib/jvm/java-1.7.0-openjdk/bin:$[PATH}"</code> 1.2056 + </blockquote> 1.2057 + <p> 1.2058 + Finally, you need to unset the <code>JAVA_HOME</code> 1.2059 + environment variable: 1.2060 + <blockquote> 1.2061 + <code>export -n JAVA_HOME</code> 1.2062 + </blockquote> 1.2063 + </blockquote> 1.2064 + 1.2065 + <h4><a name="mandriva">Mandriva Linux One 2009 Spring</a></h4> 1.2066 + <blockquote> 1.2067 + After installing <a href="http://mandriva.org">Mandriva</a> 1.2068 + Linux One 2009 Spring 1.2069 + you need to install several build dependencies. 1.2070 + The simplest way to install the build dependencies is to 1.2071 + execute the following commands as user <code>root</code>: 1.2072 + <blockquote> 1.2073 + <code>urpmi java-1.7.0-openjdk-devel make gcc gcc-c++ 1.2074 + freetype-devel zip unzip libcups2-devel libxrender1-devel 1.2075 + libalsa2-devel libstc++-static-devel libxtst6-devel 1.2076 + libxi-devel</code> 1.2077 + </blockquote> 1.2078 + <p> 1.2079 + In addition, it is necessary to set a few environment 1.2080 + variables for the build: 1.2081 + <blockquote> 1.2082 + <code>export LANG=C</code> 1.2083 + <br> 1.2084 + <code>export PATH="/usr/lib/jvm/java-1.7.0-openjdk/bin:${PATH}"</code> 1.2085 + </blockquote> 1.2086 + </blockquote> 1.2087 + 1.2088 + <h4><a name="opensolaris">OpenSolaris 2009.06</a></h4> 1.2089 + <blockquote> 1.2090 + After installing <a href="http://opensolaris.org">OpenSolaris</a> 2009.06 1.2091 + you need to install several build dependencies. 1.2092 + The simplest way to install the build dependencies is to 1.2093 + execute the following commands: 1.2094 + <blockquote> 1.2095 + <code>pfexec pkg install SUNWgmake SUNWj7dev 1.2096 + sunstudioexpress SUNWcups SUNWzip SUNWunzip SUNWxwhl 1.2097 + SUNWxorg-headers SUNWaudh SUNWfreetype2</code> 1.2098 + </blockquote> 1.2099 + <p> 1.2100 + In addition, it is necessary to set a few environment 1.2101 + variables for the build: 1.2102 + <blockquote> 1.2103 + <code>export LANG=C</code> 1.2104 + <br> 1.2105 + <code>export PATH="/opt/SunStudioExpress/bin:${PATH}"</code> 1.2106 + </blockquote> 1.2107 + </blockquote> 1.2108 + 1.2109 + </blockquote> 1.2110 + 1.2111 + </blockquote> <!-- Appendix C --> 1.2112 + 1.2113 + <!-- ====================================================== --> 1.2114 + 1.2115 + <!-- Leave out Appendix D -- 1.2116 + 1.2117 +<hr> 1.2118 +<h2><a name="mapping">Appendix D: Mapping Old to New</a></h2> 1.2119 +<blockquote> 1.2120 + <p>This table will help you convert some idioms of the old build 1.2121 + system to the new build system.</p> 1.2122 + <table summary="Cheat sheet for converting from old to new build system"> 1.2123 + <tr valign="top"> 1.2124 + <th>In the old build system, you used to...</th> 1.2125 + <th>In the new build system, you should ...</th> 1.2126 + </tr> 1.2127 + <tr valign="top"> 1.2128 + <td>run <code>make sanity</code></td> 1.2129 + <td>run <code>bash ./configure</code></td> 1.2130 + </tr> 1.2131 + <tr valign="top"> 1.2132 + <td>set <code>ALT_OUTPUTDIR=build/my-special-output</code></td> 1.2133 + <td>before building the first time: 1.2134 + <br> 1.2135 + <code>cd build/my-special-output</code> 1.2136 + <br> 1.2137 + <code>bash ../../configure</code> 1.2138 + <br> 1.2139 + to build: 1.2140 + <br> 1.2141 + <code>cd build/my-special-output</code> 1.2142 + <br> 1.2143 + <code>make</code> 1.2144 + </td> 1.2145 + </tr> 1.2146 + <tr valign="top"> 1.2147 + <td>set <code>ALT_BOOTDIR=/opt/java/jdk7</code></td> 1.2148 + <td>run <code>configure --with-boot-jdk=/opt/java/jdk7</code></td> 1.2149 + </tr> 1.2150 + <tr valign="top"> 1.2151 + <td>run <code>make ARCH_DATA_MODEL=32</code></td> 1.2152 + <td>run <code>configure --with-target-bits=32</code></td> 1.2153 + </tr> 1.2154 + <tr valign="top"> 1.2155 + <td>set <code>BUILD_CLIENT_ONLY=true</code></td> 1.2156 + <td>run <code>configure --with-jvm-variants=client</code></td> 1.2157 + </tr> 1.2158 + <tr valign="top"> 1.2159 + <td>set <code>ALT_FREETYPE_LIB_PATH=/opt/freetype/lib</code> 1.2160 + and <code>ALT_FREETYPE_HEADERS_PATH=/opt/freetype/include</code></td> 1.2161 + <td>run <code>configure --with-freetype=/opt/freetype</code></td> 1.2162 + </tr> 1.2163 + <tr valign="top"> 1.2164 + <td>set <code>ALT_CUPS_HEADERS_PATH=/opt/cups/include</code></td> 1.2165 + <td>run <code>configure --with-cups=/opt/cups</code></td> 1.2166 + </tr> 1.2167 + <tr valign="top"> 1.2168 + <td>set <code>ALT_OPENWIN_HOME=/opt/X11R6</code></td> 1.2169 + <td>run <code>configure --with-x=/opt/X11R6</code></td> 1.2170 + </tr> 1.2171 + <tr valign="top"> 1.2172 + <td>set <code>ALT_MSVCRNN_DLL_PATH=c:/vc_redist</code></td> 1.2173 + <td>run <code>configure --with-msvcr100dll=/cygdrive/c/vc_redist</code></td> 1.2174 + </tr> 1.2175 + <tr valign="top"> 1.2176 + <td>set <code>ALT_COMPILER_PATH=/opt/my-gcc/bin/gcc</code></td> 1.2177 + <td>run <code>CC=/opt/my-gcc/bin/gcc configure</code> 1.2178 + or <code>CXX=/opt/my-gcc/bin/g++ configure</code> 1.2179 + </td> 1.2180 + </tr> 1.2181 + <tr valign="top"> 1.2182 + <td>set <code>BUILD_HEADLESS_ONLY=true</code></td> 1.2183 + <td>run <code>configure --disable-headful</code></td> 1.2184 + </tr> 1.2185 + <tr valign="top"> 1.2186 + <td>set <code>ALT_DEVTOOLS_PATH=/opt/mytools</code></td> 1.2187 + <td>just run <code>configure</code>, 1.2188 + your tools should be detected automatically. 1.2189 + If you have an unusual configuration, 1.2190 + add the tools directory to your <code>PATH</code>. 1.2191 + </td> 1.2192 + </tr> 1.2193 + <tr valign="top"> 1.2194 + <td>set <code>ALT_DROPS_DIR=/home/user/dropdir</code></td> 1.2195 + <td>source drops are not used anymore</td> 1.2196 + </tr> 1.2197 + <tr valign="top"> 1.2198 + <td>set <code>USE_ONLY_BOOTDIR_TOOLS=true</code></td> 1.2199 + <td>not needed, <code>configure</code> should always do the Right Thing automatically</td> 1.2200 + </tr> 1.2201 + <tr valign="top"> 1.2202 + <td>set <code>ALT_JDK_IMPORT_PATH=/opt/java/import-jdk</code> 1.2203 + or <code>ALT_BUILD_JDK_IMPORT_PATH=/opt/java/import-jdk</code> 1.2204 + </td> 1.2205 + <td>Importing JDKs is no longer possible, 1.2206 + but hotspot can be imported using 1.2207 + <code>--with-import-hotspot</code>. 1.2208 + Documentation on how to achieve a 1.2209 + similar solution will come soon! 1.2210 + </td> 1.2211 + </tr> 1.2212 + <tr valign="top"> 1.2213 + <td>set <code>EXTRA_CFLAGS=-Xfoo</code></td> 1.2214 + <td>run <code>CFLAGS=-Xfoo configure</code></td> 1.2215 + </tr> 1.2216 + <tr valign="top"> 1.2217 + <td>set <code>CROSS_COMPILE_ARCH=i586</code></td> 1.2218 + <td>see <a href="#sec7.3"> section 7.3, Cross-compilation</a></td> 1.2219 + </tr> 1.2220 + <tr valign="top"> 1.2221 + <td>set <code>SKIP_BOOT_CYCLE=false</code></td> 1.2222 + <td>Run <code>make bootcycle-images</code>.</td> 1.2223 + </tr> 1.2224 + </table> 1.2225 + 1.2226 + <h3><a name="variables">Environment/Make Variables</a></h3> 1.2227 + <p> 1.2228 + Some of the 1.2229 + environment or make variables (just called <b>variables</b> in this 1.2230 + document) that can impact the build are: 1.2231 + <blockquote> 1.2232 + <dl> 1.2233 + <dt><a name="path"><code>PATH</code></a> </dt> 1.2234 + <dd>Typically you want to set the <code>PATH</code> to include: 1.2235 + <ul> 1.2236 + <li>The location of the GNU make binary</li> 1.2237 + <li>The location of the Bootstrap JDK <code>java</code> 1.2238 + (see <a href="#bootjdk">Bootstrap JDK</a>)</li> 1.2239 + <li>The location of the C/C++ compilers 1.2240 + (see <a href="#compilers"><code>compilers</code></a>)</li> 1.2241 + <li>The location or locations for the Unix command utilities 1.2242 + (e.g. <code>/usr/bin</code>)</li> 1.2243 + </ul> 1.2244 + </dd> 1.2245 + <dt><code>MILESTONE</code> </dt> 1.2246 + <dd> 1.2247 + The milestone name for the build (<i>e.g.</i>"beta"). 1.2248 + The default value is "internal". 1.2249 + </dd> 1.2250 + <dt><code>BUILD_NUMBER</code> </dt> 1.2251 + <dd> 1.2252 + The build number for the build (<i>e.g.</i> "b27"). 1.2253 + The default value is "b00". 1.2254 + </dd> 1.2255 + <dt><a name="arch_data_model"><code>ARCH_DATA_MODEL</code></a></dt> 1.2256 + <dd>The <code>ARCH_DATA_MODEL</code> variable 1.2257 + is used to specify whether the build is to generate 32-bit or 64-bit 1.2258 + binaries. 1.2259 + The Solaris build supports either 32-bit or 64-bit builds, but 1.2260 + Windows and Linux will support only one, depending on the specific 1.2261 + OS being used. 1.2262 + Normally, setting this variable is only necessary on Solaris. 1.2263 + Set <code>ARCH_DATA_MODEL</code> to <code>32</code> for generating 32-bit binaries, 1.2264 + or to <code>64</code> for generating 64-bit binaries. 1.2265 + </dd> 1.2266 + <dt><a name="ALT_BOOTDIR"><code>ALT_BOOTDIR</code></a></dt> 1.2267 + <dd> 1.2268 + The location of the bootstrap JDK installation. 1.2269 + See <a href="#bootjdk">Bootstrap JDK</a> for more information. 1.2270 + You should always install your own local Bootstrap JDK and 1.2271 + always set <code>ALT_BOOTDIR</code> explicitly. 1.2272 + </dd> 1.2273 + <dt><a name="ALT_OUTPUTDIR"><code>ALT_OUTPUTDIR</code></a> </dt> 1.2274 + <dd> 1.2275 + An override for specifying the (absolute) path of where the 1.2276 + build output is to go. 1.2277 + The default output directory will be build/<i>platform</i>. 1.2278 + </dd> 1.2279 + <dt><a name="ALT_COMPILER_PATH"><code>ALT_COMPILER_PATH</code></a> </dt> 1.2280 + <dd> 1.2281 + The location of the C/C++ compiler. 1.2282 + The default varies depending on the platform. 1.2283 + </dd> 1.2284 + <dt><code><a name="ALT_CACERTS_FILE">ALT_CACERTS_FILE</a></code></dt> 1.2285 + <dd> 1.2286 + The location of the <a href="#cacerts">cacerts</a> file. 1.2287 + The default will refer to 1.2288 + <code>jdk/src/share/lib/security/cacerts</code>. 1.2289 + </dd> 1.2290 + <dt><a name="ALT_CUPS_HEADERS_PATH"><code>ALT_CUPS_HEADERS_PATH</code></a> </dt> 1.2291 + <dd> 1.2292 + The location of the CUPS header files. 1.2293 + See <a href="#cups">CUPS information</a> for more information. 1.2294 + If this path does not exist the fallback path is 1.2295 + <code>/usr/include</code>. 1.2296 + </dd> 1.2297 + <dt><a name="ALT_FREETYPE_LIB_PATH"><code>ALT_FREETYPE_LIB_PATH</code></a></dt> 1.2298 + <dd> 1.2299 + The location of the FreeType shared library. 1.2300 + See <a href="#freetype">FreeType information</a> for details. 1.2301 + </dd> 1.2302 + <dt><a name="ALT_FREETYPE_HEADERS_PATH"><code>ALT_FREETYPE_HEADERS_PATH</code></a></dt> 1.2303 + <dd> 1.2304 + The location of the FreeType header files. 1.2305 + See <a href="#freetype">FreeType information</a> for details. 1.2306 + </dd> 1.2307 + <dt><a name="ALT_JDK_DEVTOOLS_PATH"><code>ALT_JDK_DEVTOOLS_PATH</code></a></dt> 1.2308 + <dd> 1.2309 + The default root location of the devtools. 1.2310 + The default value is 1.2311 + <code>$(ALT_SLASH_JAVA)/devtools</code>. 1.2312 + </dd> 1.2313 + <dt><code><a name="ALT_DEVTOOLS_PATH">ALT_DEVTOOLS_PATH</a></code> </dt> 1.2314 + <dd> 1.2315 + The location of tools like the 1.2316 + <a href="#zip"><code>zip</code> and <code>unzip</code></a> 1.2317 + binaries, but might also contain the GNU make utility 1.2318 + (<code><i>gmake</i></code>). 1.2319 + So this area is a bit of a grab bag, especially on Windows. 1.2320 + The default value depends on the platform and 1.2321 + Unix Commands being used. 1.2322 + On Linux the default will be 1.2323 + <code>$(ALT_JDK_DEVTOOLS_PATH)/linux/bin</code>, 1.2324 + on Solaris 1.2325 + <code>$(ALT_JDK_DEVTOOLS_PATH)/<i>{sparc,i386}</i>/bin</code>, 1.2326 + and on Windows with CYGWIN 1.2327 + <code>/usr/bin</code>. 1.2328 + </dd> 1.2329 + <dt><a name="ALT_UNIXCCS_PATH"><code>ALT_UNIXCCS_PATH</code></a></dt> 1.2330 + <dd> 1.2331 + <strong>Solaris only:</strong> 1.2332 + An override for specifying where the Unix CCS 1.2333 + command set are located. 1.2334 + The default location is <code>/usr/ccs/bin</code> 1.2335 + </dd> 1.2336 + <dt><a name="ALT_SLASH_JAVA"><code>ALT_SLASH_JAVA</code></a></dt> 1.2337 + <dd> 1.2338 + The default root location for many of the ALT path locations 1.2339 + of the following ALT variables. 1.2340 + The default value is 1.2341 + <code>"/java"</code> on Solaris and Linux, 1.2342 + <code>"J:"</code> on Windows. 1.2343 + </dd> 1.2344 + 1.2345 + <dt><a name="ALT_OPENWIN_HOME"><code>ALT_OPENWIN_HOME</code></a></dt> 1.2346 + <dd> 1.2347 + The top-level directory of the libraries and include files 1.2348 + for the platform's 1.2349 + graphical programming environment. 1.2350 + The default location is platform specific. 1.2351 + For example, on Linux it defaults to <code>/usr/X11R6/</code>. 1.2352 + </dd> 1.2353 + <dt><strong>Windows specific:</strong></dt> 1.2354 + <dd> 1.2355 + <dl> 1.2356 + <dt><a name="ALT_WINDOWSSDKDIR"><code>ALT_WINDOWSSDKDIR</code></a> </dt> 1.2357 + <dd> 1.2358 + The location of the 1.2359 + Microsoft Windows SDK where some tools will be 1.2360 + located. 1.2361 + The default is whatever WINDOWSSDKDIR is set to 1.2362 + (or WindowsSdkDir) or the path 1.2363 + <br> 1.2364 + <code>c:\Program Files\Microsoft SDKs\Windows\v7.0a</code> 1.2365 + </dd> 1.2366 + <dt><code><a name="ALT_DXSDK_PATH">ALT_DXSDK_PATH</a></code> </dt> 1.2367 + <dd> 1.2368 + The location of the 1.2369 + <a href="#dxsdk">Microsoft DirectX 9 SDK</a>. 1.2370 + The default will be to try and use the DirectX environment 1.2371 + variable <code>DXSDK_DIR</code>, 1.2372 + failing that, look in <code>C:/DXSDK</code>. 1.2373 + </dd> 1.2374 + <dt><code><a name="ALT_MSVCRNN_DLL_PATH">ALT_MSVCRNN_DLL_PATH</a></code> </dt> 1.2375 + <dd> 1.2376 + The location of the 1.2377 + <a href="#msvcrNN"><code>MSVCR100.DLL</code></a>. 1.2378 + </dd> 1.2379 + </dl> 1.2380 + </dd> 1.2381 + <dt><strong>Cross-Compilation Support:</strong></dt> 1.2382 + <dd> 1.2383 + <dl> 1.2384 + <dt><a name="CROSS_COMPILE_ARCH"><code>CROSS_COMPILE_ARCH</code></a> </dt> 1.2385 + <dd> 1.2386 + Set to the target architecture of a 1.2387 + cross-compilation build. If set, this 1.2388 + variable is used to signify that we are 1.2389 + cross-compiling. The expectation 1.2390 + is that 1.2391 + <a href="#ALT_COMPILER_PATH"><code>ALT_COMPILER_PATH</code></a> 1.2392 + is set 1.2393 + to point to the cross-compiler and that any 1.2394 + cross-compilation specific flags 1.2395 + are passed using 1.2396 + <a href="#EXTRA_CFLAGS"><code>EXTRA_CFLAGS</code></a>. 1.2397 + The <a href="#ALT_OPENWIN_HOME"><code>ALT_OPENWIN_HOME</code></a> 1.2398 + variable should 1.2399 + also be set to point to the graphical header files 1.2400 + (e.g. X11) provided with 1.2401 + the cross-compiler. 1.2402 + When cross-compiling we skip execution of any demos 1.2403 + etc that may be built, and 1.2404 + also skip binary-file verification. 1.2405 + </dd> 1.2406 + <dt><code><a name="EXTRA_CFLAGS">EXTRA_CFLAGS</a></code> </dt> 1.2407 + <dd> 1.2408 + Used to pass cross-compilation options to the 1.2409 + cross-compiler. 1.2410 + These are added to the <code>CFLAGS</code> 1.2411 + and <code>CXXFLAGS</code> variables. 1.2412 + </dd> 1.2413 + <dt><code><a name="USE_ONLY_BOOTDIR_TOOLS">USE_ONLY_BOOTDIR_TOOLS</a></code> </dt> 1.2414 + <dd> 1.2415 + Used primarily for cross-compilation builds 1.2416 + (and always set in that case) 1.2417 + this variable indicates that tools from the 1.2418 + boot JDK should be used during 1.2419 + the build process, not the tools 1.2420 + (<code>javac</code>, <code>javah</code>, <code>jar</code>) 1.2421 + just built (which can't execute on the build host). 1.2422 + </dd> 1.2423 + <dt><code><a name="HOST_CC">HOST_CC</a></code> </dt> 1.2424 + <dd> 1.2425 + The location of the C compiler to generate programs 1.2426 + to run on the build host. 1.2427 + Some parts of the build generate programs that are 1.2428 + then compiled and executed 1.2429 + to produce other parts of the build. Normally the 1.2430 + primary C compiler is used 1.2431 + to do this, but when cross-compiling that would be 1.2432 + the cross-compiler and the 1.2433 + resulting program could not be executed. 1.2434 + On Linux this defaults to <code>/usr/bin/gcc</code>; 1.2435 + on other platforms it must be 1.2436 + set explicitly. 1.2437 + </dd> 1.2438 + </dl> 1.2439 + <dt><strong>Specialized Build Options:</strong></dt> 1.2440 + <dd> 1.2441 + Some build variables exist to support specialized build 1.2442 + environments and/or specialized 1.2443 + build products. Their use is only supported in those contexts: 1.2444 + <dl> 1.2445 + <dt><code><a name="BUILD_CLIENT_ONLY">BUILD_CLIENT_ONLY</a></code> </dt> 1.2446 + <dd> 1.2447 + Indicates this build will only contain the 1.2448 + Hotspot client VM. In addition to 1.2449 + controlling the Hotspot build target, 1.2450 + it ensures that we don't try to copy 1.2451 + any server VM files/directories, 1.2452 + and defines a default <code>jvm.cfg</code> file 1.2453 + suitable for a client-only environment. 1.2454 + Using this in a 64-bit build will 1.2455 + generate a sanity warning as 64-bit client 1.2456 + builds are not directly supported. 1.2457 + </dd> 1.2458 + <dt><code><a name="BUILD_HEADLESS_ONLY"></a>BUILD_HEADLESS_ONLY</code> </dt> 1.2459 + <dd> 1.2460 + Used when the build environment has no graphical 1.2461 + capabilities at all. This 1.2462 + excludes building anything that requires graphical 1.2463 + libraries to be available. 1.2464 + </dd> 1.2465 + <dt><code><a name="JAVASE_EMBEDDED"></a>JAVASE_EMBEDDED</code> </dt> 1.2466 + <dd> 1.2467 + Used to indicate this is a build of the Oracle 1.2468 + Java SE Embedded product. 1.2469 + This will enable the directives included in the 1.2470 + SE-Embedded specific build 1.2471 + files. 1.2472 + </dd> 1.2473 + <dt><code><a name="LIBZIP_CAN_USE_MMAP">LIBZIP_CAN_USE_MMAP</a></code> </dt> 1.2474 + <dd> 1.2475 + If set to false, disables the use of mmap by the 1.2476 + zip utility. Otherwise, 1.2477 + mmap will be used. 1.2478 + </dd> 1.2479 + <dt><code><a name="COMPRESS_JARS"></a>COMPRESS_JARS</code> </dt> 1.2480 + <dd> 1.2481 + If set to true, causes certain jar files that 1.2482 + would otherwise be built without 1.2483 + compression, to use compression. 1.2484 + </dd> 1.2485 + </dl> 1.2486 + </dd> 1.2487 + </dl> 1.2488 + </blockquote> 1.2489 + 1.2490 +</blockquote> <!-- Appendix D --> 1.2491 + 1.2492 + <!-- ====================================================== --> 1.2493 + <hr> 1.2494 + <p>End of OpenJDK README-builds.html document.<br>Please come again! 1.2495 + <hr> 1.2496 + 1.2497 + </body> 1.2498 +</html>