README-builds.html

Tue, 23 Oct 2012 10:10:49 -0700

author
tbell
date
Tue, 23 Oct 2012 10:10:49 -0700
changeset 487
c12e759ac4e8
parent 445
efd26e051e50
child 632
d3e3d5b06f45
permissions
-rw-r--r--

7152336: Enable builds on Windows with MinGW/MSYS
Summary: Minimal makefile changes to enable building OpenJDK using MSYS on Windows7
Reviewed-by: ohair, tbell
Contributed-by: volker.simonis@gmail.com

duke@2 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
duke@2 2 <html>
ohair@13 3 <head>
ohair@13 4 <title>OpenJDK Build README</title>
ohair@13 5 </head>
ohair@13 6 <body style="background-color:lightcyan">
ohair@13 7 <!-- ====================================================== -->
ohair@41 8 <table width="100%">
ohair@13 9 <tr>
ohair@13 10 <td align="center">
ohair@25 11 <img alt="OpenJDK"
ohair@25 12 src="http://openjdk.java.net/images/openjdk.png"
ohair@25 13 width=256 />
ohair@13 14 </td>
ohair@13 15 </tr>
ohair@13 16 <tr>
ohair@13 17 <td align=center>
ohair@13 18 <h1>OpenJDK Build README</h1>
ohair@13 19 </td>
ohair@13 20 </tr>
ohair@13 21 </table>
ohair@13 22 <!-- ------------------------------------------------------ -->
ohair@13 23 <hr>
ohair@13 24 <h2><a name="introduction">Introduction</a></h2>
ohair@13 25 <blockquote>
ohair@13 26 <p>
ohair@276 27 This README file contains build instructions for the
ohair@276 28 <a href="http://openjdk.java.net" target="_blank">OpenJDK</a>.
ohair@276 29 Building the source code for the
ohair@276 30 OpenJDK
ohair@276 31 requires
ohair@276 32 a certain degree of technical expertise.
ohair@13 33 </blockquote>
ohair@13 34 <!-- ------------------------------------------------------ -->
ohair@13 35 <hr>
ohair@13 36 <h2><a name="contents">Contents</a></h2>
ohair@13 37 <blockquote>
ohair@13 38 <ul>
ohair@13 39 <li><a href="#introduction">Introduction</a></li>
ohair@276 40 <li><a href="#hg">Use of Mercurial</a>
ohair@276 41 <ul>
ohair@276 42 <li><a href="#get_source">Getting the Source</a></li>
ohair@276 43 </ul>
ohair@276 44 </li>
ohair@13 45 <li><a href="#MBE">Minimum Build Environments</a></li>
robilad@132 46 <li><a href="#SDBE">Specific Developer Build Environments</a>
ohair@41 47 <ul>
ohair@41 48 <li><a href="#fedora">Fedora Linux</a> </li>
ohair@41 49 <li><a href="#centos">CentOS Linux</a> </li>
ohair@276 50 <li><a href="#debian">Debian GNU/Linux</a></li>
ohair@276 51 <li><a href="#ubuntu">Ubuntu Linux</a> </li>
ohair@276 52 <li><a href="#opensuse">OpenSUSE</a></li>
ohair@276 53 <li><a href="#mandriva">Mandriva</a></li>
ohair@276 54 <li><a href="#opensolaris">OpenSolaris</a></li>
ohair@41 55 </ul>
ohair@276 56 </li>
ohair@320 57 <li><a href="#directories">Source Directory Structure</a>
ohair@320 58 <ul>
ohair@320 59 <li><a href="#drops">Managing the Source Drops</a></li>
ohair@320 60 </ul>
ohair@320 61 </li>
ohair@13 62 <li><a href="#building">Build Information</a>
ohair@13 63 <ul>
ohair@13 64 <li><a href="#gmake">GNU Make (<tt><i>gmake</i></tt>)</a> </li>
ohair@13 65 <li><a href="#linux">Basic Linux System Setup</a> </li>
ohair@13 66 <li><a href="#solaris">Basic Solaris System Setup</a> </li>
ohair@13 67 <li><a href="#windows">Basic Windows System Setup</a> </li>
ewendeli@433 68 <li><a href="#macosx">Basic Mac OS X System Setup</a></li>
ohair@276 69 <li><a href="#dependencies">Build Dependencies</a>
ohair@276 70 <ul>
ohair@276 71 <li><a href="#bootjdk">Bootstrap JDK</a> </li>
ohair@276 72 <li><a href="#importjdk">Optional Import JDK</a> </li>
ohair@320 73 <li><a href="#ant">Ant 1.7.1</a> </li>
ohair@276 74 <li><a href="#cacerts">Certificate Authority File (cacert)</a> </li>
ohair@276 75 <li><a href="#compilers">Compilers</a>
ohair@276 76 <ul>
ohair@276 77 <li><a href="#msvc32">Microsoft Visual Studio Professional/Express for 32 bit</a> </li>
ohair@276 78 <li><a href="#msvc64">Microsoft Visual Studio Professional for 64 bit</a> </li>
ohair@276 79 <li><a href="#mssdk64">Microsoft Windows SDK for 64 bit</a> </li>
ohair@276 80 <li><a href="#gcc">Linux gcc/binutils</a> </li>
ohair@276 81 <li><a href="#studio">Sun Studio</a> </li>
ohair@276 82 </ul>
ohair@276 83 </li>
ohair@276 84 <li><a href="#zip">Zip and Unzip</a> </li>
ohair@276 85 <li><a href="#freetype">FreeType2 Fonts</a> </li>
ohair@276 86 <li>Linux and Solaris:
ohair@276 87 <ul>
ohair@276 88 <li><a href="#cups">CUPS Include files</a> </li>
ohair@276 89 <li><a href="#xrender">XRender Include files</a></li>
ohair@276 90 </ul>
ohair@276 91 </li>
ohair@276 92 <li>Linux only:
ohair@276 93 <ul>
ohair@276 94 <li><a href="#alsa">ALSA files</a> </li>
ohair@276 95 </ul>
ohair@276 96 </li>
ohair@276 97 <li>Windows only:
ohair@276 98 <ul>
tbell@487 99 <li>Unix Command Tools (<a href="#cygwin">CYGWIN</a>) <strong>or</strong></li>
tbell@487 100 <li>Minimalist GNU for Windows (<a href="#msys">MinGW/MSYS</a>)</li>
ohair@276 101 <li><a href="#dxsdk">DirectX 9.0 SDK</a> </li>
ohair@276 102 </ul>
ohair@276 103 </li>
ohair@276 104 </ul>
ohair@276 105 </li>
ohair@13 106 </ul>
ohair@13 107 </li>
ohair@13 108 <li><a href="#creating">Creating the Build</a> </li>
ohair@13 109 <li><a href="#testing">Testing the Build</a> </li>
ohair@13 110 <li><a href="#variables">Environment/Make Variables</a></li>
ohair@13 111 <li><a href="#troubleshooting">Troubleshooting</a></li>
erikj@445 112 <li><a href="#newbuild">The New Build</a></li>
ohair@13 113 </ul>
ohair@13 114 </blockquote>
ohair@276 115
ohair@276 116 <!-- ------------------------------------------------------ -->
ohair@276 117 <hr>
ohair@276 118 <h2><a name="hg">Use of Mercurial</a></h2>
ohair@276 119 <blockquote>
ohair@276 120 The OpenJDK sources are maintained with the revision control system
ohair@276 121 <a href="http://mercurial.selenic.com/wiki/Mercurial">Mercurial</a>.
ohair@276 122 If you are new to Mercurial, please see the
ohair@276 123 <a href="http://mercurial.selenic.com/wiki/BeginnersGuides">Beginner Guides</a>
ohair@320 124 or refer to the <a href="http://hgbook.red-bean.com/">Mercurial Book</a>.
ohair@276 125 The first few chapters of the book provide an excellent overview of
ohair@276 126 Mercurial, what it is and how it works.
ohair@276 127 <br>
ohair@276 128 For using Mercurial with the OpenJDK refer to the
ohair@320 129 <a href="http://openjdk.java.net/guide/repositories.html#installConfig">
ohair@320 130 Developer Guide: Installing and Configuring Mercurial</a>
ohair@276 131 section for more information.
ohair@276 132
ohair@276 133 <!-- ------------------------------------------------------ -->
ohair@276 134 <h3><a name="get_source">Getting the Source</a></h3>
ohair@276 135 <blockquote>
ohair@276 136 To get the entire set of OpenJDK Mercurial repositories
neugens@359 137 use the script <code>get_source.sh</code> located in the root repository:
ohair@276 138 <blockquote>
ohair@276 139 <tt>
neugens@359 140 hg clone http://hg.openjdk.java.net/jdk8/jdk8 <i>YourOpenJDK</i>
ohair@276 141 <br>cd <i>YourOpenJDK</i>
ohair@276 142 <br>sh ./get_source.sh
ohair@276 143 </tt>
ohair@276 144 </blockquote>
ohair@276 145 Once you have all the repositories, the
ohair@276 146 script <tt>make/scripts/hgforest.sh</tt>
ohair@276 147 can be used to repeat the same <tt>hg</tt>
ohair@276 148 command on every repository in the forest, e.g.
ohair@276 149 <blockquote>
ohair@276 150 <tt>
ohair@276 151 cd <i>YourOpenJDK</i>
ohair@276 152 <br>sh ./make/scripts/hgforest.sh pull -u
ohair@276 153 </tt>
ohair@276 154 </blockquote>
ohair@276 155 </blockquote>
ohair@276 156
ohair@276 157 </blockquote>
ohair@276 158
ohair@13 159 <!-- ------------------------------------------------------ -->
ohair@13 160 <hr>
ohair@13 161 <h2><a name="MBE">Minimum Build Environments</a></h2>
ohair@13 162 <blockquote>
ohair@13 163 This file often describes specific requirements for what we call the
ohair@49 164 "minimum build environments" (MBE) for this
tbell@487 165 specific release of the JDK,
ohair@13 166 Building with the MBE will generate the most compatible
ohair@13 167 bits that install on, and run correctly on, the most variations
ohair@13 168 of the same base OS and hardware architecture.
ohair@13 169 These usually represent what is often called the
ohair@13 170 least common denominator platforms.
ohair@13 171 It is understood that most developers will NOT be using these
ohair@13 172 specific platforms, and in fact creating these specific platforms
ohair@13 173 may be difficult due to the age of some of this software.
ohair@13 174 <p>
ohair@276 175 The minimum OS and C/C++ compiler versions needed for building the
ohair@276 176 OpenJDK:
ohair@13 177 <p>
ohair@13 178 <table border="1">
ohair@13 179 <thead>
ohair@13 180 <tr>
ohair@13 181 <th>Base OS and Architecture</th>
ohair@13 182 <th>OS</th>
ohair@49 183 <th>C/C++ Compiler</th>
xdono@105 184 <th>BOOT JDK</th>
ohair@13 185 </tr>
ohair@13 186 </thead>
ohair@13 187 <tbody>
ohair@13 188 <tr>
ohair@49 189 <td>Linux X86 (32-bit)</td>
ohair@49 190 <td>Fedora 9</td>
ohair@320 191 <td>gcc 4.3 </td>
ohair@320 192 <td>JDK 6u18</td>
ohair@13 193 </tr>
ohair@13 194 <tr>
ohair@49 195 <td>Linux X64 (64-bit)</td>
ohair@49 196 <td>Fedora 9</td>
ohair@320 197 <td>gcc 4.3 </td>
ohair@320 198 <td>JDK 6u18</td>
ohair@13 199 </tr>
ohair@13 200 <tr>
ohair@49 201 <td>Solaris SPARC (32-bit)</td>
ohair@320 202 <td>Solaris 10 Update 6</td>
ohair@211 203 <td>Sun Studio 12 Update 1 + patches</td>
ohair@320 204 <td>JDK 6u18</td>
ohair@13 205 </tr>
ohair@13 206 <tr>
ohair@49 207 <td>Solaris SPARCV9 (64-bit)</td>
ohair@320 208 <td>Solaris 10 Update 6</td>
ohair@211 209 <td>Sun Studio 12 Update 1 + patches</td>
ohair@320 210 <td>JDK 6u18</td>
ohair@13 211 </tr>
ohair@13 212 <tr>
ohair@49 213 <td>Solaris X86 (32-bit)</td>
ohair@320 214 <td>Solaris 10 Update 6</td>
ohair@211 215 <td>Sun Studio 12 Update 1 + patches</td>
ohair@320 216 <td>JDK 6u18</td>
ohair@13 217 </tr>
ohair@13 218 <tr>
ohair@49 219 <td>Solaris X64 (64-bit)</td>
ohair@320 220 <td>Solaris 10 Update 6</td>
ohair@211 221 <td>Sun Studio 12 Update 1 + patches</td>
ohair@320 222 <td>JDK 6u18</td>
ohair@13 223 </tr>
ohair@13 224 <tr>
ohair@49 225 <td>Windows X86 (32-bit)</td>
ohair@13 226 <td>Windows XP</td>
prr@175 227 <td>Microsoft Visual Studio C++ 2010 Professional Edition</td>
ohair@320 228 <td>JDK 6u18</td>
ohair@13 229 </tr>
ohair@13 230 <tr>
ohair@49 231 <td>Windows X64 (64-bit)</td>
ohair@13 232 <td>Windows Server 2003 - Enterprise x64 Edition</td>
prr@175 233 <td>Microsoft Visual Studio C++ 2010 Professional Edition</td>
ohair@320 234 <td>JDK 6u18</td>
ohair@13 235 </tr>
ewendeli@433 236 <tr>
ewendeli@433 237 <td>Mac OS X X64 (64-bit)</td>
ewendeli@433 238 <td>Mac OS X 10.7.3 "Lion"</td>
ewendeli@433 239 <td>XCode 4.1 or later</td>
ewendeli@433 240 <td>Java for OS X Lion Update 1</td>
ewendeli@433 241 </tr>
ohair@13 242 </tbody>
ohair@13 243 </table>
ohair@276 244 <p>
tbell@487 245 These same sources do indeed build on many more systems than the
tbell@487 246 above older generation systems, again the above is just a minimum.
ohair@276 247 <p>
tbell@487 248 Compilation problems with newer or different C/C++ compilers is a
tbell@487 249 common problem.
tbell@487 250 Similarly, compilation problems related to changes to the
ohair@276 251 <tt>/usr/include</tt> or system header files is also a
tbell@487 252 common problem with newer or unreleased OS versions.
tbell@487 253 Please report these types of problems as bugs so that they
tbell@487 254 can be dealt with accordingly.
ohair@13 255 </blockquote>
ohair@13 256 <!-- ------------------------------------------------------ -->
ohair@13 257 <hr>
ohair@13 258 <h2><a name="SDBE">Specific Developer Build Environments</a></h2>
ohair@13 259 <blockquote>
ohair@13 260 We won't be listing all the possible environments, but
ohair@13 261 we will try to provide what information we have available to us.
ohair@13 262 </blockquote>
ohair@13 263 <!-- ------------------------------------------------------ -->
robilad@132 264 <h3><a name="fedora">Fedora</a></h3>
ohair@13 265 <blockquote>
ohair@276 266 <h4>Fedora 9</h4>
ohair@276 267 <p>
ohair@276 268 <blockquote>
ohair@276 269 After installing <a href="http://fedoraproject.org">Fedora</a> 9
tbell@487 270 you need to install several build dependencies. The simplest
tbell@487 271 way to do it is to execute the following commands as user
ohair@276 272 <tt>root</tt>:
ohair@276 273 <p/>
ohair@320 274 <code>yum-builddep java-1.6.0-openjdk</code>
ohair@276 275 <p/>
ohair@276 276 <code>yum install gcc gcc-c++</code>
ohair@276 277 <p/>
tbell@487 278 In addition, it's necessary to set a few environment variables for the build:
robilad@132 279
ohair@276 280 <p/>
ohair@276 281 <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk</code>
ohair@41 282 </blockquote>
ohair@276 283 <h4>Fedora 10</h4>
ohair@276 284 <p>
ohair@276 285 <blockquote>
ohair@276 286 After installing <a href="http://fedoraproject.org">Fedora</a> 10
tbell@487 287 you need to install several build dependencies. The simplest
tbell@487 288 way to do it is to execute the following commands as user
ohair@276 289 <tt>root</tt>:
ohair@276 290 <p/>
ohair@276 291 <code>yum-builddep java-1.6.0-openjdk</code>
ohair@276 292 <p/>
ohair@276 293 <code>yum install gcc gcc-c++</code>
ohair@276 294 <p/>
tbell@487 295 In addition, it's necessary to set a few environment variables for the build:
robilad@132 296
ohair@276 297 <p/>
ohair@276 298 <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk</code>
robilad@132 299 </blockquote>
ohair@276 300 <h4>Fedora 11</h4>
ohair@276 301 <p>
ohair@276 302 <blockquote>
ohair@276 303 After installing <a href="http://fedoraproject.org">Fedora</a> 11
tbell@487 304 you need to install several build dependencies. The simplest
tbell@487 305 way to do it is to execute the following commands as user
ohair@276 306 <tt>root</tt>:
ohair@276 307 <p/>
ohair@276 308 <code>yum-builddep java-1.6.0-openjdk</code>
ohair@276 309 <p/>
ohair@276 310 <code>yum install gcc gcc-c++</code>
ohair@276 311 <p/>
tbell@487 312 In addition, it's necessary to set a few environment variables for the build:
robilad@132 313
ohair@276 314 <p/>
ohair@276 315 <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk</code>
ohair@276 316 </blockquote>
ohair@13 317 </blockquote>
ohair@13 318 <!-- ------------------------------------------------------ -->
ohair@320 319 <h3><a name="centos">CentOS 5.5</a></h3>
ohair@13 320 <blockquote>
ohair@41 321 After installing
ohair@320 322 <a href="http://www.centos.org/">CentOS 5.5</a>
ohair@41 323 you need to make sure you have
ohair@41 324 the following Development bundles installed:
ohair@41 325 <blockquote>
ohair@41 326 <ul>
ohair@41 327 <li>Development Libraries</li>
ohair@41 328 <li>Development Tools</li>
ohair@41 329 <li>Java Development</li>
ohair@320 330 <li>X Software Development (Including XFree86-devel)</li>
ohair@41 331 </ul>
ohair@41 332 </blockquote>
ohair@41 333 <p>
ohair@276 334 Plus the following packages:
ohair@41 335 <blockquote>
ohair@41 336 <ul>
ohair@41 337 <li>cups devel: Cups Development Package</li>
ohair@41 338 <li>alsa devel: Alsa Development Package</li>
ohair@41 339 <li>ant: Ant Package</li>
ohair@41 340 <li>Xi devel: libXi.so Development Package</li>
ohair@41 341 </ul>
ohair@41 342 </blockquote>
ohair@41 343 <p>
ohair@276 344 The freetype 2.3 packages don't seem to be available,
ohair@276 345 but the freetype 2.3 sources can be downloaded, built,
ohair@276 346 and installed easily enough from
ohair@276 347 <a href="http://downloads.sourceforge.net/freetype">
ohair@276 348 the freetype site</a>.
ohair@276 349 Build and install with something like:
ohair@41 350 <blockquote>
ohair@41 351 <tt>./configure && make && sudo -u root make install</tt>
ohair@41 352 </blockquote>
ohair@41 353 <p>
ohair@276 354 Mercurial packages could not be found easily, but a Google
ohair@276 355 search should find ones, and they usually include Python if
ohair@276 356 it's needed.
ohair@13 357 </blockquote>
ohair@13 358 <!-- ------------------------------------------------------ -->
robilad@132 359 <h3><a name="debian">Debian</a></h3>
ohair@13 360 <blockquote>
robilad@132 361 <h4>Debian 5.0 (Lenny)</h4>
ohair@13 362 <p>
ohair@276 363 <blockquote>
tbell@487 364 After installing <a href="http://debian.org">Debian</a> 5
tbell@487 365 you need to install several build dependencies.
tbell@487 366 The simplest way to install the build dependencies is to
tbell@487 367 execute the following commands as user <tt>root</tt>:
ohair@276 368 <p/>
ohair@276 369 <code>aptitude build-dep openjdk-6</code>
ohair@276 370 <p/>
ohair@276 371 <code>aptitude install openjdk-6-jdk libmotif-dev</code>
ohair@276 372 <p/>
tbell@487 373 In addition, it's necessary to set a few environment variables for the build:
ohair@276 374 <p/>
ohair@276 375 <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code>
ohair@276 376 </blockquote>
robilad@132 377 </blockquote>
robilad@132 378 <!-- ====================================================== -->
ohair@276 379 <h3><a name="ubuntu">Ubuntu</a></h3>
robilad@132 380 <blockquote>
robilad@132 381 <h4>Ubuntu 8.04</h4>
ohair@13 382 <p>
ohair@276 383 <blockquote>
tbell@487 384 After installing <a href="http://ubuntu.org">Ubuntu</a> 8.04
tbell@487 385 you need to install several build dependencies.
ohair@276 386 <p/>
tbell@487 387 First, you need to enable the universe repository in the
tbell@487 388 Software Sources application and reload the repository
tbell@487 389 information. The Software Sources application is available
tbell@487 390 under the System/Administration menu.
ohair@276 391 <p/>
tbell@487 392 The simplest way to install the build dependencies is to
tbell@487 393 execute the following commands:
ohair@276 394 <p/>
ohair@276 395 <code>sudo aptitude build-dep openjdk-6</code>
ohair@276 396 <p/>
ohair@276 397 <code>sudo aptitude install openjdk-6-jdk</code>
ohair@276 398 <p/>
tbell@487 399 In addition, it's necessary to set a few environment variables for the build:
ohair@276 400 <p/>
ohair@276 401 <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code>
ohair@276 402 </blockquote>
ohair@276 403 <h4>Ubuntu 8.10</h4>
ohair@13 404 <p>
ohair@276 405 <blockquote>
tbell@487 406 After installing <a href="http://ubuntu.org">Ubuntu</a> 8.10
tbell@487 407 you need to install several build dependencies. The simplest
tbell@487 408 way to do it is to execute the following commands:
ohair@276 409 <p/>
ohair@276 410 <code>sudo aptitude build-dep openjdk-6</code>
ohair@276 411 <p/>
ohair@276 412 <code>sudo aptitude install openjdk-6-jdk</code>
ohair@276 413 <p/>
tbell@487 414 In addition, it's necessary to set a few environment variables for the build:
ohair@276 415 <p/>
ohair@276 416 <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code>
ohair@276 417 </blockquote>
ohair@276 418 <h4>Ubuntu 9.04</h4>
ohair@13 419 <p>
ohair@276 420 <blockquote>
tbell@487 421 After installing <a href="http://ubuntu.org">Ubuntu</a> 9.04
tbell@487 422 you need to install several build dependencies. The simplest
tbell@487 423 way to do it is to execute the following commands:
ohair@276 424 <p/>
ohair@276 425 <code>sudo aptitude build-dep openjdk-6</code>
ohair@276 426 <p/>
ohair@276 427 <code>sudo aptitude install openjdk-6-jdk</code>
ohair@276 428 <p/>
tbell@487 429 In addition, it's necessary to set a few environment variables for the build:
ohair@276 430 <p/>
ohair@276 431 <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code>
ohair@276 432 </blockquote>
ohair@13 433 </blockquote>
robilad@132 434 <!-- ====================================================== -->
robilad@132 435 <h3><a name="opensuse">OpenSUSE</a></h3>
robilad@132 436 <blockquote>
robilad@132 437 <h4>OpenSUSE 11.1</h4>
robilad@132 438 <p>
ohair@276 439 <blockquote>
tbell@487 440 After installing <a href="http://opensuse.org">OpenSUSE</a> 11.1
tbell@487 441 you need to install several build dependencies.
tbell@487 442 The simplest way to install the build dependencies is to
tbell@487 443 execute the following commands:
ohair@276 444 <p/>
ohair@276 445 <code>sudo zypper source-install -d java-1_6_0-openjdk</code>
ohair@276 446 <p/>
ohair@276 447 <code>sudo zypper install make</code>
ohair@276 448 <p/>
tbell@487 449 In addition, it is necessary to set a few environment variables for the build:
ohair@276 450 <p/>
ohair@276 451 <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-1.6.0-openjdk</code>
ohair@276 452 <p/>
tbell@487 453 Finally, you need to unset the <code>JAVA_HOME</code> environment variable:
ohair@276 454 <p/>
ohair@276 455 <code>export -n JAVA_HOME</code>
ohair@276 456 </blockquote>
ohair@276 457 </blockquote>
robilad@132 458 <!-- ====================================================== -->
robilad@132 459 <h3><a name="mandriva">Mandriva</a></h3>
robilad@132 460 <blockquote>
robilad@132 461 <h4>Mandriva Linux One 2009 Spring</h4>
robilad@132 462 <p>
ohair@276 463 <blockquote>
tbell@487 464 After installing <a href="http://mandriva.org">Mandriva</a> Linux One 2009 Spring
tbell@487 465 you need to install several build dependencies.
tbell@487 466 The simplest way to install the build dependencies is to
tbell@487 467 execute the following commands as user <tt>root</tt>:
ohair@276 468 <p/>
ohair@276 469 <code>urpmi java-1.6.0-openjdk-devel ant make gcc gcc-c++ freetype-devel zip unzip libcups2-devel libxrender1-devel libalsa2-devel libstc++-static-devel libxtst6-devel libxi-devel</code>
robilad@132 470 <p/>
tbell@487 471 In addition, it is necessary to set a few environment variables for the build:
ohair@276 472 <p/>
ohair@276 473 <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-1.6.0-openjdk</code>
ohair@276 474 </blockquote>
robilad@132 475 </blockquote>
robilad@132 476 <!-- ====================================================== -->
robilad@132 477 <h3><a name="opensolaris">OpenSolaris</a></h3>
robilad@132 478 <blockquote>
robilad@132 479 <h4>OpenSolaris 2009.06</h4>
robilad@132 480 <p>
ohair@276 481 <blockquote>
tbell@487 482 After installing <a href="http://opensolaris.org">OpenSolaris</a> 2009.06
tbell@487 483 you need to install several build dependencies.
tbell@487 484 The simplest way to install the build dependencies is to
tbell@487 485 execute the following commands:
ohair@276 486 <p/>
ohair@276 487 <code>pfexec pkg install SUNWgmake SUNWj6dev SUNWant sunstudioexpress SUNWcups SUNWzip SUNWunzip SUNWxwhl SUNWxorg-headers SUNWaudh SUNWfreetype2</code>
robilad@132 488 <p/>
tbell@487 489 In addition, it is necessary to set a few environment variables for the build:
ohair@276 490 <p/>
ohair@276 491 <code>export LANG=C ALT_COMPILER_PATH=/opt/SunStudioExpress/bin/ ALT_CUPS_HEADERS_PATH=/usr/include/</code>
ohair@276 492 <p/>
tbell@487 493 Finally, you need to make sure that the build process can find the Sun Studio compilers:
ohair@276 494 <p/>
ohair@276 495 <code>export PATH=$PATH:/opt/SunStudioExpress/bin/</code>
ohair@276 496 </blockquote>
robilad@132 497 </blockquote>
robilad@132 498 <!-- ------------------------------------------------------ -->
ohair@13 499 <hr>
ohair@13 500 <h2><a name="directories">Source Directory Structure</a></h2>
ohair@13 501 <blockquote>
ohair@13 502 <p>
ohair@276 503 The source code for the OpenJDK is delivered in a set of
ohair@276 504 directories:
ohair@276 505 <tt>hotspot</tt>,
ohair@276 506 <tt>langtools</tt>,
ohair@276 507 <tt>corba</tt>,
ohair@276 508 <tt>jaxws</tt>,
ohair@276 509 <tt>jaxp</tt>,
ohair@276 510 and
ohair@276 511 <tt>jdk</tt>.
ohair@276 512 The <tt>hotspot</tt> directory contains the source code and make
ohair@276 513 files for building the OpenJDK Hotspot Virtual Machine.
ohair@276 514 The <tt>langtools</tt> directory contains the source code and make
ohair@276 515 files for building the OpenJDK javac and language tools.
ohair@276 516 The <tt>corba</tt> directory contains the source code and make
ohair@276 517 files for building the OpenJDK Corba files.
ohair@276 518 The <tt>jaxws</tt> directory contains the source code and make
ohair@276 519 files for building the OpenJDK JAXWS files.
ohair@276 520 The <tt>jaxp</tt> directory contains the source code and make
ohair@276 521 files for building the OpenJDK JAXP files.
ohair@276 522 The <tt>jdk</tt> directory contains the source code and make files for
ohair@276 523 building the OpenJDK runtime libraries and misc files.
ohair@276 524 The top level <tt>Makefile</tt>
ohair@276 525 is used to build the entire OpenJDK.
ohair@320 526
ohair@320 527 <h3><a name="drops">Managing the Source Drops</a></h3>
ohair@320 528 <blockquote>
ohair@320 529 <p>
ohair@320 530 The repositories <tt>jaxp</tt> and <tt>jaxws</tt> actually
ohair@320 531 do not contain the sources for JAXP or JAX-WS.
ohair@320 532 These products have their own open source procedures at their
ohair@320 533 <a href="http://jaxp.java.net/">JAXP</a> and
ohair@320 534 <a href="http://jax-ws.java.net/">JAX-WS</a> home pages.
ohair@320 535 The OpenJDK project does need access to these sources to build
ohair@320 536 a complete JDK image because JAXP and JAX-WS are part of the JDK.
ohair@320 537 The current process for delivery of the JAXP and JAX-WS sources
ohair@320 538 involves so called "source drop bundles" downloaded from a public
ohair@320 539 website.
ohair@320 540 There are many reasons for this current mechanism, and it is
ohair@320 541 understood that this is not ideal for the open source community.
ohair@320 542 It is possible this process could change in the future.
ohair@320 543 <br>
neugens@359 544 <b>NOTE:</b> The <a href="http://download.java.net/openjdk/jdk8/">
ohair@320 545 Complete OpenJDK Source Bundles</a> <u>will</u> contain the JAXP and
ohair@320 546 JAX-WS sources.
ohair@320 547 </p>
ohair@320 548
ohair@320 549 <h4><a name="dropcreation">Creation of New Source Drop Bundles</a></h4>
ohair@320 550 <blockquote>
ohair@320 551 <ol>
ohair@320 552 <li>
ohair@320 553 The JAXP or JAX-WS team prepares a new zip bundle,
ohair@320 554 places a copy in a public download area on java.net,
ohair@320 555 sends us a link and a list of CRs (Change Request Numbers).
ohair@320 556 The older download bundles should not be deleted.
ohair@320 557 It is the responsibility of the JAXP and JAX-WS team to
ohair@320 558 place the proper GPL legal notices on the sources
ohair@320 559 and do any filtering or java re-packaging for the
ohair@320 560 OpenJDK instances of these classes.
ohair@320 561 </li>
ohair@320 562 <li>
ohair@320 563 The OpenJDK team copies this new bundle into shared
neugens@359 564 area (e.g. <tt>/java/devtools/share/jdk8-drops</tt>).
ohair@320 565 Older bundles are never deleted so we retain the history.
ohair@320 566 </li>
ohair@320 567 <li>
ohair@320 568 The OpenJDK team edits the ant property file
ohair@320 569 <tt>jaxp/jaxp.properties</tt> or
ohair@320 570 <tt>jaxws/jaxws.properties</tt> to update the
ohair@320 571 base URL, the zip bundle name, and the MD5 checksum
ohair@320 572 of the zip bundle
ohair@320 573 (on Solaris: <tt>sum -c md5 <i>bundlename</i></tt>)
ohair@320 574 </li>
ohair@320 575 <li>
ohair@320 576 OpenJDK team reviews and commits those changes with the
ohair@320 577 given CRs.
ohair@320 578 </li>
ohair@320 579 </ol>
ohair@320 580 </blockquote>
ohair@320 581
ohair@320 582 <h4><a name="dropusage">Using Source Drop Bundles</a></h4>
ohair@320 583 <blockquote>
ohair@320 584 <p>
ohair@320 585 The ant scripts that build <tt>jaxp</tt> and <tt>jaxws</tt>
ohair@320 586 will attempt to locate these zip bundles from the directory
ohair@320 587 in the environment variable
ohair@320 588 <tt><a href="#ALT_DROPS_DIR">ALT_DROPS_DIR</a></tt>.
ohair@320 589 The checksums protect from getting the wrong, corrupted, or
ohair@320 590 improperly modified sources.
ohair@320 591 Once the sources are made available, the population will not
ohair@320 592 happen again unless a <tt>make clobber</tt> is requested
ohair@320 593 or the <tt>jaxp/drop/</tt> or <tt>jaxws/drop/</tt>
ohair@320 594 directory is explicitly deleted.
ohair@320 595 <br>
ohair@320 596 <b>NOTE:</b> The default Makefile and ant script behavior
ohair@320 597 is to NOT download these bundles from the public http site.
ohair@320 598 In general, doing downloads
ohair@320 599 during the build process is not advised, it creates too much
ohair@320 600 unpredictability in the build process.
ohair@320 601 However, you can use <tt>make ALLOW_DOWNLOADS=true</tt> to
ohair@320 602 tell the ant script that the download of the zip bundle is
ohair@320 603 acceptable.
ohair@320 604 </p>
ohair@320 605 <p>
ohair@320 606 The recommended procedure for keeping a cache of these
ohair@320 607 source bundles would be to download them once, place them
ohair@320 608 in a directory outside the repositories, and then set
ohair@320 609 <tt><a href="#ALT_DROPS_DIR">ALT_DROPS_DIR</a></tt> to refer
ohair@320 610 to that directory.
ohair@320 611 These drop bundles do change occasionally, so the newer
ohair@320 612 bundles may need to be added to this area from time to time.
ohair@320 613 </p>
ohair@320 614 </blockquote>
ohair@320 615 </blockquote>
ohair@13 616 </blockquote>
ohair@13 617 <!-- ------------------------------------------------------ -->
ohair@13 618 <hr>
ohair@13 619 <h2><a name="building">Build Information</a></h2>
ohair@13 620 <blockquote>
ohair@13 621 Building the OpenJDK
ohair@320 622 is done with a <a href="#gmake">GNU <tt>make</tt></a> command line
ohair@320 623 and various
ohair@320 624 environment or make variable settings that direct the makefile rules
ohair@13 625 to where various components have been installed.
ohair@13 626 Where possible the makefiles will attempt to located the various
ohair@13 627 components in the default locations or any component specific
ohair@13 628 variable settings.
ohair@13 629 When the normal defaults fail or components cannot be found,
ohair@13 630 the various
ohair@13 631 <tt>ALT_*</tt> variables (alternates)
ohair@13 632 can be used to help the makefiles locate components.
ohair@13 633 <p>
ohair@276 634 Refer to the bash/sh/ksh setup file
ohair@276 635 <tt>jdk/make/jdk_generic_profile.sh</tt>
ohair@276 636 if you need help in setting up your environment variables.
ohair@276 637 A build could be as simple as:
ohair@13 638 <blockquote>
ohair@13 639 <pre><tt>
duke@2 640 bash
duke@2 641 . jdk/make/jdk_generic_profile.sh
ohair@320 642 <a href="#gmake"><tt>make</tt></a> sanity &amp;&amp; <a href="#gmake"><tt>make</tt></a>
ohair@13 643 </tt></pre>
ohair@13 644 </blockquote>
ohair@13 645 <p>
ohair@276 646 Of course ksh or sh would work too.
ohair@276 647 But some customization will probably be necessary.
ohair@276 648 The <tt>sanity</tt> rule will make some basic checks on build
ohair@276 649 dependencies and generate appropriate warning messages
ohair@276 650 regarding missing, out of date, or newer than expected components
ohair@276 651 found on your system.
ohair@13 652 </blockquote>
ohair@13 653 <!-- ------------------------------------------------------ -->
ohair@13 654 <hr>
ohair@13 655 <h3><a name="gmake">GNU make (<tt><i>gmake</i></tt>)</a></h3>
ohair@13 656 <blockquote>
ohair@13 657 The Makefiles in the OpenJDK are only valid when used with the
ohair@13 658 GNU version of the utility command <tt>make</tt>
ohair@13 659 (<tt><i>gmake</i></tt>).
ohair@13 660 A few notes about using GNU make:
ohair@13 661 <ul>
ohair@13 662 <li>
ohair@320 663 You need GNU make version 3.81 or newer.
ohair@13 664 </li>
ohair@13 665 <li>
ohair@13 666 Place the location of the GNU make binary in the <tt>PATH</tt>.
ohair@13 667 </li>
ohair@13 668 <li>
ohair@13 669 <strong>Linux:</strong>
ohair@320 670 The <tt>/usr/bin/make</tt> should be 3.81 or newer
ohair@320 671 and should work fine for you.
ohair@320 672 If this version is not 3.81 or newer,
ohair@320 673 see the <a href="#buildgmake">"Building GNU make"</a> section.
ohair@13 674 </li>
ohair@13 675 <li>
ohair@13 676 <strong>Solaris:</strong>
ohair@13 677 Do NOT use <tt>/usr/bin/make</tt> on Solaris.
ohair@13 678 If your Solaris system has the software
ohair@13 679 from the Solaris Companion CD installed,
ohair@320 680 you should try and use <tt>gmake</tt>
ohair@13 681 which will be located in either the <tt>/opt/sfw/bin</tt> or
ohair@13 682 <tt>/usr/sfw/bin</tt> directory.
ohair@320 683 In more recent versions of Solaris GNU make might be found
ohair@320 684 at <tt>/usr/bin/gmake</tt>.<br>
ohair@320 685 <b>NOTE:</b> It is very likely that this <tt>gmake</tt>
ohair@320 686 could be 3.80, you need 3.81, in which case,
ohair@320 687 see the <a href="#buildgmake">"Building GNU make"</a> section.
ohair@13 688 </li>
ohair@13 689 <li>
ohair@13 690 <strong>Windows:</strong>
tbell@487 691 Make sure you start your build inside a bash/sh/ksh shell and are
tbell@487 692 using a <tt>make.exe</tt> utility built for that environment.<br/>
tbell@487 693 <strong>MKS</strong> builds need a native Windows version of GNU make
tbell@487 694 (see <a href="#buildgmake">Building GNU make</a>).<br/>
tbell@487 695 <strong>Cygwin</strong> builds need
tbell@487 696 a make version which was specially compiled for the Cygwin environment
tbell@487 697 (see <a href="#buildgmake">Building GNU make</a>). <strong>WARNING:</strong>
tbell@487 698 the OpenJDK build with the make utility provided by Cygwin will <strong>not</strong>
tbell@487 699 work because it does not support drive letters in paths. Make sure that
tbell@487 700 your version of make will be found before the Cygwins default make by
tbell@487 701 setting an appropriate <tt>PATH</tt> environment variable or by removing
tbell@487 702 Cygwin's make after you built your own make version.<br/>
tbell@487 703 <strong>MinGW/MSYS</strong> builds can use the default make which
tbell@487 704 comes with the environment.
ohair@13 705 </li>
ohair@13 706 </ul>
ohair@13 707 <p>
ohair@276 708 Information on GNU make, and access to ftp download sites, are
ohair@276 709 available on the
ohair@276 710 <a href="http://www.gnu.org/software/make/make.html" target="_blank">
ohair@276 711 GNU make web site
ohair@276 712 </a>.
ohair@276 713 The latest source to GNU make is available at
ohair@276 714 <a href="http://ftp.gnu.org/pub/gnu/make/" target="_blank">
ohair@276 715 ftp.gnu.org/pub/gnu/make/</a>.
ohair@320 716 </p>
ohair@320 717 <!-- ------------------------------------------------------ -->
ohair@320 718 <h4><a name="buildgmake">Building GNU make</a></h4>
ohair@320 719 <blockquote>
tbell@487 720 First step is to get the GNU make 3.81 (or newer) source from
ohair@320 721 <a href="http://ftp.gnu.org/pub/gnu/make/" target="_blank">
ohair@320 722 ftp.gnu.org/pub/gnu/make/</a>.
ohair@320 723 Building is a little different depending on the OS and unix toolset
ohair@320 724 on Windows:
ohair@320 725 <ul>
ohair@320 726 <li>
ohair@320 727 <strong>Linux:</strong>
ohair@320 728 <tt>./configure && make</tt>
ohair@320 729 </li>
ohair@320 730 <li>
ohair@320 731 <strong>Solaris:</strong>
ohair@320 732 <tt>./configure && gmake CC=gcc</tt>
ohair@320 733 </li>
ohair@320 734 <li>
tbell@487 735 <strong>Windows for CYGWIN:</strong><br/>
tbell@487 736 <tt>./configure</tt><br/>
tbell@487 737 Add the line <tt>#define HAVE_CYGWIN_SHELL 1</tt> to the end of <tt>config.h</tt><br/>
tbell@487 738 <tt>make</tt><br/>
tbell@487 739 <br/>
tbell@487 740 This should produce <tt>make.exe</tt> in the current directory.
ohair@320 741 </li>
ohair@320 742 <li>
tbell@487 743 <strong>Windows for MKS:</strong><br/>
tbell@487 744 Edit <tt>config.h.W32</tt> and uncomment the line <tt>#define HAVE_MKS_SHELL 1</tt><br/>
tbell@487 745 Set the environment for your native compiler (e.g. by calling:<br/>
tbell@487 746 <tt>"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /Release /xp /x64)</tt>
tbell@487 747 <tt>nmake -f NMakefile.win32</tt>
tbell@487 748 <br/>
tbell@487 749 This should produce <tt>WinDebug/make.exe</tt> and <tt>WinRel/make.exe</tt>
tbell@487 750 <br/>
tbell@487 751 If you get the error: <tt>NMAKE : fatal error U1045: spawn failed : Permission denied</tt>
tbell@487 752 you have to set the <tt>Read &amp; execute</tt> permission for the file <tt>subproc.bat</tt>.
ohair@320 753 </li>
ohair@320 754 </ul>
ohair@320 755 </blockquote>
ohair@13 756 </blockquote>
ohair@13 757 <!-- ------------------------------------------------------ -->
ohair@13 758 <hr>
ohair@13 759 <h3><a name="linux">Basic Linux System Setup</a></h3>
ohair@13 760 <blockquote>
ohair@13 761 <strong>i586 only:</strong>
ohair@13 762 The minimum recommended hardware for building the Linux version
ohair@13 763 is a Pentium class processor or better, at least 256 MB of RAM, and
ohair@13 764 approximately 1.5 GB of free disk space.
ohair@13 765 <p>
ohair@276 766 <strong>X64 only:</strong>
ohair@276 767 The minimum recommended hardware for building the Linux
ohair@276 768 version is an AMD Opteron class processor, at least 512 MB of RAM, and
ohair@276 769 approximately 4 GB of free disk space.
ohair@13 770 <p>
ohair@276 771 The build will use the tools contained in
ohair@276 772 <tt>/bin</tt> and
ohair@276 773 <tt>/usr/bin</tt>
ohair@276 774 of a standard installation of the Linux operating environment.
ohair@276 775 You should ensure that these directories are in your
ohair@276 776 <tt>PATH</tt>.
ohair@13 777 <p>
ohair@276 778 Note that some Linux systems have a habit of pre-populating
ohair@276 779 your environment variables for you, for example <tt>JAVA_HOME</tt>
ohair@276 780 might get pre-defined for you to refer to the JDK installed on
ohair@276 781 your Linux system.
ohair@276 782 You will need to unset <tt>JAVA_HOME</tt>.
ohair@276 783 It's a good idea to run <tt>env</tt> and verify the
ohair@276 784 environment variables you are getting from the default system
ohair@276 785 settings make sense for building the
ohair@276 786 OpenJDK.
ohair@13 787 </blockquote>
ohair@13 788 <!-- ------------------------------------------------------ -->
ohair@13 789 <h4><a name="linux_checklist">Basic Linux Check List</a></h4>
ohair@13 790 <blockquote>
ohair@13 791 <ol>
ohair@13 792 <li>
ohair@13 793 Install the
ohair@13 794 <a href="#bootjdk">Bootstrap JDK</a>, set
ohair@13 795 <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>.
ohair@13 796 </li>
ohair@13 797 <li>
ohair@13 798 <a href="#importjdk">Optional Import JDK</a>, set
ohair@13 799 <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>.
ohair@13 800 </li>
ohair@13 801 <li>
ohair@13 802 Install or upgrade the <a href="#freetype">FreeType development
ohair@276 803 package</a>.
ohair@13 804 </li>
ohair@25 805 <li>
ohair@25 806 Install
ohair@320 807 <a href="#ant">Ant 1.7.1 or newer</a>,
ohair@49 808 make sure it is in your PATH.
ohair@25 809 </li>
ohair@13 810 </ol>
ohair@13 811 </blockquote>
ohair@13 812 <!-- ------------------------------------------------------ -->
ohair@13 813 <hr>
ohair@13 814 <h3><a name="solaris">Basic Solaris System Setup</a></h3>
ohair@13 815 <blockquote>
ohair@13 816 The minimum recommended hardware for building the
ohair@13 817 Solaris SPARC version is an UltraSPARC with 512 MB of RAM.
ohair@13 818 For building
ohair@13 819 the Solaris x86 version, a Pentium class processor or better and at
ohair@13 820 least 512 MB of RAM are recommended.
ohair@13 821 Approximately 1.4 GB of free disk
ohair@13 822 space is needed for a 32-bit build.
ohair@13 823 <p>
ohair@276 824 If you are building the 64-bit version, you should
ohair@276 825 run the command "isainfo -v" to verify that you have a
ohair@276 826 64-bit installation, it should say <tt>sparcv9</tt> or
ohair@276 827 <tt>amd64</tt>.
ohair@276 828 An additional 7 GB of free disk space is needed
ohair@276 829 for a 64-bit build.
ohair@13 830 <p>
ohair@276 831 The build uses the tools contained in <tt>/usr/ccs/bin</tt>
ohair@276 832 and <tt>/usr/bin</tt> of a standard developer or full installation of
ohair@276 833 the Solaris operating environment.
ohair@13 834 <p>
ohair@276 835 Solaris patches specific to the JDK can be downloaded from the
ohair@276 836 <a href="http://sunsolve.sun.com/show.do?target=patches/JavaSE" target="_blank">
ohair@276 837 SunSolve JDK Solaris patches download page</a>.
ohair@276 838 You should ensure that the latest patch cluster for
ohair@276 839 your version of the Solaris operating environment has also
ohair@276 840 been installed.
ohair@13 841 </blockquote>
ohair@13 842 <!-- ------------------------------------------------------ -->
ohair@13 843 <h4><a name="solaris_checklist">Basic Solaris Check List</a></h4>
ohair@13 844 <blockquote>
ohair@13 845 <ol>
ohair@13 846 <li>
ohair@13 847 Install the
ohair@13 848 <a href="#bootjdk">Bootstrap JDK</a>, set
ohair@13 849 <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>.
ohair@13 850 </li>
ohair@13 851 <li>
ohair@13 852 <a href="#importjdk">Optional Import JDK</a>, set
ohair@13 853 <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>.
ohair@13 854 </li>
ohair@13 855 <li>
ohair@13 856 Install the
ohair@13 857 <a href="#studio">Sun Studio Compilers</a>, set
ohair@13 858 <a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a>.
ohair@13 859 </li>
ohair@13 860 <li>
ohair@13 861 Install the
ohair@13 862 <a href="#cups">CUPS Include files</a>, set
ohair@13 863 <tt><a href="#ALT_CUPS_HEADERS_PATH">ALT_CUPS_HEADERS_PATH</a></tt>.
ohair@13 864 </li>
ohair@25 865 <li>
andrew@90 866 Install the <a href="#xrender">XRender Include files</a>.
andrew@90 867 </li>
andrew@90 868 <li>
ohair@25 869 Install
ohair@320 870 <a href="#ant">Ant 1.7.1 or newer</a>,
ohair@49 871 make sure it is in your PATH.
ohair@25 872 </li>
ohair@13 873 </ol>
ohair@13 874 </blockquote>
ohair@13 875 <!-- ------------------------------------------------------ -->
ohair@13 876 <hr>
ohair@13 877 <h3><a name="windows">Basic Windows System Setup</a></h3>
ohair@13 878 <blockquote>
ohair@13 879 <strong>i586 only:</strong>
ohair@49 880 The minimum recommended hardware for building the 32-bit or X86
ohair@13 881 Windows version is an Pentium class processor or better, at least
ohair@13 882 512 MB of RAM, and approximately 600 MB of free disk space.
ohair@13 883 <strong>
ohair@49 884 NOTE: The Windows build machines need to use the
ohair@13 885 file system NTFS.
ohair@13 886 Build machines formatted to FAT32 will not work
ohair@13 887 because FAT32 doesn't support case-sensitivity in file names.
ohair@13 888 </strong>
ohair@13 889 <p>
ohair@276 890 <strong>X64 only:</strong>
ohair@276 891 The minimum recommended hardware for building
ohair@276 892 the Windows X64 version is an AMD Opteron class processor, at least 1
ohair@276 893 GB of RAM, and approximately 10 GB of free disk space.
ohair@13 894 </blockquote>
ohair@13 895 <!-- ------------------------------------------------------ -->
ohair@13 896 <h4><a name="paths">Windows Paths</a></h4>
ohair@13 897 <blockquote>
duke@2 898 <strong>Windows:</strong>
tbell@487 899 Note that GNU make, the shell and other Unix-tools required during the build
tbell@487 900 do not tolerate the Windows habit
ohair@13 901 of having spaces in pathnames or the use of the <tt>\</tt>characters in pathnames.
tbell@487 902 Luckily on most Windows systems, you can use <tt>/</tt>instead of <tt>\</tt>, and
tbell@487 903 there is always a short <a href="http://en.wikipedia.org/wiki/8.3_filename">
tbell@487 904 "8.3" pathname</a> without spaces for any path that contains spaces.
tbell@487 905 Unfortunately, this short pathname is somewhat dynamic (i.e. dependant on the
tbell@487 906 other files and directories inside a given directory) and can not be
tbell@487 907 algorithmicly calculated by only looking at a specific path name.
ohair@13 908 <p>
ohair@276 909 The makefiles will try to translate any pathnames supplied
ohair@276 910 to it into the <tt>C:/</tt> style automatically.
tbell@487 911 </p>
ohair@13 912 <p>
tbell@487 913 Special care has to be taken if native Windows applications
tbell@487 914 like <tt>nmake</tt> or <tt>cl</tt> are called with file arguments processed
tbell@487 915 by Unix-tools like <tt>make</tt> or <tt>sh</tt>!
tbell@487 916 </p>
tbell@487 917 </blockquote>
tbell@487 918 <!-- ------------------------------------------------------ -->
tbell@487 919 <h4><a name="paths">Windows build environments</a></h4>
tbell@487 920 <blockquote>
tbell@487 921 Building on Windows requires a Unix-like environment, notably a Unix-like shell.
tbell@487 922 There are several such environments available of which
tbell@487 923 <a href="http://www.mkssoftware.com/products/tk/ds_tkdev.asp">MKS</a>,
tbell@487 924 <a href="http://www.cygwin.com/">Cygwin</a> and
tbell@487 925 <a href="http://www.mingw.org/wiki/MSYS">MinGW/MSYS</a> are currently supported for
tbell@487 926 the OpenJDK build. One of the differences of these three systems is the way
tbell@487 927 they handle Windows path names, particularly path names which contain
tbell@487 928 spaces, backslashes as path separators and possibly drive letters. Depending
tbell@487 929 on the use case and the specifics of each environment these path problems can
tbell@487 930 be solved by a combination of quoting whole paths, translating backslashes to
tbell@487 931 forward slashes, escaping backslashes with additional backslashes and
tbell@487 932 translating the path names to their <a href="http://en.wikipedia.org/wiki/8.3_filename">
tbell@487 933 "8.3" version</a>.
tbell@487 934 <p>
tbell@487 935 As of this writing (MKS ver. 9.4, Cygwin ver. 1.7.9, MinGW/MSYS 1.0.17),
tbell@487 936 MKS builds are known to be the fastest Windows builds while MingGW/MSYS
tbell@487 937 builds are slightly slower (about 10%) than MKS builds and Cygwin builds
tbell@487 938 require nearly twice the time (about 180%) of MKS builds (e.g. on a
tbell@487 939 DualCore i7 notebook with 8GB of RAM, HDD and 64-bit Windows 7 operating system
tbell@487 940 the complete OpenJDK 8 product build takes about 49min with MKS, 54min with
tbell@487 941 MinGW/MSYS and 88min with Cygwin).
tbell@487 942 </p>
tbell@487 943 <p>
tbell@487 944 Mixing tools from the different Unix emulation environments is not a good
tbell@487 945 idea and will probably not work!
tbell@487 946 </p>
tbell@487 947 <p>
tbell@487 948 <strong>MKS:</strong> is a commercial product which includes
tbell@487 949 all the Unix utilities which are required to build the OpenJDK except GNU
tbell@487 950 make. In pre-OpenJDK times it was the only supported build environment on
tbell@487 951 Windows. The MKS tools support Windows paths with drive letters and
tbell@487 952 forward slashes as path separator. Paths in environment variables like (for
tbell@487 953 example) <tt>PATH</tt> are separated by semicolon '<tt>;</tt>'.
tbell@487 954 </p>
tbell@487 955 <p>
tbell@487 956 Recent versions of MKS provide the <tt>dosname</tt> utility to convert paths
tbell@487 957 with spaces to short (8.3) path names,e .g.
tbell@487 958 <tt>dosname -s "<i>path</i>"</tt>.
tbell@487 959 </p>
tbell@487 960 <p>
tbell@487 961 If you are using the MKS environment, you need a native Windows version
tbell@487 962 of Gnu make <a href="#buildgmake">which you can easily build yourself</a>.
tbell@487 963 </p>
tbell@487 964 <p>
tbell@487 965 <strong>Cygwin:</strong>
tbell@487 966 is an open source, Linux-like environment which tries to emulate
tbell@487 967 a complete POSIX layer on Windows. It tries to be smart about path names
tbell@487 968 and can usually handle all kinds of paths if they are correctly quoted
tbell@487 969 or escaped although internally it maps drive letters <tt>&lt;drive&gt;:</tt>
tbell@487 970 to a virtual directory <tt>/cygdrive/&lt;drive&gt;</tt>.
tbell@487 971 </p>
tbell@487 972 <p>
tbell@487 973 You can always use the <tt>cygpath</tt> utility to map pathnames with spaces
tbell@487 974 or the backslash character into the <tt>C:/</tt> style of pathname
tbell@487 975 (called 'mixed'), e.g. <tt>cygpath -s -m "<i>path</i>"</tt>.
tbell@487 976 </p>
tbell@487 977 <p>
tbell@487 978 Note that the use of CYGWIN creates a unique problem with regards to
ohair@276 979 setting <a href="#path"><tt>PATH</tt></a>. Normally on Windows
ohair@276 980 the <tt>PATH</tt> variable contains directories
tbell@487 981 separated with the ";" character (Solaris and Linux use ":").
ohair@276 982 With CYGWIN, it uses ":", but that means that paths like "C:/path"
ohair@276 983 cannot be placed in the CYGWIN version of <tt>PATH</tt> and
ohair@276 984 instead CYGWIN uses something like <tt>/cygdrive/c/path</tt>
ohair@276 985 which CYGWIN understands, but only CYGWIN understands.
tbell@487 986 </p>
tbell@487 987 <p>
tbell@487 988 If you are using the Cygwin environment, you need to
tbell@487 989 <a href="#buildgmake">compile your own version</a>
tbell@487 990 of GNU make because the default Cygwin make can not handle drive letters in paths.
tbell@487 991 </p>
tbell@487 992 <p>
tbell@487 993 <strong>MinGW/MSYS:</strong>
tbell@487 994 MinGW ("Minimalist GNU for Windows") is a collection of free Windows
tbell@487 995 specific header files and import libraries combined with GNU toolsets that
tbell@487 996 allow one to produce native Windows programs that do not rely on any
tbell@487 997 3rd-party C runtime DLLs. MSYS is a supplement to MinGW which allows building
tbell@487 998 applications and programs which rely on traditional UNIX tools to
tbell@487 999 be present. Among others this includes tools like <tt>bash</tt> and <tt>make</tt>.
tbell@487 1000 </p>
tbell@487 1001 <p>
tbell@487 1002 Like Cygwin, MinGW/MSYS can handle different types of path formats. They
tbell@487 1003 are internally converted to paths with forward slashes and drive letters
tbell@487 1004 <tt>&lt;drive&gt;:</tt> replaced by a virtual
tbell@487 1005 directory <tt>/&lt;drive&gt;</tt>. Additionally, MSYS automatically
tbell@487 1006 detects binaries compiled for the MSYS environment and feeds them with the
tbell@487 1007 internal, Unix-style path names. If native Windows applications are called
tbell@487 1008 from within MSYS programs their path arguments are automatically converted
tbell@487 1009 back to Windows style path names with drive letters and backslashes as
tbell@487 1010 path separators. This may cause problems for Windows applications which
tbell@487 1011 use forward slashes as parameter separator (e.g. <tt>cl /nologo /I</tt>)
tbell@487 1012 because MSYS may wrongly <a href="http://mingw.org/wiki/Posix_path_conversion">
tbell@487 1013 replace such parameters by drive letters</a>.
tbell@487 1014 </p>
tbell@487 1015 <p>
tbell@487 1016 If you are using the MinGW/MSYS system you can use the default make
tbell@487 1017 version supplied by the environment.
tbell@487 1018 </p>
ohair@13 1019 </blockquote>
ohair@13 1020 <!-- ------------------------------------------------------ -->
ohair@13 1021 <h4><a name="windows_checklist">Basic Windows Check List</a></h4>
duke@2 1022 <blockquote>
ohair@13 1023 <ol>
ohair@13 1024 <li>
tbell@487 1025 Install one of the
tbell@487 1026 <a href="#cygwin">CYGWIN</a>, <a href="#msys">MinGW/MSYS</a> or
tbell@487 1027 <a href="http://www.mkssoftware.com/products/tk/ds_tkdev.asp">MKS</a> environments.
ohair@13 1028 </li>
ohair@13 1029 <li>
ohair@13 1030 Install the
ohair@13 1031 <a href="#bootjdk">Bootstrap JDK</a>, set
ohair@13 1032 <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>.
ohair@13 1033 </li>
ohair@13 1034 <li>
ohair@13 1035 <a href="#importjdk">Optional Import JDK</a>, set
ohair@13 1036 <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>.
ohair@13 1037 </li>
ohair@13 1038 <li>
ohair@13 1039 Install the
prr@187 1040 <a href="#msvc32">Microsoft Visual Studio Compilers</a>).
ohair@13 1041 </li>
ohair@13 1042 <li>
ohair@13 1043 Setup all environment variables for compilers
prr@187 1044 (see <a href="#msvc32">compilers</a>).
ohair@13 1045 </li>
ohair@13 1046 <li>
ohair@13 1047 Install
ohair@13 1048 <a href="#dxsdk">Microsoft DirectX SDK</a>.
ohair@13 1049 </li>
ohair@25 1050 <li>
ohair@25 1051 Install
ohair@320 1052 <a href="#ant">Ant 1.7.1 or newer</a>,
ohair@49 1053 make sure it is in your PATH and set
ohair@25 1054 <tt><a href="#ANT_HOME">ANT_HOME</a></tt>.
ohair@25 1055 </li>
ohair@13 1056 </ol>
duke@2 1057 </blockquote>
ohair@13 1058 <!-- ------------------------------------------------------ -->
ohair@13 1059 <hr>
ewendeli@433 1060 <h3><a name="macosx">Basic Mac OS X System Setup</a></h3>
ewendeli@433 1061 <blockquote>
ewendeli@433 1062 <strong>X64 only:</strong>
ewendeli@433 1063 The minimum recommended hardware for building
ewendeli@433 1064 the Mac OS X version is any 64-bit capable Intel processor, at least 2
ewendeli@433 1065 GB of RAM, and approximately 3 GB of free disk space. You should also
ewendeli@433 1066 have OS X Lion 10.7.3 installed.
ewendeli@433 1067 </blockquote>
ewendeli@433 1068 <!-- ------------------------------------------------------ -->
ewendeli@433 1069
ewendeli@433 1070 <h4><a name="macosx_checklist">Basic Mac OS X Check List</a></h4>
ewendeli@433 1071 <blockquote>
ewendeli@433 1072 <ol>
ewendeli@433 1073 <li>
ewendeli@433 1074 Install <a href="https://developer.apple.com/xcode/">XCode 4.1</a> or newer.
ewendeli@433 1075 If you install XCode 4.3 or newer, make sure you also install
ewendeli@433 1076 "Command line tools" found under the preferences pane "Downloads".
ewendeli@433 1077 </li>
ewendeli@433 1078 <li>
ewendeli@433 1079 Install <a href="http://support.apple.com/kb/dl1421" target="_blank">"Java for OS X Lion Update 1"</a>,
ewendeli@433 1080 set <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a> to <code>`/usr/libexec/java_home -v 1.6`</code></tt>
ewendeli@433 1081 </li>
ewendeli@433 1082 <li>
ewendeli@433 1083 <a href="#importjdk">Optional Import JDK</a>, set
ewendeli@433 1084 <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>.
ewendeli@433 1085 </li>
ewendeli@433 1086 </ol>
ewendeli@433 1087 </blockquote>
ewendeli@433 1088 <!-- ------------------------------------------------------ -->
ewendeli@433 1089 <hr>
ohair@13 1090 <h3><a name="dependencies">Build Dependencies</a></h3>
duke@2 1091 <blockquote>
ohair@13 1092 Depending on the platform, the OpenJDK build process has some basic
ohair@13 1093 dependencies on components not part of the OpenJDK sources.
ohair@13 1094 Some of these are specific to a platform, some even specific to
ohair@13 1095 an architecture.
ohair@13 1096 Each dependency will have a set of ALT variables that can be set
ohair@13 1097 to tell the makefiles where to locate the component.
ohair@13 1098 In most cases setting these ALT variables may not be necessary
ohair@13 1099 and the makefiles will find defaults on the system in standard
ohair@13 1100 install locations or through component specific variables.
ohair@13 1101 <!-- ------------------------------------------------------ -->
ohair@13 1102 <h4><a name="bootjdk">Bootstrap JDK</a></h4>
ohair@13 1103 <blockquote>
ohair@13 1104 All OpenJDK builds require access to the previously released
ohair@13 1105 JDK 6, this is often called a bootstrap JDK.
ohair@13 1106 The JDK 6 binaries can be downloaded from Sun's
ohair@138 1107 <a href="http://java.sun.com/javase/downloads/index.jsp"
ohair@276 1108 target="_blank">JDK 6 download site</a>.
ohair@13 1109 For build performance reasons
ohair@13 1110 is very important that this bootstrap JDK be made available on the
ohair@13 1111 local disk of the machine doing the build.
ohair@13 1112 You should always set
ohair@13 1113 <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>
ohair@13 1114 to point to the location of
ohair@13 1115 the bootstrap JDK installation, this is the directory pathname
ohair@13 1116 that contains a <tt>bin, lib, and include</tt>
ohair@13 1117 It's also a good idea to also place its <tt>bin</tt> directory
ohair@13 1118 in the <tt>PATH</tt> environment variable, although it's
ohair@13 1119 not required.
ohair@13 1120 <p>
ohair@276 1121 <strong>Solaris:</strong>
ohair@276 1122 Some pre-installed JDK images may be available to you in the
ohair@276 1123 directory <tt>/usr/jdk/instances</tt>.
ohair@276 1124 If you don't set
ohair@276 1125 <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>
ohair@276 1126 the makefiles will look in that location for a JDK it can use.
ohair@13 1127 </blockquote>
ohair@13 1128 <!-- ------------------------------------------------------ -->
ohair@13 1129 <h4><a name="importjdk">Optional Import JDK</a></h4>
ohair@13 1130 <blockquote>
ohair@13 1131 The <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>
ohair@13 1132 setting is only needed if you are not building the entire
ohair@13 1133 JDK. For example, if you have built the entire JDK once, and
ohair@13 1134 wanted to avoid repeatedly building the Hotspot VM, you could
ohair@13 1135 set this to the location of the previous JDK install image
ohair@13 1136 and the build will copy the needed files from this import area.
ohair@13 1137 </blockquote>
ohair@13 1138 <!-- ------------------------------------------------------ -->
ohair@25 1139 <h4><a name="ant">Ant</a></h4>
ohair@25 1140 <blockquote>
ohair@298 1141 All OpenJDK builds require access to least Ant 1.7.1.
ohair@25 1142 The Ant tool is available from the
ohair@320 1143 <a href="http://archive.apache.org/dist/ant/binaries/apache-ant-1.7.1-bin.zip" target="_blank">
ohair@320 1144 Ant 1.7.1 archive download site</a>.
ohair@49 1145 You should always make sure <tt>ant</tt> is in your PATH, and
ohair@49 1146 on Windows you may also need to set
ohair@25 1147 <tt><a href="#ANT_HOME">ANT_HOME</a></tt>
ohair@25 1148 to point to the location of
ohair@25 1149 the Ant installation, this is the directory pathname
ohair@25 1150 that contains a <tt>bin and lib</tt>.
ohair@320 1151 <br>
ohair@320 1152 <b>WARNING:</b> Ant versions used from IDE tools like NetBeans
ohair@320 1153 or installed via system packages may not operate the same
ohair@320 1154 as the one obtained from the Ant download bundles.
ohair@320 1155 These system and IDE installers sometimes choose to change
ohair@320 1156 the ant installation enough to cause differences.
ohair@25 1157 </blockquote>
ohair@25 1158 <!-- ------------------------------------------------------ -->
ohair@13 1159 <h4><a name="cacerts">Certificate Authority File (cacert)</a></h4>
ohair@13 1160 <blockquote>
ohair@13 1161 See <a href="http://en.wikipedia.org/wiki/Certificate_Authority" target="_blank">
ohair@276 1162 http://en.wikipedia.org/wiki/Certificate_Authority</a>
ohair@13 1163 for a better understanding of the Certificate Authority (CA).
ohair@13 1164 A certificates file named "cacerts"
ohair@13 1165 represents a system-wide keystore with CA certificates.
ohair@13 1166 In JDK and JRE
ohair@13 1167 binary bundles, the "cacerts" file contains root CA certificates from
ohair@13 1168 several public CAs (e.g., VeriSign, Thawte, and Baltimore).
ohair@13 1169 The source contain a cacerts file
ohair@13 1170 without CA root certificates.
ohair@13 1171 Formal JDK builders will need to secure
ohair@13 1172 permission from each public CA and include the certificates into their
ohair@13 1173 own custom cacerts file.
ohair@13 1174 Failure to provide a populated cacerts file
ohair@13 1175 will result in verification errors of a certificate chain during runtime.
ohair@13 1176 The variable
ohair@13 1177 <tt><a href="#ALT_CACERTS_FILE">ALT_CACERTS_FILE</a></tt>
ohair@13 1178 can be used to override the default location of the
ohair@13 1179 cacerts file that will get placed in your build.
ohair@13 1180 By default an empty cacerts file is provided and that should be
ohair@13 1181 fine for most JDK developers.
ohair@13 1182 </blockquote>
ohair@13 1183 <!-- ------------------------------------------------------ -->
ohair@13 1184 <h4><a name="compilers">Compilers</a></h4>
ohair@13 1185 <blockquote>
ohair@13 1186 <strong><a name="gcc">Linux gcc/binutils</a></strong>
ohair@13 1187 <blockquote>
ohair@320 1188 The GNU gcc compiler version should be 4.3 or newer.
ohair@13 1189 The compiler used should be the default compiler installed
ohair@13 1190 in <tt>/usr/bin</tt>.
ohair@13 1191 </blockquote>
ohair@13 1192 <strong><a name="studio">Solaris: Sun Studio</a></strong>
ohair@13 1193 <blockquote>
ohair@13 1194 At a minimum, the
ohair@211 1195 <a href="http://www.oracle.com/technetwork/server-storage/solarisstudio/downloads/index.htm" target="_blank">
ohair@276 1196 Sun Studio 12 Update 1 Compilers</a>
ohair@211 1197 (containing version 5.10 of the C and C++ compilers) is required,
tbell@487 1198 including specific patches.
ohair@276 1199 <p>
tbell@487 1200 The Solaris SPARC patch list is:
ohair@276 1201 <ul>
ohair@276 1202 <li>
ohair@276 1203 118683-05: SunOS 5.10: Patch for profiling libraries and assembler
ohair@276 1204 </li>
ohair@276 1205 <li>
ohair@276 1206 119963-21: SunOS 5.10: Shared library patch for C++
ohair@276 1207 </li>
ohair@276 1208 <li>
ohair@276 1209 120753-08: SunOS 5.10: Microtasking libraries (libmtsk) patch
ohair@276 1210 </li>
ohair@276 1211 <li>
ohair@276 1212 128228-09: Sun Studio 12 Update 1: Patch for Sun C++ Compiler
ohair@276 1213 </li>
ohair@276 1214 <li>
ohair@276 1215 141860-03: Sun Studio 12 Update 1: Patch for Compiler Common patch for Sun C C++ F77 F95
ohair@276 1216 </li>
ohair@276 1217 <li>
ohair@276 1218 141861-05: Sun Studio 12 Update 1: Patch for Sun C Compiler
ohair@276 1219 </li>
ohair@276 1220 <li>
ohair@276 1221 142371-01: Sun Studio 12.1 Update 1: Patch for dbx
ohair@276 1222 </li>
ohair@276 1223 <li>
ohair@276 1224 143384-02: Sun Studio 12 Update 1: Patch for debuginfo handling
ohair@276 1225 </li>
ohair@276 1226 <li>
ohair@276 1227 143385-02: Sun Studio 12 Update 1: Patch for Compiler Common patch for Sun C C++ F77 F95
ohair@276 1228 </li>
ohair@276 1229 <li>
ohair@276 1230 142369-01: Sun Studio 12.1: Patch for Performance Analyzer Tools
ohair@276 1231 </li>
ohair@211 1232 </ul>
ohair@211 1233 <p>
ohair@276 1234 The Solaris X86 patch list is:
ohair@211 1235 <ul>
ohair@276 1236 <li>
ohair@276 1237 119961-07: SunOS 5.10_x86, x64, Patch for profiling libraries and assembler
ohair@276 1238 </li>
ohair@276 1239 <li>
ohair@276 1240 119964-21: SunOS 5.10_x86: Shared library patch for C++_x86
ohair@276 1241 </li>
ohair@276 1242 <li>
ohair@276 1243 120754-08: SunOS 5.10_x86: Microtasking libraries (libmtsk) patch
ohair@276 1244 </li>
ohair@276 1245 <li>
ohair@276 1246 141858-06: Sun Studio 12 Update 1_x86: Sun Compiler Common patch for x86 backend
ohair@276 1247 </li>
ohair@276 1248 <li>
ohair@276 1249 128229-09: Sun Studio 12 Update 1_x86: Patch for C++ Compiler
ohair@276 1250 </li>
ohair@276 1251 <li>
ohair@276 1252 142363-05: Sun Studio 12 Update 1_x86: Patch for C Compiler
ohair@276 1253 </li>
ohair@276 1254 <li>
ohair@276 1255 142368-01: Sun Studio 12.1_x86: Patch for Performance Analyzer Tools
ohair@276 1256 </li>
ohair@211 1257 </ul>
ohair@13 1258 <p>
ohair@276 1259 Set
ohair@276 1260 <a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a>
ohair@276 1261 to point to the location of
ohair@276 1262 the compiler binaries, and place this location in the <tt>PATH</tt>.
ohair@13 1263 <p>
ohair@276 1264 The Oracle Solaris Studio Express compilers at:
ohair@276 1265 <a href="http://developers.sun.com/sunstudio/downloads/express.jsp" target="_blank">
ohair@276 1266 Oracle Solaris Studio Express Download site</a>
ohair@276 1267 are also an option, although these compilers have not
ohair@276 1268 been extensively used yet.
ohair@13 1269 </blockquote>
prr@187 1270 <strong><a name="msvc32">Windows i586: Microsoft Visual Studio 2010 Compilers</a></strong>
ohair@13 1271 <blockquote>
ohair@276 1272 <p>
ohair@320 1273 <b>BEGIN WARNING</b>: JDK 7 has transitioned to
ohair@320 1274 use the newest VS2010 Microsoft compilers.
ohair@320 1275 No other compilers are known to build the entire JDK,
ohair@276 1276 including non-open portions.
ohair@276 1277 Visual Studio 2010 Express compilers are now able to build all the
ohair@276 1278 open source repositories, but this is 32 bit only. To build 64 bit
ohair@320 1279 Windows binaries use the the 7.1 Windows SDK.
ohair@320 1280 <b>END WARNING.</b>
ohair@276 1281 <p>
ohair@320 1282 The 32-bit OpenJDK Windows build requires
ohair@276 1283 Microsoft Visual Studio C++ 2010 (VS2010) Professional
ohair@276 1284 Edition or Express compiler.
ohair@276 1285 The compiler and other tools are expected to reside
ohair@276 1286 in the location defined by the variable
ohair@276 1287 <tt>VS100COMNTOOLS</tt> which
ohair@276 1288 is set by the Microsoft Visual Studio installer.
ohair@13 1289 <p>
ohair@276 1290 Once the compiler is installed,
ohair@276 1291 it is recommended that you run <tt>VCVARS32.BAT</tt>
ohair@276 1292 to set the compiler environment variables
ohair@276 1293 <tt>INCLUDE</tt>,
ohair@276 1294 <tt>LIB</tt>, and
ohair@276 1295 <tt>PATH</tt>
ohair@276 1296 prior to building the
ohair@276 1297 OpenJDK.
ohair@276 1298 The above environment variables <b>MUST</b> be set.
ohair@276 1299 This compiler also contains the Windows SDK v 7.0a,
ohair@276 1300 which is an update to the Windows 7 SDK.
ohair@13 1301 <p>
ohair@276 1302 <b>WARNING:</b> Make sure you check out the
ohair@276 1303 <a href="#cygwin">CYGWIN link.exe WARNING</a>.
ohair@276 1304 The path <tt>/usr/bin</tt> must be after the path to the
ohair@276 1305 Visual Studio product.
ohair@13 1306 </blockquote>
prr@187 1307 <strong><a name="msvc64">Windows x64: Microsoft Visual Studio 2010 Professional Compiler</a></strong>
ohair@13 1308 <blockquote>
ohair@320 1309 For <b>X64</b>, the set up is much the same as 32 bit
prr@175 1310 except that you run <tt>amd64\VCVARS64.BAT</tt>
prr@175 1311 to set the compiler environment variables.
ohair@320 1312 Previously 64 bit builds had to use the 64 bit compiler in
prr@187 1313 an unbundled Windows SDK but this is no longer necessary if
prr@187 1314 you have VS2010 Professional.
ohair@13 1315 </blockquote>
prr@187 1316 <strong><a name="mssdk64">Windows x64: Microsoft Windows 7.1 SDK 64 bit compilers.</a></strong>
ohair@276 1317 For a free alternative for 64 bit builds, use the 7.1 SDK.
ohair@276 1318 Microsoft say that to set up your paths for this run
ohair@276 1319 <pre>
prr@187 1320 c:\Program Files\Microsoft SDKs\Windows\v7.1\bin\setenv.cmd /x64.
ohair@276 1321 </pre>
ohair@276 1322 What was tested is just directly setting up LIB, INCLUDE,
ohair@276 1323 PATH and based on the installation directories using the
ohair@276 1324 DOS short name appropriate for the system, (you will
ohair@276 1325 need to set them for yours, not just blindly copy this) eg :
ohair@276 1326 <pre>
prr@187 1327 set VSINSTALLDIR=c:\PROGRA~2\MICROS~1.0
prr@187 1328 set WindowsSdkDir=c:\PROGRA~1\MICROS~1\Windows\v7.1
prr@187 1329 set PATH=%VSINSTALLDIR%\vc\bin\amd64;%VSINSTALLDIR%\Common7\IDE;%WindowsSdkDir%\bin;%PATH%
prr@187 1330 set INCLUDE=%VSINSTALLDIR%\vc\include;%WindowsSdkDir%\include
prr@187 1331 set LIB=%VSINSTALLDIR%\vc\lib\amd64;%WindowsSdkDir%\lib\x64
ohair@276 1332 </pre>
ewendeli@433 1333 <strong><a name="llvmgcc">OS X Lion 10.7.3: LLVM GCC</a></strong>
ewendeli@433 1334 <blockquote>
ewendeli@433 1335 LLVM GCC is bundled with XCode. The version should be at least 4.2.1.
ewendeli@433 1336 </blockquote>
ohair@13 1337 </blockquote>
ohair@13 1338 <!-- ------------------------------------------------------ -->
ohair@13 1339 <h4><a name="zip">Zip and Unzip</a></h4>
ohair@13 1340 <blockquote>
ohair@13 1341 Version 2.2 (November 3rd 1997) or newer of the zip utility
ohair@13 1342 and version 5.12 or newer of the unzip utility is needed
ohair@13 1343 to build the JDK.
ohair@13 1344 With Solaris, Linux, and Windows CYGWIN, the zip and unzip
ohair@13 1345 utilities installed on the system should be fine.
ohair@13 1346 Information and the source code for
ohair@13 1347 ZIP.EXE and UNZIP.EXE is available on the
ohair@13 1348 <a href="http://www.info-zip.org"
ohair@13 1349 target="_blank">info-zip web site</a>.
ohair@13 1350 </blockquote>
ohair@13 1351 <!-- ------------------------------------------------------ -->
ohair@13 1352 <h4><a name="cups">Common UNIX Printing System (CUPS) Headers (Solaris &amp; Linux)</a></h4>
ohair@13 1353 <blockquote>
ohair@13 1354 <strong>Solaris:</strong>
ohair@13 1355 CUPS header files are required for building the
ohair@13 1356 OpenJDK on Solaris.
ohair@13 1357 The Solaris header files can be obtained by installing
ohair@13 1358 the package <strong>SFWcups</strong> from the Solaris Software
ohair@13 1359 Companion CD/DVD, these often will be installed into
ohair@13 1360 <tt>/opt/sfw/cups</tt>.
ohair@13 1361 <p>
ohair@276 1362 <strong>Linux:</strong>
ohair@276 1363 CUPS header files are required for building the
ohair@276 1364 OpenJDK on Linux.
ohair@276 1365 The Linux header files are usually available from a "cups"
ohair@276 1366 development package, it's recommended that you try and use
ohair@276 1367 the package provided by the particular version of Linux that
ohair@276 1368 you are using.
ohair@13 1369 <p>
ohair@276 1370 The CUPS header files can always be downloaded from
ohair@276 1371 <a href="http://www.cups.org" target="_blank">www.cups.org</a>.
ohair@276 1372 The variable
ohair@276 1373 <tt><a href="#ALT_CUPS_HEADERS_PATH">ALT_CUPS_HEADERS_PATH</a></tt>
ohair@276 1374 can be used to override the default location of the
ohair@276 1375 CUPS Header files.
ohair@13 1376 </blockquote>
ohair@13 1377 <!-- ------------------------------------------------------ -->
andrew@90 1378 <h4><a name="xrender">XRender Extension Headers (Solaris &amp; Linux)</a></h4>
andrew@90 1379 <blockquote>
andrew@90 1380 <p>
ohair@276 1381 <strong>Solaris:</strong>
ohair@276 1382 XRender header files are required for building the
ohair@276 1383 OpenJDK on Solaris.
ohair@276 1384 The XRender header file is included with the other X11 header files
ohair@276 1385 in the package <strong>SFWxwinc</strong> on new enough versions of
ohair@276 1386 Solaris and will be installed in
tbell@487 1387 <tt>/usr/X11/include/X11/extensions/Xrender.h</tt> or
tbell@487 1388 <tt>/usr/openwin/share/include/X11/extensions/Xrender.h</tt>
andrew@90 1389 </p><p>
ohair@276 1390 <strong>Linux:</strong>
ohair@276 1391 XRender header files are required for building the
ohair@276 1392 OpenJDK on Linux.
ohair@276 1393 The Linux header files are usually available from a "Xrender"
ohair@276 1394 development package, it's recommended that you try and use
ohair@276 1395 the package provided by the particular distribution of Linux that
ohair@276 1396 you are using.
ohair@276 1397 </p>
andrew@90 1398 </blockquote>
andrew@90 1399 <!-- ------------------------------------------------------ -->
ohair@13 1400 <h4><a name="freetype">FreeType 2</a></h4>
ohair@13 1401 <blockquote>
ohair@13 1402 Version 2.3 or newer of FreeType is required for building the OpenJDK.
ohair@13 1403 On Unix systems required files can be available as part of your
ohair@13 1404 distribution (while you still may need to upgrade them).
ohair@13 1405 Note that you need development version of package that
ohair@13 1406 includes both FreeType library and header files.
ohair@13 1407 <p>
ohair@276 1408 You can always download latest FreeType version from the
ohair@276 1409 <a href="http://www.freetype.org" target="_blank">FreeType website</a>.
ohair@13 1410 <p>
ohair@276 1411 Makefiles will try to pick FreeType from /usr/lib and /usr/include.
ohair@276 1412 In case it is installed elsewhere you will need to set environment
ohair@276 1413 variables
ohair@276 1414 <tt><a href="#ALT_FREETYPE_LIB_PATH">ALT_FREETYPE_LIB_PATH</a></tt>
ohair@276 1415 and
ohair@276 1416 <tt><a href="#ALT_FREETYPE_HEADERS_PATH">ALT_FREETYPE_HEADERS_PATH</a></tt>
ohair@276 1417 to refer to place where library and header files are installed.
ohair@25 1418 <p>
ohair@276 1419 Building the freetype 2 libraries from scratch is also possible,
ohair@276 1420 however on Windows refer to the
ohair@276 1421 <a href="http://freetype.freedesktop.org/wiki/FreeType_DLL">
ohair@276 1422 Windows FreeType DLL build instructions</a>.
ohair@25 1423 <p>
ohair@276 1424 Note that by default FreeType is built with byte code hinting
ohair@276 1425 support disabled due to licensing restrictions.
ohair@276 1426 In this case, text appearance and metrics are expected to
ohair@276 1427 differ from Sun's official JDK build.
ohair@276 1428 See
ohair@276 1429 <a href="http://freetype.sourceforge.net/freetype2/index.html">
ohair@276 1430 the SourceForge FreeType2 Home Page
ohair@276 1431 </a>
ohair@276 1432 for more information.
ohair@13 1433 </blockquote>
ohair@13 1434 <!-- ------------------------------------------------------ -->
ohair@13 1435 <h4><a name="alsa">Advanced Linux Sound Architecture (ALSA) (Linux only)</a></h4>
ohair@13 1436 <blockquote>
ohair@13 1437 <strong>Linux only:</strong>
ohair@13 1438 Version 0.9.1 or newer of the ALSA files are
ohair@13 1439 required for building the OpenJDK on Linux.
ohair@13 1440 These Linux files are usually available from an "alsa"
ohair@13 1441 of "libasound"
ohair@13 1442 development package, it's highly recommended that you try and use
ohair@13 1443 the package provided by the particular version of Linux that
ohair@13 1444 you are using.
ohair@13 1445 The makefiles will check this emit a sanity error if it is
ohair@13 1446 missing or the wrong version.
ohair@13 1447 <p>
ohair@276 1448 In particular, older Linux systems will likely not have the
ohair@276 1449 right version of ALSA installed, for example
ohair@276 1450 Redhat AS 2.1 U2 and SuSE 8.1 do not include a sufficiently
ohair@276 1451 recent ALSA distribution.
ohair@276 1452 On rpm-based systems, you can see if ALSA is installed by
ohair@276 1453 running this command:
ohair@13 1454 <pre>
ohair@13 1455 <tt>rpm -qa | grep alsa</tt>
ohair@13 1456 </pre>
ohair@13 1457 Both <tt>alsa</tt> and <tt>alsa-devel</tt> packages are needed.
ohair@13 1458 <p>
ohair@276 1459 If your distribution does not come with ALSA, and you can't
ohair@276 1460 find ALSA packages built for your particular system,
ohair@276 1461 you can try to install the pre-built ALSA rpm packages from
ohair@276 1462 <a href="http://www.freshrpms.net/" target="_blank">
ohair@276 1463 <tt>www.freshrpms.net</tt></a>.
ohair@276 1464 Note that installing a newer ALSA could
ohair@276 1465 break sound output if an older version of ALSA was previously
ohair@276 1466 installed on the system, but it will enable JDK compilation.
ohair@13 1467 <blockquote>
ohair@13 1468 Installation: execute as root<br>
ohair@13 1469 [i586]: <code>rpm -Uv --force alsa-lib-devel-0.9.1-rh61.i386.rpm</code><br>
ohair@13 1470 [x64]: <code>rpm -Uv --force alsa-lib-devel-0.9.8-amd64.x86_64.rpm</code><br>
ohair@13 1471 Uninstallation:<br>
ohair@13 1472 [i586]: <code>rpm -ev alsa-lib-devel-0.9.1-rh61</code><br>
ohair@13 1473 [x64]:<code>rpm -ev alsa-lib-devel-0.9.8-amd64</code><br>
ohair@13 1474 Make sure that you do not link to the static library
ohair@13 1475 (<tt>libasound.a</tt>),
ohair@13 1476 by verifying that the dynamic library (<tt>libasound.so</tt>) is
ohair@13 1477 correctly installed in <tt>/usr/lib</tt>.
ohair@13 1478 </blockquote>
ohair@13 1479 As a last resort you can go to the
ohair@13 1480 <a href="http://www.alsa-project.org" target="_blank">
ohair@276 1481 Advanced Linux Sound Architecture Site</a> and build it from
ohair@13 1482 source.
ohair@13 1483 <blockquote>
ohair@13 1484 Download driver and library
ohair@13 1485 source tarballs from
ohair@13 1486 <a href="http://www.alsa-project.org" target="_blank">ALSA's homepage</a>.
ohair@13 1487 As root, execute the following
ohair@13 1488 commands (you may need to adapt the version number):
ohair@13 1489 <pre>
ohair@13 1490 <tt>
ohair@13 1491 $ tar xjf alsa-driver-0.9.1.tar.bz2
ohair@13 1492 $ cd alsa-driver-0.9.1
ohair@13 1493 $ ./configure
ohair@13 1494 $ make install
ohair@13 1495 $ cd ..
ohair@13 1496 $ tar xjf alsa-lib-0.9.1.tar.bz2
ohair@13 1497 $ cd alsa-lib-0.9.1
ohair@13 1498 $ ./configure
ohair@13 1499 $ make install
ohair@13 1500 </tt>
ohair@13 1501 </pre>
ohair@13 1502 Should one of the above steps fail, refer to the documentation on
ohair@13 1503 ALSA's home page.
ohair@13 1504 </blockquote>
ohair@13 1505 Note that this is a minimum install that enables
ohair@13 1506 building the JDK platform. To actually use ALSA sound drivers, more
ohair@13 1507 steps are necessary as outlined in the documentation on ALSA's homepage.
ohair@13 1508 <p>
ohair@276 1509 ALSA can be uninstalled by executing <tt>make uninstall</tt> first in
ohair@276 1510 the <tt>alsa-lib-0.9.1</tt> directory and then in
ohair@276 1511 <tt>alsa-driver-0.9.1</tt>.
ohair@13 1512 </blockquote>
ohair@13 1513 There are no ALT* variables to change the assumed locations of ALSA,
ohair@13 1514 the makefiles will expect to find the ALSA include files and library at:
ohair@13 1515 <tt>/usr/include/alsa</tt> and <tt>/usr/lib/libasound.so</tt>.
duke@2 1516 </blockquote>
ohair@13 1517 <!-- ------------------------------------------------------ -->
ohair@13 1518 <h4>Windows Specific Dependencies</h4>
duke@2 1519 <blockquote>
ohair@13 1520 <strong>Unix Command Tools (<a name="cygwin">CYGWIN</a>)</strong>
ohair@13 1521 <blockquote>
ohair@13 1522 The OpenJDK requires access to a set of unix command tools
ohair@13 1523 on Windows which can be supplied by
ohair@13 1524 <a href="http://www.cygwin.com" target="_blank">CYGWIN</a>.
ohair@13 1525 <p>
ohair@276 1526 The OpenJDK build requires CYGWIN version 1.5.12 or newer.
ohair@276 1527 Information about CYGWIN can
ohair@276 1528 be obtained from the CYGWIN website at
ohair@276 1529 <a href="http://www.cygwin.com" target="_blank">www.cygwin.com</a>.
ohair@13 1530 <p>
ohair@276 1531 By default CYGWIN doesn't install all the tools required for building
ohair@276 1532 the OpenJDK.
ohair@276 1533 Along with the default installation, you need to install
ohair@276 1534 the following tools.
ohair@13 1535 <blockquote>
ohair@13 1536 <table border="1">
ohair@13 1537 <thead>
ohair@13 1538 <tr>
ohair@13 1539 <td>Binary Name</td>
ohair@41 1540 <td>Category</td>
ohair@13 1541 <td>Package</td>
ohair@13 1542 <td>Description</td>
ohair@13 1543 </tr>
ohair@13 1544 </thead>
ohair@13 1545 <tbody>
ohair@13 1546 <tr>
ohair@13 1547 <td>ar.exe</td>
ohair@13 1548 <td>Devel</td>
ohair@41 1549 <td>binutils</td>
ohair@41 1550 <td>The GNU assembler, linker and binary
ohair@276 1551 utilities</td>
ohair@13 1552 </tr>
ohair@13 1553 <tr>
ohair@13 1554 <td>make.exe</td>
ohair@13 1555 <td>Devel</td>
ohair@41 1556 <td>make</td>
ohair@41 1557 <td>The GNU version of the 'make' utility built for CYGWIN.<br>
tbell@487 1558 <b>NOTE</b>: the Cygwin make can not be used to build the
tbell@487 1559 OpenJDK. You only need it to build your own version of make
tbell@487 1560 (see <a href="#gmake">the GNU make section</a>)</td>
ohair@13 1561 </tr>
ohair@13 1562 <tr>
ohair@13 1563 <td>m4.exe</td>
ohair@13 1564 <td>Interpreters</td>
ohair@41 1565 <td>m4</td>
ohair@41 1566 <td>GNU implementation of the traditional Unix macro
ohair@276 1567 processor</td>
ohair@13 1568 </tr>
ohair@13 1569 <tr>
ohair@13 1570 <td>cpio.exe</td>
ohair@13 1571 <td>Utils</td>
ohair@41 1572 <td>cpio</td>
ohair@41 1573 <td>A program to manage archives of files</td>
ohair@13 1574 </tr>
ohair@13 1575 <tr>
ohair@25 1576 <td>gawk.exe</td>
ohair@13 1577 <td>Utils</td>
ohair@41 1578 <td>awk</td>
ohair@41 1579 <td>Pattern-directed scanning and processing language</td>
ohair@13 1580 </tr>
ohair@13 1581 <tr>
ohair@13 1582 <td>file.exe</td>
ohair@13 1583 <td>Utils</td>
ohair@41 1584 <td>file</td>
ohair@41 1585 <td>Determines file type using 'magic' numbers</td>
ohair@13 1586 </tr>
ohair@13 1587 <tr>
ohair@13 1588 <td>zip.exe</td>
ohair@25 1589 <td>Archive</td>
ohair@41 1590 <td>zip</td>
ohair@41 1591 <td>Package and compress (archive) files</td>
ohair@13 1592 </tr>
ohair@13 1593 <tr>
ohair@13 1594 <td>unzip.exe</td>
ohair@25 1595 <td>Archive</td>
ohair@41 1596 <td>unzip</td>
ohair@41 1597 <td>Extract compressed files in a ZIP archive</td>
ohair@13 1598 </tr>
ohair@13 1599 <tr>
ohair@13 1600 <td>free.exe</td>
ohair@41 1601 <td>System</td>
ohair@41 1602 <td>procps</td>
ohair@41 1603 <td>Display amount of free and used memory in the system</td>
ohair@13 1604 </tr>
ohair@13 1605 </tbody>
ohair@13 1606 </table>
ohair@13 1607 </blockquote>
ohair@13 1608 <p>
ohair@276 1609 Note that the CYGWIN software can conflict with other non-CYGWIN
ohair@276 1610 software on your Windows system.
ohair@276 1611 CYGWIN provides a
ohair@276 1612 <a href="http://cygwin.com/faq/faq.using.html" target="_blank">FAQ</a> for
ohair@276 1613 known issues and problems, of particular interest is the
ohair@276 1614 section on
ohair@276 1615 <a href="http://cygwin.com/faq/faq.using.html#faq.using.bloda" target="_blank">
ohair@276 1616 BLODA (applications that interfere with CYGWIN)</a>.
ohair@41 1617 <p>
ohair@276 1618 <b>WARNING:</b>
ohair@276 1619 Be very careful with <b><tt>link.exe</tt></b>, it will conflict
ohair@276 1620 with the Visual Studio version. You need the Visual Studio
ohair@276 1621 version of <tt>link.exe</tt>, not the CYGWIN one.
ohair@276 1622 So it's important that the Visual Studio paths in PATH preceed
ohair@276 1623 the CYGWIN path <tt>/usr/bin</tt>.
ohair@13 1624 </blockquote>
tbell@487 1625 <strong> Minimalist GNU for Windows (<a name="msys">MinGW/MSYS</a>)</strong>
tbell@487 1626 <blockquote>
tbell@487 1627 Alternatively, the set of unix command tools for the OpenJDK build on
tbell@487 1628 Windows can be supplied by
tbell@487 1629 <a href="http://www.mingw.org/wiki/MSYS" target="_blank">MinGW/MSYS</a>.
tbell@487 1630 <p>
tbell@487 1631 In addition to the tools which will be installed by default, you have
tbell@487 1632 to manually install the <tt>msys-zip</tt> and <tt>msys-unzip</tt> packages.
tbell@487 1633 This can be easily done with the MinGW command line installer:<br/>
tbell@487 1634 <tt><br/>
tbell@487 1635 mingw-get.exe install msys-zip<br/>
tbell@487 1636 mingw-get.exe install msys-unzip<br/>
tbell@487 1637 </tt>
tbell@487 1638 </p>
tbell@487 1639 </blockquote>
ohair@13 1640 <strong><a name="dxsdk">Microsoft DirectX 9.0 SDK header files and libraries</a></strong>
duke@2 1641 <blockquote>
ohair@13 1642 Microsoft DirectX 9.0 SDK (Summer 2004)
ohair@13 1643 headers are required for building
ohair@13 1644 OpenJDK.
ohair@13 1645 This SDK can be downloaded from
ohair@13 1646 <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=FD044A42-9912-42A3-9A9E-D857199F888E&amp;displaylang=en" target="_blank">
ohair@276 1647 Microsoft DirectX 9.0 SDK (Summer 2004)</a>.
ohair@13 1648 If the link above becomes obsolete, the SDK can be found from
ohair@13 1649 <a href="http://download.microsoft.com" target="_blank">the Microsoft Download Site</a>
ohair@13 1650 (search with "DirectX 9.0 SDK Update Summer 2004").
ohair@13 1651 The location of this SDK can be set with
ohair@13 1652 <tt><a href="#ALT_DXSDK_PATH">ALT_DXSDK_PATH</a></tt>
ohair@13 1653 but it's normally found via the DirectX environment variable
ohair@13 1654 <tt>DXSDK_DIR</tt>.
ohair@13 1655 </blockquote>
ohair@291 1656 <strong><a name="msvcrNN"><tt>MSVCR100.DLL</tt></a></strong>
ohair@13 1657 <blockquote>
prr@175 1658 The OpenJDK build requires access to a redistributable
prr@175 1659 <tt>MSVCR100.DLL</tt>.
prr@175 1660 This is usually picked up automatically from the redist
prr@175 1661 directories of Visual Studio 2010.
prr@175 1662 If this cannot be found set the
ohair@291 1663 <a href="#ALT_MSVCRNN_DLL_PATH"><tt>ALT_MSVCRNN_DLL_PATH</tt></a>
ohair@49 1664 variable to the location of this file.
ohair@13 1665 <p>
duke@2 1666 </blockquote>
duke@2 1667 </blockquote>
ohair@13 1668 <!-- ------------------------------------------------------ -->
ohair@13 1669 <hr>
ohair@13 1670 <h2><a name="creating">Creating the Build</a></h2>
duke@2 1671 <blockquote>
ohair@13 1672 Once a machine is setup to build the OpenJDK,
ohair@13 1673 the steps to create the build are fairly simple.
ohair@13 1674 The various ALT settings can either be made into variables
ohair@13 1675 or can be supplied on the
ohair@13 1676 <a href="#gmake"><tt><i>gmake</i></tt></a>
ohair@13 1677 command.
ohair@13 1678 <ol>
ohair@13 1679 <li>Use the sanity rule to double check all the ALT settings:
ohair@13 1680 <blockquote>
ohair@13 1681 <tt>
ohair@13 1682 <i>gmake</i>
ohair@13 1683 sanity
ohair@13 1684 [ARCH_DATA_MODEL=<i>32 or 64</i>]
ohair@13 1685 [other "ALT_" overrides]
ohair@13 1686 </tt>
ohair@13 1687 </blockquote>
ohair@13 1688 </li>
ohair@13 1689 <li>Start the build with the command:
ohair@13 1690 <blockquote>
ohair@13 1691 <tt>
ohair@13 1692 <i>gmake</i>
ohair@13 1693 [ARCH_DATA_MODEL=<i>32 or 64</i>]
ohair@13 1694 [ALT_OUTPUTDIR=<i>output_directory</i>]
ohair@13 1695 [other "ALT_" overrides]
ohair@13 1696 </tt>
ohair@13 1697 </blockquote>
ohair@13 1698 </li>
ohair@13 1699 </ol>
duke@2 1700 <p>
ohair@276 1701 <strong>Solaris:</strong>
ohair@276 1702 Note that ARCH_DATA_MODEL is really only needed on Solaris to
ohair@276 1703 indicate you want to built the 64-bit version.
ohair@276 1704 And before the Solaris 64-bit binaries can be used, they
ohair@276 1705 must be merged with the binaries from a separate 32-bit build.
ohair@276 1706 The merged binaries may then be used in either 32-bit or 64-bit mode, with
ohair@276 1707 the selection occurring at runtime
ohair@276 1708 with the <tt>-d32</tt> or <tt>-d64</tt> options.
duke@2 1709 </blockquote>
ohair@13 1710 <!-- ------------------------------------------------------ -->
ohair@13 1711 <hr>
ohair@13 1712 <h2><a name="testing">Testing the Build</a></h2>
ohair@13 1713 <blockquote>
ohair@13 1714 When the build is completed, you should see the generated
ohair@13 1715 binaries and associated files in the <tt>j2sdk-image</tt>
ohair@13 1716 directory in the output directory.
ohair@13 1717 The default output directory is
ohair@13 1718 <tt>build/<i>platform</i></tt>,
ohair@13 1719 where <tt><i>platform</i></tt> is one of
ohair@276 1720 <blockquote>
ohair@276 1721 <ul>
ohair@276 1722 <li><tt>solaris-sparc</tt></li>
ohair@276 1723 <li><tt>solaris-sparcv9</tt></li>
ohair@276 1724 <li><tt>solaris-i586</tt></li>
ohair@276 1725 <li><tt>solaris-amd64</tt></li>
ohair@276 1726 <li><tt>linux-i586</tt></li>
ohair@276 1727 <li><tt>linux-amd64</tt></li>
ohair@276 1728 <li><tt>windows-i586</tt></li>
ohair@276 1729 <li><tt>windows-amd64</tt></li>
ohair@276 1730 </ul>
ohair@276 1731 </blockquote>
ohair@13 1732 In particular, the
ohair@13 1733 <tt>build/<i>platform</i>/j2sdk-image/bin</tt>
ohair@13 1734 directory should contain executables for the
ohair@13 1735 OpenJDK tools and utilities.
duke@2 1736 <p>
ohair@276 1737 You can test that the build completed properly by using the build
ohair@276 1738 to run the various demos that you will find in the
ohair@276 1739 <tt>build/<i>platform</i>/j2sdk-image/demo</tt>
ohair@276 1740 directory.
ohair@13 1741 <p>
ohair@276 1742 The provided regression tests can be run with the <tt>jtreg</tt>
ohair@276 1743 utility from
ohair@276 1744 <a href="http://openjdk.java.net/jtreg/" target="_blank">the jtreg site</a>.
duke@2 1745 </blockquote>
ohair@13 1746 <!-- ------------------------------------------------------ -->
ohair@13 1747 <hr>
ohair@13 1748 <h2><a name="variables">Environment/Make Variables</a></h2>
ohair@13 1749 <p>
ohair@276 1750 Some of the
ohair@276 1751 environment or make variables (just called <b>variables</b> in this
ohair@276 1752 document) that can impact the build are:
duke@2 1753 <blockquote>
duke@2 1754 <dl>
ohair@49 1755 <dt><a name="path"><tt>PATH</tt></a> </dt>
ohair@49 1756 <dd>Typically you want to set the <tt>PATH</tt> to include:
ohair@49 1757 <ul>
ohair@49 1758 <li>The location of the GNU make binary</li>
ohair@49 1759 <li>The location of the Bootstrap JDK <tt>java</tt>
ohair@276 1760 (see <a href="#bootjdk">Bootstrap JDK</a>)</li>
ohair@49 1761 <li>The location of the C/C++ compilers
ohair@276 1762 (see <a href="#compilers"><tt>compilers</tt></a>)</li>
ohair@49 1763 <li>The location or locations for the Unix command utilities
ohair@276 1764 (e.g. <tt>/usr/bin</tt>)</li>
ohair@49 1765 </ul>
ohair@49 1766 </dd>
ohair@49 1767 <dt><tt>MILESTONE</tt> </dt>
ohair@49 1768 <dd>
ohair@49 1769 The milestone name for the build (<i>e.g.</i>"beta").
ohair@49 1770 The default value is "internal".
ohair@49 1771 </dd>
ohair@49 1772 <dt><tt>BUILD_NUMBER</tt> </dt>
ohair@49 1773 <dd>
ohair@49 1774 The build number for the build (<i>e.g.</i> "b27").
ohair@49 1775 The default value is "b00".
ohair@49 1776 </dd>
ohair@49 1777 <dt><a name="arch_data_model"><tt>ARCH_DATA_MODEL</tt></a></dt>
ohair@49 1778 <dd>The <tt>ARCH_DATA_MODEL</tt> variable
ohair@49 1779 is used to specify whether the build is to generate 32-bit or 64-bit
ohair@49 1780 binaries.
ohair@49 1781 The Solaris build supports either 32-bit or 64-bit builds, but
ohair@49 1782 Windows and Linux will support only one, depending on the specific
ohair@49 1783 OS being used.
ohair@49 1784 Normally, setting this variable is only necessary on Solaris.
ohair@49 1785 Set <tt>ARCH_DATA_MODEL</tt> to <tt>32</tt> for generating 32-bit binaries,
ohair@49 1786 or to <tt>64</tt> for generating 64-bit binaries.
ohair@49 1787 </dd>
ohair@49 1788 <dt><a name="ALT_BOOTDIR"><tt>ALT_BOOTDIR</tt></a></dt>
ohair@49 1789 <dd>
ohair@49 1790 The location of the bootstrap JDK installation.
ohair@49 1791 See <a href="#bootjdk">Bootstrap JDK</a> for more information.
ohair@49 1792 You should always install your own local Bootstrap JDK and
ohair@49 1793 always set <tt>ALT_BOOTDIR</tt> explicitly.
ohair@49 1794 </dd>
ohair@49 1795 <dt><a name="ALT_JDK_IMPORT_PATH"><tt>ALT_JDK_IMPORT_PATH</tt></a></dt>
duke@2 1796 <dd>
ohair@49 1797 The location of a previously built JDK installation.
ohair@49 1798 See <a href="#importjdk">Optional Import JDK</a> for more information.
ohair@49 1799 </dd>
ohair@49 1800 <dt><a name="ALT_OUTPUTDIR"><tt>ALT_OUTPUTDIR</tt></a> </dt>
ohair@49 1801 <dd>
ohair@49 1802 An override for specifying the (absolute) path of where the
ohair@49 1803 build output is to go.
ohair@49 1804 The default output directory will be build/<i>platform</i>.
ohair@49 1805 </dd>
ohair@49 1806 <dt><a name="ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a> </dt>
ohair@49 1807 <dd>
ohair@49 1808 The location of the C/C++ compiler.
ohair@49 1809 The default varies depending on the platform.
ohair@49 1810 </dd>
ohair@49 1811 <dt><tt><a name="ALT_CACERTS_FILE">ALT_CACERTS_FILE</a></tt></dt>
ohair@49 1812 <dd>
ohair@49 1813 The location of the <a href="#cacerts">cacerts</a> file.
ohair@49 1814 The default will refer to
ohair@49 1815 <tt>jdk/src/share/lib/security/cacerts</tt>.
ohair@49 1816 </dd>
ohair@49 1817 <dt><a name="ALT_CUPS_HEADERS_PATH"><tt>ALT_CUPS_HEADERS_PATH</tt></a> </dt>
ohair@49 1818 <dd>
ohair@49 1819 The location of the CUPS header files.
ohair@49 1820 See <a href="#cups">CUPS information</a> for more information.
ohair@49 1821 If this path does not exist the fallback path is
ohair@49 1822 <tt>/usr/include</tt>.
ohair@49 1823 </dd>
ohair@49 1824 <dt><a name="ALT_FREETYPE_LIB_PATH"><tt>ALT_FREETYPE_LIB_PATH</tt></a></dt>
ohair@49 1825 <dd>
ohair@49 1826 The location of the FreeType shared library.
ohair@49 1827 See <a href="#freetype">FreeType information</a> for details.
ohair@49 1828 </dd>
ohair@49 1829 <dt><a name="ALT_FREETYPE_HEADERS_PATH"><tt>ALT_FREETYPE_HEADERS_PATH</tt></a></dt>
ohair@49 1830 <dd>
ohair@49 1831 The location of the FreeType header files.
ohair@49 1832 See <a href="#freetype">FreeType information</a> for details.
ohair@49 1833 </dd>
ohair@49 1834 <dt><a name="ALT_JDK_DEVTOOLS_PATH"><tt>ALT_JDK_DEVTOOLS_PATH</tt></a></dt>
ohair@49 1835 <dd>
ohair@49 1836 The default root location of the devtools.
ohair@49 1837 The default value is
ohair@49 1838 <tt>$(ALT_SLASH_JAVA)/devtools</tt>.
ohair@49 1839 </dd>
ohair@49 1840 <dt><tt><a name="ALT_DEVTOOLS_PATH">ALT_DEVTOOLS_PATH</a></tt> </dt>
ohair@49 1841 <dd>
ohair@49 1842 The location of tools like the
ohair@49 1843 <a href="#zip"><tt>zip</tt> and <tt>unzip</tt></a>
ohair@49 1844 binaries, but might also contain the GNU make utility
ohair@49 1845 (<tt><i>gmake</i></tt>).
ohair@49 1846 So this area is a bit of a grab bag, especially on Windows.
ohair@49 1847 The default value depends on the platform and
ohair@49 1848 Unix Commands being used.
ohair@49 1849 On Linux the default will be
ohair@49 1850 <tt>$(ALT_JDK_DEVTOOLS_PATH)/linux/bin</tt>,
ohair@49 1851 on Solaris
ohair@49 1852 <tt>$(ALT_JDK_DEVTOOLS_PATH)/<i>{sparc,i386}</i>/bin</tt>,
ohair@49 1853 and on Windows with CYGWIN
ohair@49 1854 <tt>/usr/bin</tt>.
ohair@49 1855 </dd>
ohair@320 1856 <dt><tt><a name="ALT_DROPS_DIR">ALT_DROPS_DIR</a></tt> </dt>
ohair@320 1857 <dd>
ohair@320 1858 The location of any source drop bundles
ohair@320 1859 (see <a href="#drops">Managing the Source Drops</a>).
ohair@320 1860 The default will be
neugens@359 1861 <tt>$(ALT_JDK_DEVTOOLS_PATH)/share/jdk8-drops</tt>.
ohair@320 1862 </dd>
ohair@49 1863 <dt><a name="ALT_UNIXCCS_PATH"><tt>ALT_UNIXCCS_PATH</tt></a></dt>
ohair@49 1864 <dd>
ohair@49 1865 <strong>Solaris only:</strong>
ohair@49 1866 An override for specifying where the Unix CCS
ohair@49 1867 command set are located.
ohair@49 1868 The default location is <tt>/usr/ccs/bin</tt>
ohair@49 1869 </dd>
ohair@49 1870 <dt><a name="ALT_SLASH_JAVA"><tt>ALT_SLASH_JAVA</tt></a></dt>
ohair@49 1871 <dd>
ohair@49 1872 The default root location for many of the ALT path locations
ohair@49 1873 of the following ALT variables.
ohair@49 1874 The default value is
ohair@49 1875 <tt>"/java"</tt> on Solaris and Linux,
ohair@49 1876 <tt>"J:"</tt> on Windows.
ohair@49 1877 </dd>
ohair@49 1878 <dt><a name="ALT_BUILD_JDK_IMPORT_PATH"><tt>ALT_BUILD_JDK_IMPORT_PATH</tt></a></dt>
ohair@49 1879 <dd>
ohair@49 1880 These are useful in managing builds on multiple platforms.
ohair@49 1881 The default network location for all of the import JDK images
ohair@49 1882 for all platforms.
ohair@49 1883 If <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>
ohair@49 1884 is not set, this directory will be used and should contain
ohair@49 1885 the following directories:
ohair@49 1886 <tt>solaris-sparc</tt>,
ohair@49 1887 <tt>solaris-i586</tt>,
ohair@49 1888 <tt>solaris-sparcv9</tt>,
ohair@49 1889 <tt>solaris-amd64</tt>,
ohair@49 1890 <tt>linux-i586</tt>,
ohair@49 1891 <tt>linux-amd64</tt>,
ohair@49 1892 <tt>windows-i586</tt>,
ohair@49 1893 and
ohair@49 1894 <tt>windows-amd64</tt>.
ohair@49 1895 Where each of these directories contain the import JDK image
ohair@49 1896 for that platform.
duke@2 1897 </dd>
dholmes@323 1898 <dt><a name="ALT_OPENWIN_HOME"><tt>ALT_OPENWIN_HOME</tt></a></dt>
dholmes@323 1899 <dd>
tbell@487 1900 The top-level directory of the libraries and include files for the platform's
tbell@487 1901 graphical programming environment. The default location is platform specific.
tbell@487 1902 For example, on Linux it defaults to <tt>/usr/X11R6/</tt>.
tbell@487 1903 </dd>
ohair@49 1904 <dt><strong>Windows specific:</strong></dt>
ohair@13 1905 <dd>
ohair@49 1906 <dl>
ohair@275 1907 <dt><a name="ALT_WINDOWSSDKDIR"><tt>ALT_WINDOWSSDKDIR</tt></a> </dt>
ohair@49 1908 <dd>
ohair@49 1909 The location of the
ohair@275 1910 Microsoft Windows SDK where some tools will be
tbell@487 1911 located.
tbell@487 1912 The default is whatever WINDOWSSDKDIR is set to
tbell@487 1913 (or WindowsSdkDir) or the path
ohair@320 1914 <br>
ohair@320 1915 <tt>c:\Program Files\Microsoft SDKs\Windows\v7.0a</tt>
ohair@49 1916 </dd>
ohair@49 1917 <dt><tt><a name="ALT_DXSDK_PATH">ALT_DXSDK_PATH</a></tt> </dt>
ohair@49 1918 <dd>
ohair@49 1919 The location of the
ohair@49 1920 <a href="#dxsdk">Microsoft DirectX 9 SDK</a>.
ohair@49 1921 The default will be to try and use the DirectX environment
ohair@49 1922 variable <tt>DXSDK_DIR</tt>,
ohair@49 1923 failing that, look in <tt>C:/DXSDK</tt>.
ohair@49 1924 </dd>
prr@175 1925 <dt><tt><a name="ALT_MSVCRNN_DLL_PATH">ALT_MSVCRNN_DLL_PATH</a></tt> </dt>
ohair@49 1926 <dd>
ohair@49 1927 The location of the
ohair@291 1928 <a href="#msvcrNN"><tt>MSVCR100.DLL</tt></a>.
ohair@49 1929 </dd>
ohair@49 1930 </dl>
duke@2 1931 </dd>
dholmes@323 1932 <dt><strong>Cross-Compilation Support:</strong></dt>
dholmes@323 1933 <dd>
dholmes@323 1934 <dl>
dholmes@323 1935 <dt><a name="CROSS_COMPILE_ARCH"><tt>CROSS_COMPILE_ARCH</tt></a> </dt>
dholmes@323 1936 <dd>
dholmes@323 1937 Set to the target architecture of a cross-compilation build. If set, this
dholmes@323 1938 variable is used to signify that we are cross-compiling. The expectation
dholmes@323 1939 is that <a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a> is set
dholmes@323 1940 to point to the cross-compiler and that any cross-compilation specific flags
dholmes@323 1941 are passed using <a href="#EXTRA_CFLAGS"><tt>EXTRA_CFLAGS</tt></a>.
tbell@487 1942 The <a href="#ALT_OPENWIN_HOME"><tt>ALT_OPENWIN_HOME</tt></a> variable should
tbell@487 1943 also be set to point to the graphical header files (e.g. X11) provided with
tbell@487 1944 the cross-compiler.
dholmes@323 1945 When cross-compiling we skip execution of any demos etc that may be built, and
dholmes@323 1946 also skip binary-file verification.
dholmes@323 1947 </dd>
dholmes@323 1948 <dt><tt><a name="EXTRA_CFLAGS">EXTRA_CFLAGS</a></tt> </dt>
dholmes@323 1949 <dd>
tbell@487 1950 Used to pass cross-compilation options to the cross-compiler.
dholmes@323 1951 These are added to the <tt>CFLAGS</tt> and <tt>CXXFLAGS</tt> variables.
tbell@487 1952 </dd>
dholmes@323 1953 <dt><tt><a name="USE_ONLY_BOOTDIR_TOOLS">USE_ONLY_BOOTDIR_TOOLS</a></tt> </dt>
dholmes@323 1954 <dd>
dholmes@323 1955 Used primarily for cross-compilation builds (and always set in that case)
dholmes@323 1956 this variable indicates that tools from the boot JDK should be used during
dholmes@323 1957 the build process, not the tools (<tt>javac</tt>, <tt>javah</tt>, <tt>jar</tt>)
dholmes@323 1958 just built (which can't execute on the build host).
dholmes@323 1959 </dd>
dholmes@323 1960 <dt><tt><a name="HOST_CC">HOST_CC</a></tt> </dt>
dholmes@323 1961 <dd>
dholmes@323 1962 The location of the C compiler to generate programs to run on the build host.
dholmes@323 1963 Some parts of the build generate programs that are then compiled and executed
dholmes@323 1964 to produce other parts of the build. Normally the primary C compiler is used
dholmes@323 1965 to do this, but when cross-compiling that would be the cross-compiler and the
dholmes@323 1966 resulting program could not be executed.
dholmes@323 1967 On Linux this defaults to <tt>/usr/bin/gcc</tt>; on other platforms it must be
dholmes@323 1968 set explicitly.
dholmes@323 1969 </dd>
dholmes@323 1970 </dl>
dholmes@323 1971 <dt><strong>Specialized Build Options:</strong></dt>
dholmes@323 1972 <dd>
dholmes@323 1973 Some build variables exist to support specialized build environments and/or specialized
dholmes@323 1974 build products. Their use is only supported in those contexts:
dholmes@323 1975 <dl>
dholmes@323 1976 <dt><tt><a name="BUILD_CLIENT_ONLY">BUILD_CLIENT_ONLY</a></tt> </dt>
dholmes@323 1977 <dd>
dholmes@323 1978 Indicates this build will only contain the Hotspot client VM. In addition to
dholmes@323 1979 controlling the Hotspot build target, it ensures that we don't try to copy
dholmes@323 1980 any server VM files/directories, and defines a default <tt>jvm.cfg</tt> file
dholmes@323 1981 suitable for a client-only environment. Using this in a 64-bit build will
dholmes@323 1982 generate a sanity warning as 64-bit client builds are not directly supported.
dholmes@323 1983 </dd>
dholmes@323 1984 <dt><tt><a name="BUILD_HEADLESS_ONLY"></a>BUILD_HEADLESS_ONLY</tt> </dt>
dholmes@323 1985 <dd>
dholmes@323 1986 Used when the build environment has no graphical capabilities at all. This
tbell@487 1987 excludes building anything that requires graphical libraries to be available.
dholmes@323 1988 </dd>
dholmes@323 1989 <dt><tt><a name="JAVASE_EMBEDDED"></a>JAVASE_EMBEDDED</tt> </dt>
dholmes@323 1990 <dd>
tbell@487 1991 Used to indicate this is a build of the Oracle Java SE Embedded product.
tbell@487 1992 This will enable the directives included in the SE-Embedded specific build
tbell@487 1993 files.
dholmes@323 1994 </dd>
dholmes@323 1995 <dt><tt><a name="LIBZIP_CAN_USE_MMAP">LIBZIP_CAN_USE_MMAP</a></tt> </dt>
dholmes@323 1996 <dd>
tbell@487 1997 If set to false, disables the use of mmap by the zip utility. Otherwise,
tbell@487 1998 mmap will be used.
dholmes@323 1999 </dd>
dholmes@323 2000 <dt><tt><a name="COMPRESS_JARS"></a>COMPRESS_JARS</tt> </dt>
dholmes@323 2001 <dd>
tbell@487 2002 If set to true, causes certain jar files that would otherwise be built without
tbell@487 2003 compression, to use compression.
dholmes@323 2004 </dd>
dholmes@323 2005 </dl>
dholmes@323 2006 </dd>
duke@2 2007 </dl>
ohair@13 2008 </blockquote>
ohair@13 2009 <!-- ------------------------------------------------------ -->
ohair@13 2010 <hr>
ohair@320 2011 <h2><a name="hints">Hints and Tips</a></h2>
ohair@320 2012 <blockquote>
ohair@320 2013 You don't have to use all these hints and tips, and in fact people do actually
ohair@320 2014 build with systems that contradict these, but they might prove to be
ohair@320 2015 helpful to some.
ohair@320 2016 <ul>
ohair@320 2017 <li>
ohair@320 2018 If <tt>make sanity</tt> does not work, find out why, fix that
ohair@320 2019 before going any further. Or at least understand what the
ohair@320 2020 complaints are from it.
ohair@320 2021 </li>
ohair@320 2022 <li>
ohair@320 2023 JDK: Keep in mind that you are building a JDK, but you need
ohair@320 2024 a JDK (BOOTDIR JDK) to build this JDK.
ohair@320 2025 </li>
ohair@320 2026 <li>
ohair@320 2027 Ant: The ant utility is a java application and besides having
ohair@320 2028 ant available to you, it's important that ant finds the right
ohair@320 2029 java to run with. Make sure you can type <tt>ant -version</tt>
ohair@320 2030 and get clean results with no error messages.
ohair@320 2031 </li>
ohair@320 2032 <li>
ohair@320 2033 Linux: Try and favor the system packages over building your own
ohair@320 2034 or getting packages from other areas.
ohair@320 2035 Most Linux builds should be possible with the system's
ohair@320 2036 available packages.
ohair@320 2037 </li>
ohair@320 2038 <li>
ohair@320 2039 Solaris: Typically you will need to get compilers on your systems
ohair@320 2040 and occasionally GNU make 3.81 if a gmake binary is not available.
ohair@320 2041 The gmake binary might not be 3.81, be careful.
ohair@320 2042 </li>
ohair@320 2043 <li>
ohair@320 2044 Windows VS2010:
ohair@320 2045 <ul>
ohair@320 2046 <li>
ohair@320 2047 Only the C++ part of VS2010 is needed.
ohair@320 2048 Try to let the installation go to the default install directory.
ohair@320 2049 Always reboot your system after installing VS2010.
ohair@320 2050 The system environment variable VS100COMNTOOLS should be
ohair@320 2051 set in your environment.
ohair@320 2052 </li>
ohair@320 2053 <li>
ohair@320 2054 Make sure that TMP and TEMP are also set in the environment
ohair@320 2055 and refer to Windows paths that exist, like <tt>C:\temp</tt>,
ohair@320 2056 not <tt>/tmp</tt>, not <tt>/cygdrive/c/temp</tt>, and not <tt>C:/temp</tt>.
ohair@320 2057 <tt>C:\temp</tt> is just an example, it is assumed that this area is
ohair@320 2058 private to the user, so by default after installs you should
ohair@320 2059 see a unique user path in these variables.
ohair@320 2060 </li>
ohair@320 2061 <li>
ohair@320 2062 You need to use vsvars32.bat or vsvars64.bat to get the
ohair@320 2063 PATH, INCLUDE, LIB, LIBPATH, and WINDOWSSDKDIR
ohair@320 2064 variables set in your shell environment.
ohair@320 2065 These bat files are not easy to use from a shell environment.
neugens@359 2066 However, there is a script placed in the root jdk8 repository called
ohair@320 2067 vsvars.sh that can help, it should only be done once in a shell
ohair@320 2068 that will be doing the build, e.g.<br>
ohair@320 2069 <tt>sh ./make/scripts/vsvars.sh -v10 > settings<br>
ohair@320 2070 eval `cat settings`</tt><br>
ohair@320 2071 Or just <tt>eval `sh ./make/scripts/vsvars.sh -v10`</tt>.
ohair@320 2072 </li>
ohair@320 2073 </ul>
ohair@320 2074 </li>
ohair@320 2075 <li>
ohair@320 2076 Windows: PATH order is critical, see the
ohair@320 2077 <a href="#paths">paths</a> section for more information.
ohair@320 2078 </li>
ohair@320 2079 <li>
ohair@320 2080 Windows 64bit builds: Use ARCH_DATA_MODEL=64.
ohair@320 2081 </li>
ohair@320 2082 </ul>
ohair@320 2083 </blockquote>
ohair@320 2084 <!-- ------------------------------------------------------ -->
ohair@320 2085 <hr>
ohair@13 2086 <h2><a name="troubleshooting">Troubleshooting</a></h2>
ohair@13 2087 <blockquote>
ohair@13 2088 A build can fail for any number of reasons.
ohair@13 2089 Most failures
ohair@13 2090 are a result of trying to build in an environment in which all the
ohair@13 2091 pre-build requirements have not been met.
ohair@13 2092 The first step in
ohair@13 2093 troubleshooting a build failure is to recheck that you have satisfied
ohair@13 2094 all the pre-build requirements for your platform.
ohair@13 2095 Look for the check list of the platform you are building on in the
ohair@13 2096 <a href="#contents">Table of Contents</a>.
ohair@13 2097 <p>
ohair@276 2098 You can validate your build environment by using the <tt>sanity</tt>
ohair@276 2099 target.
ohair@276 2100 Any errors listed
ohair@276 2101 will stop the build from starting, and any warnings may result in
ohair@276 2102 a flawed product build.
ohair@276 2103 We strongly encourage you to evaluate every
ohair@276 2104 sanity check warning and fix it if required, before you proceed
ohair@276 2105 further with your build.
ohair@13 2106 <p>
ohair@276 2107 Some of the more common problems with builds are briefly described
ohair@276 2108 below, with suggestions for remedies.
ohair@13 2109 <ul>
ohair@13 2110 <li>
ohair@320 2111 <b>Corrupted Bundles on Windows:</b>
ohair@320 2112 <blockquote>
ohair@320 2113 Some virus scanning software has been known to corrupt the
ohair@320 2114 downloading of zip bundles.
ohair@320 2115 It may be necessary to disable the 'on access' or 'real time'
ohair@320 2116 virus scanning features to prevent this corruption.
ohair@320 2117 This type of "real time" virus scanning can also slow down the
ohair@320 2118 build process significantly.
ohair@320 2119 Temporarily disabling the feature, or excluding the build
ohair@320 2120 output directory may be necessary to get correct and faster builds.
ohair@320 2121 </blockquote>
ohair@320 2122 </li>
ohair@320 2123 <li>
ohair@13 2124 <b>Slow Builds:</b>
ohair@13 2125 <blockquote>
ohair@13 2126 If your build machine seems to be overloaded from too many
ohair@13 2127 simultaneous C++ compiles, try setting the <tt>HOTSPOT_BUILD_JOBS</tt>
ohair@13 2128 variable to <tt>1</tt> (if you're using a multiple CPU
ohair@13 2129 machine, setting it to more than the the number of CPUs is probably
ohair@13 2130 not a good idea).
ohair@13 2131 <p>
ohair@276 2132 Creating the javadocs can be very slow, if you are running
ohair@276 2133 javadoc, consider skipping that step.
ohair@13 2134 <p>
ohair@276 2135 Faster hardware and more RAM always helps too.
ohair@276 2136 The VM build tends to be CPU intensive (many C++ compiles),
ohair@276 2137 and the rest of the JDK will often be disk intensive.
ohair@13 2138 <p>
ohair@276 2139 Faster compiles are possible using a tool called
ohair@276 2140 <a href="http://ccache.samba.org/" target="_blank">ccache</a>.
ohair@13 2141 </blockquote>
ohair@13 2142 </li>
ohair@13 2143 <li>
ohair@13 2144 <b>File time issues:</b>
ohair@13 2145 <blockquote>
ohair@13 2146 If you see warnings that refer to file time stamps, e.g.
ohair@13 2147 <blockquote>
ohair@13 2148 <i>Warning message:</i><tt> File `xxx' has modification time in
ohair@276 2149 the future.</tt>
ohair@13 2150 <br>
ohair@13 2151 <i>Warning message:</i> <tt> Clock skew detected. Your build may
ohair@276 2152 be incomplete.</tt>
ohair@13 2153 </blockquote>
ohair@13 2154 These warnings can occur when the clock on the build machine is out of
ohair@13 2155 sync with the timestamps on the source files. Other errors, apparently
ohair@13 2156 unrelated but in fact caused by the clock skew, can occur along with
ohair@13 2157 the clock skew warnings. These secondary errors may tend to obscure the
ohair@13 2158 fact that the true root cause of the problem is an out-of-sync clock.
ohair@13 2159 For example, an out-of-sync clock has been known to cause an old
ohair@13 2160 version of javac to be used to compile some files, resulting in errors
ohair@13 2161 when the pre-1.4 compiler ran across the new <tt>assert</tt> keyword
ohair@13 2162 in the 1.4 source code.
ohair@13 2163 <p>
ohair@276 2164 If you see these warnings, reset the clock on the build
ohair@276 2165 machine, run "<tt><i>gmake</i> clobber</tt>" or delete the directory
ohair@276 2166 containing the build output, and restart the build from the beginning.
ohair@13 2167 </blockquote>
ohair@13 2168 </li>
ohair@13 2169 <li>
ohair@13 2170 <b>Error message: <tt>Trouble writing out table to disk</tt></b>
ohair@13 2171 <blockquote>
ohair@13 2172 Increase the amount of swap space on your build machine.
ohair@13 2173 </blockquote>
ohair@13 2174 </li>
ohair@13 2175 <li>
ohair@13 2176 <b>Error Message: <tt>libstdc++ not found:</tt></b>
ohair@13 2177 <blockquote>
ohair@13 2178 This is caused by a missing libstdc++.a library.
ohair@13 2179 This is installed as part of a specific package
ohair@13 2180 (e.g. libstdc++.so.devel.386).
ohair@49 2181 By default some 64-bit Linux versions (e.g. Fedora)
ohair@49 2182 only install the 64-bit version of the libstdc++ package.
ohair@13 2183 Various parts of the JDK build require a static
ohair@13 2184 link of the C++ runtime libraries to allow for maximum
ohair@13 2185 portability of the built images.
ohair@13 2186 </blockquote>
ohair@13 2187 </li>
ohair@13 2188 <li>
ohair@13 2189 <b>Error Message: <tt>cannot restore segment prot after reloc</tt></b>
ohair@13 2190 <blockquote>
ohair@13 2191 This is probably an issue with SELinux (See
ohair@13 2192 <a href="http://en.wikipedia.org/wiki/SELinux" target="_blank">
ohair@276 2193 http://en.wikipedia.org/wiki/SELinux</a>).
ohair@13 2194 Parts of the VM is built without the <tt>-fPIC</tt> for
ohair@13 2195 performance reasons.
ohair@13 2196 <p>
ohair@276 2197 To completely disable SELinux:
ohair@276 2198 <ol>
ohair@276 2199 <li><tt>$ su root</tt></li>
ohair@276 2200 <li><tt># system-config-securitylevel</tt></li>
ohair@276 2201 <li><tt>In the window that appears, select the SELinux tab</tt></li>
ohair@276 2202 <li><tt>Disable SELinux</tt></li>
ohair@276 2203 </ol>
ohair@13 2204 <p>
ohair@276 2205 Alternatively, instead of completely disabling it you could
ohair@276 2206 disable just this one check.
ohair@276 2207 <ol>
ohair@276 2208 <li>Select System->Administration->SELinux Management</li>
ohair@276 2209 <li>In the SELinux Management Tool which appears,
ohair@13 2210 select "Boolean" from the menu on the left</li>
ohair@276 2211 <li>Expand the "Memory Protection" group</li>
ohair@276 2212 <li>Check the first item, labeled
ohair@13 2213 "Allow all unconfined executables to use libraries requiring text relocation ..."</li>
ohair@276 2214 </ol>
ohair@13 2215 </blockquote>
ohair@13 2216 </li>
ohair@13 2217 <li>
ohair@320 2218 <b>Windows Error Messages:</b><br>
ohair@320 2219 <tt>*** fatal error - couldn't allocate heap, ... </tt><br>
ohair@320 2220 <tt>rm fails with "Directory not empty"</tt><br>
ohair@320 2221 <tt>unzip fails with "cannot create ... Permission denied"</tt><br>
ohair@320 2222 <tt>unzip fails with "cannot create ... Error 50"</tt><br>
ohair@13 2223 <blockquote>
ohair@13 2224 The CYGWIN software can conflict with other non-CYGWIN
ohair@13 2225 software. See the CYGWIN FAQ section on
ohair@13 2226 <a href="http://cygwin.com/faq/faq.using.html#faq.using.bloda" target="_blank">
ohair@276 2227 BLODA (applications that interfere with CYGWIN)</a>.
ohair@13 2228 </blockquote>
ohair@13 2229 </li>
ohair@13 2230 <li>
ohair@320 2231 <b>Windows Error Message: <tt>spawn failed</tt></b>
ohair@13 2232 <blockquote>
ohair@320 2233 Try rebooting the system, or there could be some kind of
ohair@320 2234 issue with the disk or disk partition being used.
ohair@320 2235 Sometimes it comes with a "Permission Denied" message.
ohair@13 2236 </blockquote>
ohair@13 2237 </li>
ohair@13 2238 </ul>
ohair@13 2239 </blockquote>
erikj@445 2240 <!-- ------------------------------------------------------ -->
erikj@445 2241 <hr>
erikj@445 2242 <h2><a name="newbuild">The New Build</a></h2>
erikj@445 2243 <blockquote>
erikj@445 2244 The <a href="http://openjdk.java.net/projects/build-infra/">
erikj@445 2245 Build Infrastructure project</a> is working on a new
erikj@445 2246 build. For information on how to try it out, please see the
erikj@445 2247 <a href="http://openjdk.java.net/projects/build-infra/guide.html">
erikj@445 2248 Build Infra User Guide</a>
erikj@445 2249 </blockquote>
ohair@13 2250 <hr>
ohair@13 2251 </body>
ohair@13 2252 </html>

mercurial