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