[2] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
---|
| 2 | <html>
|
---|
| 3 | <head>
|
---|
| 4 | <!-- OpenJDK 6 Specific -->
|
---|
| 5 | <title>OpenJDK 6 Build README</title>
|
---|
| 6 | </head>
|
---|
| 7 | <body style="background-color:lightcyan">
|
---|
| 8 | <!-- ====================================================== -->
|
---|
| 9 | <table width="100%" style="background-color:white">
|
---|
| 10 | <tr>
|
---|
| 11 | <td align="center">
|
---|
| 12 | <a href="http://openjdk.java.net" border="0">
|
---|
| 13 | <img alt="OpenJDK"
|
---|
| 14 | src="http://openjdk.java.net/images/openjdk.png"
|
---|
| 15 | width=256
|
---|
| 16 | style="border-style: none"/>
|
---|
| 17 | </a>
|
---|
| 18 | </td>
|
---|
| 19 | </tr>
|
---|
| 20 | <tr>
|
---|
| 21 | <td align=center>
|
---|
| 22 | <!-- OpenJDK 6 Specific -->
|
---|
| 23 | <h1>OpenJDK 6 Build README</h1>
|
---|
| 24 | </td>
|
---|
| 25 | </tr>
|
---|
| 26 | </table>
|
---|
| 27 | <!-- ------------------------------------------------------ -->
|
---|
| 28 | <hr>
|
---|
| 29 | <h2><a name="introduction">Introduction</a></h2>
|
---|
| 30 | <blockquote>
|
---|
| 31 | <p>
|
---|
| 32 | This README file contains build instructions for the
|
---|
| 33 | <a href="http://openjdk.java.net" target="_blank">OpenJDK</a>.
|
---|
| 34 | Building the source code for the
|
---|
| 35 | OpenJDK
|
---|
| 36 | requires
|
---|
| 37 | a certain degree of technical expertise.
|
---|
| 38 | <!-- OpenJDK 6 Specific -->
|
---|
| 39 | <blockquote style="background-color:white">
|
---|
| 40 | This document is specific to OpenJDK 6, which has some
|
---|
| 41 | very minor differences in the build requirements over
|
---|
| 42 | the OpenJDK 7 sources,
|
---|
| 43 | e.g. OpenJDK 6 requires access to Motif files.
|
---|
| 44 | Where there are differences they should stand out,
|
---|
| 45 | like this block of text does.
|
---|
| 46 | </blockquote>
|
---|
| 47 | </blockquote>
|
---|
| 48 | <!-- ------------------------------------------------------ -->
|
---|
| 49 | <hr>
|
---|
| 50 | <h2><a name="contents">Contents</a></h2>
|
---|
| 51 | <blockquote>
|
---|
| 52 | <ul>
|
---|
| 53 | <li><a href="#introduction">Introduction</a></li>
|
---|
| 54 | <li><a href="#MBE">Minimum Build Environments</a></li>
|
---|
| 55 | <li><a href="#SDBE">Specific Developer Build Environments</a>
|
---|
| 56 | <ul>
|
---|
| 57 | <li><a href="#fedora">Fedora</a></li>
|
---|
| 58 | <li><a href="#debian">Debian</a></li>
|
---|
| 59 | <li><a href="#ubuntu">Ubuntu</a></li>
|
---|
| 60 | <li><a href="#opensuse">OpenSUSE</a></li>
|
---|
| 61 | <li><a href="#mandriva">Mandriva</a></li>
|
---|
| 62 | <li><a href="#opensolaris">OpenSolaris</a></li>
|
---|
| 63 | </ul>
|
---|
| 64 | </li>
|
---|
| 65 | <li><a href="#directories">Source Directory Structure</a> </li>
|
---|
| 66 | <li><a href="#building">Build Information</a>
|
---|
| 67 | <ul>
|
---|
| 68 | <li><a href="#gmake">GNU Make (<tt><i>gmake</i></tt>)</a> </li>
|
---|
| 69 | <li><a href="#linux">Basic Linux System Setup</a> </li>
|
---|
| 70 | <li><a href="#solaris">Basic Solaris System Setup</a> </li>
|
---|
| 71 | <li><a href="#windows">Basic Windows System Setup</a> </li>
|
---|
| 72 | <li><a href="#dependencies">Build Dependencies</a> </li>
|
---|
| 73 | <ul>
|
---|
| 74 | <li><a href="#bootjdk">Bootstrap JDK</a> </li>
|
---|
| 75 | <li><a href="#importjdk">Optional Import JDK</a> </li>
|
---|
| 76 | <li><a href="#ant">Ant</a> </li>
|
---|
| 77 | <li><a href="#cacerts">Certificate Authority File (cacert)</a> </li>
|
---|
| 78 | <li><a href="#compilers">Compilers</a>
|
---|
| 79 | <ul>
|
---|
| 80 | <li><a href="#msvc">Microsoft Visual Studio</a> </li>
|
---|
| 81 | <li><a href="#mssdk">Microsoft Platform SDK</a> </li>
|
---|
| 82 | <li><a href="#gcc">Linux gcc/binutils</a> </li>
|
---|
| 83 | <li><a href="#studio">Sun Studio</a> </li>
|
---|
| 84 | </ul>
|
---|
| 85 | </li>
|
---|
| 86 | <li><a href="#zip">Zip and Unzip</a> </li>
|
---|
| 87 | <li><a href="#freetype">FreeType2 Fonts</a> </li>
|
---|
| 88 | <li>Linux and Solaris:
|
---|
| 89 | <ul>
|
---|
| 90 | <!-- OpenJDK 6 Specific -->
|
---|
| 91 | <li style="background-color:white"><a href="#motif">Motif</a> </li>
|
---|
| 92 | <li><a href="#cups">CUPS Include files</a> </li>
|
---|
| 93 | </ul>
|
---|
| 94 | </li>
|
---|
| 95 | <li>Linux only:
|
---|
| 96 | <ul>
|
---|
| 97 | <li><a href="#alsa">ALSA files</a> </li>
|
---|
| 98 | </ul>
|
---|
| 99 | </li>
|
---|
| 100 | <li>Windows only:
|
---|
| 101 | <ul>
|
---|
| 102 | <li>Unix Command Tools (<a href="#cygwin">CYGWIN</a>)</li>
|
---|
| 103 | <li><a href="#dxsdk">DirectX 9.0 SDK</a> </li>
|
---|
| 104 | </ul>
|
---|
| 105 | </li>
|
---|
| 106 | </ul>
|
---|
| 107 | </ul>
|
---|
| 108 | </li>
|
---|
| 109 | <li><a href="#creating">Creating the Build</a> </li>
|
---|
| 110 | <li><a href="#testing">Testing the Build</a> </li>
|
---|
| 111 | <li><a href="#variables">Environment/Make Variables</a></li>
|
---|
| 112 | <li><a href="#troubleshooting">Troubleshooting</a></li>
|
---|
| 113 | </ul>
|
---|
| 114 | </blockquote>
|
---|
| 115 | <!-- ------------------------------------------------------ -->
|
---|
| 116 | <hr>
|
---|
| 117 | <h2><a name="MBE">Minimum Build Environments</a></h2>
|
---|
| 118 | <blockquote>
|
---|
| 119 | This file often describes specific requirements for what we call the
|
---|
| 120 | "minimum build environments" (MBE) for this
|
---|
| 121 | specific release of the JDK,
|
---|
| 122 | Building with the MBE will generate the most compatible
|
---|
| 123 | bits that install on, and run correctly on, the most variations
|
---|
| 124 | of the same base OS and hardware architecture.
|
---|
| 125 | These usually represent what is often called the
|
---|
| 126 | least common denominator platforms.
|
---|
| 127 | It is understood that most developers will NOT be using these
|
---|
| 128 | specific platforms, and in fact creating these specific platforms
|
---|
| 129 | may be difficult due to the age of some of this software.
|
---|
| 130 | <p>
|
---|
| 131 | The minimum OS and C/C++ compiler versions needed for building the
|
---|
| 132 | OpenJDK:
|
---|
| 133 | <p>
|
---|
| 134 | <table border="1">
|
---|
| 135 | <thead>
|
---|
| 136 | <tr>
|
---|
| 137 | <th>Base OS and Architecture</th>
|
---|
| 138 | <th>OS</th>
|
---|
| 139 | <th>C/C++ Compiler</th>
|
---|
| 140 | </tr>
|
---|
| 141 | </thead>
|
---|
| 142 | <tbody>
|
---|
| 143 | <tr>
|
---|
| 144 | <td>Linux X86 (32bit)</td>
|
---|
| 145 | <td>Fedora 9</td>
|
---|
| 146 | <td>gcc 4 </td>
|
---|
| 147 | </tr>
|
---|
| 148 | <tr>
|
---|
| 149 | <td>Linux X64 (64bit)</td>
|
---|
| 150 | <td>Fedora 9</td>
|
---|
| 151 | <td>gcc 4 </td>
|
---|
| 152 | </tr>
|
---|
| 153 | <tr>
|
---|
| 154 | <td>Solaris SPARC (32bit)</td>
|
---|
| 155 | <!-- OpenJDK 6 Specific -->
|
---|
| 156 | <td>Solaris 8 + patches
|
---|
| 157 | <br>
|
---|
| 158 | See <a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/JavaSE" target="_blank">
|
---|
| 159 | SunSolve</a> for patch downloads.
|
---|
| 160 | </td>
|
---|
| 161 | <td>Sun Studio 11 </td>
|
---|
| 162 | </tr>
|
---|
| 163 | <tr>
|
---|
| 164 | <td>Solaris SPARCV9 (64bit)</td>
|
---|
| 165 | <!-- OpenJDK 6 Specific -->
|
---|
| 166 | <td>Solaris 8 + patches
|
---|
| 167 | <br>
|
---|
| 168 | See <a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/JavaSE" target="_blank">
|
---|
| 169 | SunSolve</a> for patch downloads.
|
---|
| 170 | </td>
|
---|
| 171 | <td>Sun Studio 11</td>
|
---|
| 172 | </tr>
|
---|
| 173 | <tr>
|
---|
| 174 | <td>Solaris X86 (32bit)</td>
|
---|
| 175 | <!-- OpenJDK 6 Specific -->
|
---|
| 176 | <td>Solaris 8 + patches
|
---|
| 177 | <br>
|
---|
| 178 | See <a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/JavaSE" target="_blank">
|
---|
| 179 | SunSolve</a> for patch downloads.
|
---|
| 180 | </td>
|
---|
| 181 | <td>Sun Studio 11</td>
|
---|
| 182 | </tr>
|
---|
| 183 | <tr>
|
---|
| 184 | <td>Solaris X64 (64bit)</td>
|
---|
| 185 | <td>Solaris 10 + patches
|
---|
| 186 | <br>
|
---|
| 187 | See <a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/JavaSE" target="_blank">
|
---|
| 188 | SunSolve</a> for patch downloads.
|
---|
| 189 | </td>
|
---|
| 190 | <td>Sun Studio 11</td>
|
---|
| 191 | </tr>
|
---|
| 192 | <tr>
|
---|
| 193 | <td>Windows X86 (32bit)</td>
|
---|
| 194 | <!-- OpenJDK 6 Specific -->
|
---|
| 195 | <td>Windows 2000</td>
|
---|
| 196 | <td>Microsoft Visual Studio .NET 2003 Professional</td>
|
---|
| 197 | </tr>
|
---|
| 198 | <tr>
|
---|
| 199 | <td>Windows X64 (64bit)</td>
|
---|
| 200 | <td>Windows Server 2003 - Enterprise x64 Edition</td>
|
---|
| 201 | <td>Microsoft Platform SDK - April 2005</td>
|
---|
| 202 | </tr>
|
---|
| 203 | </tbody>
|
---|
| 204 | </table>
|
---|
| 205 | <p>
|
---|
| 206 | These same sources do indeed build on many more systems than the
|
---|
| 207 | above older generation systems, again the above is just a minimum.
|
---|
| 208 | <p>
|
---|
| 209 | Compilation problems with newer or different C/C++ compilers is a
|
---|
| 210 | common problem.
|
---|
| 211 | Similarly, compilation problems related to changes to the
|
---|
| 212 | <tt>/usr/include</tt> or system header files is also a
|
---|
| 213 | common problem with newer or unreleased OS versions.
|
---|
| 214 | Please report these types of problems as bugs so that they
|
---|
| 215 | can be dealt with accordingly.
|
---|
| 216 | </blockquote>
|
---|
| 217 | <!-- ------------------------------------------------------ -->
|
---|
| 218 | <hr>
|
---|
| 219 | <h2><a name="SDBE">Specific Developer Build Environments</a></h2>
|
---|
| 220 | <blockquote>
|
---|
| 221 | We won't be listing all the possible environments, but
|
---|
| 222 | we will try to provide what information we have available to us.
|
---|
| 223 | </blockquote>
|
---|
| 224 | <!-- ====================================================== -->
|
---|
| 225 | <h3><a name="fedora">Fedora</a></h3>
|
---|
| 226 | <blockquote>
|
---|
| 227 | <h4>Fedora 9</h4>
|
---|
| 228 | <p>
|
---|
| 229 | <blockquote>
|
---|
| 230 | After installing <a href="http://fedoraproject.org">Fedora</a> 9
|
---|
| 231 | you need to install several build dependencies. The simplest
|
---|
| 232 | way to do it is to execute the following commands as user
|
---|
| 233 | <tt>root</tt>:
|
---|
| 234 | <p/>
|
---|
| 235 | <code>yum-builddep java-1.6.0-openjdk</code>
|
---|
| 236 | <p/>
|
---|
| 237 | <code>yum install gcc gcc-c++</code>
|
---|
| 238 | <p/>
|
---|
| 239 | In addition, it's necessary to set a few environment variables for the build:
|
---|
| 240 |
|
---|
| 241 | <p/>
|
---|
| 242 | <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk</code>
|
---|
| 243 | </blockquote>
|
---|
| 244 | <h4>Fedora 10</h4>
|
---|
| 245 | <p>
|
---|
| 246 | <blockquote>
|
---|
| 247 | After installing <a href="http://fedoraproject.org">Fedora</a> 10
|
---|
| 248 | you need to install several build dependencies. The simplest
|
---|
| 249 | way to do it is to execute the following commands as user
|
---|
| 250 | <tt>root</tt>:
|
---|
| 251 | <p/>
|
---|
| 252 | <code>yum-builddep java-1.6.0-openjdk</code>
|
---|
| 253 | <p/>
|
---|
| 254 | <code>yum install gcc gcc-c++</code>
|
---|
| 255 | <p/>
|
---|
| 256 | In addition, it's necessary to set a few environment variables for the build:
|
---|
| 257 |
|
---|
| 258 | <p/>
|
---|
| 259 | <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk</code>
|
---|
| 260 | </blockquote>
|
---|
| 261 | <h4>Fedora 11</h4>
|
---|
| 262 | <p>
|
---|
| 263 | <blockquote>
|
---|
| 264 | After installing <a href="http://fedoraproject.org">Fedora</a> 11
|
---|
| 265 | you need to install several build dependencies. The simplest
|
---|
| 266 | way to do it is to execute the following commands as user
|
---|
| 267 | <tt>root</tt>:
|
---|
| 268 | <p/>
|
---|
| 269 | <code>yum-builddep java-1.6.0-openjdk</code>
|
---|
| 270 | <p/>
|
---|
| 271 | <code>yum install gcc gcc-c++</code>
|
---|
| 272 | <p/>
|
---|
| 273 | In addition, it's necessary to set a few environment variables for the build:
|
---|
| 274 |
|
---|
| 275 | <p/>
|
---|
| 276 | <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk</code>
|
---|
| 277 | </blockquote>
|
---|
| 278 | </blockquote>
|
---|
| 279 | <!-- ====================================================== -->
|
---|
| 280 | <h3><a name="debian">Debian</a></h3>
|
---|
| 281 | <blockquote>
|
---|
| 282 | <h4>Debian 5.0 (Lenny)</h4>
|
---|
| 283 | <p>
|
---|
| 284 | <blockquote>
|
---|
| 285 | After installing <a href="http://debian.org">Debian</a> 5
|
---|
| 286 | you need to install several build dependencies.
|
---|
| 287 | The simplest way to install the build dependencies is to
|
---|
| 288 | execute the following commands as user <tt>root</tt>:
|
---|
| 289 | <p/>
|
---|
| 290 | <code>aptitude build-dep openjdk-6</code>
|
---|
| 291 | <p/>
|
---|
| 292 | <code>aptitude install openjdk-6-jdk</code>
|
---|
| 293 | <p/>
|
---|
| 294 | <!-- OpenJDK 6 Specific -->
|
---|
| 295 | <code style="background-color:white">aptitude install libmotif-dev</code>
|
---|
| 296 | <p/>
|
---|
| 297 | In addition, it's necessary to set a few environment variables for the build:
|
---|
| 298 | <p/>
|
---|
| 299 | <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code>
|
---|
| 300 | </blockquote>
|
---|
| 301 | </blockquote>
|
---|
| 302 | <!-- ====================================================== -->
|
---|
| 303 | <h3><a name="ubuntu">Ubuntu</a></h3>
|
---|
| 304 | <blockquote>
|
---|
| 305 | <h4>Ubuntu 8.04</h4>
|
---|
| 306 | <p>
|
---|
| 307 | <blockquote>
|
---|
| 308 | After installing <a href="http://ubuntu.org">Ubuntu</a> 8.04
|
---|
| 309 | you need to install several build dependencies.
|
---|
| 310 | <p/>
|
---|
| 311 | First, you need to enable the universe repository in the
|
---|
| 312 | Software Sources application and reload the repository
|
---|
| 313 | information. The Software Sources application is available
|
---|
| 314 | under the System/Administration menu.
|
---|
| 315 | <p/>
|
---|
| 316 | The simplest way to install the build dependencies is to
|
---|
| 317 | execute the following commands:
|
---|
| 318 | <p/>
|
---|
| 319 | <code>sudo aptitude build-dep openjdk-6</code>
|
---|
| 320 | <p/>
|
---|
| 321 | <code>sudo aptitude install openjdk-6-jdk</code>
|
---|
| 322 | <p/>
|
---|
| 323 | <!-- OpenJDK 6 Specific -->
|
---|
| 324 | <code style="background-color:white">sudo aptitude install libmotif-dev</code>
|
---|
| 325 | <p/>
|
---|
| 326 | In addition, it's necessary to set a few environment variables for the build:
|
---|
| 327 | <p/>
|
---|
| 328 | <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code>
|
---|
| 329 | </blockquote>
|
---|
| 330 | <h4>Ubuntu 8.10</h4>
|
---|
| 331 | <p>
|
---|
| 332 | <blockquote>
|
---|
| 333 | After installing <a href="http://ubuntu.org">Ubuntu</a> 8.10
|
---|
| 334 | you need to install several build dependencies. The simplest
|
---|
| 335 | way to do it is to execute the following commands:
|
---|
| 336 | <p/>
|
---|
| 337 | <code>sudo aptitude build-dep openjdk-6</code>
|
---|
| 338 | <p/>
|
---|
| 339 | <code>sudo aptitude install openjdk-6-jdk gcc-4.2 g++-4.2</code>
|
---|
| 340 | <p/>
|
---|
| 341 | <!-- OpenJDK 6 Specific -->
|
---|
| 342 | <code style="background-color:white">sudo aptitude install libmotif-dev</code>
|
---|
| 343 | <p/>
|
---|
| 344 | In addition, it's necessary to set a few environment variables for the build:
|
---|
| 345 | <p/>
|
---|
| 346 | <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code>
|
---|
| 347 | <p/>
|
---|
| 348 | Then, calling <tt>make</tt> in the top level OpenJDK source
|
---|
| 349 | code directory with the following parameters results in a
|
---|
| 350 | working build:
|
---|
| 351 | <p/>
|
---|
| 352 | <code>make all CC=gcc-4.2 CPP=g++-4.2</code>
|
---|
| 353 | </blockquote>
|
---|
| 354 | <h4>Ubuntu 9.04</h4>
|
---|
| 355 | <p>
|
---|
| 356 | <blockquote>
|
---|
| 357 | After installing <a href="http://ubuntu.org">Ubuntu</a> 9.04
|
---|
| 358 | you need to install several build dependencies. The simplest
|
---|
| 359 | way to do it is to execute the following commands:
|
---|
| 360 | <p/>
|
---|
| 361 | <code>sudo aptitude build-dep openjdk-6</code>
|
---|
| 362 | <p/>
|
---|
| 363 | <code>sudo aptitude install openjdk-6-jdk gcc-4.2 g++-4.2</code>
|
---|
| 364 | <p/>
|
---|
| 365 | <!-- OpenJDK 6 Specific -->
|
---|
| 366 | <code style="background-color:white">sudo aptitude install libmotif-dev</code>
|
---|
| 367 | <p/>
|
---|
| 368 | In addition, it's necessary to set a few environment variables for the build:
|
---|
| 369 | <p/>
|
---|
| 370 | <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code>
|
---|
| 371 | <p/>
|
---|
| 372 | Then, calling <tt>make</tt> in the top level OpenJDK source
|
---|
| 373 | code directory with the following parameters results in a
|
---|
| 374 | working build:
|
---|
| 375 | <p/>
|
---|
| 376 | <code>make all CC=gcc-4.2 CPP=g++-4.2</code>
|
---|
| 377 | </blockquote>
|
---|
| 378 | </blockquote>
|
---|
| 379 | <!-- ====================================================== -->
|
---|
| 380 | <h3><a name="opensuse">OpenSUSE</a></h3>
|
---|
| 381 | <blockquote>
|
---|
| 382 | <h4>OpenSUSE 11.1</h4>
|
---|
| 383 | <p>
|
---|
| 384 | <blockquote>
|
---|
| 385 | After installing <a href="http://opensuse.org">OpenSUSE</a> 11.1
|
---|
| 386 | you need to install several build dependencies.
|
---|
| 387 | The simplest way to install the build dependencies is to
|
---|
| 388 | execute the following commands:
|
---|
| 389 | <p/>
|
---|
| 390 | <code>sudo zypper source-install -d java-1_6_0-openjdk</code>
|
---|
| 391 | <p/>
|
---|
| 392 | <code>sudo zypper install make</code>
|
---|
| 393 | <p/>
|
---|
| 394 | In addition, it is necessary to set a few environment variables for the build:
|
---|
| 395 | <p/>
|
---|
| 396 | <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-1.6.0-openjdk</code>
|
---|
| 397 | <p/>
|
---|
| 398 | Finally, you need to unset the <code>JAVA_HOME</code> environment variable:
|
---|
| 399 | <p/>
|
---|
| 400 | <code>export -n JAVA_HOME</code>
|
---|
| 401 | </blockquote>
|
---|
| 402 | </blockquote>
|
---|
| 403 | <!-- ====================================================== -->
|
---|
| 404 | <h3><a name="mandriva">Mandriva</a></h3>
|
---|
| 405 | <blockquote>
|
---|
| 406 | <h4>Mandriva Linux One 2009 Spring</h4>
|
---|
| 407 | <p>
|
---|
| 408 | <blockquote>
|
---|
| 409 | After installing <a href="http://mandriva.org">Mandriva</a> Linux One 2009 Spring
|
---|
| 410 | you need to install several build dependencies.
|
---|
| 411 | The simplest way to install the build dependencies is to
|
---|
| 412 | execute the following commands as user <tt>root</tt>:
|
---|
| 413 | <p/>
|
---|
| 414 | <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>
|
---|
| 415 | <p/>
|
---|
| 416 | <!-- OpenJDK 6 Specific -->
|
---|
| 417 | <code style="background-color:white">urpmi libopenmotif-devel</code>
|
---|
| 418 | <p/>
|
---|
| 419 | In addition, it is necessary to set a few environment variables for the build:
|
---|
| 420 | <p/>
|
---|
| 421 | <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-1.6.0-openjdk</code>
|
---|
| 422 | </blockquote>
|
---|
| 423 | </blockquote>
|
---|
| 424 | <!-- ====================================================== -->
|
---|
| 425 | <h3><a name="opensolaris">OpenSolaris</a></h3>
|
---|
| 426 | <blockquote>
|
---|
| 427 | <h4>OpenSolaris 2009.06</h4>
|
---|
| 428 | <p>
|
---|
| 429 | <blockquote>
|
---|
| 430 | After installing <a href="http://opensolaris.org">OpenSolaris</a> 2009.06
|
---|
| 431 | you need to install several build dependencies.
|
---|
| 432 | The simplest way to install the build dependencies is to
|
---|
| 433 | execute the following commands:
|
---|
| 434 | <p/>
|
---|
| 435 | <code>pfexec pkg install SUNWgmake SUNWj6dev SUNWant sunstudioexpress SUNWcups SUNWzip SUNWunzip SUNWxwhl SUNWxorg-headers SUNWaudh SUNWfreetype2</code>
|
---|
| 436 | <p/>
|
---|
| 437 | <!-- OpenJDK 6 Specific -->
|
---|
| 438 | <code style="background-color:white">pfexec pkg install SUNWmfrun</code>
|
---|
| 439 | <p/>
|
---|
| 440 | In addition, it is necessary to set a few environment variables for the build:
|
---|
| 441 | <p/>
|
---|
| 442 | <code>export LANG=C ALT_COMPILER_PATH=/opt/SunStudioExpress/bin/ ALT_CUPS_HEADERS_PATH=/usr/include/</code>
|
---|
| 443 | <p/>
|
---|
| 444 | Finally, you need to make sure that the build process can find the Sun Studio compilers:
|
---|
| 445 | <p/>
|
---|
| 446 | <code>export PATH=$PATH:/opt/SunStudioExpress/bin/</code>
|
---|
| 447 | </blockquote>
|
---|
| 448 | </blockquote>
|
---|
| 449 | <!-- ------------------------------------------------------ -->
|
---|
| 450 | <hr>
|
---|
| 451 | <h2><a name="directories">Source Directory Structure</a></h2>
|
---|
| 452 | <blockquote>
|
---|
| 453 | <p>
|
---|
| 454 | The source code for the OpenJDK is delivered in a set of
|
---|
| 455 | directories:
|
---|
| 456 | <tt>hotspot</tt>,
|
---|
| 457 | <tt>langtools</tt>,
|
---|
| 458 | <tt>corba</tt>,
|
---|
| 459 | <tt>jaxws</tt>,
|
---|
| 460 | <tt>jaxp</tt>,
|
---|
| 461 | and
|
---|
| 462 | <tt>jdk</tt>.
|
---|
| 463 | The <tt>hotspot</tt> directory contains the source code and make
|
---|
| 464 | files for building the OpenJDK Hotspot Virtual Machine.
|
---|
| 465 | The <tt>langtools</tt> directory contains the source code and make
|
---|
| 466 | files for building the OpenJDK javac and language tools.
|
---|
| 467 | The <tt>corba</tt> directory contains the source code and make
|
---|
| 468 | files for building the OpenJDK Corba files.
|
---|
| 469 | The <tt>jaxws</tt> directory contains the source code and make
|
---|
| 470 | files for building the OpenJDK JAXWS files.
|
---|
| 471 | The <tt>jaxp</tt> directory contains the source code and make
|
---|
| 472 | files for building the OpenJDK JAXP files.
|
---|
| 473 | The <tt>jdk</tt> directory contains the source code and make files for
|
---|
| 474 | building the OpenJDK runtime libraries and misc files.
|
---|
| 475 | The top level <tt>Makefile</tt>
|
---|
| 476 | is used to build the entire OpenJDK.
|
---|
| 477 | </blockquote>
|
---|
| 478 | <!-- ------------------------------------------------------ -->
|
---|
| 479 | <hr>
|
---|
| 480 | <h2><a name="building">Build Information</a></h2>
|
---|
| 481 | <blockquote>
|
---|
| 482 | Building the OpenJDK
|
---|
| 483 | is done with a <tt><i>gmake</i></tt>
|
---|
| 484 | command line and various
|
---|
| 485 | environment or make variable settings that direct the make rules
|
---|
| 486 | to where various components have been installed.
|
---|
| 487 | Where possible the makefiles will attempt to located the various
|
---|
| 488 | components in the default locations or any component specific
|
---|
| 489 | variable settings.
|
---|
| 490 | When the normal defaults fail or components cannot be found,
|
---|
| 491 | the various
|
---|
| 492 | <tt>ALT_*</tt> variables (alternates)
|
---|
| 493 | can be used to help the makefiles locate components.
|
---|
| 494 | <p>
|
---|
| 495 | Refer to the bash/sh/ksh setup file
|
---|
| 496 | <tt>jdk/make/jdk_generic_profile.sh</tt>
|
---|
| 497 | if you need help in setting up your environment variables.
|
---|
| 498 | A build could be as simple as:
|
---|
| 499 | <blockquote>
|
---|
| 500 | <pre><tt>
|
---|
| 501 | bash
|
---|
| 502 | . jdk/make/jdk_generic_profile.sh
|
---|
| 503 | <i>gmake</i> sanity && <i>gmake</i>
|
---|
| 504 | </tt></pre>
|
---|
| 505 | </blockquote>
|
---|
| 506 | <p>
|
---|
| 507 | Of course ksh or sh would work too.
|
---|
| 508 | But some customization will probably be necessary.
|
---|
| 509 | The <tt>sanity</tt> rule will make some basic checks on build
|
---|
| 510 | dependencies and generate appropriate warning messages
|
---|
| 511 | regarding missing, out of date, or newer than expected components
|
---|
| 512 | found on your system.
|
---|
| 513 | </blockquote>
|
---|
| 514 | <!-- ------------------------------------------------------ -->
|
---|
| 515 | <hr>
|
---|
| 516 | <h3><a name="gmake">GNU make (<tt><i>gmake</i></tt>)</a></h3>
|
---|
| 517 | <blockquote>
|
---|
| 518 | The Makefiles in the OpenJDK are only valid when used with the
|
---|
| 519 | GNU version of the utility command <tt>make</tt>
|
---|
| 520 | (<tt><i>gmake</i></tt>).
|
---|
| 521 | A few notes about using GNU make:
|
---|
| 522 | <ul>
|
---|
| 523 | <li>
|
---|
| 524 | In general, you need GNU make version 3.78.1 or newer.
|
---|
| 525 | </li>
|
---|
| 526 | <li>
|
---|
| 527 | Place the location of the GNU make binary in the <tt>PATH</tt>.
|
---|
| 528 | </li>
|
---|
| 529 | <li>
|
---|
| 530 | <strong>Linux:</strong>
|
---|
| 531 | The <tt>/usr/bin/make</tt> command should work fine for you.
|
---|
| 532 | </li>
|
---|
| 533 | <li>
|
---|
| 534 | <strong>Solaris:</strong>
|
---|
| 535 | Do NOT use <tt>/usr/bin/make</tt> on Solaris.
|
---|
| 536 | If your Solaris system has the software
|
---|
| 537 | from the Solaris Companion CD installed,
|
---|
| 538 | you should use <tt>gmake</tt>
|
---|
| 539 | which will be located in either the <tt>/opt/sfw/bin</tt> or
|
---|
| 540 | <tt>/usr/sfw/bin</tt> directory.
|
---|
| 541 | </li>
|
---|
| 542 | <li>
|
---|
| 543 | <strong>Windows:</strong>
|
---|
| 544 | Make sure you start your build inside a bash/sh/ksh shell
|
---|
| 545 | and are using a <tt>make.exe</tt> utility built for that
|
---|
| 546 | environment (a cygwin <tt>make.exe</tt> is not the same
|
---|
| 547 | as a <tt>make.exe</tt> built for something like
|
---|
| 548 | <a href="http://www.mkssoftware.com/">MKS</a>).
|
---|
| 549 | <br>
|
---|
| 550 | <b>WARNING:</b> Watch out for make version 3.81, it may
|
---|
| 551 | not work due to a lack of support for drive letter paths
|
---|
| 552 | like <tt>C:/</tt>. See
|
---|
| 553 | <a href="#gmake">section on gmake</a>.
|
---|
| 554 | Use a 3.80 version, or find a newer
|
---|
| 555 | version that has this problem fixed.
|
---|
| 556 | The older 3.80 version of make.exe can be downloaded with this
|
---|
| 557 | <a href="http://cygwin.paracoda.com/release/make/make-3.80-1.tar.bz2" target="_blank">
|
---|
| 558 | link</a>.
|
---|
| 559 | Also see the
|
---|
| 560 | <a href="http://developer.mozilla.org/en/docs/Windows_build_prerequisites_using_cygwin#make" target="_blank">
|
---|
| 561 | mozilla developer center</a>
|
---|
| 562 | on this topic.
|
---|
| 563 | </li>
|
---|
| 564 | </ul>
|
---|
| 565 | <p>
|
---|
| 566 | Information on GNU make, and access to ftp download sites, are
|
---|
| 567 | available on the
|
---|
| 568 | <a href="http://www.gnu.org/software/make/make.html" target="_blank">
|
---|
| 569 | GNU make web site
|
---|
| 570 | </a>.
|
---|
| 571 | The latest source to GNU make is available at
|
---|
| 572 | <a href="http://ftp.gnu.org/pub/gnu/make/" target="_blank">
|
---|
| 573 | ftp.gnu.org/pub/gnu/make/</a>.
|
---|
| 574 | </blockquote>
|
---|
| 575 | <!-- ------------------------------------------------------ -->
|
---|
| 576 | <hr>
|
---|
| 577 | <h3><a name="linux">Basic Linux System Setup</a></h3>
|
---|
| 578 | <blockquote>
|
---|
| 579 | <strong>i586 only:</strong>
|
---|
| 580 | The minimum recommended hardware for building the Linux version
|
---|
| 581 | is a Pentium class processor or better, at least 256 MB of RAM, and
|
---|
| 582 | approximately 1.5 GB of free disk space.
|
---|
| 583 | <p>
|
---|
| 584 | <strong>X64 only:</strong>
|
---|
| 585 | The minimum recommended hardware for building the Linux
|
---|
| 586 | version is an AMD Opteron class processor, at least 512 MB of RAM, and
|
---|
| 587 | approximately 4 GB of free disk space.
|
---|
| 588 | <p>
|
---|
| 589 | The build will use the tools contained in
|
---|
| 590 | <tt>/bin</tt> and
|
---|
| 591 | <tt>/usr/bin</tt>
|
---|
| 592 | of a standard installation of the Linux operating environment.
|
---|
| 593 | You should ensure that these directories are in your
|
---|
| 594 | <tt>PATH</tt>.
|
---|
| 595 | <p>
|
---|
| 596 | Note that some Linux systems have a habit of pre-populating
|
---|
| 597 | your environment variables for you, for example <tt>JAVA_HOME</tt>
|
---|
| 598 | might get pre-defined for you to refer to the JDK installed on
|
---|
| 599 | your Linux system.
|
---|
| 600 | You will need to unset <tt>JAVA_HOME</tt>.
|
---|
| 601 | It's a good idea to run <tt>env</tt> and verify the
|
---|
| 602 | environment variables you are getting from the default system
|
---|
| 603 | settings make sense for building the
|
---|
| 604 | OpenJDK.
|
---|
| 605 | </blockquote>
|
---|
| 606 | <!-- ------------------------------------------------------ -->
|
---|
| 607 | <h4><a name="linux_checklist">Basic Linux Check List</a></h4>
|
---|
| 608 | <blockquote>
|
---|
| 609 | <ol>
|
---|
| 610 | <li>
|
---|
| 611 | Install the
|
---|
| 612 | <a href="#bootjdk">Bootstrap JDK</a>, set
|
---|
| 613 | <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>.
|
---|
| 614 | </li>
|
---|
| 615 | <li>
|
---|
| 616 | <a href="#importjdk">Optional Import JDK</a>, set
|
---|
| 617 | <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>.
|
---|
| 618 | </li>
|
---|
| 619 | <li>
|
---|
| 620 | Install or upgrade the <a href="#freetype">FreeType development
|
---|
| 621 | package</a>.
|
---|
| 622 | </li>
|
---|
| 623 | <li>
|
---|
| 624 | Install
|
---|
| 625 | <a href="#ant">Ant</a>,
|
---|
| 626 | make sure it is in your PATH.
|
---|
| 627 | </li>
|
---|
| 628 | <li style="background-color:white">
|
---|
| 629 | <!-- OpenJDK 6 Specific -->
|
---|
| 630 | Install the
|
---|
| 631 | <a href="#motif">Motif header files</a>, set
|
---|
| 632 | <tt><a href="#ALT_MOTIF_DIR">ALT_MOTIF_DIR</a></tt>.
|
---|
| 633 | </li>
|
---|
| 634 | </ol>
|
---|
| 635 | </blockquote>
|
---|
| 636 | <!-- ------------------------------------------------------ -->
|
---|
| 637 | <hr>
|
---|
| 638 | <h3><a name="solaris">Basic Solaris System Setup</a></h3>
|
---|
| 639 | <blockquote>
|
---|
| 640 | The minimum recommended hardware for building the
|
---|
| 641 | Solaris SPARC version is an UltraSPARC with 512 MB of RAM.
|
---|
| 642 | For building
|
---|
| 643 | the Solaris x86 version, a Pentium class processor or better and at
|
---|
| 644 | least 512 MB of RAM are recommended.
|
---|
| 645 | Approximately 1.4 GB of free disk
|
---|
| 646 | space is needed for a 32-bit build.
|
---|
| 647 | <p>
|
---|
| 648 | If you are building the 64bit version, you should
|
---|
| 649 | run the command "isainfo -v" to verify that you have a
|
---|
| 650 | 64-bit installation, it should say <tt>sparcv9</tt> or
|
---|
| 651 | <tt>amd64</tt>.
|
---|
| 652 | An additional 7 GB of free disk space is needed
|
---|
| 653 | for a 64-bit build.
|
---|
| 654 | <p>
|
---|
| 655 | The build uses the tools contained in <tt>/usr/ccs/bin</tt>
|
---|
| 656 | and <tt>/usr/bin</tt> of a standard developer or full installation of
|
---|
| 657 | the Solaris operating environment.
|
---|
| 658 | <p>
|
---|
| 659 | Solaris patches specific to the JDK can be downloaded from the
|
---|
| 660 | <a href="http://sunsolve.sun.com/show.do?target=patches/JavaSE" target="_blank">
|
---|
| 661 | SunSolve JDK Solaris patches download page</a>.
|
---|
| 662 | You should ensure that the latest patch cluster for
|
---|
| 663 | your version of the Solaris operating environment has also
|
---|
| 664 | been installed.
|
---|
| 665 | </blockquote>
|
---|
| 666 | <!-- ------------------------------------------------------ -->
|
---|
| 667 | <h4><a name="solaris_checklist">Basic Solaris Check List</a></h4>
|
---|
| 668 | <blockquote>
|
---|
| 669 | <ol>
|
---|
| 670 | <li>
|
---|
| 671 | Install the
|
---|
| 672 | <a href="#bootjdk">Bootstrap JDK</a>, set
|
---|
| 673 | <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>.
|
---|
| 674 | </li>
|
---|
| 675 | <li>
|
---|
| 676 | <a href="#importjdk">Optional Import JDK</a>, set
|
---|
| 677 | <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>.
|
---|
| 678 | </li>
|
---|
| 679 | <li>
|
---|
| 680 | Install the
|
---|
| 681 | <a href="#studio">Sun Studio Compilers</a>, set
|
---|
| 682 | <a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a>.
|
---|
| 683 | </li>
|
---|
| 684 | <li>
|
---|
| 685 | Install the
|
---|
| 686 | <a href="#cups">CUPS Include files</a>, set
|
---|
| 687 | <tt><a href="#ALT_CUPS_HEADERS_PATH">ALT_CUPS_HEADERS_PATH</a></tt>.
|
---|
| 688 | </li>
|
---|
| 689 | <li>
|
---|
| 690 | Install
|
---|
| 691 | <a href="#ant">Ant</a>,
|
---|
| 692 | make sure it is in your PATH.
|
---|
| 693 | </li>
|
---|
| 694 | </ol>
|
---|
| 695 | </blockquote>
|
---|
| 696 | <!-- ------------------------------------------------------ -->
|
---|
| 697 | <hr>
|
---|
| 698 | <h3><a name="windows">Basic Windows System Setup</a></h3>
|
---|
| 699 | <blockquote>
|
---|
| 700 | <strong>i586 only:</strong>
|
---|
| 701 | The minimum recommended hardware for building the 32bit or X86
|
---|
| 702 | Windows version is an Pentium class processor or better, at least
|
---|
| 703 | 512 MB of RAM, and approximately 600 MB of free disk space.
|
---|
| 704 | <strong>
|
---|
| 705 | NOTE: The Windows 2000 build machines need to use the
|
---|
| 706 | file system NTFS.
|
---|
| 707 | Build machines formatted to FAT32 will not work
|
---|
| 708 | because FAT32 doesn't support case-sensitivity in file names.
|
---|
| 709 | </strong>
|
---|
| 710 | <p>
|
---|
| 711 | <strong>X64 only:</strong>
|
---|
| 712 | The minimum recommended hardware for building
|
---|
| 713 | the Windows X64 version is an AMD Opteron class processor, at least 1
|
---|
| 714 | GB of RAM, and approximately 10 GB of free disk space.
|
---|
| 715 | </blockquote>
|
---|
| 716 | <!-- ------------------------------------------------------ -->
|
---|
| 717 | <h4><a name="paths">Windows Paths</a></h4>
|
---|
| 718 | <blockquote>
|
---|
| 719 | <strong>Windows:</strong>
|
---|
| 720 | Note that GNU make is a historic utility and is based very
|
---|
| 721 | heavily on shell scripting, so it does not tolerate the Windows habit
|
---|
| 722 | of having spaces in pathnames or the use of the <tt>\</tt>characters in pathnames.
|
---|
| 723 | Luckily on most Windows systems, you can use <tt>/</tt>instead of \, and
|
---|
| 724 | there is always a 'short' pathname without spaces for any path that
|
---|
| 725 | contains spaces.
|
---|
| 726 | Unfortunately, this short pathname can be somewhat dynamic and the
|
---|
| 727 | formula is difficult to explain.
|
---|
| 728 | You can use <tt>cygpath</tt> utility to map pathnames with spaces
|
---|
| 729 | or the <tt>\</tt>character into the <tt>C:/</tt> style of pathname
|
---|
| 730 | (called 'mixed'), e.g.
|
---|
| 731 | <tt>cygpath -s -m "<i>path</i>"</tt>.
|
---|
| 732 | <p>
|
---|
| 733 | The makefiles will try to translate any pathnames supplied
|
---|
| 734 | to it into the <tt>C:/</tt> style automatically.
|
---|
| 735 | <p>
|
---|
| 736 | Note that use of CYGWIN creates a unique problem with regards to
|
---|
| 737 | setting <a href="#path"><tt>PATH</tt></a>. Normally on Windows
|
---|
| 738 | the <tt>PATH</tt> variable contains directories
|
---|
| 739 | separated with the ";" character (Solaris and Linux uses ":").
|
---|
| 740 | With CYGWIN, it uses ":", but that means that paths like "C:/path"
|
---|
| 741 | cannot be placed in the CYGWIN version of <tt>PATH</tt> and
|
---|
| 742 | instead CYGWIN uses something like <tt>/cygdrive/c/path</tt>
|
---|
| 743 | which CYGWIN understands, but only CYGWIN understands.
|
---|
| 744 | So be careful with paths on Windows.
|
---|
| 745 | </blockquote>
|
---|
| 746 | <!-- ------------------------------------------------------ -->
|
---|
| 747 | <h4><a name="windows_checklist">Basic Windows Check List</a></h4>
|
---|
| 748 | <blockquote>
|
---|
| 749 | <ol>
|
---|
| 750 | <li>
|
---|
| 751 | Install the
|
---|
| 752 | <a href="#cygwin">CYGWIN product</a>.
|
---|
| 753 | </li>
|
---|
| 754 | <li>
|
---|
| 755 | Install the
|
---|
| 756 | <a href="#bootjdk">Bootstrap JDK</a>, set
|
---|
| 757 | <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>.
|
---|
| 758 | </li>
|
---|
| 759 | <li>
|
---|
| 760 | <a href="#importjdk">Optional Import JDK</a>, set
|
---|
| 761 | <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>.
|
---|
| 762 | </li>
|
---|
| 763 | <li>
|
---|
| 764 | Install the
|
---|
| 765 | <a href="#msvc">Microsoft Visual Studio .NET 2003 Professional</a> or the
|
---|
| 766 | <a href="#mssdk">Microsoft Platform SDK</a>.
|
---|
| 767 | </li>
|
---|
| 768 | <li>
|
---|
| 769 | Setup all environment variables for compilers
|
---|
| 770 | (see <a href="#msvc">compilers</a>).
|
---|
| 771 | </li>
|
---|
| 772 | <li>
|
---|
| 773 | Install
|
---|
| 774 | <a href="#dxsdk">Microsoft DirectX SDK</a>.
|
---|
| 775 | </li>
|
---|
| 776 | <li>
|
---|
| 777 | Install
|
---|
| 778 | <a href="#ant">Ant</a>,
|
---|
| 779 | make sure it is in your PATH and set
|
---|
| 780 | <tt><a href="#ANT_HOME">ANT_HOME</a></tt>.
|
---|
| 781 | </li>
|
---|
| 782 | </ol>
|
---|
| 783 | </blockquote>
|
---|
| 784 | <!-- ------------------------------------------------------ -->
|
---|
| 785 | <hr>
|
---|
| 786 | <h3><a name="dependencies">Build Dependencies</a></h3>
|
---|
| 787 | <blockquote>
|
---|
| 788 | Depending on the platform, the OpenJDK build process has some basic
|
---|
| 789 | dependencies on components not part of the OpenJDK sources.
|
---|
| 790 | Some of these are specific to a platform, some even specific to
|
---|
| 791 | an architecture.
|
---|
| 792 | Each dependency will have a set of ALT variables that can be set
|
---|
| 793 | to tell the makefiles where to locate the component.
|
---|
| 794 | In most cases setting these ALT variables may not be necessary
|
---|
| 795 | and the makefiles will find defaults on the system in standard
|
---|
| 796 | install locations or through component specific variables.
|
---|
| 797 | <!-- ------------------------------------------------------ -->
|
---|
| 798 | <h4><a name="bootjdk">Bootstrap JDK</a></h4>
|
---|
| 799 | <blockquote>
|
---|
| 800 | All OpenJDK builds require access to the previously released
|
---|
| 801 | JDK 6, this is often called a bootstrap JDK.
|
---|
| 802 | <blockquote style="background-color:white">
|
---|
| 803 | <!-- OpenJDK 6 Specific -->
|
---|
| 804 | Normally the "boot" JDK is the previously released version
|
---|
| 805 | of the JDK, so it's unusual for a JDK 6 build like this to
|
---|
| 806 | require a JDK 6 "boot".
|
---|
| 807 | Unfortunately, it is currently required due to some JDK 6
|
---|
| 808 | dependencies in some of the sources.
|
---|
| 809 | </blockquote>
|
---|
| 810 | The JDK 6 binaries can be downloaded from Sun's
|
---|
| 811 | <a href="http://java.sun.com/javase/1.6.0/download.html" target="_blank">JDK 6 download site</a>.
|
---|
| 812 | For build performance reasons
|
---|
| 813 | is very important that this bootstrap JDK be made available on the
|
---|
| 814 | local disk of the machine doing the build.
|
---|
| 815 | You should always set
|
---|
| 816 | <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>
|
---|
| 817 | to point to the location of
|
---|
| 818 | the bootstrap JDK installation, this is the directory pathname
|
---|
| 819 | that contains a <tt>bin, lib, and include</tt>
|
---|
| 820 | It's also a good idea to also place its <tt>bin</tt> directory
|
---|
| 821 | in the <tt>PATH</tt> environment variable, although it's
|
---|
| 822 | not required.
|
---|
| 823 | <p>
|
---|
| 824 | <strong>Solaris:</strong>
|
---|
| 825 | Some pre-installed JDK images may be available to you in the
|
---|
| 826 | directory <tt>/usr/jdk/instances</tt>.
|
---|
| 827 | If you don't set
|
---|
| 828 | <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>
|
---|
| 829 | The makefiles will look in that location for a JDK it can use.
|
---|
| 830 | <p>
|
---|
| 831 | <strong>Linux:</strong>
|
---|
| 832 | Many GNU/Linux distributions already include OpenJDK 6. OpenJDK 6
|
---|
| 833 | can be used to bootstrap itself, so installing the corresponding
|
---|
| 834 | distribution package is sufficient. You'll still need to set
|
---|
| 835 | <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>, though.
|
---|
| 836 | </blockquote>
|
---|
| 837 | <!-- ------------------------------------------------------ -->
|
---|
| 838 | <h4><a name="importjdk">Optional Import JDK</a></h4>
|
---|
| 839 | <blockquote>
|
---|
| 840 | The <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>
|
---|
| 841 | setting is only needed if you are not building the entire
|
---|
| 842 | JDK. For example, if you have built the entire JDK once, and
|
---|
| 843 | wanted to avoid repeatedly building the Hotspot VM, you could
|
---|
| 844 | set this to the location of the previous JDK install image
|
---|
| 845 | and the build will copy the needed files from this import area.
|
---|
| 846 | </blockquote>
|
---|
| 847 | <!-- ------------------------------------------------------ -->
|
---|
| 848 | <h4><a name="ant">Ant</a></h4>
|
---|
| 849 | <blockquote>
|
---|
| 850 | All OpenJDK builds require access to least Ant 1.6.5.
|
---|
| 851 | The Ant tool is available from the
|
---|
| 852 | <a href="http://ant.apache.org" target="_blank">
|
---|
| 853 | Ant download site</a>.
|
---|
| 854 | You should always make sure <tt>ant</tt> is in your PATH, and
|
---|
| 855 | on Windows you may also need to set
|
---|
| 856 | <tt><a href="#ANT_HOME">ANT_HOME</a></tt>
|
---|
| 857 | to point to the location of
|
---|
| 858 | the Ant installation, this is the directory pathname
|
---|
| 859 | that contains a <tt>bin and lib</tt>.
|
---|
| 860 | </blockquote>
|
---|
| 861 | <!-- ------------------------------------------------------ -->
|
---|
| 862 | <h4><a name="cacerts">Certificate Authority File (cacert)</a></h4>
|
---|
| 863 | <blockquote>
|
---|
| 864 | See <a href="http://en.wikipedia.org/wiki/Certificate_Authority" target="_blank">
|
---|
| 865 | http://en.wikipedia.org/wiki/Certificate_Authority</a>
|
---|
| 866 | for a better understanding of the Certificate Authority (CA).
|
---|
| 867 | A certificates file named "cacerts"
|
---|
| 868 | represents a system-wide keystore with CA certificates.
|
---|
| 869 | In JDK and JRE
|
---|
| 870 | binary bundles, the "cacerts" file contains root CA certificates from
|
---|
| 871 | several public CAs (e.g., VeriSign, Thawte, and Baltimore).
|
---|
| 872 | The source contain a cacerts file
|
---|
| 873 | without CA root certificates.
|
---|
| 874 | Formal JDK builders will need to secure
|
---|
| 875 | permission from each public CA and include the certificates into their
|
---|
| 876 | own custom cacerts file.
|
---|
| 877 | Failure to provide a populated cacerts file
|
---|
| 878 | will result in verification errors of a certificate chain during runtime.
|
---|
| 879 | The variable
|
---|
| 880 | <tt><a href="#ALT_CACERTS_FILE">ALT_CACERTS_FILE</a></tt>
|
---|
| 881 | can be used to override the default location of the
|
---|
| 882 | cacerts file that will get placed in your build.
|
---|
| 883 | By default an empty cacerts file is provided and that should be
|
---|
| 884 | fine for most JDK developers.
|
---|
| 885 | </blockquote>
|
---|
| 886 | <!-- ------------------------------------------------------ -->
|
---|
| 887 | <h4><a name="compilers">Compilers</a></h4>
|
---|
| 888 | <blockquote>
|
---|
| 889 | <strong><a name="gcc">Linux gcc/binutils</a></strong>
|
---|
| 890 | <blockquote>
|
---|
| 891 | The GNU gcc compiler version should be 4 or newer.
|
---|
| 892 | The compiler used should be the default compiler installed
|
---|
| 893 | in <tt>/usr/bin</tt>.
|
---|
| 894 | </blockquote>
|
---|
| 895 | <strong><a name="studio">Solaris: Sun Studio</a></strong>
|
---|
| 896 | <blockquote>
|
---|
| 897 | At a minimum, the
|
---|
| 898 | <a href="http://developers.sun.com/sunstudio/index.jsp" target="_blank">
|
---|
| 899 | Sun Studio 11 Compilers</a>
|
---|
| 900 | (containing version 5.8 of the C and C++ compilers) is required,
|
---|
| 901 | with patches from the
|
---|
| 902 | <a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/patch-access" target="_blank">
|
---|
| 903 | SunSolve web site</a>.
|
---|
| 904 | <p>
|
---|
| 905 | Set
|
---|
| 906 | <a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a>
|
---|
| 907 | to point to the location of
|
---|
| 908 | the compiler binaries, and place this location in the <tt>PATH</tt>.
|
---|
| 909 | <p>
|
---|
| 910 | The Sun Studio Express compilers at:
|
---|
| 911 | <a href="http://developers.sun.com/sunstudio/downloads/express.jsp" target="_blank">
|
---|
| 912 | Sun Studio Express Download site</a>
|
---|
| 913 | are also an option, although these compilers have not
|
---|
| 914 | been extensively used yet.
|
---|
| 915 | </blockquote>
|
---|
| 916 | <strong><a name="msvc">Windows i586: Microsoft Visual Studio .NET 2003 Professional</a></strong>
|
---|
| 917 | <blockquote>
|
---|
| 918 | The 32-bit OpenJDK Windows build
|
---|
| 919 | requires Microsoft Visual Studio .NET 2003 (VS2003) Professional
|
---|
| 920 | Edition compiler.
|
---|
| 921 | The compiler and other tools are expected to reside
|
---|
| 922 | in the location defined by the variable <tt>VS71COMNTOOLS</tt> which
|
---|
| 923 | is set by the Microsoft Visual Studio .NET installer.
|
---|
| 924 | <p>
|
---|
| 925 | Once the compiler is installed,
|
---|
| 926 | it is recommended that you run <tt>VCVARS32.BAT</tt>
|
---|
| 927 | to set the compiler environment variables
|
---|
| 928 | <tt>MSVCDIR</tt>,
|
---|
| 929 | <tt>INCLUDE</tt>,
|
---|
| 930 | <tt>LIB</tt>, and
|
---|
| 931 | <tt>PATH</tt>
|
---|
| 932 | prior to building the
|
---|
| 933 | OpenJDK.
|
---|
| 934 | The above environment variables <b>MUST</b> be set.
|
---|
| 935 | <p>
|
---|
| 936 | The Microsoft Visual Studio .NET 2005 (VS2005) compiler
|
---|
| 937 | will not work at this time due to the new runtime dll
|
---|
| 938 | and the manifest requirements.
|
---|
| 939 | </blockquote>
|
---|
| 940 | <strong><a name="mssdk">Windows X64: Microsoft Platform SDK April 2005</a></strong>
|
---|
| 941 | <blockquote>
|
---|
| 942 | On <b>X64</b>, the Microsoft Platform Software
|
---|
| 943 | Development Kit (SDK), April 2005 Edition compiler,
|
---|
| 944 | is required for building the OpenJDK
|
---|
| 945 | because it contains the C/C++ compiler.
|
---|
| 946 | You will need to minimally install the Core SDK and
|
---|
| 947 | the MDAC SDK features of this compiler.
|
---|
| 948 | <p>
|
---|
| 949 | Once the Platform SDK is installed,
|
---|
| 950 | it is recommended that you run <tt>SetEnv.Cmd /X64</tt>
|
---|
| 951 | to set the compiler environment variables
|
---|
| 952 | <tt>MSSDK</tt>,
|
---|
| 953 | <tt>MSTOOLS</tt>,
|
---|
| 954 | <tt>INCLUDE</tt>,
|
---|
| 955 | <tt>LIB</tt>, and
|
---|
| 956 | <tt>PATH</tt>
|
---|
| 957 | prior to building the
|
---|
| 958 | OpenJDK.
|
---|
| 959 | The above environment variables <b>MUST</b> be set.
|
---|
| 960 | <p>
|
---|
| 961 | Note that this compiler may say it's version is a
|
---|
| 962 | Microsoft Visual Studio .NET 2005 (VS2005), but be careful,
|
---|
| 963 | it will not match the official VS2005 product.
|
---|
| 964 | This Platform SDK compiler is only used on X64 builds.
|
---|
| 965 | </blockquote>
|
---|
| 966 | </blockquote>
|
---|
| 967 | <!-- ------------------------------------------------------ -->
|
---|
| 968 | <h4><a name="zip">Zip and Unzip</a></h4>
|
---|
| 969 | <blockquote>
|
---|
| 970 | Version 2.2 (November 3rd 1997) or newer of the zip utility
|
---|
| 971 | and version 5.12 or newer of the unzip utility is needed
|
---|
| 972 | to build the JDK.
|
---|
| 973 | With Solaris, Linux, and Windows CYGWIN, the zip and unzip
|
---|
| 974 | utilities installed on the system should be fine.
|
---|
| 975 | Information and the source code for
|
---|
| 976 | ZIP.EXE and UNZIP.EXE is available on the
|
---|
| 977 | <a href="http://www.info-zip.org"
|
---|
| 978 | target="_blank">info-zip web site</a>.
|
---|
| 979 | </blockquote>
|
---|
| 980 | <!-- ------------------------------------------------------ -->
|
---|
| 981 | <h4><a name="cups">Common UNIX Printing System (CUPS) Headers (Solaris & Linux)</a></h4>
|
---|
| 982 | <blockquote>
|
---|
| 983 | <strong>Solaris:</strong>
|
---|
| 984 | CUPS header files are required for building the
|
---|
| 985 | OpenJDK on Solaris.
|
---|
| 986 | The Solaris header files can be obtained by installing
|
---|
| 987 | the package <strong>SFWcups</strong> from the Solaris Software
|
---|
| 988 | Companion CD/DVD, these often will be installed into
|
---|
| 989 | <tt>/opt/sfw/cups</tt>.
|
---|
| 990 | <p>
|
---|
| 991 | <strong>Linux:</strong>
|
---|
| 992 | CUPS header files are required for building the
|
---|
| 993 | OpenJDK on Linux.
|
---|
| 994 | The Linux header files are usually available from a "cups"
|
---|
| 995 | development package, it's recommended that you try and use
|
---|
| 996 | the package provided by the particular version of Linux that
|
---|
| 997 | you are using.
|
---|
| 998 | <p>
|
---|
| 999 | The CUPS header files can always be downloaded from
|
---|
| 1000 | <a href="http://www.cups.org" target="_blank">www.cups.org</a>.
|
---|
| 1001 | The variable
|
---|
| 1002 | <tt><a href="#ALT_CUPS_HEADERS_PATH">ALT_CUPS_HEADERS_PATH</a></tt>
|
---|
| 1003 | can be used to override the default location of the
|
---|
| 1004 | CUPS Header files.
|
---|
| 1005 | </blockquote>
|
---|
| 1006 | <!-- ------------------------------------------------------ -->
|
---|
| 1007 | <h4><a name="motif">Motif Headers (Solaris & Linux)</a></h4>
|
---|
| 1008 | <blockquote style="background-color:white">
|
---|
| 1009 | <!-- OpenJDK 6 Specific -->
|
---|
| 1010 | Motif headers (not libraries) are required for building the
|
---|
| 1011 | OpenJDK 6.
|
---|
| 1012 | <p>
|
---|
| 1013 | <strong>Solaris:</strong>
|
---|
| 1014 | Normally these files can be found on Solaris systems
|
---|
| 1015 | at /usr/include/Xm, so on Solaris systems no further downloads
|
---|
| 1016 | should be needed.
|
---|
| 1017 | <p>
|
---|
| 1018 | <strong>Linux:</strong>
|
---|
| 1019 | On Linux, your particular Linux distribution may provide a
|
---|
| 1020 | "motif" development package you can install. If this package
|
---|
| 1021 | installs the files into /usr/include/Xm, no further action should
|
---|
| 1022 | be needed.
|
---|
| 1023 | An acceptable version of these Motif header files are
|
---|
| 1024 | available in the source bundle
|
---|
| 1025 | <a href="http://www.openbsd.org/3.9_packages/hppa/openmotif-2.1.30.5p1.tgz-long.html">
|
---|
| 1026 | openmotif-2.1.30.5p1.tgz</a>
|
---|
| 1027 | from
|
---|
| 1028 | <a href="http://www.openbsd.org/">www.openbsd.org</a>.
|
---|
| 1029 | You would need to install the package and set the environment variable
|
---|
| 1030 | <tt><a href="#ALT_MOTIF_DIR">ALT_MOTIF_DIR</a></tt>
|
---|
| 1031 | to refer to the top of this installation.
|
---|
| 1032 | </blockquote>
|
---|
| 1033 | <!-- ------------------------------------------------------ -->
|
---|
| 1034 | <h4><a name="freetype">FreeType 2</a></h4>
|
---|
| 1035 | <blockquote>
|
---|
| 1036 | Version 2.3 or newer of FreeType is required for building the OpenJDK.
|
---|
| 1037 | On Unix systems required files can be available as part of your
|
---|
| 1038 | distribution (while you still may need to upgrade them).
|
---|
| 1039 | Note that you need development version of package that
|
---|
| 1040 | includes both FreeType library and header files.
|
---|
| 1041 | <p>
|
---|
| 1042 | You can always download latest FreeType version from the
|
---|
| 1043 | <a href="http://www.freetype.org" target="_blank">FreeType website</a>.
|
---|
| 1044 | <p>
|
---|
| 1045 | Makefiles will try to pick FreeType from /usr/lib and /usr/include.
|
---|
| 1046 | In case it is installed elsewhere you will need to set environment
|
---|
| 1047 | variables
|
---|
| 1048 | <tt><a href="#ALT_FREETYPE_LIB_PATH">ALT_FREETYPE_LIB_PATH</a></tt>
|
---|
| 1049 | and
|
---|
| 1050 | <tt><a href="#ALT_FREETYPE_HEADERS_PATH">ALT_FREETYPE_HEADERS_PATH</a></tt>
|
---|
| 1051 | to refer to place where library and header files are installed.
|
---|
| 1052 | </blockquote>
|
---|
| 1053 | <!-- ------------------------------------------------------ -->
|
---|
| 1054 | <h4><a name="alsa">Advanced Linux Sound Architecture (ALSA) (Linux only)</a></h4>
|
---|
| 1055 | <blockquote>
|
---|
| 1056 | <strong>Linux only:</strong>
|
---|
| 1057 | Version 0.9.1 or newer of the ALSA files are
|
---|
| 1058 | required for building the OpenJDK on Linux.
|
---|
| 1059 | These Linux files are usually available from an "alsa"
|
---|
| 1060 | of "libasound"
|
---|
| 1061 | development package, it's highly recommended that you try and use
|
---|
| 1062 | the package provided by the particular version of Linux that
|
---|
| 1063 | you are using.
|
---|
| 1064 | The makefiles will check this emit a sanity error if it is
|
---|
| 1065 | missing or the wrong version.
|
---|
| 1066 | <p>
|
---|
| 1067 | In particular, older Linux systems will likely not have the
|
---|
| 1068 | right version of ALSA installed, for example
|
---|
| 1069 | Redhat AS 2.1 U2 and SuSE 8.1 do not include a sufficiently
|
---|
| 1070 | recent ALSA distribution.
|
---|
| 1071 | On rpm-based systems, you can see if ALSA is installed by
|
---|
| 1072 | running this command:
|
---|
| 1073 | <pre>
|
---|
| 1074 | <tt>rpm -qa | grep alsa</tt>
|
---|
| 1075 | </pre>
|
---|
| 1076 | Both <tt>alsa</tt> and <tt>alsa-devel</tt> packages are needed.
|
---|
| 1077 | <p>
|
---|
| 1078 | If your distribution does not come with ALSA, and you can't
|
---|
| 1079 | find ALSA packages built for your particular system,
|
---|
| 1080 | you can try to install the pre-built ALSA rpm packages from
|
---|
| 1081 | <a href="http://www.freshrpms.net/" target="_blank">
|
---|
| 1082 | <tt>www.freshrpms.net</tt></a>.
|
---|
| 1083 | Note that installing a newer ALSA could
|
---|
| 1084 | break sound output if an older version of ALSA was previously
|
---|
| 1085 | installed on the system, but it will enable JDK compilation.
|
---|
| 1086 | <blockquote>
|
---|
| 1087 | Installation: execute as root<br>
|
---|
| 1088 | [i586]: <code>rpm -Uv --force alsa-lib-devel-0.9.1-rh61.i386.rpm</code><br>
|
---|
| 1089 | [x64]: <code>rpm -Uv --force alsa-lib-devel-0.9.8-amd64.x86_64.rpm</code><br>
|
---|
| 1090 | Uninstallation:<br>
|
---|
| 1091 | [i586]: <code>rpm -ev alsa-lib-devel-0.9.1-rh61</code><br>
|
---|
| 1092 | [x64]:<code>rpm -ev alsa-lib-devel-0.9.8-amd64</code><br>
|
---|
| 1093 | Make sure that you do not link to the static library
|
---|
| 1094 | (<tt>libasound.a</tt>),
|
---|
| 1095 | by verifying that the dynamic library (<tt>libasound.so</tt>) is
|
---|
| 1096 | correctly installed in <tt>/usr/lib</tt>.
|
---|
| 1097 | </blockquote>
|
---|
| 1098 | As a last resort you can go to the
|
---|
| 1099 | <a href="http://www.alsa-project.org" target="_blank">
|
---|
| 1100 | Advanced Linux Sound Architecture Site</a> and build it from
|
---|
| 1101 | source.
|
---|
| 1102 | <blockquote>
|
---|
| 1103 | Download driver and library
|
---|
| 1104 | source tarballs from
|
---|
| 1105 | <a href="http://www.alsa-project.org" target="_blank">ALSA's homepage</a>.
|
---|
| 1106 | As root, execute the following
|
---|
| 1107 | commands (you may need to adapt the version number):
|
---|
| 1108 | <pre>
|
---|
| 1109 | <tt>
|
---|
| 1110 | $ tar xjf alsa-driver-0.9.1.tar.bz2
|
---|
| 1111 | $ cd alsa-driver-0.9.1
|
---|
| 1112 | $ ./configure
|
---|
| 1113 | $ make install
|
---|
| 1114 | $ cd ..
|
---|
| 1115 | $ tar xjf alsa-lib-0.9.1.tar.bz2
|
---|
| 1116 | $ cd alsa-lib-0.9.1
|
---|
| 1117 | $ ./configure
|
---|
| 1118 | $ make install
|
---|
| 1119 | </tt>
|
---|
| 1120 | </pre>
|
---|
| 1121 | Should one of the above steps fail, refer to the documentation on
|
---|
| 1122 | ALSA's home page.
|
---|
| 1123 | </blockquote>
|
---|
| 1124 | Note that this is a minimum install that enables
|
---|
| 1125 | building the JDK platform. To actually use ALSA sound drivers, more
|
---|
| 1126 | steps are necessary as outlined in the documentation on ALSA's homepage.
|
---|
| 1127 | <p>
|
---|
| 1128 | ALSA can be uninstalled by executing <tt>make uninstall</tt> first in
|
---|
| 1129 | the <tt>alsa-lib-0.9.1</tt> directory and then in
|
---|
| 1130 | <tt>alsa-driver-0.9.1</tt>.
|
---|
| 1131 | </blockquote>
|
---|
| 1132 | There are no ALT* variables to change the assumed locations of ALSA,
|
---|
| 1133 | the makefiles will expect to find the ALSA include files and library at:
|
---|
| 1134 | <tt>/usr/include/alsa</tt> and <tt>/usr/lib/libasound.so</tt>.
|
---|
| 1135 | </blockquote>
|
---|
| 1136 | <!-- ------------------------------------------------------ -->
|
---|
| 1137 | <h4>Windows Specific Dependencies</h4>
|
---|
| 1138 | <blockquote>
|
---|
| 1139 | <strong>Unix Command Tools (<a name="cygwin">CYGWIN</a>)</strong>
|
---|
| 1140 | <blockquote>
|
---|
| 1141 | The OpenJDK requires access to a set of unix command tools
|
---|
| 1142 | on Windows which can be supplied by
|
---|
| 1143 | <a href="http://www.cygwin.com" target="_blank">CYGWIN</a>.
|
---|
| 1144 | <p>
|
---|
| 1145 | The OpenJDK build requires CYGWIN version 1.5.12 or newer.
|
---|
| 1146 | Information about CYGWIN can
|
---|
| 1147 | be obtained from the CYGWIN website at
|
---|
| 1148 | <a href="http://www.cygwin.com" target="_blank">www.cygwin.com</a>.
|
---|
| 1149 | <p>
|
---|
| 1150 | By default CYGWIN doesn't install all the tools required for building
|
---|
| 1151 | the OpenJDK.
|
---|
| 1152 | Along with the default installation, you need to install
|
---|
| 1153 | the following tools.
|
---|
| 1154 | <blockquote>
|
---|
| 1155 | <table border="1">
|
---|
| 1156 | <thead>
|
---|
| 1157 | <tr>
|
---|
| 1158 | <td>Binary Name</td>
|
---|
| 1159 | <td>Package</td>
|
---|
| 1160 | <td>Description</td>
|
---|
| 1161 | </tr>
|
---|
| 1162 | </thead>
|
---|
| 1163 | <tbody>
|
---|
| 1164 | <tr>
|
---|
| 1165 | <td>ar.exe</td>
|
---|
| 1166 | <td>Devel</td>
|
---|
| 1167 | <td>binutils: The GNU assembler, linker and binary
|
---|
| 1168 | utilities</td>
|
---|
| 1169 | </tr>
|
---|
| 1170 | <tr>
|
---|
| 1171 | <td>make.exe</td>
|
---|
| 1172 | <td>Devel</td>
|
---|
| 1173 | <td>make: The GNU version of the 'make' utility</td>
|
---|
| 1174 | </tr>
|
---|
| 1175 | <tr>
|
---|
| 1176 | <td>m4.exe</td>
|
---|
| 1177 | <td>Interpreters</td>
|
---|
| 1178 | <td>m4: GNU implementation of the traditional Unix macro
|
---|
| 1179 | processor</td>
|
---|
| 1180 | </tr>
|
---|
| 1181 | <tr>
|
---|
| 1182 | <td>cpio.exe</td>
|
---|
| 1183 | <td>Utils</td>
|
---|
| 1184 | <td>cpio: A program to manage archives of files</td>
|
---|
| 1185 | </tr>
|
---|
| 1186 | <tr>
|
---|
| 1187 | <td>awk.exe</td>
|
---|
| 1188 | <td>Utils</td>
|
---|
| 1189 | <td>awk: Pattern-directed scanning and processing language</td>
|
---|
| 1190 | </tr>
|
---|
| 1191 | <tr>
|
---|
| 1192 | <td>file.exe</td>
|
---|
| 1193 | <td>Utils</td>
|
---|
| 1194 | <td>file: Determines file type using 'magic' numbers</td>
|
---|
| 1195 | </tr>
|
---|
| 1196 | <tr>
|
---|
| 1197 | <td>zip.exe</td>
|
---|
| 1198 | <td>Utils</td>
|
---|
| 1199 | <td>zip: Package and compress (archive) files</td>
|
---|
| 1200 | </tr>
|
---|
| 1201 | <tr>
|
---|
| 1202 | <td>unzip.exe</td>
|
---|
| 1203 | <td>Utils</td>
|
---|
| 1204 | <td>unzip: Extract compressed files in a ZIP archive</td>
|
---|
| 1205 | </tr>
|
---|
| 1206 | <tr>
|
---|
| 1207 | <td>free.exe</td>
|
---|
| 1208 | <td>Utils</td>
|
---|
| 1209 | <td>free: Display amount of free and used memory in the system</td>
|
---|
| 1210 | </tr>
|
---|
| 1211 | </tbody>
|
---|
| 1212 | </table>
|
---|
| 1213 | </blockquote>
|
---|
| 1214 | <p>
|
---|
| 1215 | Note that the CYGWIN software can conflict with other non-CYGWIN
|
---|
| 1216 | software on your Windows system.
|
---|
| 1217 | CYGWIN provides a
|
---|
| 1218 | <a href="http://cygwin.com/faq/faq.using.html" target="_blank">FAQ</a> for
|
---|
| 1219 | known issues and problems, of particular interest is the
|
---|
| 1220 | section on
|
---|
| 1221 | <a href="http://cygwin.com/faq/faq.using.html#faq.using.bloda" target="_blank">
|
---|
| 1222 | BLODA (applications that interfere with CYGWIN)</a>.
|
---|
| 1223 | </blockquote>
|
---|
| 1224 | <strong><a name="dxsdk">Microsoft DirectX 9.0 SDK header files and libraries</a></strong>
|
---|
| 1225 | <blockquote>
|
---|
| 1226 | Microsoft DirectX 9.0 SDK (Summer 2004)
|
---|
| 1227 | headers are required for building
|
---|
| 1228 | OpenJDK.
|
---|
| 1229 | This SDK can be downloaded from
|
---|
| 1230 | <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=FD044A42-9912-42A3-9A9E-D857199F888E&displaylang=en" target="_blank">
|
---|
| 1231 | Microsoft DirectX 9.0 SDK (Summer 2004)</a>.
|
---|
| 1232 | If the link above becomes obsolete, the SDK can be found from
|
---|
| 1233 | <a href="http://download.microsoft.com" target="_blank">the Microsoft Download Site</a>
|
---|
| 1234 | (search with "DirectX 9.0 SDK Update Summer 2004").
|
---|
| 1235 | The location of this SDK can be set with
|
---|
| 1236 | <tt><a href="#ALT_DXSDK_PATH">ALT_DXSDK_PATH</a></tt>
|
---|
| 1237 | but it's normally found via the DirectX environment variable
|
---|
| 1238 | <tt>DXSDK_DIR</tt>.
|
---|
| 1239 | </blockquote>
|
---|
| 1240 | <strong><a name="msvcrt"><tt>MSVCRT.DLL</tt></a></strong>
|
---|
| 1241 | <blockquote>
|
---|
| 1242 | <strong>i586 only:</strong>
|
---|
| 1243 | The OpenJDK 32bit build requires access to
|
---|
| 1244 | <tt>MSVCRT.DLL</tt> version 6.00.8337.0 or newer.
|
---|
| 1245 | If the <tt>MSVCRT.DLL</tt> is not installed in
|
---|
| 1246 | the system32 directory set the
|
---|
| 1247 | <a href="#ALT_MSVCRT_DLL_PATH"><tt>ALT_MSVCRT_DLL_PATH</tt></a>
|
---|
| 1248 | variable to the location.
|
---|
| 1249 | <p>
|
---|
| 1250 | <strong>X64 only:</strong>
|
---|
| 1251 | The OpenJDK 64bit build requires access to
|
---|
| 1252 | <tt>MSVCRT.DLL</tt> version 7.0.3790.0 or newer, which is
|
---|
| 1253 | usually supplied by the
|
---|
| 1254 | <a href="#mssdk">Platform SDK</a>.
|
---|
| 1255 | If it is not available from the Platform SDK,
|
---|
| 1256 | set the
|
---|
| 1257 | <a href="#ALT_MSVCRT_DLL_PATH"><tt>ALT_MSVCRT_DLL_PATH</tt></a>
|
---|
| 1258 | variable to the location.
|
---|
| 1259 | </blockquote>
|
---|
| 1260 | <strong><tt><a name="msvcr71">MSVCR71.DLL</a></tt></strong>
|
---|
| 1261 | <blockquote>
|
---|
| 1262 | <strong>i586 only:</strong>
|
---|
| 1263 | The
|
---|
| 1264 | OpenJDK
|
---|
| 1265 | build requires access to
|
---|
| 1266 | MSVCR71.DLL version 7.10.3052.4 or newer which should be
|
---|
| 1267 | supplied by the
|
---|
| 1268 | <a href="#msvc">Visual Studio product</a>
|
---|
| 1269 | If the <tt>MSVCR71.DLL</tt> is not available from the
|
---|
| 1270 | Visual Studio product
|
---|
| 1271 | set the
|
---|
| 1272 | <a href="#ALT_MSVCR71_DLL_PATH"><tt>ALT_MSVCR71_DLL_PATH</tt></a>
|
---|
| 1273 | variable to the location.
|
---|
| 1274 | </blockquote>
|
---|
| 1275 | </blockquote>
|
---|
| 1276 | <!-- ------------------------------------------------------ -->
|
---|
| 1277 | <hr>
|
---|
| 1278 | <h2><a name="creating">Creating the Build</a></h2>
|
---|
| 1279 | <blockquote>
|
---|
| 1280 | Once a machine is setup to build the OpenJDK,
|
---|
| 1281 | the steps to create the build are fairly simple.
|
---|
| 1282 | The various ALT settings can either be made into variables
|
---|
| 1283 | or can be supplied on the
|
---|
| 1284 | <a href="#gmake"><tt><i>gmake</i></tt></a>
|
---|
| 1285 | command.
|
---|
| 1286 | <ol>
|
---|
| 1287 | <li>Use the sanity rule to double check all the ALT settings:
|
---|
| 1288 | <blockquote>
|
---|
| 1289 | <tt>
|
---|
| 1290 | <i>gmake</i>
|
---|
| 1291 | sanity
|
---|
| 1292 | [ARCH_DATA_MODEL=<i>32 or 64</i>]
|
---|
| 1293 | [other "ALT_" overrides]
|
---|
| 1294 | </tt>
|
---|
| 1295 | </blockquote>
|
---|
| 1296 | </li>
|
---|
| 1297 | <li>Start the build with the command:
|
---|
| 1298 | <blockquote>
|
---|
| 1299 | <tt>
|
---|
| 1300 | <i>gmake</i>
|
---|
| 1301 | [ARCH_DATA_MODEL=<i>32 or 64</i>]
|
---|
| 1302 | [ALT_OUTPUTDIR=<i>output_directory</i>]
|
---|
| 1303 | [other "ALT_" overrides]
|
---|
| 1304 | </tt>
|
---|
| 1305 | </blockquote>
|
---|
| 1306 | </li>
|
---|
| 1307 | </ol>
|
---|
| 1308 | <p>
|
---|
| 1309 | <strong>Solaris:</strong>
|
---|
| 1310 | Note that ARCH_DATA_MODEL is really only needed on Solaris to
|
---|
| 1311 | indicate you want to built the 64-bit version.
|
---|
| 1312 | And before the Solaris 64-bit binaries can be used, they
|
---|
| 1313 | must be merged with the binaries from a separate 32-bit build.
|
---|
| 1314 | The merged binaries may then be used in either 32-bit or 64-bit mode, with
|
---|
| 1315 | the selection occurring at runtime
|
---|
| 1316 | with the <tt>-d32</tt> or <tt>-d64</tt> options.
|
---|
| 1317 | </blockquote>
|
---|
| 1318 | <!-- ------------------------------------------------------ -->
|
---|
| 1319 | <hr>
|
---|
| 1320 | <h2><a name="testing">Testing the Build</a></h2>
|
---|
| 1321 | <blockquote>
|
---|
| 1322 | When the build is completed, you should see the generated
|
---|
| 1323 | binaries and associated files in the <tt>j2sdk-image</tt>
|
---|
| 1324 | directory in the output directory.
|
---|
| 1325 | The default output directory is
|
---|
| 1326 | <tt>build/<i>platform</i></tt>,
|
---|
| 1327 | where <tt><i>platform</i></tt> is one of
|
---|
| 1328 | <tt><ul>
|
---|
| 1329 | <li>solaris-sparc</li>
|
---|
| 1330 | <li>solaris-sparcv9</li>
|
---|
| 1331 | <li>solaris-i586</li>
|
---|
| 1332 | <li>solaris-amd64</li>
|
---|
| 1333 | <li>linux-i586</li>
|
---|
| 1334 | <li>linux-amd64</li>
|
---|
| 1335 | <li>windows-i586</li>
|
---|
| 1336 | <li>windows-amd64</li>
|
---|
| 1337 | </ul></tt>
|
---|
| 1338 | In particular, the
|
---|
| 1339 | <tt>build/<i>platform</i>/j2sdk-image/bin</tt>
|
---|
| 1340 | directory should contain executables for the
|
---|
| 1341 | OpenJDK tools and utilities.
|
---|
| 1342 | <p>
|
---|
| 1343 | You can test that the build completed properly by using the build
|
---|
| 1344 | to run the various demos that you will find in the
|
---|
| 1345 | <tt>build/<i>platform</i>/j2sdk-image/demo</tt>
|
---|
| 1346 | directory.
|
---|
| 1347 | <p>
|
---|
| 1348 | The provided regression tests can be run with the <tt>jtreg</tt>
|
---|
| 1349 | utility from
|
---|
| 1350 | <a href="http://openjdk.java.net/jtreg/" target="_blank">the jtreg site</a>.
|
---|
| 1351 | </blockquote>
|
---|
| 1352 | <!-- ------------------------------------------------------ -->
|
---|
| 1353 | <hr>
|
---|
| 1354 | <h2><a name="variables">Environment/Make Variables</a></h2>
|
---|
| 1355 | <p>
|
---|
| 1356 | Some of the
|
---|
| 1357 | environment or make variables (just called <b>variables</b> in this
|
---|
| 1358 | document) that can impact the build are:
|
---|
| 1359 | <blockquote>
|
---|
| 1360 | <dl>
|
---|
| 1361 | <dt><a name="path"><tt>PATH</tt></a> </dt>
|
---|
| 1362 | <dd>Typically you want to set the <tt>PATH</tt> to include:
|
---|
| 1363 | <ul>
|
---|
| 1364 | <li>The location of the GNU make binary</li>
|
---|
| 1365 | <li>The location of the Bootstrap JDK <tt>java</tt>
|
---|
| 1366 | (see <a href="#bootjdk">Bootstrap JDK</a>)</li>
|
---|
| 1367 | <li>The location of the C/C++ compilers
|
---|
| 1368 | (see <a href="#compilers"><tt>compilers</tt></a>)</li>
|
---|
| 1369 | <li>The location or locations for the Unix command utilities
|
---|
| 1370 | (e.g. <tt>/usr/bin</tt>)</li>
|
---|
| 1371 | </ul>
|
---|
| 1372 | </dd>
|
---|
| 1373 | <dt><tt>MILESTONE</tt> </dt>
|
---|
| 1374 | <dd>
|
---|
| 1375 | The milestone name for the build (<i>e.g.</i>"beta").
|
---|
| 1376 | The default value is "internal".
|
---|
| 1377 | </dd>
|
---|
| 1378 | <dt><tt>BUILD_NUMBER</tt> </dt>
|
---|
| 1379 | <dd>
|
---|
| 1380 | The build number for the build (<i>e.g.</i> "b27").
|
---|
| 1381 | The default value is "b00".
|
---|
| 1382 | </dd>
|
---|
| 1383 | <dt><a name="arch_data_model"><tt>ARCH_DATA_MODEL</tt></a></dt>
|
---|
| 1384 | <dd>The <tt>ARCH_DATA_MODEL</tt> variable
|
---|
| 1385 | is used to specify whether the build is to generate 32-bit or 64-bit
|
---|
| 1386 | binaries.
|
---|
| 1387 | The Solaris build supports either 32-bit or 64-bit builds, but
|
---|
| 1388 | Windows and Linux will support only one, depending on the specific
|
---|
| 1389 | OS being used.
|
---|
| 1390 | Normally, setting this variable is only necessary on Solaris.
|
---|
| 1391 | Set <tt>ARCH_DATA_MODEL</tt> to <tt>32</tt> for generating 32-bit binaries,
|
---|
| 1392 | or to <tt>64</tt> for generating 64-bit binaries.
|
---|
| 1393 | </dd>
|
---|
| 1394 | <dt><a name="ALT_BOOTDIR"><tt>ALT_BOOTDIR</tt></a></dt>
|
---|
| 1395 | <dd>
|
---|
| 1396 | The location of the bootstrap JDK installation.
|
---|
| 1397 | See <a href="#bootjdk">Bootstrap JDK</a> for more information.
|
---|
| 1398 | You should always install your own local Bootstrap JDK and
|
---|
| 1399 | always set <tt>ALT_BOOTDIR</tt> explicitly.
|
---|
| 1400 | </dd>
|
---|
| 1401 | <dt><a name="ALT_JDK_IMPORT_PATH"><tt>ALT_JDK_IMPORT_PATH</tt></a></dt>
|
---|
| 1402 | <dd>
|
---|
| 1403 | The location of a previously built JDK installation.
|
---|
| 1404 | See <a href="#importjdk">Optional Import JDK</a> for more information.
|
---|
| 1405 | </dd>
|
---|
| 1406 | <dt><a name="ALT_OUTPUTDIR"><tt>ALT_OUTPUTDIR</tt></a> </dt>
|
---|
| 1407 | <dd>
|
---|
| 1408 | An override for specifying the (absolute) path of where the
|
---|
| 1409 | build output is to go.
|
---|
| 1410 | The default output directory will be build/<i>platform</i>.
|
---|
| 1411 | </dd>
|
---|
| 1412 | <dt><a name="ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a> </dt>
|
---|
| 1413 | <dd>
|
---|
| 1414 | The location of the C/C++ compiler.
|
---|
| 1415 | The default varies depending on the platform.
|
---|
| 1416 | </dd>
|
---|
| 1417 | <dt><tt><a name="ALT_CACERTS_FILE">ALT_CACERTS_FILE</a></tt></dt>
|
---|
| 1418 | <dd>
|
---|
| 1419 | The location of the <a href="#cacerts">cacerts</a> file.
|
---|
| 1420 | The default will refer to
|
---|
| 1421 | <tt>jdk/src/share/lib/security/cacerts</tt>.
|
---|
| 1422 | </dd>
|
---|
| 1423 | <dt><a name="ALT_CUPS_HEADERS_PATH"><tt>ALT_CUPS_HEADERS_PATH</tt></a> </dt>
|
---|
| 1424 | <dd>
|
---|
| 1425 | The location of the CUPS header files.
|
---|
| 1426 | See <a href="#cups">CUPS information</a> for more information.
|
---|
| 1427 | If this path does not exist the fallback path is
|
---|
| 1428 | <tt>/usr/include</tt>.
|
---|
| 1429 | </dd>
|
---|
| 1430 | <!-- OpenJDK 6 Specific -->
|
---|
| 1431 | <dt style="background-color:white"><a name="ALT_MOTIF_DIR"><tt>ALT_MOTIF_DIR</tt></a></dt>
|
---|
| 1432 | <dd style="background-color:white">
|
---|
| 1433 | The location of the Motif 2.1 headers and libraries.
|
---|
| 1434 | See <a href="#motif">Motif</a> for details.
|
---|
| 1435 | </dd>
|
---|
| 1436 | <dt><a name="ALT_FREETYPE_LIB_PATH"><tt>ALT_FREETYPE_LIB_PATH</tt></a></dt>
|
---|
| 1437 | <dd>
|
---|
| 1438 | The location of the FreeType shared library.
|
---|
| 1439 | See <a href="#freetype">FreeType information</a> for details.
|
---|
| 1440 | </dd>
|
---|
| 1441 | <dt><a name="ALT_FREETYPE_HEADERS_PATH"><tt>ALT_FREETYPE_HEADERS_PATH</tt></a></dt>
|
---|
| 1442 | <dd>
|
---|
| 1443 | The location of the FreeType header files.
|
---|
| 1444 | See <a href="#freetype">FreeType information</a> for details.
|
---|
| 1445 | </dd>
|
---|
| 1446 | <dt><a name="ALT_JDK_DEVTOOLS_PATH"><tt>ALT_JDK_DEVTOOLS_PATH</tt></a></dt>
|
---|
| 1447 | <dd>
|
---|
| 1448 | The default root location of the devtools.
|
---|
| 1449 | The default value is
|
---|
| 1450 | <tt>$(ALT_SLASH_JAVA)/devtools</tt>.
|
---|
| 1451 | </dd>
|
---|
| 1452 | <dt><tt><a name="ALT_DEVTOOLS_PATH">ALT_DEVTOOLS_PATH</a></tt> </dt>
|
---|
| 1453 | <dd>
|
---|
| 1454 | The location of tools like the
|
---|
| 1455 | <a href="#zip"><tt>zip</tt> and <tt>unzip</tt></a>
|
---|
| 1456 | binaries, but might also contain the GNU make utility
|
---|
| 1457 | (<tt><i>gmake</i></tt>).
|
---|
| 1458 | So this area is a bit of a grab bag, especially on Windows.
|
---|
| 1459 | The default value depends on the platform and
|
---|
| 1460 | Unix Commands being used.
|
---|
| 1461 | On Linux the default will be
|
---|
| 1462 | <tt>$(ALT_JDK_DEVTOOLS_PATH)/linux/bin</tt>,
|
---|
| 1463 | on Solaris
|
---|
| 1464 | <tt>$(ALT_JDK_DEVTOOLS_PATH)/<i>{sparc,i386}</i>/bin</tt>,
|
---|
| 1465 | on Windows with MKS
|
---|
| 1466 | <tt>%SYSTEMDRIVE%/UTILS</tt>,
|
---|
| 1467 | and on Windows with CYGWIN
|
---|
| 1468 | <tt>/usr/bin</tt>.
|
---|
| 1469 | </dd>
|
---|
| 1470 | <dt><a name="ALT_UNIXCOMMAND_PATH"><tt>ALT_UNIXCOMMAND_PATH</tt></a> </dt>
|
---|
| 1471 | <dd>
|
---|
| 1472 | An override for specifying where the
|
---|
| 1473 | Unix command set are located.
|
---|
| 1474 | The default location varies depending on the platform,
|
---|
| 1475 | <tt>"%SYSTEMDRIVE%/MKSNT"</tt> or
|
---|
| 1476 | <tt>$(ROOTDIR)</tt> on Windows with MKS, otherwise it's
|
---|
| 1477 | <tt>"/bin"</tt> or <tt>/usr/bin</tt>.
|
---|
| 1478 | </dd>
|
---|
| 1479 | <dt><a name="ALT_UNIXCCS_PATH"><tt>ALT_UNIXCCS_PATH</tt></a></dt>
|
---|
| 1480 | <dd>
|
---|
| 1481 | <strong>Solaris only:</strong>
|
---|
| 1482 | An override for specifying where the Unix CCS
|
---|
| 1483 | command set are located.
|
---|
| 1484 | The default location is <tt>/usr/ccs/bin</tt>
|
---|
| 1485 | </dd>
|
---|
| 1486 | <dt><a name="ALT_USRBIN_PATH"><tt>ALT_USRBIN_PATH</tt></a></dt>
|
---|
| 1487 | <dd>
|
---|
| 1488 | An override for specifying where the
|
---|
| 1489 | Unix <tt>/usr/bin</tt> commands are located. You usually do not need
|
---|
| 1490 | to set this variable: the default location is <tt>/usr/bin</tt>)
|
---|
| 1491 | </dd>
|
---|
| 1492 | <dt><a name="ALT_SLASH_JAVA"><tt>ALT_SLASH_JAVA</tt></a></dt>
|
---|
| 1493 | <dd>
|
---|
| 1494 | The default root location for many of the ALT path locations
|
---|
| 1495 | of the following ALT variables.
|
---|
| 1496 | The default value is
|
---|
| 1497 | <tt>"/java"</tt> on Solaris and Linux,
|
---|
| 1498 | <tt>"J:"</tt> on Windows.
|
---|
| 1499 | </dd>
|
---|
| 1500 | <dt><a name="ALT_BUILD_JDK_IMPORT_PATH"><tt>ALT_BUILD_JDK_IMPORT_PATH</tt></a></dt>
|
---|
| 1501 | <dd>
|
---|
| 1502 | These are useful in managing builds on multiple platforms.
|
---|
| 1503 | The default network location for all of the import JDK images
|
---|
| 1504 | for all platforms.
|
---|
| 1505 | If <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>
|
---|
| 1506 | is not set, this directory will be used and should contain
|
---|
| 1507 | the following directories:
|
---|
| 1508 | <tt>solaris-sparc</tt>,
|
---|
| 1509 | <tt>solaris-i586</tt>,
|
---|
| 1510 | <tt>solaris-sparcv9</tt>,
|
---|
| 1511 | <tt>solaris-amd64</tt>,
|
---|
| 1512 | <tt>linux-i586</tt>,
|
---|
| 1513 | <tt>linux-amd64</tt>,
|
---|
| 1514 | <tt>windows-i586</tt>,
|
---|
| 1515 | and
|
---|
| 1516 | <tt>windows-amd64</tt>.
|
---|
| 1517 | Where each of these directories contain the import JDK image
|
---|
| 1518 | for that platform.
|
---|
| 1519 | </dd>
|
---|
| 1520 | <dt><a name="OPENJDK"><tt>OPENJDK</tt></a></dt>
|
---|
| 1521 | <dd>
|
---|
| 1522 | Flag used to decide whether the build is a pure OpenJDK
|
---|
| 1523 | build (when set to <code>true</code>). You usually do not
|
---|
| 1524 | need to set this variable.
|
---|
| 1525 | </dd>
|
---|
| 1526 | <dt><strong>Windows specific:</strong></dt>
|
---|
| 1527 | <dd>
|
---|
| 1528 | <dl>
|
---|
| 1529 | <dt><a name="ALT_MSDEVTOOLS_PATH"><tt>ALT_MSDEVTOOLS_PATH</tt></a> </dt>
|
---|
| 1530 | <dd>
|
---|
| 1531 | The location of the Microsoft Visual Studio .NET 2003
|
---|
| 1532 | tools 'bin' directory.
|
---|
| 1533 | The default is usually derived from
|
---|
| 1534 | <a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a>.
|
---|
| 1535 | </dd>
|
---|
| 1536 | <dt><tt><a name="ALT_DXSDK_PATH">ALT_DXSDK_PATH</a></tt> </dt>
|
---|
| 1537 | <dd>
|
---|
| 1538 | The location of the
|
---|
| 1539 | <a href="#dxsdk">Microsoft DirectX 9 SDK</a>.
|
---|
| 1540 | The default will be to try and use the DirectX environment
|
---|
| 1541 | variable <tt>DXSDK_DIR</tt>,
|
---|
| 1542 | failing that, look in <tt>C:/DXSDK</tt>.
|
---|
| 1543 | </dd>
|
---|
| 1544 | <dt><tt><a name="ALT_MSVCRT_DLL_PATH">ALT_MSVCRT_DLL_PATH</a></tt> </dt>
|
---|
| 1545 | <dd>
|
---|
| 1546 | The location of the
|
---|
| 1547 | <a href="#msvcrt"><tt>MSVCRT.DLL</tt></a>.
|
---|
| 1548 | </dd>
|
---|
| 1549 | <dt><tt><a name="ALT_MSVCR71_DLL_PATH">ALT_MSVCR71_DLL_PATH</a></tt> </dt>
|
---|
| 1550 | <dd>
|
---|
| 1551 | <strong>i586 only:</strong>
|
---|
| 1552 | The location of the
|
---|
| 1553 | <a href="#msvcr71"><tt>MSVCR71.DLL</tt></a>.
|
---|
| 1554 | </dd>
|
---|
| 1555 | </dl>
|
---|
| 1556 | </dd>
|
---|
| 1557 | </dl>
|
---|
| 1558 | </blockquote>
|
---|
| 1559 | <!-- ------------------------------------------------------ -->
|
---|
| 1560 | <hr>
|
---|
| 1561 | <h2><a name="troubleshooting">Troubleshooting</a></h2>
|
---|
| 1562 | <blockquote>
|
---|
| 1563 | A build can fail for any number of reasons.
|
---|
| 1564 | Most failures
|
---|
| 1565 | are a result of trying to build in an environment in which all the
|
---|
| 1566 | pre-build requirements have not been met.
|
---|
| 1567 | The first step in
|
---|
| 1568 | troubleshooting a build failure is to recheck that you have satisfied
|
---|
| 1569 | all the pre-build requirements for your platform.
|
---|
| 1570 | Look for the check list of the platform you are building on in the
|
---|
| 1571 | <a href="#contents">Table of Contents</a>.
|
---|
| 1572 | <p>
|
---|
| 1573 | You can validate your build environment by using the <tt>sanity</tt>
|
---|
| 1574 | target.
|
---|
| 1575 | Any errors listed
|
---|
| 1576 | will stop the build from starting, and any warnings may result in
|
---|
| 1577 | a flawed product build.
|
---|
| 1578 | We strongly encourage you to evaluate every
|
---|
| 1579 | sanity check warning and fix it if required, before you proceed
|
---|
| 1580 | further with your build.
|
---|
| 1581 | <p>
|
---|
| 1582 | Some of the more common problems with builds are briefly described
|
---|
| 1583 | below, with suggestions for remedies.
|
---|
| 1584 | <ul>
|
---|
| 1585 | <li>
|
---|
| 1586 | <b>Slow Builds:</b>
|
---|
| 1587 | <blockquote>
|
---|
| 1588 | If your build machine seems to be overloaded from too many
|
---|
| 1589 | simultaneous C++ compiles, try setting the <tt>HOTSPOT_BUILD_JOBS</tt>
|
---|
| 1590 | variable to <tt>1</tt> (if you're using a multiple CPU
|
---|
| 1591 | machine, setting it to more than the the number of CPUs is probably
|
---|
| 1592 | not a good idea).
|
---|
| 1593 | <p>
|
---|
| 1594 | Creating the javadocs can be very slow, if you are running
|
---|
| 1595 | javadoc, consider skipping that step.
|
---|
| 1596 | <p>
|
---|
| 1597 | Faster hardware and more RAM always helps too.
|
---|
| 1598 | The VM build tends to be CPU intensive (many C++ compiles),
|
---|
| 1599 | and the rest of the JDK will often be disk intensive.
|
---|
| 1600 | <p>
|
---|
| 1601 | Faster compiles are possible using a tool called
|
---|
| 1602 | <a href="http://ccache.samba.org/" target="_blank">ccache</a>.
|
---|
| 1603 | </blockquote>
|
---|
| 1604 | </li>
|
---|
| 1605 | <li>
|
---|
| 1606 | <b>File time issues:</b>
|
---|
| 1607 | <blockquote>
|
---|
| 1608 | If you see warnings that refer to file time stamps, e.g.
|
---|
| 1609 | <blockquote>
|
---|
| 1610 | <i>Warning message:</i><tt> File `xxx' has modification time in
|
---|
| 1611 | the future.</tt>
|
---|
| 1612 | <br>
|
---|
| 1613 | <i>Warning message:</i> <tt> Clock skew detected. Your build may
|
---|
| 1614 | be incomplete.</tt>
|
---|
| 1615 | </blockquote>
|
---|
| 1616 | These warnings can occur when the clock on the build machine is out of
|
---|
| 1617 | sync with the timestamps on the source files. Other errors, apparently
|
---|
| 1618 | unrelated but in fact caused by the clock skew, can occur along with
|
---|
| 1619 | the clock skew warnings. These secondary errors may tend to obscure the
|
---|
| 1620 | fact that the true root cause of the problem is an out-of-sync clock.
|
---|
| 1621 | For example, an out-of-sync clock has been known to cause an old
|
---|
| 1622 | version of javac to be used to compile some files, resulting in errors
|
---|
| 1623 | when the pre-1.4 compiler ran across the new <tt>assert</tt> keyword
|
---|
| 1624 | in the 1.4 source code.
|
---|
| 1625 | <p>
|
---|
| 1626 | If you see these warnings, reset the clock on the build
|
---|
| 1627 | machine, run "<tt><i>gmake</i> clobber</tt>" or delete the directory
|
---|
| 1628 | containing the build output, and restart the build from the beginning.
|
---|
| 1629 | </blockquote>
|
---|
| 1630 | </li>
|
---|
| 1631 | <li>
|
---|
| 1632 | <b>Error message: <tt>Trouble writing out table to disk</tt></b>
|
---|
| 1633 | <blockquote>
|
---|
| 1634 | Increase the amount of swap space on your build machine.
|
---|
| 1635 | </blockquote>
|
---|
| 1636 | </li>
|
---|
| 1637 | <li>
|
---|
| 1638 | <b>Error Message: <tt>libstdc++ not found:</tt></b>
|
---|
| 1639 | <blockquote>
|
---|
| 1640 | This is caused by a missing libstdc++.a library.
|
---|
| 1641 | This is installed as part of a specific package
|
---|
| 1642 | (e.g. libstdc++.so.devel.386).
|
---|
| 1643 | By default some 64bit Linux versions (e.g. Fedora)
|
---|
| 1644 | only install the 64bit version of the libstdc++ package.
|
---|
| 1645 | Various parts of the JDK build require a static
|
---|
| 1646 | link of the C++ runtime libraries to allow for maximum
|
---|
| 1647 | portability of the built images.
|
---|
| 1648 | </blockquote>
|
---|
| 1649 | </li>
|
---|
| 1650 | <li>
|
---|
| 1651 | <b>Error Message: <tt>cannot restore segment prot after reloc</tt></b>
|
---|
| 1652 | <blockquote>
|
---|
| 1653 | This is probably an issue with SELinux (See
|
---|
| 1654 | <a href="http://en.wikipedia.org/wiki/SELinux" target="_blank">
|
---|
| 1655 | http://en.wikipedia.org/wiki/SELinux</a>).
|
---|
| 1656 | Parts of the VM is built without the <tt>-fPIC</tt> for
|
---|
| 1657 | performance reasons.
|
---|
| 1658 | <p>
|
---|
| 1659 | To completely disable SELinux:
|
---|
| 1660 | <tt>
|
---|
| 1661 | <ol>
|
---|
| 1662 | <li>$ su root</li>
|
---|
| 1663 | <li># system-config-securitylevel</li>
|
---|
| 1664 | <li>In the window that appears, select the SELinux tab</li>
|
---|
| 1665 | <li>Disable SELinux</li>
|
---|
| 1666 | </ol>
|
---|
| 1667 | </tt>
|
---|
| 1668 | <p>
|
---|
| 1669 | Alternatively, instead of completely disabling it you could
|
---|
| 1670 | disable just this one check.
|
---|
| 1671 | <tt>
|
---|
| 1672 | <ol>
|
---|
| 1673 | <li>Select System->Administration->SELinux Management</li>
|
---|
| 1674 | <li>In the SELinux Management Tool which appears,
|
---|
| 1675 | select "Boolean" from the menu on the left</li>
|
---|
| 1676 | <li>Expand the "Memory Protection" group</li>
|
---|
| 1677 | <li>Check the first item, labeled
|
---|
| 1678 | "Allow all unconfined executables to use libraries requiring text relocation ..."</li>
|
---|
| 1679 | </ol>
|
---|
| 1680 | </tt>
|
---|
| 1681 | </blockquote>
|
---|
| 1682 | </li>
|
---|
| 1683 | <li>
|
---|
| 1684 | <b>Windows Error Message: <tt>*** fatal error - couldn't allocate heap, ... </tt></b>
|
---|
| 1685 | <blockquote>
|
---|
| 1686 | The CYGWIN software can conflict with other non-CYGWIN
|
---|
| 1687 | software. See the CYGWIN FAQ section on
|
---|
| 1688 | <a href="http://cygwin.com/faq/faq.using.html#faq.using.bloda" target="_blank">
|
---|
| 1689 | BLODA (applications that interfere with CYGWIN)</a>.
|
---|
| 1690 | </blockquote>
|
---|
| 1691 | </li>
|
---|
| 1692 | <li>
|
---|
| 1693 | <b>Windows Error Message: <tt>*** multiple target patterns. Stop.</tt></b>
|
---|
| 1694 | <blockquote>
|
---|
| 1695 | The CYGWIN make version 3.81 may not like the Windows <tt>C:/</tt>
|
---|
| 1696 | style paths, it may not like the ':' character in the path
|
---|
| 1697 | when used in a makefile target definition.
|
---|
| 1698 | See the <a href="#gmake"><tt><i>gmake</i></tt></a> section.
|
---|
| 1699 | </blockquote>
|
---|
| 1700 | </li>
|
---|
| 1701 | </ul>
|
---|
| 1702 | </blockquote>
|
---|
| 1703 | <hr>
|
---|
| 1704 | </body>
|
---|
| 1705 | </html>
|
---|