annotate README-builds.html @ 0:cfeea66a3fa8

Initial load
author duke
date Sat, 01 Dec 2007 00:00:00 +0000
children be0ea51b2743
rev   line source
duke@0 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
duke@0 2
duke@0 3 <html>
duke@0 4 <head><title>OpenJDK Build README</title></head>
duke@0 5
duke@0 6 <!-- ------------------------------------------------------ -->
duke@0 7 <hr noshade="noshade" size="3">
duke@0 8
duke@0 9 <center>
duke@0 10 <h1>OpenJDK Build README</h1>
duke@0 11 </center>
duke@0 12
duke@0 13 <!-- ------------------------------------------------------ -->
duke@0 14 <hr noshade="noshade" size="3">
duke@0 15
duke@0 16 <h2><a name="introduction">Introduction</a></h2>
duke@0 17
duke@0 18 <blockquote>
duke@0 19 <p>
duke@0 20 This README file contains build instructions for the
duke@0 21 <a href="">OpenJDK</a>.
duke@0 22 Building the source code for the
duke@0 23 OpenJDK
duke@0 24 requires
duke@0 25 a certain degree of technical expertise.
duke@0 26 </blockquote>
duke@0 27
duke@0 28 <!-- ------------------------------------------------------ -->
duke@0 29 <hr noshade="noshade" size="3">
duke@0 30
duke@0 31 <h2><a name="contents">Contents</a></h2>
duke@0 32
duke@0 33 <blockquote>
duke@0 34 <ul>
duke@0 35 <li><a href="#introduction">Introduction</a></li>
duke@0 36 <li><a href="#MBE">Minimum Build Environments</a></li>
duke@0 37 <li><a href="#SDBE">Specific Developer Build Environments</a></li>
duke@0 38 <li><a href="#directories">Source Directory Structure</a> </li>
duke@0 39 <li><a href="#building">Build Information</a>
duke@0 40 <ul type="disc">
duke@0 41 <li><a href="#gmake">GNU Make (<tt><i>gmake</i></tt>)</a> </li>
duke@0 42 <li><a href="#linux">Basic Linux System Setup</a> </li>
duke@0 43 <li><a href="#solaris">Basic Solaris System Setup</a> </li>
duke@0 44 <li><a href="#windows">Basic Windows System Setup</a> </li>
duke@0 45 <li><a href="#dependencies">Build Dependencies</a> </li>
duke@0 46 <ul type="disc">
duke@0 47 <li><a href="#bootjdk">Bootstrap JDK</a> </li>
duke@0 48 <li><a href="#binaryplugs">Binary Plugs</a> </li>
duke@0 49 <li><a href="#cacerts">Certificate Authority File (cacert)</a> </li>
duke@0 50 <li><a href="#compilers">Compilers</a>
duke@0 51 <ul>
duke@0 52 <li><a href="#msvc">Microsoft Visual Studio</a> </li>
duke@0 53 <li><a href="#mssdk">Microsoft Platform SDK</a> </li>
duke@0 54 <li><a href="#gcc">Linux gcc/binutils</a> </li>
duke@0 55 <li><a href="#studio">Sun Studio</a> </li>
duke@0 56 </ul>
duke@0 57 </li>
duke@0 58 <li>Linux and Solaris:
duke@0 59 <ul>
duke@0 60 <li><a href="#cups">CUPS Include files</a> </li>
duke@0 61 </ul>
duke@0 62 </li>
duke@0 63 <li>Windows only:
duke@0 64 <ul>
duke@0 65 <li>Unix Command Tools (<a href="#cygwin">CYGWIN</a>)</li>
duke@0 66 <li><a href="#dxsdk">DirectX 9.0 SDK</a> </li>
duke@0 67 </ul>
duke@0 68 </li>
duke@0 69 </ul>
duke@0 70 </ul>
duke@0 71 </li>
duke@0 72 <li><a href="#creating">Creating the Build</a> </li>
duke@0 73 <li><a href="#testing">Testing the Build</a> </li>
duke@0 74 <li><a href="#variables">Environment/Make Variables</a></li>
duke@0 75 <li><a href="#troubleshooting">Troubleshooting</a></li>
duke@0 76 </ul>
duke@0 77 </blockquote>
duke@0 78
duke@0 79 <!-- ------------------------------------------------------ -->
duke@0 80 <hr noshade="noshade" size="3">
duke@0 81
duke@0 82 <h2><a name="MBE">Minimum Build Environments</a></h2>
duke@0 83
duke@0 84 <blockquote>
duke@0 85 <p>
duke@0 86 This file often describes specific requirements for what we call the
duke@0 87 "minimum build environments" (MBE) for the JDK.
duke@0 88 Building with the MBE will generate the most compatible
duke@0 89 bits that install on, and run correctly on, the most variations
duke@0 90 of the same base OS and hardware architecture.
duke@0 91 These usually represent what is often called the
duke@0 92 least common denominator platforms.
duke@0 93 It is understood that most developers will NOT be using these
duke@0 94 specific platforms, and in fact creating these specific platforms
duke@0 95 may be difficult due to the age of some of this software.
duke@0 96 <p>
duke@0 97
duke@0 98 <p>
duke@0 99 The minimum OS and C/C++ compiler versions needed for building the
duke@0 100 OpenJDK:
duke@0 101 <p>
duke@0 102 <center>
duke@0 103 <table border="1">
duke@0 104 <thead>
duke@0 105 <tr>
duke@0 106 <th>Base OS and Architecture</th>
duke@0 107 <th>OS</th>
duke@0 108 <th>Compiler</th>
duke@0 109 </tr>
duke@0 110 </thead>
duke@0 111 <tbody>
duke@0 112 <tr>
duke@0 113 <td>Linux X86 (32bit)</td>
duke@0 114 <td>Red Hat Enterprise Linux 4 </td>
duke@0 115 <td>gcc 4 </td>
duke@0 116 </tr>
duke@0 117 <tr>
duke@0 118 <td>Linux X64 (64bit)</td>
duke@0 119 <td>Red Hat Enterprise Linux 4 </td>
duke@0 120 <td>gcc 4 </td>
duke@0 121 </tr>
duke@0 122 <tr>
duke@0 123 <td>Solaris SPARC (32bit)</td>
duke@0 124 <td>Solaris 10 + patches
duke@0 125 <br>
duke@0 126 See <a href="">SunSolve</a> for patch downloads.
duke@0 127 </td>
duke@0 128 <td>Sun Studio 11 </td>
duke@0 129 </tr>
duke@0 130 <tr>
duke@0 131 <td>Solaris SPARCV9 (64bit)</td>
duke@0 132 <td>Solaris 10 + patches
duke@0 133 <br>
duke@0 134 See <a href="">SunSolve</a> for patch downloads.
duke@0 135 </td>
duke@0 136 <td>Sun Studio 11</td>
duke@0 137 </tr>
duke@0 138 <tr>
duke@0 139 <td>Solaris X86 (32bit)</td>
duke@0 140 <td>Solaris 10 + patches
duke@0 141 <br>
duke@0 142 See <a href="">SunSolve</a> for patch downloads.
duke@0 143 </td>
duke@0 144 <td>Sun Studio 11</td>
duke@0 145 </tr>
duke@0 146 <tr>
duke@0 147 <td>Solaris X64 (64bit)</td>
duke@0 148 <td>Solaris 10 + patches
duke@0 149 <br>
duke@0 150 See <a href="">SunSolve</a> for patch downloads.
duke@0 151 </td>
duke@0 152 <td>Sun Studio 11</td>
duke@0 153 </tr>
duke@0 154 <tr>
duke@0 155 <td>Windows X86 (32bit)</td>
duke@0 156 <td>Windows XP</td>
duke@0 157 <td>Microsoft Visual Studio .NET 2003 Professional</td>
duke@0 158 </tr>
duke@0 159 <tr>
duke@0 160 <td>Windows X64 (64bit)</td>
duke@0 161 <td>Windows Server 2003 - Enterprise x64 Edition</td>
duke@0 162 <td>Microsoft Platform SDK - April 2005</td>
duke@0 163 </tr>
duke@0 164 </tbody>
duke@0 165 </table>
duke@0 166 </center>
duke@0 167 </blockquote>
duke@0 168
duke@0 169 <!-- ------------------------------------------------------ -->
duke@0 170 <hr noshade="noshade" size="3">
duke@0 171
duke@0 172 <h2><a name="SDBE">Specific Developer Build Environments</a></h2>
duke@0 173
duke@0 174 <blockquote>
duke@0 175 <p>
duke@0 176 We won't be listing all the possible environments, but
duke@0 177 we will try to provide what information we have available to us.
duke@0 178 </blockquote>
duke@0 179
duke@0 180 <h3><a name="fedora">Fedora</a></h3>
duke@0 181
duke@0 182 <blockquote>
duke@0 183 TBD
duke@0 184 </blockquote>
duke@0 185
duke@0 186 <h3><a name="debian">Debian</a></h3>
duke@0 187
duke@0 188 <blockquote>
duke@0 189 TBD
duke@0 190 </blockquote>
duke@0 191
duke@0 192 <h3><a name="ubuntu">Ubuntu</a></h3>
duke@0 193
duke@0 194 <blockquote>
duke@0 195 <p>
duke@0 196 In addition to needing the Bootstrap JDK and the Binary Plugs,
duke@0 197 when building on Ubuntu you will need to
duke@0 198 make sure certain packages are installed.
duke@0 199 In particular, certain X11 packages, make, m4, gawk, gcc 4,
duke@0 200 binutils, cups, freetype
duke@0 201 and alsa.
duke@0 202
duke@0 203 <h4>Ubuntu 6.06</h4>
duke@0 204
duke@0 205 <p>
duke@0 206 The following list of packages for Ubuntu 6.06 is a working set that
duke@0 207 does appear to work.
duke@0 208
duke@0 209 <p>
duke@0 210 <b>Note that it's quite possible that some of these
duke@0 211 packages are not required, so anyone discovering that some of the
duke@0 212 packages listed below are NOT required,
duke@0 213 please let the
duke@0 214 OpenJDK
duke@0 215 team know.</b>
duke@0 216 <p>
duke@0 217 All the packages below can be installed with the
duke@0 218 Synaptic Package manager provided with the base Ubuntu 6.06 release.
duke@0 219
duke@0 220 <blockquote>
duke@0 221 <ul>
duke@0 222 <li>binutils (2.16.1cvs20060117-1ubuntu2.1)</li>
duke@0 223 <li>cpp (4:4.0.3-1)</li>
duke@0 224 <li>cpp-4.0 (4.0.3-1ubuntu5)</li>
duke@0 225 <li>libfreetype6-dev</li>
duke@0 226 <li>g++ (4:4.0.3-1)</li>
duke@0 227 <li>g++-4.0 (4.0.3-1ubuntu5)</li>
duke@0 228 <li>gawk (1:3.1.5-2build1)</li>
duke@0 229 <li>gcc (4:4.0.3-1)</li>
duke@0 230 <li>gcc-4.0 (4.0.3-1ubuntu5)</li>
duke@0 231 <li>libasound2-dev (1.0.10-2ubuntu4)</li>
duke@0 232 <li>libc6 (2.3.6-0ubuntu20) to 2.3.6-0ubuntu20.4</li>
duke@0 233 <li>libc6-dev (2.3.6-0ubuntu20.4)</li>
duke@0 234 <li>libc6-i686 (2.3.6-0ubuntu20) to 2.3.6-0ubuntu20.4</li>
duke@0 235 <li>libcupsys2-dev (1.2.2-0ubuntu0.6.06)</li>
duke@0 236 <li>libgcrypt11-dev (1.2.2-1)</li>
duke@0 237 <li>libgnutls-dev (1.2.9-2ubuntu1.1)</li>
duke@0 238 <li>libgnutls12 (1.2.9-2ubuntu1) to 1.2.9-2ubuntu1.1</li>
duke@0 239 <li>libgpg-error-dev (1.1-4)</li>
duke@0 240 <li>libice-dev (2:1.0.0-0ubuntu2)</li>
duke@0 241 <li>liblockfile1 (1.06.1)</li>
duke@0 242 <li>libopencdk8-dev (0.5.7-2)</li>
duke@0 243 <li>libpopt-dev (1.7-5)</li>
duke@0 244 <li>libsm-dev (2:1.0.0-0ubuntu2)</li>
duke@0 245 <li>libstdc++6-4.0-dev (4.0.3-1ubuntu5)</li>
duke@0 246 <li>libtasn1-2-dev (0.2.17-1ubuntu1)</li>
duke@0 247 <li>libx11-dev (2:1.0.0-0ubuntu9)</li>
duke@0 248 <li>libxau-dev (1:1.0.0-0ubuntu4)</li>
duke@0 249 <li>libxaw-headers (2:1.0.1-0ubuntu3)</li>
duke@0 250 <li>libxaw7-dev (2:1.0.1-0ubuntu3)</li>
duke@0 251 <li>libxdmcp-dev (1:1.0.0-0ubuntu2)</li>
duke@0 252 <li>libxext-dev (2:1.0.0-0ubuntu4)</li>
duke@0 253 <li>libxi-dev (2:1.0.0-0ubuntu3) </li>
duke@0 254 <li>libxmu-dev (2:1.0.0-0ubuntu3)</li>
duke@0 255 <li>libxmu-headers (2:1.0.0-0ubuntu3)</li>
duke@0 256 <li>libxmuu-dev (2:1.0.0-0ubuntu3)</li>
duke@0 257 <li>libxp-dev (6.8.2-11ubuntu2)</li>
duke@0 258 <li>libxpm-dev (1:</li>
duke@0 259 <li>libxrandr-dev (1:</li>
duke@0 260 <li>libxt-dev (1:1.0.0-0ubuntu3)</li>
duke@0 261 <li>libxtrap-dev (2:1.0.0-0ubuntu2)</li>
duke@0 262 <li>libxtst-dev (2:1.0.1-0ubuntu2)</li>
duke@0 263 <li>libxv-dev (2:1.0.1-0ubuntu3)</li>
duke@0 264 <li>linux-kernel-headers (</li>
duke@0 265 <li>m4 (1.4.4-1)</li>
duke@0 266 <li>make (3.80+3.81.b4-1)</li>
duke@0 267 <li>ssl-cert (1.0.13)</li>
duke@0 268 <li>x-dev (7.0.4-0ubuntu2)</li>
duke@0 269 <li>x11proto-core-dev (7.0.4-0ubuntu2)</li>
duke@0 270 <li>x11proto-input-dev (1.3.2-0ubuntu2)</li>
duke@0 271 <li>x11proto-kb-dev (1.0.2-0ubuntu2)</li>
duke@0 272 <li>x11proto-randr-dev (1.1.2-0ubuntu2)</li>
duke@0 273 <li>x11proto-record-dev (1.13.2-0ubuntu2)</li>
duke@0 274 <li>x11proto-trap-dev (3.4.3-0ubuntu2)</li>
duke@0 275 <li>x11proto-video-dev (2.2.2-0ubuntu2)</li>
duke@0 276 <li>x11proto-xext-dev (7.0.2-0ubuntu2)</li>
duke@0 277 <li>xlibs-dev (7.0.0-0ubuntu45)</li>
duke@0 278 <li>zlib1g-dev (1:1.2.3-6ubuntu4)</li>
duke@0 279 </ul>
duke@0 280 </blockquote>
duke@0 281
duke@0 282 <h4>Ubuntu 7.04</h4>
duke@0 283
duke@0 284 <p>
duke@0 285 Using the Synaptic Package Manager, download the following
duke@0 286 packages (double indented packages are automatically aquired
duke@0 287 due to package dependencies):
duke@0 288
duke@0 289 <blockquote>
duke@0 290 <ul>
duke@0 291 <li>build-essential</li>
duke@0 292 <ul>
duke@0 293 <li>dpkg-dev</li>
duke@0 294 <li>g++</li>
duke@0 295 <li>g++-4.1</li>
duke@0 296 <li>libc6-dev</li>
duke@0 297 <li>libstdc++6.4.1-dev</li>
duke@0 298 <li>linux-libc-dev</li>
duke@0 299 </ul>
duke@0 300 <li>gawk</li>
duke@0 301 <li>m4</li>
duke@0 302 <li>libasound2-dev</li>
duke@0 303 <li>libcupsys2-dev</li>
duke@0 304 <ul>
duke@0 305 <li>libgcrypt11-dev</li>
duke@0 306 <li>lgnutls-dev</li>
duke@0 307 <li>libgpg-error-dev</li>
duke@0 308 <li>liblzo-dev</li>
duke@0 309 <li>libopencdk8-dev</li>
duke@0 310 <li>libpopt-dev</li>
duke@0 311 <li>libtasn1-3-dev</li>
duke@0 312 <li>zlib1g-dev</li>
duke@0 313 </ul>
duke@0 314 <li>sun-java6-jdk</li>
duke@0 315 <ul>
duke@0 316 <li>java-common</li>
duke@0 317 <li>libltdl3</li>
duke@0 318 <li>odbcinst1debian1</li>
duke@0 319 <li>sun-java6-bin</li>
duke@0 320 <li>sun-java6-jre</li>
duke@0 321 <li>unixodbc</li>
duke@0 322 </ul>
duke@0 323 <li>xlibs-dev</li>
duke@0 324 <ul>
duke@0 325 <li>(many)</li>
duke@0 326 </ul>
duke@0 327 <li>x11proto-print-dev</li>
duke@0 328 <li>libxaw7-dev</li>
duke@0 329 <ul>
duke@0 330 <li>libxaw-headers</li>
duke@0 331 </ul>
duke@0 332 <li>libxp-dev</li>
duke@0 333 <li>libfreetype6-dev</li>
duke@0 334 </ul>
duke@0 335 </blockquote>
duke@0 336 </blockquote>
duke@0 337
duke@0 338 <!-- ------------------------------------------------------ -->
duke@0 339 <hr noshade="noshade" size="3">
duke@0 340
duke@0 341 <h2><a name="directories">Source Directory Structure</a></h2>
duke@0 342
duke@0 343 <blockquote>
duke@0 344 <p>
duke@0 345 The source code for the
duke@0 346 OpenJDK is
duke@0 347 delivered in <i>3</i> sibling directories:
duke@0 348 <tt>hotspot</tt>,
duke@0 349 <tt>langtools</tt>,
duke@0 350 <tt>corba</tt>,
duke@0 351 <tt>jaxws</tt>,
duke@0 352 <tt>jaxp</tt>,
duke@0 353 <tt>jdk</tt>
duke@0 354 and
duke@0 355 The <tt>hotspot</tt> directory contains the source code and make
duke@0 356 files for
duke@0 357 building the
duke@0 358 OpenJDK
duke@0 359 Hotspot Virtual Machine.
duke@0 360 The <tt>jdk</tt>
duke@0 361 directory contains the source code and make files for
duke@0 362 building the
duke@0 363 OpenJDK
duke@0 364 runtime libraries, tools and demos.
duke@0 365 The top level Makefile is used to build the complete OpenJDK
duke@0 366 release including building the hotspot
duke@0 367 VM, staging the VM binaries, and building the
duke@0 368 OpenJDK
duke@0 369 runtime libraries,
duke@0 370 tools and demos.
duke@0 371 </blockquote>
duke@0 372
duke@0 373 <!-- ------------------------------------------------------ -->
duke@0 374 <hr noshade="noshade" size="3">
duke@0 375
duke@0 376 <h2><a name="building">Build Information</a></h2>
duke@0 377
duke@0 378 <blockquote>
duke@0 379 <p>
duke@0 380 Building the
duke@0 381 OpenJDK
duke@0 382 is done with a <tt><i>gmake</i></tt>
duke@0 383 command line and various
duke@0 384 environment or make variable settings that direct the make rules
duke@0 385 to where various components have been installed.
duke@0 386 Where possible the makefiles will attempt to located the various
duke@0 387 components in the default locations or any component specific
duke@0 388 variable settings.
duke@0 389 When the normal defaults fail or components cannot be found,
duke@0 390 the various
duke@0 391 <tt>ALT_*</tt> variables (alternates)
duke@0 392 can be used to help the makefiles locate components.
duke@0 393 <p>
duke@0 394 Refer to the bash/sh/ksh setup file
duke@0 395 <tt>jdk/make/</tt>
duke@0 396 if you need help in setting up your environment variables.
duke@0 397 A build could be as simple as:
duke@0 398 <blockquote>
duke@0 399 <pre><tt>
duke@0 400 bash
duke@0 401 . jdk/make/
duke@0 402 <i>gmake</i> sanity &amp;&amp; <i>gmake</i>
duke@0 403 </tt></pre>
duke@0 404 </blockquote>
duke@0 405 <p>
duke@0 406 Of course ksh or sh would work too.
duke@0 407 But some customization will probably be necessary.
duke@0 408 The <tt>sanity</tt> rule will make some basic checks on build
duke@0 409 dependencies and generate appropriate warning messages
duke@0 410 regarding missing, out of date, or newer than expected components
duke@0 411 found on your system.
duke@0 412 </blockquote>
duke@0 413
duke@0 414 <!-- ------------------------------------------------------ -->
duke@0 415 <hr noshade="noshade" size="3">
duke@0 416
duke@0 417 <h3><a name="gmake">GNU make (<tt><i>gmake</i></tt>)</a></h3>
duke@0 418
duke@0 419 <blockquote>
duke@0 420 <p>
duke@0 421 The Makefiles in the
duke@0 422 OpenJDK
duke@0 423 are only valid when used with the
duke@0 424 GNU version of the utility command <tt>make</tt>
duke@0 425 (<tt><i>gmake</i></tt>).
duke@0 426 A few notes about using GNU make:
duke@0 427 <ul>
duke@0 428 <li>
duke@0 429 In general, you need GNU make version 3.78.1 or newer.
duke@0 430 </li>
duke@0 431 <li>
duke@0 432 Place the location of the GNU make binary in the <tt>PATH</tt>.
duke@0 433 </li>
duke@0 434 <li>
duke@0 435 <strong>Linux:</strong>
duke@0 436 The <tt>/usr/bin/make</tt> command should work fine for you.
duke@0 437 </li>
duke@0 438 <li>
duke@0 439 <strong>Solaris:</strong>
duke@0 440 Do NOT use <tt>/usr/bin/make</tt> on Solaris.
duke@0 441 If your Solaris system has the software
duke@0 442 from the Solaris Companion CD installed,
duke@0 443 you should use <tt>gmake</tt>
duke@0 444 which will be located in either the <tt>/opt/sfw/bin</tt> or
duke@0 445 <tt>/usr/sfw/bin</tt> directory.
duke@0 446 </li>
duke@0 447 <li>
duke@0 448 <strong>Windows:</strong>
duke@0 449 Make sure you start your build inside a bash/sh/ksh shell.
duke@0 450 <br>
duke@0 451 <b>WARNING:</b> Watch out for make version 3.81, it may
duke@0 452 not work due to a lack of support for drive letter paths
duke@0 453 like <tt>C:/</tt>. Use a 3.80 version, or find a newer
duke@0 454 version that has this problem fixed.
duke@0 455 </li>
duke@0 456 </ul>
duke@0 457 <p>
duke@0 458 Information on GNU make, and access to ftp download sites, are
duke@0 459 available on the
duke@0 460 <a href="">
duke@0 461 GNU make web site
duke@0 462 </a>.
duke@0 463 The latest source to GNU make is available at
duke@0 464 <a href=""></a>.
duke@0 465 </blockquote>
duke@0 466
duke@0 467 <!-- ------------------------------------------------------ -->
duke@0 468 <hr noshade="noshade" size="3">
duke@0 469
duke@0 470 <h3><a name="linux">Basic Linux System Setup</a></h3>
duke@0 471
duke@0 472 <blockquote>
duke@0 473 <p>
duke@0 474 <strong>i586 only:</strong>
duke@0 475 The minimum recommended hardware for building the Linux version
duke@0 476 is a Pentium class processor or better, at least 256 MB of RAM, and
duke@0 477 approximately 1.5 GB of free disk space.
duke@0 478 <p>
duke@0 479 <strong>X64 only:</strong>
duke@0 480 The minimum recommended hardware for building the Linux
duke@0 481 version is an AMD Opteron class processor, at least 512 MB of RAM, and
duke@0 482 approximately 4 GB of free disk space.
duke@0 483 <p>
duke@0 484 The build will use the tools contained in
duke@0 485 <tt>/bin</tt> and
duke@0 486 <tt>/usr/bin</tt>
duke@0 487 of a standard installation of the Linux operating environment.
duke@0 488 You should ensure that these directories are in your
duke@0 489 <tt>PATH</tt>.
duke@0 490 <p>
duke@0 491 Note that some Linux systems have a habit of pre-populating
duke@0 492 your environment variables for you, for example <tt>JAVA_HOME</tt>
duke@0 493 might get pre-defined for you to refer to the JDK installed on
duke@0 494 your Linux system.
duke@0 495 You will need to unset <tt>JAVA_HOME</tt>.
duke@0 496 It's a good idea to run <tt>env</tt> and verify the
duke@0 497 environment variables you are getting from the default system
duke@0 498 settings make sense for building the
duke@0 499 OpenJDK.
duke@0 500 </blockquote>
duke@0 501
duke@0 502 <!-- ------------------------------------------------------ -->
duke@0 503
duke@0 504 <h4><a name="linux_checklist">Basic Linux Check List</a></h4>
duke@0 505
duke@0 506 <blockquote>
duke@0 507 <ol>
duke@0 508 <li>
duke@0 509 Install the
duke@0 510 <a href="#bootjdk">Bootstrap JDK</a>, set
duke@0 511 <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>.
duke@0 512 </li>
duke@0 513 <li>
duke@0 514 Install the
duke@0 515 <a href="#binaryplugs">Binary Plugs</a>, set
duke@0 516 <tt><a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</a></tt>.
duke@0 517 </li>
duke@0 518 <li>
duke@0 519 Install or upgrade the <a href="#freetype">FreeType development
duke@0 520 package</a>.
duke@0 521 </li>
duke@0 522 </ol>
duke@0 523 </blockquote>
duke@0 524
duke@0 525 <!-- ------------------------------------------------------ -->
duke@0 526 <hr noshade="noshade" size="3">
duke@0 527
duke@0 528 <h3><a name="solaris">Basic Solaris System Setup</a></h3>
duke@0 529
duke@0 530 <blockquote>
duke@0 531 <p>
duke@0 532 The minimum recommended hardware for building the
duke@0 533 Solaris SPARC version is an UltraSPARC with 512 MB of RAM.
duke@0 534 For building
duke@0 535 the Solaris x86 version, a Pentium class processor or better and at
duke@0 536 least 128 MB of RAM are recommended.
duke@0 537 Approximately 1.4 GB of free disk
duke@0 538 space is needed for a 32-bit build.
duke@0 539 <p>
duke@0 540 If you are building the 64bit version, you should
duke@0 541 run the command "isainfo -v" to verify that you have a
duke@0 542 64-bit installation.
duke@0 543 An additional 7 GB of free disk space is needed
duke@0 544 for a 64-bit build.
duke@0 545 <p>
duke@0 546 The build uses the tools contained in <tt>/usr/ccs/bin</tt>
duke@0 547 and <tt>/usr/bin</tt> of a standard developer or full installation of
duke@0 548 the Solaris operating environment.
duke@0 549 </blockquote>
duke@0 550
duke@0 551 <!-- ------------------------------------------------------ -->
duke@0 552
duke@0 553 <h4><a name="solaris_checklist">Basic Solaris Check List</a></h4>
duke@0 554
duke@0 555 <blockquote>
duke@0 556 <ol>
duke@0 557 <li>
duke@0 558 Install the
duke@0 559 <a href="#bootjdk">Bootstrap JDK</a>, set
duke@0 560 <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>.
duke@0 561 </li>
duke@0 562 <li>
duke@0 563 Install the
duke@0 564 <a href="#binaryplugs">Binary Plugs</a>, set
duke@0 565 <tt><a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</a></tt>.
duke@0 566 </li>
duke@0 567 <li>
duke@0 568 Install the
duke@0 569 <a href="#studio">Sun Studio Compilers</a>, set
duke@0 570 <a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a>.
duke@0 571 </li>
duke@0 572 <li>
duke@0 573 Install the
duke@0 574 <a href="#cups">CUPS Include files</a>, set
duke@0 575 <tt><a href="#ALT_CUPS_HEADERS_PATH">ALT_CUPS_HEADERS_PATH</a></tt>.
duke@0 576 </li>
duke@0 577 </ol>
duke@0 578 </blockquote>
duke@0 579
duke@0 580 <!-- ------------------------------------------------------ -->
duke@0 581 <hr noshade="noshade" size="3">
duke@0 582
duke@0 583 <h3><a name="windows">Basic Windows System Setup</a></h3>
duke@0 584
duke@0 585 <blockquote>
duke@0 586 <p>
duke@0 587 <strong>i586 only:</strong>
duke@0 588 The minimum recommended hardware for building the 32bit or X86
duke@0 589 Windows version is an Pentium class processor or better, at least
duke@0 590 512 MB of RAM, and approximately 600 MB of free disk space.
duke@0 591 <strong>
duke@0 592 NOTE: The Windows 2000 build machines need to use the
duke@0 593 file system NTFS.
duke@0 594 Build machines formatted to FAT32 will not work
duke@0 595 because FAT32 doesn't support case-sensitivity in file names.
duke@0 596 </strong>
duke@0 597 <p>
duke@0 598 <strong>X64 only:</strong>
duke@0 599 The minimum recommended hardware for building
duke@0 600 the Windows X64 version is an AMD Opteron class processor, at least 1
duke@0 601 GB of RAM, and approximately 10 GB of free disk space.
duke@0 602 </blockquote>
duke@0 603
duke@0 604 <!-- ------------------------------------------------------ -->
duke@0 605
duke@0 606 <h4><a name="paths">Windows Paths</a></h4>
duke@0 607
duke@0 608 <blockquote>
duke@0 609 <p>
duke@0 610 <strong>Windows:</strong>
duke@0 611 Note that GNU make is a historic utility and is based very
duke@0 612 heavily on shell scripting, so it does not tolerate the Windows habit
duke@0 613 of having spaces in pathnames or the use of the <tt>\</tt>characters in pathnames.
duke@0 614 Luckily on most Windows systems, you can use <tt>/</tt>instead of \, and
duke@0 615 there is always a 'short' pathname without spaces for any path that
duke@0 616 contains spaces.
duke@0 617 Unfortunately, this short pathname can be somewhat dynamic and the
duke@0 618 formula is difficult to explain.
duke@0 619 You can use <tt>cygpath</tt> utility to map pathnames with spaces
duke@0 620 or the <tt>\</tt>character into the <tt>C:/</tt> style of pathname
duke@0 621 (called 'mixed'), e.g.
duke@0 622 <tt>cygpath -s -m "<i>path</i>"</tt>.
duke@0 623 <p>
duke@0 624 The makefiles will try to translate any pathnames supplied
duke@0 625 to it into the <tt>C:/</tt> style automatically.
duke@0 626 <p>
duke@0 627 Note that use of CYGWIN creates a unique problem with regards to
duke@0 628 setting <a href="#path"><tt>PATH</tt></a>. Normally on Windows
duke@0 629 the <tt>PATH</tt> variable contains directories
duke@0 630 separated with the ";" character (Solaris and Linux uses ":").
duke@0 631 With CYGWIN, it uses ":", but that means that paths like "C:/path"
duke@0 632 cannot be placed in the CYGWIN version of <tt>PATH</tt> and
duke@0 633 instead CYGWIN uses something like <tt>/cygdrive/c/path</tt>
duke@0 634 which CYGWIN understands, but only CYGWIN understands.
duke@0 635 So be careful with paths on Windows.
duke@0 636 </blockquote>
duke@0 637
duke@0 638 <!-- ------------------------------------------------------ -->
duke@0 639
duke@0 640 <h4><a name="windows_checklist">Basic Windows Check List</a></h4>
duke@0 641
duke@0 642 <blockquote>
duke@0 643 <ol>
duke@0 644 <li>
duke@0 645 Install the
duke@0 646 <a href="#cygwin">CYGWIN product</a>.
duke@0 647 </li>
duke@0 648 <li>
duke@0 649 Install the
duke@0 650 <a href="#bootjdk">Bootstrap JDK</a>, set
duke@0 651 <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>.
duke@0 652 </li>
duke@0 653 <li>
duke@0 654 Install the
duke@0 655 <a href="#binaryplugs">Binary Plugs</a>, set
duke@0 656 <tt><a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</a></tt>..
duke@0 657 </li>
duke@0 658 <li>
duke@0 659 Install the
duke@0 660 <a href="#msvc">Microsoft Visual Studio .NET 2003 Professional</a> or the
duke@0 661 <a href="#mssdk">Microsoft Platform SDK</a>.
duke@0 662 </li>
duke@0 663 <li>
duke@0 664 Setup all environment variables for compilers
duke@0 665 (see <a href="#msvc">compilers</a>).
duke@0 666 </li>
duke@0 667 <li>
duke@0 668 Install
duke@0 669 <a href="#dxsdk">Microsoft DirectX SDK</a>.
duke@0 670 </li>
duke@0 671 </ol>
duke@0 672 </blockquote>
duke@0 673
duke@0 674 <!-- ------------------------------------------------------ -->
duke@0 675 <hr noshade="noshade" size="3">
duke@0 676
duke@0 677 <h3><a name="dependencies">Build Dependencies</a></h3>
duke@0 678
duke@0 679 <blockquote>
duke@0 680 <p>
duke@0 681 Depending on the platform, the
duke@0 682 OpenJDK
duke@0 683 build process has some basic
duke@0 684 dependencies on components not part of the
duke@0 685 OpenJDK
duke@0 686 sources.
duke@0 687 Some of these are specific to a platform, some even specific to
duke@0 688 an architecture.
duke@0 689 Each dependency will have a set of ALT variables that can be set
duke@0 690 to tell the makefiles where to locate the component.
duke@0 691 In most cases setting these ALT variables may not be necessary
duke@0 692 and the makefiles will find defaults on the system in standard
duke@0 693 install locations or through component specific variables.
duke@0 694
duke@0 695 <h4><a name="bootjdk">Bootstrap JDK</a></h4>
duke@0 696
duke@0 697 <blockquote>
duke@0 698 <p>
duke@0 699 All
duke@0 700 OpenJDK
duke@0 701 builds require access to the previously released
duke@0 702 JDK 6, this is often called a bootstrap JDK.
duke@0 703 The JDK 6 binaries can be downloaded from Sun's
duke@0 704 <a href="">JDK 6 download site</a>.
duke@0 705 For build performance reasons
duke@0 706 is very important that this bootstrap JDK be made available on the
duke@0 707 local disk of the machine doing the build.
duke@0 708 You should always set
duke@0 709 <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>
duke@0 710 to point to the location of
duke@0 711 the bootstrap JDK installation, this is the directory pathname
duke@0 712 that contains a <tt>bin, lib, and include</tt>
duke@0 713 It's also a good idea to also place its <tt>bin</tt> directory
duke@0 714 in the <tt>PATH</tt> environment variable, although it's
duke@0 715 not required.
duke@0 716 <p>
duke@0 717 <strong>Solaris:</strong>
duke@0 718 Some pre-installed JDK images may be available to you in the
duke@0 719 directory <tt>/usr/jdk/instances</tt>.
duke@0 720 If you don't set
duke@0 721 <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>
duke@0 722 the makefiles will look in that location for a JDK it can use.
duke@0 723 </blockquote>
duke@0 724
duke@0 725 <h4><a name="binaryplugs">Binary Plugs</a></h4>
duke@0 726
duke@0 727 <blockquote>
duke@0 728 <p>
duke@0 729 Not all of the source code that makes up the JDK is available
duke@0 730 under an open-source license.
duke@0 731 In order to build an OpenJDK binary from source code,
duke@0 732 you must first download and install the appropriate
duke@0 733 binary plug bundles from the OpenJDK Download area.
duke@0 734 During the OpenJDK build process these "binary plugs"
duke@0 735 for the encumbered components will be copied into your
duke@0 736 resulting OpenJDK binary build image.
duke@0 737 These binary plug files are only for the purpose of
duke@0 738 building an OpenJDK binary.
duke@0 739 Download the Binary Plugs by selecting the <b>Downloads</b>
duke@0 740 link at
duke@0 741 <a href="">the OpenJDK site</a>,
duke@0 742 install the bundle,
duke@0 743 and make sure you set
duke@0 744 <tt><a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</a></tt>
duke@0 745 to the root of this installation.
duke@0 746 </blockquote>
duke@0 747
duke@0 748 <h4><a name="cacerts">Certificate Authority File (cacert)</a></h4>
duke@0 749
duke@0 750 <blockquote>
duke@0 751 <p>
duke@0 752 See <a href="">
duke@0 753</a>
duke@0 754 for a better understanding of the Certificate Authority (CA).
duke@0 755 A certificates file named "cacerts"
duke@0 756 represents a system-wide keystore with CA certificates.
duke@0 757 In JDK and JRE
duke@0 758 binary bundles, the "cacerts" file contains root CA certificates from
duke@0 759 several public CAs (e.g., VeriSign, Thawte, and Baltimore).
duke@0 760 The source contain a cacerts file
duke@0 761 without CA root certificates.
duke@0 762 Formal JDK builders will need to secure
duke@0 763 permission from each public CA and include the certificates into their
duke@0 764 own custom cacerts file.
duke@0 765 Failure to provide a populated cacerts file
duke@0 766 will result in verification errors of a certificate chain during runtime.
duke@0 767 The variable
duke@0 768 <tt><a href="#ALT_CACERTS_FILE">ALT_CACERTS_FILE</a></tt>
duke@0 769 can be used to override the default location of the
duke@0 770 cacerts file that will get placed in your build.
duke@0 771 By default an empty cacerts file is provided and that should be
duke@0 772 fine for most JDK developers.
duke@0 773 </blockquote>
duke@0 774
duke@0 775 <h4><a name="compilers">Compilers</a></h4>
duke@0 776
duke@0 777 <blockquote>
duke@0 778
duke@0 779 <a name="gcc">
duke@0 780 <strong>Linux gcc/binutils</strong>
duke@0 781 </a>
duke@0 782
duke@0 783 <blockquote>
duke@0 784 <p>
duke@0 785 The GNU gcc compiler version should be 3.2.2 or newer.
duke@0 786 The binutils package should be or newer.
duke@0 787 The compiler used should be the default compiler installed
duke@0 788 in <tt>/usr/bin</tt>.
duke@0 789 </blockquote>
duke@0 790
duke@0 791 <strong><a name="studio">Solaris: Sun Studio</a></strong>
duke@0 792
duke@0 793 <blockquote>
duke@0 794 <p>
duke@0 795 At a minimum, the
duke@0 796 <a href="">
duke@0 797 Sun Studio 11 Compilers</a>
duke@0 798 (containing version 5.8 of the C and C++ compilers) is required,
duke@0 799 with patches from the
duke@0 800 <a href="">
duke@0 801 SunSolve web site</a>.
duke@0 802 <p>
duke@0 803 Set
duke@0 804 <a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a>
duke@0 805 to point to the location of
duke@0 806 the compiler binaries, and place this location in the <tt>PATH</tt>.
duke@0 807 <p>
duke@0 808 The Sun Studio Express compilers at:
duke@0 809 <a href="">
duke@0 810 Sun Studio Express Download site</a>
duke@0 811 are also an option, although these compilers have not
duke@0 812 been extensively used yet.
duke@0 813 </blockquote>
duke@0 814
duke@0 815 <a name="msvc">
duke@0 816 <strong>Windows i586: Microsoft Visual Studio .NET 2003 Professional</strong>
duke@0 817 </a>
duke@0 818
duke@0 819 <blockquote>
duke@0 820 <p>
duke@0 821 The 32-bit
duke@0 822 OpenJDK
duke@0 823 Windows build
duke@0 824 requires Microsoft Visual Studio .NET 2003 (VS2003) Professional
duke@0 825 Edition compiler.
duke@0 826 The compiler and other tools are expected to reside
duke@0 827 in the location defined by the variable <tt>VS71COMNTOOLS</tt> which
duke@0 828 is set by the Microsoft Visual Studio .NET installer.
duke@0 829 <p>
duke@0 830 Once the compiler is installed,
duke@0 831 it is recommended that you run <tt>VCVARS32.BAT</tt>
duke@0 832 to set the compiler environment variables
duke@0 833 <tt>MSVCDIR</tt>,
duke@0 834 <tt>INCLUDE</tt>,
duke@0 835 <tt>LIB</tt>, and
duke@0 836 <tt>PATH</tt>
duke@0 837 prior to building the
duke@0 838 OpenJDK.
duke@0 839 The above environment variables <b>MUST</b> be set.
duke@0 840 <p>
duke@0 841 The Microsoft Visual Studio .NET 2005 (VS2005) compiler
duke@0 842 will not work at this time due to the new runtime dll
duke@0 843 and the manifest requirements.
duke@0 844 </blockquote>
duke@0 845
duke@0 846 <a name="mssdk">
duke@0 847 <strong>Windows X64: Microsoft Platform SDK April 2005</strong>
duke@0 848 </a>
duke@0 849
duke@0 850 <blockquote>
duke@0 851 <p>
duke@0 852 On <b>X64</b>,
duke@0 853 the Microsoft Platform Software
duke@0 854 Development Kit (SDK), April 2005 Edition compiler, is required for
duke@0 855 building the
duke@0 856 OpenJDK
duke@0 857 because it contains the C/C++ compiler.
duke@0 858 You will need to minimally install the Core SDK and
duke@0 859 the MDAC SDK features of this compiler.
duke@0 860 <p>
duke@0 861 Once the Platform SDK is installed,
duke@0 862 it is recommended that you run <tt>SetEnv.Cmd /X64</tt>
duke@0 863 to set the compiler environment variables
duke@0 864 <tt>MSSDK</tt>,
duke@0 865 <tt>MSTOOLS</tt>,
duke@0 866 <tt>INCLUDE</tt>,
duke@0 867 <tt>LIB</tt>, and
duke@0 868 <tt>PATH</tt>
duke@0 869 prior to building the
duke@0 870 OpenJDK.
duke@0 871 The above environment variables <b>MUST</b> be set.
duke@0 872 <p>
duke@0 873 Note that this compiler may say it's version is a
duke@0 874 Microsoft Visual Studio .NET 2005 (VS2005), but be careful,
duke@0 875 it will not match the official VS2005 product.
duke@0 876 This Platform SDK compiler is only used on X64 builds.
duke@0 877 </blockquote>
duke@0 878
duke@0 879 </blockquote>
duke@0 880
duke@0 881 <h4><a name="cups">Common UNIX Printing System (CUPS) Headers (Solaris &amp; Linux)</a></h4>
duke@0 882
duke@0 883 <blockquote>
duke@0 884 <p>
duke@0 885 <strong>Solaris:</strong>
duke@0 886 CUPS header files are required for building the
duke@0 887 OpenJDK on Solaris.
duke@0 888 The Solaris header files can be obtained by installing
duke@0 889 the package <strong>SFWcups</strong> from the Solaris Software
duke@0 890 Companion CD/DVD, these often will be installed into
duke@0 891 <tt>/opt/sfw/cups</tt>.
duke@0 892 <p>
duke@0 893 <strong>Linux:</strong>
duke@0 894 CUPS header files are required for building the
duke@0 895 OpenJDK on Linux.
duke@0 896 The Linux header files are usually available from a "cups"
duke@0 897 development package, it's recommended that you try and use
duke@0 898 the package provided by the particular version of Linux that
duke@0 899 you are using.
duke@0 900 <p>
duke@0 901 The CUPS header files can always be downloaded from
duke@0 902 <a href=""></a>.
duke@0 903 The variable
duke@0 904 <tt><a href="#ALT_CUPS_HEADERS_PATH">ALT_CUPS_HEADERS_PATH</a></tt>
duke@0 905 can be used to override the default location of the
duke@0 906 CUPS Header files.
duke@0 907 </blockquote>
duke@0 908
duke@0 909 <h4><a name="freetype">FreeType 2</a></h4>
duke@0 910
duke@0 911 <blockquote>
duke@0 912 <p>
duke@0 913 Version 2.3 or newer of FreeType is required for building the OpenJDK.
duke@0 914 On Unix systems required files can be available as part of your
duke@0 915 distribution (while you still may need to upgrade them).
duke@0 916 Note that you need development version of package that
duke@0 917 includes both FreeType library and header files.
duke@0 918 </p>
duke@0 919 <p>
duke@0 920 You can always download latest FreeType version from the
duke@0 921 <a href="">FreeType website</a>.
duke@0 922 </p>
duke@0 923 <p>
duke@0 924 Makefiles will try to pick FreeType from /usr/lib and /usr/include.
duke@0 925 In case it is installed elsewhere you will need to set environment
duke@0 926 variables
duke@0 927 <tt><a href="#ALT_FREETYPE_LIB_PATH">ALT_FREETYPE_LIB_PATH</a></tt>
duke@0 928 and
duke@0 930 to refer to place where library and header files are installed.
duke@0 931 </p>
duke@0 932 </blockquote>
duke@0 933
duke@0 934 <h4><a name="alsa">Advanced Linux Sound Architecture (ALSA) (Linux only)</a></h4>
duke@0 935
duke@0 936 <blockquote>
duke@0 937 <p>
duke@0 938 <strong>Linux only:</strong>
duke@0 939 Version 0.9.1 or newer of the ALSA files are
duke@0 940 required for building the
duke@0 941 OpenJDK on Linux.
duke@0 942 These Linux files are usually available from an "alsa"
duke@0 943 of "libasound"
duke@0 944 development package, it's recommended that you try and use
duke@0 945 the package provided by the particular version of Linux that
duke@0 946 you are using.
duke@0 947 The makefiles will check this emit a sanity error if it is
duke@0 948 missing or the wrong version.
duke@0 949 As a last resort you can go to the
duke@0 950 <a href="" target="_blank">
duke@0 951 Advanced Linux Sound Architecture Site</a>.
duke@0 952 </blockquote>
duke@0 953
duke@0 954 <h4>Windows Specific Dependencies</h4>
duke@0 955
duke@0 956 <blockquote>
duke@0 957
duke@0 958 <strong>Unix Command Tools (<a name="cygwin">CYGWIN</a>)</strong>
duke@0 959
duke@0 960 <blockquote>
duke@0 961 <p>
duke@0 962 The
duke@0 963 OpenJDK
duke@0 964 requires access to a set of unix command tools
duke@0 965 on Windows which can be supplied by
duke@0 966 <a href="">CYGWIN</a>.
duke@0 967 <p>
duke@0 968 The
duke@0 969 OpenJDK
duke@0 970 build
duke@0 971 requires CYGWIN version 1.5.12 or newer.
duke@0 972 Information about CYGWIN can
duke@0 973 be obtained from the CYGWIN website at
duke@0 974 <a href=""></a>.
duke@0 975 <p>
duke@0 976 By default CYGWIN doesn't install all the tools required for building
duke@0 977 the OpenJDK.
duke@0 978 Along with the default installation, you need to install
duke@0 979 the following tools.
duke@0 980 <blockquote>
duke@0 981 <table border="1">
duke@0 982 <thead>
duke@0 983 <tr>
duke@0 984 <td>Binary Name</td>
duke@0 985 <td>Package</td>
duke@0 986 <td>Description</td>
duke@0 987 </tr>
duke@0 988 </thead>
duke@0 989 <tbody>
duke@0 990 <tr>
duke@0 991 <td>ar.exe</td>
duke@0 992 <td>Devel</td>
duke@0 993 <td>binutils: The GNU assembler, linker and binary
duke@0 994 utilities</td>
duke@0 995 </tr>
duke@0 996 <tr>
duke@0 997 <td>make.exe</td>
duke@0 998 <td>Devel</td>
duke@0 999 <td>make: The GNU version of the 'make' utility</td>
duke@0 1000 </tr>
duke@0 1001 <tr>
duke@0 1002 <td>m4.exe</td>
duke@0 1003 <td>Interpreters</td>
duke@0 1004 <td>m4: GNU implementation of the traditional Unix macro
duke@0 1005 processor</td>
duke@0 1006 </tr>
duke@0 1007 <tr>
duke@0 1008 <td>cpio.exe</td>
duke@0 1009 <td>Utils</td>
duke@0 1010 <td>cpio: A program to manage archives of files</td>
duke@0 1011 </tr>
duke@0 1012 <tr>
duke@0 1013 <td>file.exe</td>
duke@0 1014 <td>Utils</td>
duke@0 1015 <td>file: Determines file type using 'magic' numbers</td>
duke@0 1016 </tr>
duke@0 1017 </tbody>
duke@0 1018 </table>
duke@0 1019 </blockquote>
duke@0 1020 </blockquote>
duke@0 1021
duke@0 1022 <a name="dxsdk">
duke@0 1023 <strong>Microsoft DirectX 9.0 SDK header files and libraries</strong>
duke@0 1024 </a>
duke@0 1025
duke@0 1026 <blockquote>
duke@0 1027 <p>
duke@0 1028 Microsoft DirectX 9.0 SDK (Summer 2004)
duke@0 1029 headers are required for building
duke@0 1030 OpenJDK.
duke@0 1031 This SDK can be downloaded from
duke@0 1032 <a href=";displaylang=en">
duke@0 1033 Microsoft DirectX 9.0 SDK (Summer 2004)</a>.
duke@0 1034 If the link above becomes obsolete, the SDK can be found from
duke@0 1035 <a href="">the Microsoft Download Site</a>
duke@0 1036 (search with "DirectX 9.0 SDK Update Summer 2004").
duke@0 1037 The location of this SDK can be set with
duke@0 1038 <tt><a href="#ALT_DXSDK_PATH">ALT_DXSDK_PATH</a></tt>
duke@0 1039 but it's normally found via the DirectX environment variable
duke@0 1040 <tt>DXSDK_DIR</tt>.
duke@0 1041 </blockquote>
duke@0 1042
duke@0 1043 <a name="msvcrt">
duke@0 1044 <strong><tt>MSVCRT.DLL</tt></strong>
duke@0 1045 </a>
duke@0 1046
duke@0 1047 <blockquote>
duke@0 1048 <p>
duke@0 1049 <strong>i586 only:</strong>
duke@0 1050 The
duke@0 1051 OpenJDK
duke@0 1052 32bit build requires
duke@0 1053 access to <tt>MSVCRT.DLL</tt>
duke@0 1054 version 6.00.8337.0 or newer.
duke@0 1055 If the <tt>MSVCRT.DLL</tt> is not installed in
duke@0 1056 the system32 directory set the
duke@0 1057 <a href="#ALT_MSVCRT_DLL_PATH"><tt>ALT_MSVCRT_DLL_PATH</tt></a>
duke@0 1058 variable to the location.
duke@0 1059 <p>
duke@0 1060 <strong>X64 only:</strong>
duke@0 1061 The OpenJDK 64bit build requires access to
duke@0 1062 <tt>MSVCRT.DLL</tt> version 7.0.3790.0 or newer, which is
duke@0 1063 usually supplied by the
duke@0 1064 <a href="#mssdk">Platform SDK</a>.
duke@0 1065 If it is not available from the Platform SDK,
duke@0 1066 set the
duke@0 1067 <a href="#ALT_MSVCRT_DLL_PATH"><tt>ALT_MSVCRT_DLL_PATH</tt></a>
duke@0 1068 variable to the location.
duke@0 1069 </blockquote>
duke@0 1070
duke@0 1071 <a name="msvcr71">
duke@0 1072 <strong><tt>MSVCR71.DLL</tt></strong>
duke@0 1073 </a>
duke@0 1074
duke@0 1075 <blockquote>
duke@0 1076 <p>
duke@0 1077 <strong>i586 only:</strong>
duke@0 1078 The
duke@0 1079 OpenJDK
duke@0 1080 build requires access to
duke@0 1081 MSVCR71.DLL version 7.10.3052.4 or newer which should be
duke@0 1082 supplied by the
duke@0 1083 <a href="#msvc">Visual Studio product</a>
duke@0 1084 If the <tt>MSVCR71.DLL</tt> is not available from the
duke@0 1085 Visual Studio product
duke@0 1086 set the
duke@0 1087 <a href="#ALT_MSVCR71_DLL_PATH"><tt>ALT_MSVCR71_DLL_PATH</tt></a>
duke@0 1088 variable to the location.
duke@0 1089 </blockquote>
duke@0 1090
duke@0 1091 </blockquote>
duke@0 1092
duke@0 1093
duke@0 1094 </blockquote>
duke@0 1095
duke@0 1096
duke@0 1097 <hr noshade="noshade" size="3">
duke@0 1098
duke@0 1099 <h2><a name="creating">Creating the Build</a></h2>
duke@0 1100
duke@0 1101 <blockquote>
duke@0 1102 <p>
duke@0 1103 Once a machine is setup to build the
duke@0 1104 OpenJDK,
duke@0 1105 the steps to create the
duke@0 1106 build are fairly simple.
duke@0 1107 The various ALT settings can either be made into variables
duke@0 1108 or can be supplied on the
duke@0 1109 <a href="#gmake"><tt><i>gmake</i></tt></a>
duke@0 1110 command.
duke@0 1111 <p>
duke@0 1112 <ol>
duke@0 1113 <li>Use the sanity rule to double check all the ALT settings:
duke@0 1114 <blockquote>
duke@0 1115 <tt>
duke@0 1116 <i>gmake</i>
duke@0 1117 sanity
duke@0 1118 [ARCH_DATA_MODEL=<i>32 or 64</i>]
duke@0 1119 [other "ALT_" overrides]
duke@0 1120 </tt>
duke@0 1121 </blockquote>
duke@0 1122 </li>
duke@0 1123 <li>Start the build with the command:
duke@0 1124 <blockquote>
duke@0 1125 <tt>
duke@0 1126 <i>gmake</i>
duke@0 1127 [ARCH_DATA_MODEL=<i>32 or 64</i>]
duke@0 1128 [ALT_OUTPUTDIR=<i>output_directory</i>]
duke@0 1129 [other "ALT_" overrides]
duke@0 1130 </tt>
duke@0 1131 </blockquote>
duke@0 1132 </li>
duke@0 1133 </ol>
duke@0 1134 <p>
duke@0 1135 <strong>Solaris:</strong>
duke@0 1136 Note that ARCH_DATA_MODEL is really only needed on Solaris to
duke@0 1137 indicate you want to built the 64-bit version.
duke@0 1138 And before the Solaris 64-bit binaries can be used, they
duke@0 1139 must be merged with the binaries from a separate 32-bit build.
duke@0 1140 The merged binaries may then be used in either 32-bit or 64-bit mode, with
duke@0 1141 the selection occurring at runtime
duke@0 1142 with the <tt>-d32</tt> or <tt>-d64</tt> options.
duke@0 1143 </blockquote>
duke@0 1144
duke@0 1145 <!-- ------------------------------------------------------ -->
duke@0 1146 <hr noshade="noshade" size="3">
duke@0 1147
duke@0 1148 <h2><a name="testing">Testing the Build</a></h2>
duke@0 1149
duke@0 1150 <blockquote>
duke@0 1151 <p>
duke@0 1152 When the build is completed, you should see the generated
duke@0 1153 binaries and associated files in the <tt>j2sdk-image</tt>
duke@0 1154 directory in the output directory.
duke@0 1155 The default output directory is
duke@0 1156 <tt>build/<i>platform</i></tt>,
duke@0 1157 where <tt><i>platform</i></tt> is one of
duke@0 1158 <tt><ul>
duke@0 1159 <li>solaris-sparc</li>
duke@0 1160 <li>solaris-sparcv9</li>
duke@0 1161 <li>solaris-i586</li>
duke@0 1162 <li>solaris-amd64</li>
duke@0 1163 <li>linux-i586</li>
duke@0 1164 <li>linux-amd64</li>
duke@0 1165 <li>windows-i586</li>
duke@0 1166 <li>windows-amd64</li>
duke@0 1167 </ul></tt>
duke@0 1168 In particular, the
duke@0 1169 <tt>build/<i>platform</i>/j2sdk-image/bin</tt>
duke@0 1170 directory should contain executables for the
duke@0 1171 OpenJDK
duke@0 1172 tools and utilities.
duke@0 1173 <p>
duke@0 1174 You can test that the build completed properly by using the build
duke@0 1175 to run the various demos that you will find in the
duke@0 1176 <tt>build/<i>platform</i>/j2sdk-image/demo</tt>
duke@0 1177 directory.
duke@0 1178 <p>
duke@0 1179 The provided regression tests can be run with the <tt>jtreg</tt>
duke@0 1180 utility from
duke@0 1181 <a href="">the jtreg site</a>.
duke@0 1182 </blockquote>
duke@0 1183
duke@0 1184 <!-- ------------------------------------------------------ -->
duke@0 1185 <hr noshade="noshade" size="3">
duke@0 1186
duke@0 1187 <h2><a name="variables">Environment/Make Variables</a></h2>
duke@0 1188
duke@0 1189 <p>
duke@0 1190 Some of the
duke@0 1191 environment or make variables (just called <b>variables</b> in this
duke@0 1192 document) that can impact the build are:
duke@0 1193
duke@0 1194 <blockquote>
duke@0 1195
duke@0 1196 <dl>
duke@0 1197
duke@0 1198 <dt><a name="path"><tt>PATH</tt></a> </dt>
duke@0 1199 <dd>Typically you want to set the <tt>PATH</tt> to include:
duke@0 1200 <ul>
duke@0 1201 <li>The location of the GNU make binary</li>
duke@0 1202 <li>The location of the JDK 6 <tt>java</tt>
duke@0 1203 (see <a href="#bootjdk">Bootstrap JDK</a>)</li>
duke@0 1204 <li>The location of the C/C++ compilers
duke@0 1205 (see <a href="#compilers"><tt>compilers</tt></a>)</li>
duke@0 1206 <li>The location or locations for the Unix command utilities
duke@0 1207 (e.g. <tt>/usr/bin</tt>)</li>
duke@0 1208 </ul>
duke@0 1209 </dd>
duke@0 1210
duke@0 1211 <dt><a name="arch_data_model"><tt>ARCH_DATA_MODEL</tt></a></dt>
duke@0 1212 <dd>The <tt>ARCH_DATA_MODEL</tt> variable
duke@0 1213 is used to specify whether the build is to generate 32-bit or 64-bit
duke@0 1214 binaries.
duke@0 1215 The Solaris build supports either 32-bit or 64-bit builds, but
duke@0 1216 Windows and Linux will support only one, depending on the specific
duke@0 1217 OS being used.
duke@0 1218 Normally, setting this variable is only necessary on Solaris.
duke@0 1219 Set <tt>ARCH_DATA_MODEL</tt> to <tt>32</tt> for generating 32-bit binaries,
duke@0 1220 or to <tt>64</tt> for generating 64-bit binaries.
duke@0 1221 </dd>
duke@0 1222
duke@0 1223 <dt><a name="ALT_BOOTDIR"><tt>ALT_BOOTDIR</tt></a></dt>
duke@0 1224 <dd>
duke@0 1225 The location of the bootstrap JDK installation.
duke@0 1226 See <a href="#bootjdk">Bootstrap JDK</a> for more information.
duke@0 1227 You should always install your own local Bootstrap JDK and
duke@0 1228 always set <tt>ALT_BOOTDIR</tt> explicitly.
duke@0 1229 </dd>
duke@0 1230
duke@0 1231 <dt><a name="ALT_OUTPUTDIR"><tt>ALT_OUTPUTDIR</tt></a> </dt>
duke@0 1232 <dd>
duke@0 1233 An override for specifying the (absolute) path of where the
duke@0 1234 build output is to go.
duke@0 1235 The default output directory will be build/<i>platform</i>.
duke@0 1236 </dd>
duke@0 1237
duke@0 1238 <dt><a name="ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a> </dt>
duke@0 1239 <dd>
duke@0 1240 The location of the C/C++ compiler.
duke@0 1241 The default varies depending on the platform.
duke@0 1242 </dd>
duke@0 1243
duke@0 1244 <dt><tt><a name="ALT_CACERTS_FILE">ALT_CACERTS_FILE</a></tt></dt>
duke@0 1245 <dd>
duke@0 1246 The location of the <a href="#cacerts">cacerts</a> file.
duke@0 1247 The default will refer to
duke@0 1248 <tt>jdk/src/share/lib/security/cacerts</tt>.
duke@0 1249 </dd>
duke@0 1250
duke@0 1251 <dt><a name="ALT_BINARY_PLUGS_PATH"><tt>ALT_BINARY_PLUGS_PATH</tt></a></dt>
duke@0 1252 <dd>
duke@0 1253 The location of the binary plugs installation.
duke@0 1254 See <a href="#binaryplugs">Binary Plugs</a> for more information.
duke@0 1255 You should always have a local copy of a
duke@0 1256 recent Binary Plugs install image
duke@0 1257 and set this variable to that location.
duke@0 1258 </dd>
duke@0 1259
duke@0 1260 <dt><a name="ALT_CUPS_HEADERS_PATH"><tt>ALT_CUPS_HEADERS_PATH</tt></a> </dt>
duke@0 1261 <dd>
duke@0 1262 The location of the CUPS header files.
duke@0 1263 See <a href="#cups">CUPS information</a> for more information.
duke@0 1264 If this path does not exist the fallback path is
duke@0 1265 <tt>/usr/include</tt>.
duke@0 1266 </dd>
duke@0 1267
duke@0 1268
duke@0 1269 <dt><a name="ALT_FREETYPE_LIB_PATH"><tt>ALT_FREETYPE_LIB_PATH</tt></a></dt>
duke@0 1270 <dd>
duke@0 1271 The location of the FreeType shared library.
duke@0 1272 See <a href="#freetype">FreeType information</a> for details.
duke@0 1273 </dd>
duke@0 1274
duke@0 1275 <dt><a name="ALT_FREETYPE_HEADERS_PATH"><tt>ALT_FREETYPE_HEADERS_PATH</tt></a></dt>
duke@0 1276 <dd>
duke@0 1277 The location of the FreeType header files.
duke@0 1278 See <a href="#freetype">FreeType information</a> for details.
duke@0 1279 </dd>
duke@0 1280
duke@0 1281 <dt><strong>Windows specific:</strong></dt>
duke@0 1282 <dd>
duke@0 1283 <dl>
duke@0 1284 <dt><a name="ALT_MSDEVTOOLS_PATH"><tt>ALT_MSDEVTOOLS_PATH</tt></a> </dt>
duke@0 1285 <dd>
duke@0 1286 The location of the Microsoft Visual Studio .NET 2003
duke@0 1287 tools 'bin' directory.
duke@0 1288 The default is usually derived from
duke@0 1289 <a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a>.
duke@0 1290 </dd>
duke@0 1291
duke@0 1292 <dt><tt><a name="ALT_DXSDK_PATH">ALT_DXSDK_PATH</a></tt> </dt>
duke@0 1293 <dd>
duke@0 1294 The location of the
duke@0 1295 <a href="#dxsdk">Microsoft DirectX 9 SDK</a>.
duke@0 1296 The default will be to try and use the DirectX environment
duke@0 1297 variable <tt>DXSDK_DIR</tt>,
duke@0 1298 failing that, look in <tt>C:/DXSDK</tt>.
duke@0 1299 </dd>
duke@0 1300
duke@0 1301 <dt><tt><a name="ALT_MSVCRT_DLL_PATH">ALT_MSVCRT_DLL_PATH</a></tt> </dt>
duke@0 1302 <dd>
duke@0 1303 The location of the
duke@0 1304 <a href="#msvcrt"><tt>MSVCRT.DLL</tt></a>.
duke@0 1305 </dd>
duke@0 1306
duke@0 1307 <dt><tt><a name="ALT_MSVCR71_DLL_PATH">ALT_MSVCR71_DLL_PATH</a></tt> </dt>
duke@0 1308 <dd>
duke@0 1309 <strong>i586 only:</strong>
duke@0 1310 The location of the
duke@0 1311 <a href="#msvcr71"><tt>MSVCR71.DLL</tt></a>.
duke@0 1312 </dd>
duke@0 1313 </dl>
duke@0 1314 </dd>
duke@0 1315
duke@0 1316 </dl>
duke@0 1317 </blockquote>
duke@0 1318
duke@0 1319 <!-- ------------------------------------------------------ -->
duke@0 1320 <hr noshade="noshade" size="3">
duke@0 1321
duke@0 1322 <h2><a name="troubleshooting">Troubleshooting</a></h2>
duke@0 1323
duke@0 1324 <blockquote>
duke@0 1325 <p>
duke@0 1326 A build can fail for any number of reasons.
duke@0 1327 Most failures
duke@0 1328 are a result of trying to build in an environment in which all the
duke@0 1329 pre-build requirements have not been met.
duke@0 1330 The first step in
duke@0 1331 troubleshooting a build failure is to recheck that you have satisfied
duke@0 1332 all the pre-build requirements for your platform.
duke@0 1333 Look for the check list of the platform you are building on in the
duke@0 1334 <a href="#contents">Table of Contents</a>.
duke@0 1335
duke@0 1336 <p>
duke@0 1337 You can validate your build environment by using the <tt>sanity</tt>
duke@0 1338 target.
duke@0 1339 Any errors listed
duke@0 1340 will stop the build from starting, and any warnings may result in
duke@0 1341 a flawed product build.
duke@0 1342 We strongly encourage you to evaluate every
duke@0 1343 sanity check warning and fix it if required, before you proceed
duke@0 1344 further with your build.
duke@0 1345
duke@0 1346 <p>
duke@0 1347 Some of the more common problems with builds are briefly described
duke@0 1348 below, with suggestions for remedies.
duke@0 1349
duke@0 1350 <ul>
duke@0 1351 <li>
duke@0 1352 <b>Slow Builds:</b>
duke@0 1353 <blockquote>
duke@0 1354 <p>
duke@0 1355 If your build machine seems to be overloaded from too many
duke@0 1356 simultaneous C++ compiles, try setting the <tt>HOTSPOT_BUILD_JOBS</tt>
duke@0 1357 variable to <tt>1</tt> (if you're using a multiple CPU
duke@0 1358 machine, setting it to more than the the number of CPUs is probably
duke@0 1359 not a good idea).
duke@0 1360 <p>
duke@0 1361 Creating the javadocs can be very slow, if you are running
duke@0 1362 javadoc, consider skipping that step.
duke@0 1363 <p>
duke@0 1364 Faster hardware and more RAM always helps too.
duke@0 1365 The VM build tends to be CPU intensive (many C++ compiles),
duke@0 1366 and the rest of the JDK will often be disk intensive.
duke@0 1367 <p>
duke@0 1368 Faster compiles are possible using a tool called
duke@0 1369 <a href="">ccache</a>.
duke@0 1370 </blockquote>
duke@0 1371 </li>
duke@0 1372 <li>
duke@0 1373 <b>File time issues:</b>
duke@0 1374 <blockquote>
duke@0 1375 <p>
duke@0 1376 If you see warnings that refer to file time stamps, e.g.
duke@0 1377 <blockquote>
duke@0 1378 <i>Warning message:</i><tt> File `xxx' has modification time in
duke@0 1379 the future.</tt>
duke@0 1380 <br>
duke@0 1381 <i>Warning message:</i> <tt> Clock skew detected. Your build may
duke@0 1382 be incomplete.</tt>
duke@0 1383 </blockquote>
duke@0 1384 <p>
duke@0 1385 These warnings can occur when the clock on the build machine is out of
duke@0 1386 sync with the timestamps on the source files. Other errors, apparently
duke@0 1387 unrelated but in fact caused by the clock skew, can occur along with
duke@0 1388 the clock skew warnings. These secondary errors may tend to obscure the
duke@0 1389 fact that the true root cause of the problem is an out-of-sync clock.
duke@0 1390 For example, an out-of-sync clock has been known to cause an old
duke@0 1391 version of javac to be used to compile some files, resulting in errors
duke@0 1392 when the pre-1.4 compiler ran across the new <tt>assert</tt> keyword
duke@0 1393 in the 1.4 source code.
duke@0 1394 <p>
duke@0 1395 If you see these warnings, reset the clock on the build
duke@0 1396 machine, run "<tt><i>gmake</i> clobber</tt>" or delete the directory
duke@0 1397 containing the build output, and restart the build from the beginning.
duke@0 1398 </blockquote>
duke@0 1399 </li>
duke@0 1400 <li>
duke@0 1401 <b>Error message: <tt>Trouble writing out table to disk</tt></b>
duke@0 1402 <blockquote>
duke@0 1403 <p>
duke@0 1404 Increase the amount of swap space on your build machine.
duke@0 1405 </blockquote>
duke@0 1406 </li>
duke@0 1407 <li>
duke@0 1408 <b>Error Message: <tt>libstdc++ not found:</tt></b>
duke@0 1409 <blockquote>
duke@0 1410 This is caused by a missing libstdc++.a library.
duke@0 1411 This is installed as part of a specific package
duke@0 1412 (e.g.
duke@0 1413 By default some 64bit Linux versions (e.g. Fedora)
duke@0 1414 only install the 64bit version of the libstdc++ package.
duke@0 1415 Various parts of the JDK build require a static
duke@0 1416 link of the C++ runtime libraries to allow for maximum
duke@0 1417 portability of the built images.
duke@0 1418 </blockquote>
duke@0 1419 </li>
duke@0 1420 <li>
duke@0 1421 <b>Error Message: <tt>cannot restore segment prot after reloc</tt></b>
duke@0 1422 <blockquote>
duke@0 1423 This is probably an issue with SELinux (See
duke@0 1424 <a href=""></a>).
duke@0 1425 Parts of the VM is built without the <tt>-fPIC</tt> for
duke@0 1426 performance reasons.
duke@0 1427 <p>
duke@0 1428 To completely disable SELinux:
duke@0 1429 <ol><tt>
duke@0 1430
duke@0 1431 <li>$ su root</li>
duke@0 1432 <li># system-config-securitylevel</li>
duke@0 1433 <li>In the window that appears, select the SELinux tab</li>
duke@0 1434 <li>Disable SELinux</li>
duke@0 1435 </ol></tt>
duke@0 1436 <p>
duke@0 1437 Alternatively, instead of completely disabling it you could
duke@0 1438 disable just this one check.
duke@0 1439 <ol><tt>
duke@0 1440 <li>Select System->Administration->SELinux Management</li>
duke@0 1441 <li>In the SELinux Management Tool which appears,
duke@0 1442 select "Boolean" from the menu on the left</li>
duke@0 1443 <li>Expand the "Memory Protection" group</li>
duke@0 1444 <li>Check the first item, labeled
duke@0 1445 "Allow all unconfined executables to use libraries requiring text relocation ..."</li>
duke@0 1446 </ol></tt>
duke@0 1447 </blockquote>
duke@0 1448 </li>
duke@0 1449 </ul>
duke@0 1450 </blockquote>
duke@0 1451
duke@0 1452 <hr noshade="noshade" size="3">