1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/README-builds.html Sat Dec 01 00:00:00 2007 +0000 1.3 @@ -0,0 +1,1452 @@ 1.4 +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 1.5 + 1.6 +<html> 1.7 +<head><title>OpenJDK Build README</title></head> 1.8 + 1.9 +<!-- ------------------------------------------------------ --> 1.10 +<hr noshade="noshade" size="3"> 1.11 + 1.12 +<center> 1.13 + <h1>OpenJDK Build README</h1> 1.14 +</center> 1.15 + 1.16 +<!-- ------------------------------------------------------ --> 1.17 +<hr noshade="noshade" size="3"> 1.18 + 1.19 +<h2><a name="introduction">Introduction</a></h2> 1.20 + 1.21 +<blockquote> 1.22 + <p> 1.23 + This README file contains build instructions for the 1.24 + <a href="http://openjdk.java.net">OpenJDK</a>. 1.25 + Building the source code for the 1.26 + OpenJDK 1.27 + requires 1.28 + a certain degree of technical expertise. 1.29 +</blockquote> 1.30 + 1.31 +<!-- ------------------------------------------------------ --> 1.32 +<hr noshade="noshade" size="3"> 1.33 + 1.34 +<h2><a name="contents">Contents</a></h2> 1.35 + 1.36 +<blockquote> 1.37 + <ul> 1.38 + <li><a href="#introduction">Introduction</a></li> 1.39 + <li><a href="#MBE">Minimum Build Environments</a></li> 1.40 + <li><a href="#SDBE">Specific Developer Build Environments</a></li> 1.41 + <li><a href="#directories">Source Directory Structure</a> </li> 1.42 + <li><a href="#building">Build Information</a> 1.43 + <ul type="disc"> 1.44 + <li><a href="#gmake">GNU Make (<tt><i>gmake</i></tt>)</a> </li> 1.45 + <li><a href="#linux">Basic Linux System Setup</a> </li> 1.46 + <li><a href="#solaris">Basic Solaris System Setup</a> </li> 1.47 + <li><a href="#windows">Basic Windows System Setup</a> </li> 1.48 + <li><a href="#dependencies">Build Dependencies</a> </li> 1.49 + <ul type="disc"> 1.50 + <li><a href="#bootjdk">Bootstrap JDK</a> </li> 1.51 + <li><a href="#binaryplugs">Binary Plugs</a> </li> 1.52 + <li><a href="#cacerts">Certificate Authority File (cacert)</a> </li> 1.53 + <li><a href="#compilers">Compilers</a> 1.54 + <ul> 1.55 + <li><a href="#msvc">Microsoft Visual Studio</a> </li> 1.56 + <li><a href="#mssdk">Microsoft Platform SDK</a> </li> 1.57 + <li><a href="#gcc">Linux gcc/binutils</a> </li> 1.58 + <li><a href="#studio">Sun Studio</a> </li> 1.59 + </ul> 1.60 + </li> 1.61 + <li>Linux and Solaris: 1.62 + <ul> 1.63 + <li><a href="#cups">CUPS Include files</a> </li> 1.64 + </ul> 1.65 + </li> 1.66 + <li>Windows only: 1.67 + <ul> 1.68 + <li>Unix Command Tools (<a href="#cygwin">CYGWIN</a>)</li> 1.69 + <li><a href="#dxsdk">DirectX 9.0 SDK</a> </li> 1.70 + </ul> 1.71 + </li> 1.72 + </ul> 1.73 + </ul> 1.74 + </li> 1.75 + <li><a href="#creating">Creating the Build</a> </li> 1.76 + <li><a href="#testing">Testing the Build</a> </li> 1.77 + <li><a href="#variables">Environment/Make Variables</a></li> 1.78 + <li><a href="#troubleshooting">Troubleshooting</a></li> 1.79 + </ul> 1.80 +</blockquote> 1.81 + 1.82 +<!-- ------------------------------------------------------ --> 1.83 +<hr noshade="noshade" size="3"> 1.84 + 1.85 +<h2><a name="MBE">Minimum Build Environments</a></h2> 1.86 + 1.87 +<blockquote> 1.88 + <p> 1.89 + This file often describes specific requirements for what we call the 1.90 + "minimum build environments" (MBE) for the JDK. 1.91 + Building with the MBE will generate the most compatible 1.92 + bits that install on, and run correctly on, the most variations 1.93 + of the same base OS and hardware architecture. 1.94 + These usually represent what is often called the 1.95 + least common denominator platforms. 1.96 + It is understood that most developers will NOT be using these 1.97 + specific platforms, and in fact creating these specific platforms 1.98 + may be difficult due to the age of some of this software. 1.99 + <p> 1.100 + 1.101 + <p> 1.102 + The minimum OS and C/C++ compiler versions needed for building the 1.103 + OpenJDK: 1.104 + <p> 1.105 + <center> 1.106 + <table border="1"> 1.107 + <thead> 1.108 + <tr> 1.109 + <th>Base OS and Architecture</th> 1.110 + <th>OS</th> 1.111 + <th>Compiler</th> 1.112 + </tr> 1.113 + </thead> 1.114 + <tbody> 1.115 + <tr> 1.116 + <td>Linux X86 (32bit)</td> 1.117 + <td>Red Hat Enterprise Linux 4 </td> 1.118 + <td>gcc 4 </td> 1.119 + </tr> 1.120 + <tr> 1.121 + <td>Linux X64 (64bit)</td> 1.122 + <td>Red Hat Enterprise Linux 4 </td> 1.123 + <td>gcc 4 </td> 1.124 + </tr> 1.125 + <tr> 1.126 + <td>Solaris SPARC (32bit)</td> 1.127 + <td>Solaris 10 + patches 1.128 + <br> 1.129 + See <a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/JavaSE">SunSolve</a> for patch downloads. 1.130 + </td> 1.131 + <td>Sun Studio 11 </td> 1.132 + </tr> 1.133 + <tr> 1.134 + <td>Solaris SPARCV9 (64bit)</td> 1.135 + <td>Solaris 10 + patches 1.136 + <br> 1.137 + See <a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/JavaSE">SunSolve</a> for patch downloads. 1.138 + </td> 1.139 + <td>Sun Studio 11</td> 1.140 + </tr> 1.141 + <tr> 1.142 + <td>Solaris X86 (32bit)</td> 1.143 + <td>Solaris 10 + patches 1.144 + <br> 1.145 + See <a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/JavaSE">SunSolve</a> for patch downloads. 1.146 + </td> 1.147 + <td>Sun Studio 11</td> 1.148 + </tr> 1.149 + <tr> 1.150 + <td>Solaris X64 (64bit)</td> 1.151 + <td>Solaris 10 + patches 1.152 + <br> 1.153 + See <a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/JavaSE">SunSolve</a> for patch downloads. 1.154 + </td> 1.155 + <td>Sun Studio 11</td> 1.156 + </tr> 1.157 + <tr> 1.158 + <td>Windows X86 (32bit)</td> 1.159 + <td>Windows XP</td> 1.160 + <td>Microsoft Visual Studio .NET 2003 Professional</td> 1.161 + </tr> 1.162 + <tr> 1.163 + <td>Windows X64 (64bit)</td> 1.164 + <td>Windows Server 2003 - Enterprise x64 Edition</td> 1.165 + <td>Microsoft Platform SDK - April 2005</td> 1.166 + </tr> 1.167 + </tbody> 1.168 + </table> 1.169 + </center> 1.170 +</blockquote> 1.171 + 1.172 +<!-- ------------------------------------------------------ --> 1.173 +<hr noshade="noshade" size="3"> 1.174 + 1.175 +<h2><a name="SDBE">Specific Developer Build Environments</a></h2> 1.176 + 1.177 +<blockquote> 1.178 + <p> 1.179 + We won't be listing all the possible environments, but 1.180 + we will try to provide what information we have available to us. 1.181 +</blockquote> 1.182 + 1.183 +<h3><a name="fedora">Fedora</a></h3> 1.184 + 1.185 +<blockquote> 1.186 + TBD 1.187 +</blockquote> 1.188 + 1.189 +<h3><a name="debian">Debian</a></h3> 1.190 + 1.191 +<blockquote> 1.192 + TBD 1.193 +</blockquote> 1.194 + 1.195 +<h3><a name="ubuntu">Ubuntu</a></h3> 1.196 + 1.197 +<blockquote> 1.198 + <p> 1.199 + In addition to needing the Bootstrap JDK and the Binary Plugs, 1.200 + when building on Ubuntu you will need to 1.201 + make sure certain packages are installed. 1.202 + In particular, certain X11 packages, make, m4, gawk, gcc 4, 1.203 + binutils, cups, freetype 1.204 + and alsa. 1.205 + 1.206 + <h4>Ubuntu 6.06</h4> 1.207 + 1.208 + <p> 1.209 + The following list of packages for Ubuntu 6.06 is a working set that 1.210 + does appear to work. 1.211 + 1.212 + <p> 1.213 + <b>Note that it's quite possible that some of these 1.214 + packages are not required, so anyone discovering that some of the 1.215 + packages listed below are NOT required, 1.216 + please let the 1.217 + OpenJDK 1.218 + team know.</b> 1.219 + <p> 1.220 + All the packages below can be installed with the 1.221 + Synaptic Package manager provided with the base Ubuntu 6.06 release. 1.222 + 1.223 + <blockquote> 1.224 + <ul> 1.225 + <li>binutils (2.16.1cvs20060117-1ubuntu2.1)</li> 1.226 + <li>cpp (4:4.0.3-1)</li> 1.227 + <li>cpp-4.0 (4.0.3-1ubuntu5)</li> 1.228 + <li>libfreetype6-dev</li> 1.229 + <li>g++ (4:4.0.3-1)</li> 1.230 + <li>g++-4.0 (4.0.3-1ubuntu5)</li> 1.231 + <li>gawk (1:3.1.5-2build1)</li> 1.232 + <li>gcc (4:4.0.3-1)</li> 1.233 + <li>gcc-4.0 (4.0.3-1ubuntu5)</li> 1.234 + <li>libasound2-dev (1.0.10-2ubuntu4)</li> 1.235 + <li>libc6 (2.3.6-0ubuntu20) to 2.3.6-0ubuntu20.4</li> 1.236 + <li>libc6-dev (2.3.6-0ubuntu20.4)</li> 1.237 + <li>libc6-i686 (2.3.6-0ubuntu20) to 2.3.6-0ubuntu20.4</li> 1.238 + <li>libcupsys2-dev (1.2.2-0ubuntu0.6.06)</li> 1.239 + <li>libgcrypt11-dev (1.2.2-1)</li> 1.240 + <li>libgnutls-dev (1.2.9-2ubuntu1.1)</li> 1.241 + <li>libgnutls12 (1.2.9-2ubuntu1) to 1.2.9-2ubuntu1.1</li> 1.242 + <li>libgpg-error-dev (1.1-4)</li> 1.243 + <li>libice-dev (2:1.0.0-0ubuntu2)</li> 1.244 + <li>liblockfile1 (1.06.1)</li> 1.245 + <li>libopencdk8-dev (0.5.7-2)</li> 1.246 + <li>libpopt-dev (1.7-5)</li> 1.247 + <li>libsm-dev (2:1.0.0-0ubuntu2)</li> 1.248 + <li>libstdc++6-4.0-dev (4.0.3-1ubuntu5)</li> 1.249 + <li>libtasn1-2-dev (0.2.17-1ubuntu1)</li> 1.250 + <li>libx11-dev (2:1.0.0-0ubuntu9)</li> 1.251 + <li>libxau-dev (1:1.0.0-0ubuntu4)</li> 1.252 + <li>libxaw-headers (2:1.0.1-0ubuntu3)</li> 1.253 + <li>libxaw7-dev (2:1.0.1-0ubuntu3)</li> 1.254 + <li>libxdmcp-dev (1:1.0.0-0ubuntu2)</li> 1.255 + <li>libxext-dev (2:1.0.0-0ubuntu4)</li> 1.256 + <li>libxi-dev (2:1.0.0-0ubuntu3) </li> 1.257 + <li>libxmu-dev (2:1.0.0-0ubuntu3)</li> 1.258 + <li>libxmu-headers (2:1.0.0-0ubuntu3)</li> 1.259 + <li>libxmuu-dev (2:1.0.0-0ubuntu3)</li> 1.260 + <li>libxp-dev (6.8.2-11ubuntu2)</li> 1.261 + <li>libxpm-dev (1:3.5.4.2-0ubuntu3)</li> 1.262 + <li>libxrandr-dev (1:1.1.0.2-0ubuntu4)</li> 1.263 + <li>libxt-dev (1:1.0.0-0ubuntu3)</li> 1.264 + <li>libxtrap-dev (2:1.0.0-0ubuntu2)</li> 1.265 + <li>libxtst-dev (2:1.0.1-0ubuntu2)</li> 1.266 + <li>libxv-dev (2:1.0.1-0ubuntu3)</li> 1.267 + <li>linux-kernel-headers (2.6.11.2-0ubuntu18)</li> 1.268 + <li>m4 (1.4.4-1)</li> 1.269 + <li>make (3.80+3.81.b4-1)</li> 1.270 + <li>ssl-cert (1.0.13)</li> 1.271 + <li>x-dev (7.0.4-0ubuntu2)</li> 1.272 + <li>x11proto-core-dev (7.0.4-0ubuntu2)</li> 1.273 + <li>x11proto-input-dev (1.3.2-0ubuntu2)</li> 1.274 + <li>x11proto-kb-dev (1.0.2-0ubuntu2)</li> 1.275 + <li>x11proto-randr-dev (1.1.2-0ubuntu2)</li> 1.276 + <li>x11proto-record-dev (1.13.2-0ubuntu2)</li> 1.277 + <li>x11proto-trap-dev (3.4.3-0ubuntu2)</li> 1.278 + <li>x11proto-video-dev (2.2.2-0ubuntu2)</li> 1.279 + <li>x11proto-xext-dev (7.0.2-0ubuntu2)</li> 1.280 + <li>xlibs-dev (7.0.0-0ubuntu45)</li> 1.281 + <li>zlib1g-dev (1:1.2.3-6ubuntu4)</li> 1.282 + </ul> 1.283 + </blockquote> 1.284 + 1.285 + <h4>Ubuntu 7.04</h4> 1.286 + 1.287 + <p> 1.288 + Using the Synaptic Package Manager, download the following 1.289 + packages (double indented packages are automatically aquired 1.290 + due to package dependencies): 1.291 + 1.292 + <blockquote> 1.293 + <ul> 1.294 + <li>build-essential</li> 1.295 + <ul> 1.296 + <li>dpkg-dev</li> 1.297 + <li>g++</li> 1.298 + <li>g++-4.1</li> 1.299 + <li>libc6-dev</li> 1.300 + <li>libstdc++6.4.1-dev</li> 1.301 + <li>linux-libc-dev</li> 1.302 + </ul> 1.303 + <li>gawk</li> 1.304 + <li>m4</li> 1.305 + <li>libasound2-dev</li> 1.306 + <li>libcupsys2-dev</li> 1.307 + <ul> 1.308 + <li>libgcrypt11-dev</li> 1.309 + <li>lgnutls-dev</li> 1.310 + <li>libgpg-error-dev</li> 1.311 + <li>liblzo-dev</li> 1.312 + <li>libopencdk8-dev</li> 1.313 + <li>libpopt-dev</li> 1.314 + <li>libtasn1-3-dev</li> 1.315 + <li>zlib1g-dev</li> 1.316 + </ul> 1.317 + <li>sun-java6-jdk</li> 1.318 + <ul> 1.319 + <li>java-common</li> 1.320 + <li>libltdl3</li> 1.321 + <li>odbcinst1debian1</li> 1.322 + <li>sun-java6-bin</li> 1.323 + <li>sun-java6-jre</li> 1.324 + <li>unixodbc</li> 1.325 + </ul> 1.326 + <li>xlibs-dev</li> 1.327 + <ul> 1.328 + <li>(many)</li> 1.329 + </ul> 1.330 + <li>x11proto-print-dev</li> 1.331 + <li>libxaw7-dev</li> 1.332 + <ul> 1.333 + <li>libxaw-headers</li> 1.334 + </ul> 1.335 + <li>libxp-dev</li> 1.336 + <li>libfreetype6-dev</li> 1.337 + </ul> 1.338 + </blockquote> 1.339 +</blockquote> 1.340 + 1.341 +<!-- ------------------------------------------------------ --> 1.342 +<hr noshade="noshade" size="3"> 1.343 + 1.344 +<h2><a name="directories">Source Directory Structure</a></h2> 1.345 + 1.346 +<blockquote> 1.347 + <p> 1.348 + The source code for the 1.349 + OpenJDK is 1.350 + delivered in <i>3</i> sibling directories: 1.351 + <tt>hotspot</tt>, 1.352 + <tt>langtools</tt>, 1.353 + <tt>corba</tt>, 1.354 + <tt>jaxws</tt>, 1.355 + <tt>jaxp</tt>, 1.356 + <tt>jdk</tt> 1.357 + and 1.358 + The <tt>hotspot</tt> directory contains the source code and make 1.359 + files for 1.360 + building the 1.361 + OpenJDK 1.362 + Hotspot Virtual Machine. 1.363 + The <tt>jdk</tt> 1.364 + directory contains the source code and make files for 1.365 + building the 1.366 + OpenJDK 1.367 + runtime libraries, tools and demos. 1.368 + The top level Makefile is used to build the complete OpenJDK 1.369 + release including building the hotspot 1.370 + VM, staging the VM binaries, and building the 1.371 + OpenJDK 1.372 + runtime libraries, 1.373 + tools and demos. 1.374 +</blockquote> 1.375 + 1.376 +<!-- ------------------------------------------------------ --> 1.377 +<hr noshade="noshade" size="3"> 1.378 + 1.379 +<h2><a name="building">Build Information</a></h2> 1.380 + 1.381 +<blockquote> 1.382 + <p> 1.383 + Building the 1.384 + OpenJDK 1.385 + is done with a <tt><i>gmake</i></tt> 1.386 + command line and various 1.387 + environment or make variable settings that direct the make rules 1.388 + to where various components have been installed. 1.389 + Where possible the makefiles will attempt to located the various 1.390 + components in the default locations or any component specific 1.391 + variable settings. 1.392 + When the normal defaults fail or components cannot be found, 1.393 + the various 1.394 + <tt>ALT_*</tt> variables (alternates) 1.395 + can be used to help the makefiles locate components. 1.396 + <p> 1.397 + Refer to the bash/sh/ksh setup file 1.398 + <tt>jdk/make/jdk_generic_profile.sh</tt> 1.399 + if you need help in setting up your environment variables. 1.400 + A build could be as simple as: 1.401 + <blockquote> 1.402 + <pre><tt> 1.403 + bash 1.404 + . jdk/make/jdk_generic_profile.sh 1.405 + <i>gmake</i> sanity && <i>gmake</i> 1.406 + </tt></pre> 1.407 + </blockquote> 1.408 + <p> 1.409 + Of course ksh or sh would work too. 1.410 + But some customization will probably be necessary. 1.411 + The <tt>sanity</tt> rule will make some basic checks on build 1.412 + dependencies and generate appropriate warning messages 1.413 + regarding missing, out of date, or newer than expected components 1.414 + found on your system. 1.415 +</blockquote> 1.416 + 1.417 +<!-- ------------------------------------------------------ --> 1.418 +<hr noshade="noshade" size="3"> 1.419 + 1.420 +<h3><a name="gmake">GNU make (<tt><i>gmake</i></tt>)</a></h3> 1.421 + 1.422 +<blockquote> 1.423 + <p> 1.424 + The Makefiles in the 1.425 + OpenJDK 1.426 + are only valid when used with the 1.427 + GNU version of the utility command <tt>make</tt> 1.428 + (<tt><i>gmake</i></tt>). 1.429 + A few notes about using GNU make: 1.430 + <ul> 1.431 + <li> 1.432 + In general, you need GNU make version 3.78.1 or newer. 1.433 + </li> 1.434 + <li> 1.435 + Place the location of the GNU make binary in the <tt>PATH</tt>. 1.436 + </li> 1.437 + <li> 1.438 + <strong>Linux:</strong> 1.439 + The <tt>/usr/bin/make</tt> command should work fine for you. 1.440 + </li> 1.441 + <li> 1.442 + <strong>Solaris:</strong> 1.443 + Do NOT use <tt>/usr/bin/make</tt> on Solaris. 1.444 + If your Solaris system has the software 1.445 + from the Solaris Companion CD installed, 1.446 + you should use <tt>gmake</tt> 1.447 + which will be located in either the <tt>/opt/sfw/bin</tt> or 1.448 + <tt>/usr/sfw/bin</tt> directory. 1.449 + </li> 1.450 + <li> 1.451 + <strong>Windows:</strong> 1.452 + Make sure you start your build inside a bash/sh/ksh shell. 1.453 + <br> 1.454 + <b>WARNING:</b> Watch out for make version 3.81, it may 1.455 + not work due to a lack of support for drive letter paths 1.456 + like <tt>C:/</tt>. Use a 3.80 version, or find a newer 1.457 + version that has this problem fixed. 1.458 + </li> 1.459 + </ul> 1.460 + <p> 1.461 + Information on GNU make, and access to ftp download sites, are 1.462 + available on the 1.463 + <a href="http://www.gnu.org/software/make/make.html"> 1.464 + GNU make web site 1.465 + </a>. 1.466 + The latest source to GNU make is available at 1.467 + <a href="http://ftp.gnu.org/pub/gnu/make/">ftp.gnu.org/pub/gnu/make/</a>. 1.468 +</blockquote> 1.469 + 1.470 +<!-- ------------------------------------------------------ --> 1.471 +<hr noshade="noshade" size="3"> 1.472 + 1.473 +<h3><a name="linux">Basic Linux System Setup</a></h3> 1.474 + 1.475 +<blockquote> 1.476 + <p> 1.477 + <strong>i586 only:</strong> 1.478 + The minimum recommended hardware for building the Linux version 1.479 + is a Pentium class processor or better, at least 256 MB of RAM, and 1.480 + approximately 1.5 GB of free disk space. 1.481 + <p> 1.482 + <strong>X64 only:</strong> 1.483 + The minimum recommended hardware for building the Linux 1.484 + version is an AMD Opteron class processor, at least 512 MB of RAM, and 1.485 + approximately 4 GB of free disk space. 1.486 + <p> 1.487 + The build will use the tools contained in 1.488 + <tt>/bin</tt> and 1.489 + <tt>/usr/bin</tt> 1.490 + of a standard installation of the Linux operating environment. 1.491 + You should ensure that these directories are in your 1.492 + <tt>PATH</tt>. 1.493 + <p> 1.494 + Note that some Linux systems have a habit of pre-populating 1.495 + your environment variables for you, for example <tt>JAVA_HOME</tt> 1.496 + might get pre-defined for you to refer to the JDK installed on 1.497 + your Linux system. 1.498 + You will need to unset <tt>JAVA_HOME</tt>. 1.499 + It's a good idea to run <tt>env</tt> and verify the 1.500 + environment variables you are getting from the default system 1.501 + settings make sense for building the 1.502 + OpenJDK. 1.503 +</blockquote> 1.504 + 1.505 +<!-- ------------------------------------------------------ --> 1.506 + 1.507 +<h4><a name="linux_checklist">Basic Linux Check List</a></h4> 1.508 + 1.509 +<blockquote> 1.510 + <ol> 1.511 + <li> 1.512 + Install the 1.513 + <a href="#bootjdk">Bootstrap JDK</a>, set 1.514 + <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>. 1.515 + </li> 1.516 + <li> 1.517 + Install the 1.518 + <a href="#binaryplugs">Binary Plugs</a>, set 1.519 + <tt><a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</a></tt>. 1.520 + </li> 1.521 + <li> 1.522 + Install or upgrade the <a href="#freetype">FreeType development 1.523 + package</a>. 1.524 + </li> 1.525 + </ol> 1.526 +</blockquote> 1.527 + 1.528 +<!-- ------------------------------------------------------ --> 1.529 +<hr noshade="noshade" size="3"> 1.530 + 1.531 +<h3><a name="solaris">Basic Solaris System Setup</a></h3> 1.532 + 1.533 +<blockquote> 1.534 + <p> 1.535 + The minimum recommended hardware for building the 1.536 + Solaris SPARC version is an UltraSPARC with 512 MB of RAM. 1.537 + For building 1.538 + the Solaris x86 version, a Pentium class processor or better and at 1.539 + least 128 MB of RAM are recommended. 1.540 + Approximately 1.4 GB of free disk 1.541 + space is needed for a 32-bit build. 1.542 + <p> 1.543 + If you are building the 64bit version, you should 1.544 + run the command "isainfo -v" to verify that you have a 1.545 + 64-bit installation. 1.546 + An additional 7 GB of free disk space is needed 1.547 + for a 64-bit build. 1.548 + <p> 1.549 + The build uses the tools contained in <tt>/usr/ccs/bin</tt> 1.550 + and <tt>/usr/bin</tt> of a standard developer or full installation of 1.551 + the Solaris operating environment. 1.552 +</blockquote> 1.553 + 1.554 +<!-- ------------------------------------------------------ --> 1.555 + 1.556 +<h4><a name="solaris_checklist">Basic Solaris Check List</a></h4> 1.557 + 1.558 +<blockquote> 1.559 + <ol> 1.560 + <li> 1.561 + Install the 1.562 + <a href="#bootjdk">Bootstrap JDK</a>, set 1.563 + <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>. 1.564 + </li> 1.565 + <li> 1.566 + Install the 1.567 + <a href="#binaryplugs">Binary Plugs</a>, set 1.568 + <tt><a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</a></tt>. 1.569 + </li> 1.570 + <li> 1.571 + Install the 1.572 + <a href="#studio">Sun Studio Compilers</a>, set 1.573 + <a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a>. 1.574 + </li> 1.575 + <li> 1.576 + Install the 1.577 + <a href="#cups">CUPS Include files</a>, set 1.578 + <tt><a href="#ALT_CUPS_HEADERS_PATH">ALT_CUPS_HEADERS_PATH</a></tt>. 1.579 + </li> 1.580 + </ol> 1.581 +</blockquote> 1.582 + 1.583 +<!-- ------------------------------------------------------ --> 1.584 +<hr noshade="noshade" size="3"> 1.585 + 1.586 +<h3><a name="windows">Basic Windows System Setup</a></h3> 1.587 + 1.588 +<blockquote> 1.589 + <p> 1.590 + <strong>i586 only:</strong> 1.591 + The minimum recommended hardware for building the 32bit or X86 1.592 + Windows version is an Pentium class processor or better, at least 1.593 + 512 MB of RAM, and approximately 600 MB of free disk space. 1.594 + <strong> 1.595 + NOTE: The Windows 2000 build machines need to use the 1.596 + file system NTFS. 1.597 + Build machines formatted to FAT32 will not work 1.598 + because FAT32 doesn't support case-sensitivity in file names. 1.599 + </strong> 1.600 + <p> 1.601 + <strong>X64 only:</strong> 1.602 + The minimum recommended hardware for building 1.603 + the Windows X64 version is an AMD Opteron class processor, at least 1 1.604 + GB of RAM, and approximately 10 GB of free disk space. 1.605 +</blockquote> 1.606 + 1.607 +<!-- ------------------------------------------------------ --> 1.608 + 1.609 +<h4><a name="paths">Windows Paths</a></h4> 1.610 + 1.611 +<blockquote> 1.612 + <p> 1.613 + <strong>Windows:</strong> 1.614 + Note that GNU make is a historic utility and is based very 1.615 + heavily on shell scripting, so it does not tolerate the Windows habit 1.616 + of having spaces in pathnames or the use of the <tt>\</tt>characters in pathnames. 1.617 + Luckily on most Windows systems, you can use <tt>/</tt>instead of \, and 1.618 + there is always a 'short' pathname without spaces for any path that 1.619 + contains spaces. 1.620 + Unfortunately, this short pathname can be somewhat dynamic and the 1.621 + formula is difficult to explain. 1.622 + You can use <tt>cygpath</tt> utility to map pathnames with spaces 1.623 + or the <tt>\</tt>character into the <tt>C:/</tt> style of pathname 1.624 + (called 'mixed'), e.g. 1.625 + <tt>cygpath -s -m "<i>path</i>"</tt>. 1.626 + <p> 1.627 + The makefiles will try to translate any pathnames supplied 1.628 + to it into the <tt>C:/</tt> style automatically. 1.629 + <p> 1.630 + Note that use of CYGWIN creates a unique problem with regards to 1.631 + setting <a href="#path"><tt>PATH</tt></a>. Normally on Windows 1.632 + the <tt>PATH</tt> variable contains directories 1.633 + separated with the ";" character (Solaris and Linux uses ":"). 1.634 + With CYGWIN, it uses ":", but that means that paths like "C:/path" 1.635 + cannot be placed in the CYGWIN version of <tt>PATH</tt> and 1.636 + instead CYGWIN uses something like <tt>/cygdrive/c/path</tt> 1.637 + which CYGWIN understands, but only CYGWIN understands. 1.638 + So be careful with paths on Windows. 1.639 +</blockquote> 1.640 + 1.641 +<!-- ------------------------------------------------------ --> 1.642 + 1.643 +<h4><a name="windows_checklist">Basic Windows Check List</a></h4> 1.644 + 1.645 +<blockquote> 1.646 + <ol> 1.647 + <li> 1.648 + Install the 1.649 + <a href="#cygwin">CYGWIN product</a>. 1.650 + </li> 1.651 + <li> 1.652 + Install the 1.653 + <a href="#bootjdk">Bootstrap JDK</a>, set 1.654 + <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>. 1.655 + </li> 1.656 + <li> 1.657 + Install the 1.658 + <a href="#binaryplugs">Binary Plugs</a>, set 1.659 + <tt><a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</a></tt>.. 1.660 + </li> 1.661 + <li> 1.662 + Install the 1.663 + <a href="#msvc">Microsoft Visual Studio .NET 2003 Professional</a> or the 1.664 + <a href="#mssdk">Microsoft Platform SDK</a>. 1.665 + </li> 1.666 + <li> 1.667 + Setup all environment variables for compilers 1.668 + (see <a href="#msvc">compilers</a>). 1.669 + </li> 1.670 + <li> 1.671 + Install 1.672 + <a href="#dxsdk">Microsoft DirectX SDK</a>. 1.673 + </li> 1.674 + </ol> 1.675 +</blockquote> 1.676 + 1.677 +<!-- ------------------------------------------------------ --> 1.678 +<hr noshade="noshade" size="3"> 1.679 + 1.680 +<h3><a name="dependencies">Build Dependencies</a></h3> 1.681 + 1.682 +<blockquote> 1.683 + <p> 1.684 + Depending on the platform, the 1.685 + OpenJDK 1.686 + build process has some basic 1.687 + dependencies on components not part of the 1.688 + OpenJDK 1.689 + sources. 1.690 + Some of these are specific to a platform, some even specific to 1.691 + an architecture. 1.692 + Each dependency will have a set of ALT variables that can be set 1.693 + to tell the makefiles where to locate the component. 1.694 + In most cases setting these ALT variables may not be necessary 1.695 + and the makefiles will find defaults on the system in standard 1.696 + install locations or through component specific variables. 1.697 + 1.698 + <h4><a name="bootjdk">Bootstrap JDK</a></h4> 1.699 + 1.700 + <blockquote> 1.701 + <p> 1.702 + All 1.703 + OpenJDK 1.704 + builds require access to the previously released 1.705 + JDK 6, this is often called a bootstrap JDK. 1.706 + The JDK 6 binaries can be downloaded from Sun's 1.707 + <a href="http://java.sun.com/javase/1.6.0/download.html">JDK 6 download site</a>. 1.708 + For build performance reasons 1.709 + is very important that this bootstrap JDK be made available on the 1.710 + local disk of the machine doing the build. 1.711 + You should always set 1.712 + <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt> 1.713 + to point to the location of 1.714 + the bootstrap JDK installation, this is the directory pathname 1.715 + that contains a <tt>bin, lib, and include</tt> 1.716 + It's also a good idea to also place its <tt>bin</tt> directory 1.717 + in the <tt>PATH</tt> environment variable, although it's 1.718 + not required. 1.719 + <p> 1.720 + <strong>Solaris:</strong> 1.721 + Some pre-installed JDK images may be available to you in the 1.722 + directory <tt>/usr/jdk/instances</tt>. 1.723 + If you don't set 1.724 + <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt> 1.725 + the makefiles will look in that location for a JDK it can use. 1.726 + </blockquote> 1.727 + 1.728 + <h4><a name="binaryplugs">Binary Plugs</a></h4> 1.729 + 1.730 + <blockquote> 1.731 + <p> 1.732 + Not all of the source code that makes up the JDK is available 1.733 + under an open-source license. 1.734 + In order to build an OpenJDK binary from source code, 1.735 + you must first download and install the appropriate 1.736 + binary plug bundles from the OpenJDK Download area. 1.737 + During the OpenJDK build process these "binary plugs" 1.738 + for the encumbered components will be copied into your 1.739 + resulting OpenJDK binary build image. 1.740 + These binary plug files are only for the purpose of 1.741 + building an OpenJDK binary. 1.742 + Download the Binary Plugs by selecting the <b>Downloads</b> 1.743 + link at 1.744 + <a href="http://openjdk.java.net/">the OpenJDK site</a>, 1.745 + install the bundle, 1.746 + and make sure you set 1.747 + <tt><a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</a></tt> 1.748 + to the root of this installation. 1.749 + </blockquote> 1.750 + 1.751 + <h4><a name="cacerts">Certificate Authority File (cacert)</a></h4> 1.752 + 1.753 + <blockquote> 1.754 + <p> 1.755 + See <a href="http://en.wikipedia.org/wiki/CAcert"> 1.756 + www.wikipedia.org/wiki/CAcert</a> 1.757 + for a better understanding of the Certificate Authority (CA). 1.758 + A certificates file named "cacerts" 1.759 + represents a system-wide keystore with CA certificates. 1.760 + In JDK and JRE 1.761 + binary bundles, the "cacerts" file contains root CA certificates from 1.762 + several public CAs (e.g., VeriSign, Thawte, and Baltimore). 1.763 + The source contain a cacerts file 1.764 + without CA root certificates. 1.765 + Formal JDK builders will need to secure 1.766 + permission from each public CA and include the certificates into their 1.767 + own custom cacerts file. 1.768 + Failure to provide a populated cacerts file 1.769 + will result in verification errors of a certificate chain during runtime. 1.770 + The variable 1.771 + <tt><a href="#ALT_CACERTS_FILE">ALT_CACERTS_FILE</a></tt> 1.772 + can be used to override the default location of the 1.773 + cacerts file that will get placed in your build. 1.774 + By default an empty cacerts file is provided and that should be 1.775 + fine for most JDK developers. 1.776 + </blockquote> 1.777 + 1.778 + <h4><a name="compilers">Compilers</a></h4> 1.779 + 1.780 + <blockquote> 1.781 + 1.782 + <a name="gcc"> 1.783 + <strong>Linux gcc/binutils</strong> 1.784 + </a> 1.785 + 1.786 + <blockquote> 1.787 + <p> 1.788 + The GNU gcc compiler version should be 3.2.2 or newer. 1.789 + The binutils package should be 2.11.93.0.2-11 or newer. 1.790 + The compiler used should be the default compiler installed 1.791 + in <tt>/usr/bin</tt>. 1.792 + </blockquote> 1.793 + 1.794 + <strong><a name="studio">Solaris: Sun Studio</a></strong> 1.795 + 1.796 + <blockquote> 1.797 + <p> 1.798 + At a minimum, the 1.799 + <a href="http://developers.sun.com/sunstudio/index.jsp"> 1.800 + Sun Studio 11 Compilers</a> 1.801 + (containing version 5.8 of the C and C++ compilers) is required, 1.802 + with patches from the 1.803 + <a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/patch-access"> 1.804 + SunSolve web site</a>. 1.805 + <p> 1.806 + Set 1.807 + <a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a> 1.808 + to point to the location of 1.809 + the compiler binaries, and place this location in the <tt>PATH</tt>. 1.810 + <p> 1.811 + The Sun Studio Express compilers at: 1.812 + <a href="http://developers.sun.com/sunstudio/downloads/express.jsp"> 1.813 + Sun Studio Express Download site</a> 1.814 + are also an option, although these compilers have not 1.815 + been extensively used yet. 1.816 + </blockquote> 1.817 + 1.818 + <a name="msvc"> 1.819 + <strong>Windows i586: Microsoft Visual Studio .NET 2003 Professional</strong> 1.820 + </a> 1.821 + 1.822 + <blockquote> 1.823 + <p> 1.824 + The 32-bit 1.825 + OpenJDK 1.826 + Windows build 1.827 + requires Microsoft Visual Studio .NET 2003 (VS2003) Professional 1.828 + Edition compiler. 1.829 + The compiler and other tools are expected to reside 1.830 + in the location defined by the variable <tt>VS71COMNTOOLS</tt> which 1.831 + is set by the Microsoft Visual Studio .NET installer. 1.832 + <p> 1.833 + Once the compiler is installed, 1.834 + it is recommended that you run <tt>VCVARS32.BAT</tt> 1.835 + to set the compiler environment variables 1.836 + <tt>MSVCDIR</tt>, 1.837 + <tt>INCLUDE</tt>, 1.838 + <tt>LIB</tt>, and 1.839 + <tt>PATH</tt> 1.840 + prior to building the 1.841 + OpenJDK. 1.842 + The above environment variables <b>MUST</b> be set. 1.843 + <p> 1.844 + The Microsoft Visual Studio .NET 2005 (VS2005) compiler 1.845 + will not work at this time due to the new runtime dll 1.846 + and the manifest requirements. 1.847 + </blockquote> 1.848 + 1.849 + <a name="mssdk"> 1.850 + <strong>Windows X64: Microsoft Platform SDK April 2005</strong> 1.851 + </a> 1.852 + 1.853 + <blockquote> 1.854 + <p> 1.855 + On <b>X64</b>, 1.856 + the Microsoft Platform Software 1.857 + Development Kit (SDK), April 2005 Edition compiler, is required for 1.858 + building the 1.859 + OpenJDK 1.860 + because it contains the C/C++ compiler. 1.861 + You will need to minimally install the Core SDK and 1.862 + the MDAC SDK features of this compiler. 1.863 + <p> 1.864 + Once the Platform SDK is installed, 1.865 + it is recommended that you run <tt>SetEnv.Cmd /X64</tt> 1.866 + to set the compiler environment variables 1.867 + <tt>MSSDK</tt>, 1.868 + <tt>MSTOOLS</tt>, 1.869 + <tt>INCLUDE</tt>, 1.870 + <tt>LIB</tt>, and 1.871 + <tt>PATH</tt> 1.872 + prior to building the 1.873 + OpenJDK. 1.874 + The above environment variables <b>MUST</b> be set. 1.875 + <p> 1.876 + Note that this compiler may say it's version is a 1.877 + Microsoft Visual Studio .NET 2005 (VS2005), but be careful, 1.878 + it will not match the official VS2005 product. 1.879 + This Platform SDK compiler is only used on X64 builds. 1.880 + </blockquote> 1.881 + 1.882 + </blockquote> 1.883 + 1.884 + <h4><a name="cups">Common UNIX Printing System (CUPS) Headers (Solaris & Linux)</a></h4> 1.885 + 1.886 + <blockquote> 1.887 + <p> 1.888 + <strong>Solaris:</strong> 1.889 + CUPS header files are required for building the 1.890 + OpenJDK on Solaris. 1.891 + The Solaris header files can be obtained by installing 1.892 + the package <strong>SFWcups</strong> from the Solaris Software 1.893 + Companion CD/DVD, these often will be installed into 1.894 + <tt>/opt/sfw/cups</tt>. 1.895 + <p> 1.896 + <strong>Linux:</strong> 1.897 + CUPS header files are required for building the 1.898 + OpenJDK on Linux. 1.899 + The Linux header files are usually available from a "cups" 1.900 + development package, it's recommended that you try and use 1.901 + the package provided by the particular version of Linux that 1.902 + you are using. 1.903 + <p> 1.904 + The CUPS header files can always be downloaded from 1.905 + <a href="http://www.cups.org">www.cups.org</a>. 1.906 + The variable 1.907 + <tt><a href="#ALT_CUPS_HEADERS_PATH">ALT_CUPS_HEADERS_PATH</a></tt> 1.908 + can be used to override the default location of the 1.909 + CUPS Header files. 1.910 + </blockquote> 1.911 + 1.912 + <h4><a name="freetype">FreeType 2</a></h4> 1.913 + 1.914 + <blockquote> 1.915 + <p> 1.916 + Version 2.3 or newer of FreeType is required for building the OpenJDK. 1.917 + On Unix systems required files can be available as part of your 1.918 + distribution (while you still may need to upgrade them). 1.919 + Note that you need development version of package that 1.920 + includes both FreeType library and header files. 1.921 + </p> 1.922 + <p> 1.923 + You can always download latest FreeType version from the 1.924 + <a href="http://www.freetype.org">FreeType website</a>. 1.925 + </p> 1.926 + <p> 1.927 + Makefiles will try to pick FreeType from /usr/lib and /usr/include. 1.928 + In case it is installed elsewhere you will need to set environment 1.929 + variables 1.930 + <tt><a href="#ALT_FREETYPE_LIB_PATH">ALT_FREETYPE_LIB_PATH</a></tt> 1.931 + and 1.932 + <tt><a href="#ALT_FREETYPE_HEADERS_PATH">ALT_FREETYPE_HEADERS_PATH</a></tt> 1.933 + to refer to place where library and header files are installed. 1.934 + </p> 1.935 + </blockquote> 1.936 + 1.937 + <h4><a name="alsa">Advanced Linux Sound Architecture (ALSA) (Linux only)</a></h4> 1.938 + 1.939 + <blockquote> 1.940 + <p> 1.941 + <strong>Linux only:</strong> 1.942 + Version 0.9.1 or newer of the ALSA files are 1.943 + required for building the 1.944 + OpenJDK on Linux. 1.945 + These Linux files are usually available from an "alsa" 1.946 + of "libasound" 1.947 + development package, it's recommended that you try and use 1.948 + the package provided by the particular version of Linux that 1.949 + you are using. 1.950 + The makefiles will check this emit a sanity error if it is 1.951 + missing or the wrong version. 1.952 + As a last resort you can go to the 1.953 + <a href="http://www.alsa-project.org" target="_blank"> 1.954 + Advanced Linux Sound Architecture Site</a>. 1.955 + </blockquote> 1.956 + 1.957 + <h4>Windows Specific Dependencies</h4> 1.958 + 1.959 + <blockquote> 1.960 + 1.961 + <strong>Unix Command Tools (<a name="cygwin">CYGWIN</a>)</strong> 1.962 + 1.963 + <blockquote> 1.964 + <p> 1.965 + The 1.966 + OpenJDK 1.967 + requires access to a set of unix command tools 1.968 + on Windows which can be supplied by 1.969 + <a href="http://www.cygwin.com">CYGWIN</a>. 1.970 + <p> 1.971 + The 1.972 + OpenJDK 1.973 + build 1.974 + requires CYGWIN version 1.5.12 or newer. 1.975 + Information about CYGWIN can 1.976 + be obtained from the CYGWIN website at 1.977 + <a href="http://www.cygwin.com">www.cygwin.com</a>. 1.978 + <p> 1.979 + By default CYGWIN doesn't install all the tools required for building 1.980 + the OpenJDK. 1.981 + Along with the default installation, you need to install 1.982 + the following tools. 1.983 + <blockquote> 1.984 + <table border="1"> 1.985 + <thead> 1.986 + <tr> 1.987 + <td>Binary Name</td> 1.988 + <td>Package</td> 1.989 + <td>Description</td> 1.990 + </tr> 1.991 + </thead> 1.992 + <tbody> 1.993 + <tr> 1.994 + <td>ar.exe</td> 1.995 + <td>Devel</td> 1.996 + <td>binutils: The GNU assembler, linker and binary 1.997 + utilities</td> 1.998 + </tr> 1.999 + <tr> 1.1000 + <td>make.exe</td> 1.1001 + <td>Devel</td> 1.1002 + <td>make: The GNU version of the 'make' utility</td> 1.1003 + </tr> 1.1004 + <tr> 1.1005 + <td>m4.exe</td> 1.1006 + <td>Interpreters</td> 1.1007 + <td>m4: GNU implementation of the traditional Unix macro 1.1008 + processor</td> 1.1009 + </tr> 1.1010 + <tr> 1.1011 + <td>cpio.exe</td> 1.1012 + <td>Utils</td> 1.1013 + <td>cpio: A program to manage archives of files</td> 1.1014 + </tr> 1.1015 + <tr> 1.1016 + <td>file.exe</td> 1.1017 + <td>Utils</td> 1.1018 + <td>file: Determines file type using 'magic' numbers</td> 1.1019 + </tr> 1.1020 + </tbody> 1.1021 + </table> 1.1022 + </blockquote> 1.1023 + </blockquote> 1.1024 + 1.1025 + <a name="dxsdk"> 1.1026 + <strong>Microsoft DirectX 9.0 SDK header files and libraries</strong> 1.1027 + </a> 1.1028 + 1.1029 + <blockquote> 1.1030 + <p> 1.1031 + Microsoft DirectX 9.0 SDK (Summer 2004) 1.1032 + headers are required for building 1.1033 + OpenJDK. 1.1034 + This SDK can be downloaded from 1.1035 + <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=FD044A42-9912-42A3-9A9E-D857199F888E&displaylang=en"> 1.1036 + Microsoft DirectX 9.0 SDK (Summer 2004)</a>. 1.1037 + If the link above becomes obsolete, the SDK can be found from 1.1038 + <a href="http://download.microsoft.com">the Microsoft Download Site</a> 1.1039 + (search with "DirectX 9.0 SDK Update Summer 2004"). 1.1040 + The location of this SDK can be set with 1.1041 + <tt><a href="#ALT_DXSDK_PATH">ALT_DXSDK_PATH</a></tt> 1.1042 + but it's normally found via the DirectX environment variable 1.1043 + <tt>DXSDK_DIR</tt>. 1.1044 + </blockquote> 1.1045 + 1.1046 + <a name="msvcrt"> 1.1047 + <strong><tt>MSVCRT.DLL</tt></strong> 1.1048 + </a> 1.1049 + 1.1050 + <blockquote> 1.1051 + <p> 1.1052 + <strong>i586 only:</strong> 1.1053 + The 1.1054 + OpenJDK 1.1055 + 32bit build requires 1.1056 + access to <tt>MSVCRT.DLL</tt> 1.1057 + version 6.00.8337.0 or newer. 1.1058 + If the <tt>MSVCRT.DLL</tt> is not installed in 1.1059 + the system32 directory set the 1.1060 + <a href="#ALT_MSVCRT_DLL_PATH"><tt>ALT_MSVCRT_DLL_PATH</tt></a> 1.1061 + variable to the location. 1.1062 + <p> 1.1063 + <strong>X64 only:</strong> 1.1064 + The OpenJDK 64bit build requires access to 1.1065 + <tt>MSVCRT.DLL</tt> version 7.0.3790.0 or newer, which is 1.1066 + usually supplied by the 1.1067 + <a href="#mssdk">Platform SDK</a>. 1.1068 + If it is not available from the Platform SDK, 1.1069 + set the 1.1070 + <a href="#ALT_MSVCRT_DLL_PATH"><tt>ALT_MSVCRT_DLL_PATH</tt></a> 1.1071 + variable to the location. 1.1072 + </blockquote> 1.1073 + 1.1074 + <a name="msvcr71"> 1.1075 + <strong><tt>MSVCR71.DLL</tt></strong> 1.1076 + </a> 1.1077 + 1.1078 + <blockquote> 1.1079 + <p> 1.1080 + <strong>i586 only:</strong> 1.1081 + The 1.1082 + OpenJDK 1.1083 + build requires access to 1.1084 + MSVCR71.DLL version 7.10.3052.4 or newer which should be 1.1085 + supplied by the 1.1086 + <a href="#msvc">Visual Studio product</a> 1.1087 + If the <tt>MSVCR71.DLL</tt> is not available from the 1.1088 + Visual Studio product 1.1089 + set the 1.1090 + <a href="#ALT_MSVCR71_DLL_PATH"><tt>ALT_MSVCR71_DLL_PATH</tt></a> 1.1091 + variable to the location. 1.1092 + </blockquote> 1.1093 + 1.1094 + </blockquote> 1.1095 + 1.1096 + 1.1097 +</blockquote> 1.1098 + 1.1099 + 1.1100 +<hr noshade="noshade" size="3"> 1.1101 + 1.1102 +<h2><a name="creating">Creating the Build</a></h2> 1.1103 + 1.1104 +<blockquote> 1.1105 + <p> 1.1106 + Once a machine is setup to build the 1.1107 + OpenJDK, 1.1108 + the steps to create the 1.1109 + build are fairly simple. 1.1110 + The various ALT settings can either be made into variables 1.1111 + or can be supplied on the 1.1112 + <a href="#gmake"><tt><i>gmake</i></tt></a> 1.1113 + command. 1.1114 + <p> 1.1115 + <ol> 1.1116 + <li>Use the sanity rule to double check all the ALT settings: 1.1117 + <blockquote> 1.1118 + <tt> 1.1119 + <i>gmake</i> 1.1120 + sanity 1.1121 + [ARCH_DATA_MODEL=<i>32 or 64</i>] 1.1122 + [other "ALT_" overrides] 1.1123 + </tt> 1.1124 + </blockquote> 1.1125 + </li> 1.1126 + <li>Start the build with the command: 1.1127 + <blockquote> 1.1128 + <tt> 1.1129 + <i>gmake</i> 1.1130 + [ARCH_DATA_MODEL=<i>32 or 64</i>] 1.1131 + [ALT_OUTPUTDIR=<i>output_directory</i>] 1.1132 + [other "ALT_" overrides] 1.1133 + </tt> 1.1134 + </blockquote> 1.1135 + </li> 1.1136 + </ol> 1.1137 + <p> 1.1138 + <strong>Solaris:</strong> 1.1139 + Note that ARCH_DATA_MODEL is really only needed on Solaris to 1.1140 + indicate you want to built the 64-bit version. 1.1141 + And before the Solaris 64-bit binaries can be used, they 1.1142 + must be merged with the binaries from a separate 32-bit build. 1.1143 + The merged binaries may then be used in either 32-bit or 64-bit mode, with 1.1144 + the selection occurring at runtime 1.1145 + with the <tt>-d32</tt> or <tt>-d64</tt> options. 1.1146 +</blockquote> 1.1147 + 1.1148 +<!-- ------------------------------------------------------ --> 1.1149 +<hr noshade="noshade" size="3"> 1.1150 + 1.1151 +<h2><a name="testing">Testing the Build</a></h2> 1.1152 + 1.1153 +<blockquote> 1.1154 + <p> 1.1155 + When the build is completed, you should see the generated 1.1156 + binaries and associated files in the <tt>j2sdk-image</tt> 1.1157 + directory in the output directory. 1.1158 + The default output directory is 1.1159 + <tt>build/<i>platform</i></tt>, 1.1160 + where <tt><i>platform</i></tt> is one of 1.1161 + <tt><ul> 1.1162 + <li>solaris-sparc</li> 1.1163 + <li>solaris-sparcv9</li> 1.1164 + <li>solaris-i586</li> 1.1165 + <li>solaris-amd64</li> 1.1166 + <li>linux-i586</li> 1.1167 + <li>linux-amd64</li> 1.1168 + <li>windows-i586</li> 1.1169 + <li>windows-amd64</li> 1.1170 + </ul></tt> 1.1171 + In particular, the 1.1172 + <tt>build/<i>platform</i>/j2sdk-image/bin</tt> 1.1173 + directory should contain executables for the 1.1174 + OpenJDK 1.1175 + tools and utilities. 1.1176 + <p> 1.1177 + You can test that the build completed properly by using the build 1.1178 + to run the various demos that you will find in the 1.1179 + <tt>build/<i>platform</i>/j2sdk-image/demo</tt> 1.1180 + directory. 1.1181 + <p> 1.1182 + The provided regression tests can be run with the <tt>jtreg</tt> 1.1183 + utility from 1.1184 + <a href="http://openjdk.java.net/jtreg/">the jtreg site</a>. 1.1185 +</blockquote> 1.1186 + 1.1187 +<!-- ------------------------------------------------------ --> 1.1188 +<hr noshade="noshade" size="3"> 1.1189 + 1.1190 +<h2><a name="variables">Environment/Make Variables</a></h2> 1.1191 + 1.1192 +<p> 1.1193 +Some of the 1.1194 +environment or make variables (just called <b>variables</b> in this 1.1195 +document) that can impact the build are: 1.1196 + 1.1197 +<blockquote> 1.1198 + 1.1199 + <dl> 1.1200 + 1.1201 + <dt><a name="path"><tt>PATH</tt></a> </dt> 1.1202 + <dd>Typically you want to set the <tt>PATH</tt> to include: 1.1203 + <ul> 1.1204 + <li>The location of the GNU make binary</li> 1.1205 + <li>The location of the JDK 6 <tt>java</tt> 1.1206 + (see <a href="#bootjdk">Bootstrap JDK</a>)</li> 1.1207 + <li>The location of the C/C++ compilers 1.1208 + (see <a href="#compilers"><tt>compilers</tt></a>)</li> 1.1209 + <li>The location or locations for the Unix command utilities 1.1210 + (e.g. <tt>/usr/bin</tt>)</li> 1.1211 + </ul> 1.1212 + </dd> 1.1213 + 1.1214 + <dt><a name="arch_data_model"><tt>ARCH_DATA_MODEL</tt></a></dt> 1.1215 + <dd>The <tt>ARCH_DATA_MODEL</tt> variable 1.1216 + is used to specify whether the build is to generate 32-bit or 64-bit 1.1217 + binaries. 1.1218 + The Solaris build supports either 32-bit or 64-bit builds, but 1.1219 + Windows and Linux will support only one, depending on the specific 1.1220 + OS being used. 1.1221 + Normally, setting this variable is only necessary on Solaris. 1.1222 + Set <tt>ARCH_DATA_MODEL</tt> to <tt>32</tt> for generating 32-bit binaries, 1.1223 + or to <tt>64</tt> for generating 64-bit binaries. 1.1224 + </dd> 1.1225 + 1.1226 + <dt><a name="ALT_BOOTDIR"><tt>ALT_BOOTDIR</tt></a></dt> 1.1227 + <dd> 1.1228 + The location of the bootstrap JDK installation. 1.1229 + See <a href="#bootjdk">Bootstrap JDK</a> for more information. 1.1230 + You should always install your own local Bootstrap JDK and 1.1231 + always set <tt>ALT_BOOTDIR</tt> explicitly. 1.1232 + </dd> 1.1233 + 1.1234 + <dt><a name="ALT_OUTPUTDIR"><tt>ALT_OUTPUTDIR</tt></a> </dt> 1.1235 + <dd> 1.1236 + An override for specifying the (absolute) path of where the 1.1237 + build output is to go. 1.1238 + The default output directory will be build/<i>platform</i>. 1.1239 + </dd> 1.1240 + 1.1241 + <dt><a name="ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a> </dt> 1.1242 + <dd> 1.1243 + The location of the C/C++ compiler. 1.1244 + The default varies depending on the platform. 1.1245 + </dd> 1.1246 + 1.1247 + <dt><tt><a name="ALT_CACERTS_FILE">ALT_CACERTS_FILE</a></tt></dt> 1.1248 + <dd> 1.1249 + The location of the <a href="#cacerts">cacerts</a> file. 1.1250 + The default will refer to 1.1251 + <tt>jdk/src/share/lib/security/cacerts</tt>. 1.1252 + </dd> 1.1253 + 1.1254 + <dt><a name="ALT_BINARY_PLUGS_PATH"><tt>ALT_BINARY_PLUGS_PATH</tt></a></dt> 1.1255 + <dd> 1.1256 + The location of the binary plugs installation. 1.1257 + See <a href="#binaryplugs">Binary Plugs</a> for more information. 1.1258 + You should always have a local copy of a 1.1259 + recent Binary Plugs install image 1.1260 + and set this variable to that location. 1.1261 + </dd> 1.1262 + 1.1263 + <dt><a name="ALT_CUPS_HEADERS_PATH"><tt>ALT_CUPS_HEADERS_PATH</tt></a> </dt> 1.1264 + <dd> 1.1265 + The location of the CUPS header files. 1.1266 + See <a href="#cups">CUPS information</a> for more information. 1.1267 + If this path does not exist the fallback path is 1.1268 + <tt>/usr/include</tt>. 1.1269 + </dd> 1.1270 + 1.1271 + 1.1272 + <dt><a name="ALT_FREETYPE_LIB_PATH"><tt>ALT_FREETYPE_LIB_PATH</tt></a></dt> 1.1273 + <dd> 1.1274 + The location of the FreeType shared library. 1.1275 + See <a href="#freetype">FreeType information</a> for details. 1.1276 + </dd> 1.1277 + 1.1278 + <dt><a name="ALT_FREETYPE_HEADERS_PATH"><tt>ALT_FREETYPE_HEADERS_PATH</tt></a></dt> 1.1279 + <dd> 1.1280 + The location of the FreeType header files. 1.1281 + See <a href="#freetype">FreeType information</a> for details. 1.1282 + </dd> 1.1283 + 1.1284 + <dt><strong>Windows specific:</strong></dt> 1.1285 + <dd> 1.1286 + <dl> 1.1287 + <dt><a name="ALT_MSDEVTOOLS_PATH"><tt>ALT_MSDEVTOOLS_PATH</tt></a> </dt> 1.1288 + <dd> 1.1289 + The location of the Microsoft Visual Studio .NET 2003 1.1290 + tools 'bin' directory. 1.1291 + The default is usually derived from 1.1292 + <a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a>. 1.1293 + </dd> 1.1294 + 1.1295 + <dt><tt><a name="ALT_DXSDK_PATH">ALT_DXSDK_PATH</a></tt> </dt> 1.1296 + <dd> 1.1297 + The location of the 1.1298 + <a href="#dxsdk">Microsoft DirectX 9 SDK</a>. 1.1299 + The default will be to try and use the DirectX environment 1.1300 + variable <tt>DXSDK_DIR</tt>, 1.1301 + failing that, look in <tt>C:/DXSDK</tt>. 1.1302 + </dd> 1.1303 + 1.1304 + <dt><tt><a name="ALT_MSVCRT_DLL_PATH">ALT_MSVCRT_DLL_PATH</a></tt> </dt> 1.1305 + <dd> 1.1306 + The location of the 1.1307 + <a href="#msvcrt"><tt>MSVCRT.DLL</tt></a>. 1.1308 + </dd> 1.1309 + 1.1310 + <dt><tt><a name="ALT_MSVCR71_DLL_PATH">ALT_MSVCR71_DLL_PATH</a></tt> </dt> 1.1311 + <dd> 1.1312 + <strong>i586 only:</strong> 1.1313 + The location of the 1.1314 + <a href="#msvcr71"><tt>MSVCR71.DLL</tt></a>. 1.1315 + </dd> 1.1316 + </dl> 1.1317 + </dd> 1.1318 + 1.1319 + </dl> 1.1320 +</blockquote> 1.1321 + 1.1322 +<!-- ------------------------------------------------------ --> 1.1323 +<hr noshade="noshade" size="3"> 1.1324 + 1.1325 +<h2><a name="troubleshooting">Troubleshooting</a></h2> 1.1326 + 1.1327 +<blockquote> 1.1328 + <p> 1.1329 + A build can fail for any number of reasons. 1.1330 + Most failures 1.1331 + are a result of trying to build in an environment in which all the 1.1332 + pre-build requirements have not been met. 1.1333 + The first step in 1.1334 + troubleshooting a build failure is to recheck that you have satisfied 1.1335 + all the pre-build requirements for your platform. 1.1336 + Look for the check list of the platform you are building on in the 1.1337 + <a href="#contents">Table of Contents</a>. 1.1338 + 1.1339 + <p> 1.1340 + You can validate your build environment by using the <tt>sanity</tt> 1.1341 + target. 1.1342 + Any errors listed 1.1343 + will stop the build from starting, and any warnings may result in 1.1344 + a flawed product build. 1.1345 + We strongly encourage you to evaluate every 1.1346 + sanity check warning and fix it if required, before you proceed 1.1347 + further with your build. 1.1348 + 1.1349 + <p> 1.1350 + Some of the more common problems with builds are briefly described 1.1351 + below, with suggestions for remedies. 1.1352 + 1.1353 + <ul> 1.1354 + <li> 1.1355 + <b>Slow Builds:</b> 1.1356 + <blockquote> 1.1357 + <p> 1.1358 + If your build machine seems to be overloaded from too many 1.1359 + simultaneous C++ compiles, try setting the <tt>HOTSPOT_BUILD_JOBS</tt> 1.1360 + variable to <tt>1</tt> (if you're using a multiple CPU 1.1361 + machine, setting it to more than the the number of CPUs is probably 1.1362 + not a good idea). 1.1363 + <p> 1.1364 + Creating the javadocs can be very slow, if you are running 1.1365 + javadoc, consider skipping that step. 1.1366 + <p> 1.1367 + Faster hardware and more RAM always helps too. 1.1368 + The VM build tends to be CPU intensive (many C++ compiles), 1.1369 + and the rest of the JDK will often be disk intensive. 1.1370 + <p> 1.1371 + Faster compiles are possible using a tool called 1.1372 + <a href="http://ccache.samba.org/">ccache</a>. 1.1373 + </blockquote> 1.1374 + </li> 1.1375 + <li> 1.1376 + <b>File time issues:</b> 1.1377 + <blockquote> 1.1378 + <p> 1.1379 + If you see warnings that refer to file time stamps, e.g. 1.1380 + <blockquote> 1.1381 + <i>Warning message:</i><tt> File `xxx' has modification time in 1.1382 + the future.</tt> 1.1383 + <br> 1.1384 + <i>Warning message:</i> <tt> Clock skew detected. Your build may 1.1385 + be incomplete.</tt> 1.1386 + </blockquote> 1.1387 + <p> 1.1388 + These warnings can occur when the clock on the build machine is out of 1.1389 + sync with the timestamps on the source files. Other errors, apparently 1.1390 + unrelated but in fact caused by the clock skew, can occur along with 1.1391 + the clock skew warnings. These secondary errors may tend to obscure the 1.1392 + fact that the true root cause of the problem is an out-of-sync clock. 1.1393 + For example, an out-of-sync clock has been known to cause an old 1.1394 + version of javac to be used to compile some files, resulting in errors 1.1395 + when the pre-1.4 compiler ran across the new <tt>assert</tt> keyword 1.1396 + in the 1.4 source code. 1.1397 + <p> 1.1398 + If you see these warnings, reset the clock on the build 1.1399 + machine, run "<tt><i>gmake</i> clobber</tt>" or delete the directory 1.1400 + containing the build output, and restart the build from the beginning. 1.1401 + </blockquote> 1.1402 + </li> 1.1403 + <li> 1.1404 + <b>Error message: <tt>Trouble writing out table to disk</tt></b> 1.1405 + <blockquote> 1.1406 + <p> 1.1407 + Increase the amount of swap space on your build machine. 1.1408 + </blockquote> 1.1409 + </li> 1.1410 + <li> 1.1411 + <b>Error Message: <tt>libstdc++ not found:</tt></b> 1.1412 + <blockquote> 1.1413 + This is caused by a missing libstdc++.a library. 1.1414 + This is installed as part of a specific package 1.1415 + (e.g. libstdc++.so.devel.386). 1.1416 + By default some 64bit Linux versions (e.g. Fedora) 1.1417 + only install the 64bit version of the libstdc++ package. 1.1418 + Various parts of the JDK build require a static 1.1419 + link of the C++ runtime libraries to allow for maximum 1.1420 + portability of the built images. 1.1421 + </blockquote> 1.1422 + </li> 1.1423 + <li> 1.1424 + <b>Error Message: <tt>cannot restore segment prot after reloc</tt></b> 1.1425 + <blockquote> 1.1426 + This is probably an issue with SELinux (See 1.1427 + <a href="http://en.wikipedia.org/wiki/SELinux">http://en.wikipedia.org/wiki/SELinux</a>). 1.1428 + Parts of the VM is built without the <tt>-fPIC</tt> for 1.1429 + performance reasons. 1.1430 + <p> 1.1431 + To completely disable SELinux: 1.1432 + <ol><tt> 1.1433 + 1.1434 + <li>$ su root</li> 1.1435 + <li># system-config-securitylevel</li> 1.1436 + <li>In the window that appears, select the SELinux tab</li> 1.1437 + <li>Disable SELinux</li> 1.1438 + </ol></tt> 1.1439 + <p> 1.1440 + Alternatively, instead of completely disabling it you could 1.1441 + disable just this one check. 1.1442 + <ol><tt> 1.1443 + <li>Select System->Administration->SELinux Management</li> 1.1444 + <li>In the SELinux Management Tool which appears, 1.1445 + select "Boolean" from the menu on the left</li> 1.1446 + <li>Expand the "Memory Protection" group</li> 1.1447 + <li>Check the first item, labeled 1.1448 + "Allow all unconfined executables to use libraries requiring text relocation ..."</li> 1.1449 + </ol></tt> 1.1450 + </blockquote> 1.1451 + </li> 1.1452 + </ul> 1.1453 +</blockquote> 1.1454 + 1.1455 +<hr noshade="noshade" size="3">