Sat, 01 Dec 2007 00:00:00 +0000
Initial load
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> |
duke@2 | 345 | The source code for the |
duke@2 | 346 | OpenJDK is |
duke@2 | 347 | delivered in <i>3</i> sibling directories: |
duke@2 | 348 | <tt>hotspot</tt>, |
duke@2 | 349 | <tt>langtools</tt>, |
duke@2 | 350 | <tt>corba</tt>, |
duke@2 | 351 | <tt>jaxws</tt>, |
duke@2 | 352 | <tt>jaxp</tt>, |
duke@2 | 353 | <tt>jdk</tt> |
duke@2 | 354 | and |
duke@2 | 355 | The <tt>hotspot</tt> directory contains the source code and make |
duke@2 | 356 | files for |
duke@2 | 357 | building the |
duke@2 | 358 | OpenJDK |
duke@2 | 359 | Hotspot Virtual Machine. |
duke@2 | 360 | The <tt>jdk</tt> |
duke@2 | 361 | directory contains the source code and make files for |
duke@2 | 362 | building the |
duke@2 | 363 | OpenJDK |
duke@2 | 364 | runtime libraries, tools and demos. |
duke@2 | 365 | The top level Makefile is used to build the complete OpenJDK |
duke@2 | 366 | release including building the hotspot |
duke@2 | 367 | VM, staging the VM binaries, and building the |
duke@2 | 368 | OpenJDK |
duke@2 | 369 | runtime libraries, |
duke@2 | 370 | tools and demos. |
duke@2 | 371 | </blockquote> |
duke@2 | 372 | |
duke@2 | 373 | <!-- ------------------------------------------------------ --> |
duke@2 | 374 | <hr noshade="noshade" size="3"> |
duke@2 | 375 | |
duke@2 | 376 | <h2><a name="building">Build Information</a></h2> |
duke@2 | 377 | |
duke@2 | 378 | <blockquote> |
duke@2 | 379 | <p> |
duke@2 | 380 | Building the |
duke@2 | 381 | OpenJDK |
duke@2 | 382 | is done with a <tt><i>gmake</i></tt> |
duke@2 | 383 | command line and various |
duke@2 | 384 | environment or make variable settings that direct the make rules |
duke@2 | 385 | to where various components have been installed. |
duke@2 | 386 | Where possible the makefiles will attempt to located the various |
duke@2 | 387 | components in the default locations or any component specific |
duke@2 | 388 | variable settings. |
duke@2 | 389 | When the normal defaults fail or components cannot be found, |
duke@2 | 390 | the various |
duke@2 | 391 | <tt>ALT_*</tt> variables (alternates) |
duke@2 | 392 | can be used to help the makefiles locate components. |
duke@2 | 393 | <p> |
duke@2 | 394 | Refer to the bash/sh/ksh setup file |
duke@2 | 395 | <tt>jdk/make/jdk_generic_profile.sh</tt> |
duke@2 | 396 | if you need help in setting up your environment variables. |
duke@2 | 397 | A build could be as simple as: |
duke@2 | 398 | <blockquote> |
duke@2 | 399 | <pre><tt> |
duke@2 | 400 | bash |
duke@2 | 401 | . jdk/make/jdk_generic_profile.sh |
duke@2 | 402 | <i>gmake</i> sanity && <i>gmake</i> |
duke@2 | 403 | </tt></pre> |
duke@2 | 404 | </blockquote> |
duke@2 | 405 | <p> |
duke@2 | 406 | Of course ksh or sh would work too. |
duke@2 | 407 | But some customization will probably be necessary. |
duke@2 | 408 | The <tt>sanity</tt> rule will make some basic checks on build |
duke@2 | 409 | dependencies and generate appropriate warning messages |
duke@2 | 410 | regarding missing, out of date, or newer than expected components |
duke@2 | 411 | found on your system. |
duke@2 | 412 | </blockquote> |
duke@2 | 413 | |
duke@2 | 414 | <!-- ------------------------------------------------------ --> |
duke@2 | 415 | <hr noshade="noshade" size="3"> |
duke@2 | 416 | |
duke@2 | 417 | <h3><a name="gmake">GNU make (<tt><i>gmake</i></tt>)</a></h3> |
duke@2 | 418 | |
duke@2 | 419 | <blockquote> |
duke@2 | 420 | <p> |
duke@2 | 421 | The Makefiles in the |
duke@2 | 422 | OpenJDK |
duke@2 | 423 | are only valid when used with the |
duke@2 | 424 | GNU version of the utility command <tt>make</tt> |
duke@2 | 425 | (<tt><i>gmake</i></tt>). |
duke@2 | 426 | A few notes about using GNU make: |
duke@2 | 427 | <ul> |
duke@2 | 428 | <li> |
duke@2 | 429 | In general, you need GNU make version 3.78.1 or newer. |
duke@2 | 430 | </li> |
duke@2 | 431 | <li> |
duke@2 | 432 | Place the location of the GNU make binary in the <tt>PATH</tt>. |
duke@2 | 433 | </li> |
duke@2 | 434 | <li> |
duke@2 | 435 | <strong>Linux:</strong> |
duke@2 | 436 | The <tt>/usr/bin/make</tt> command should work fine for you. |
duke@2 | 437 | </li> |
duke@2 | 438 | <li> |
duke@2 | 439 | <strong>Solaris:</strong> |
duke@2 | 440 | Do NOT use <tt>/usr/bin/make</tt> on Solaris. |
duke@2 | 441 | If your Solaris system has the software |
duke@2 | 442 | from the Solaris Companion CD installed, |
duke@2 | 443 | you should use <tt>gmake</tt> |
duke@2 | 444 | which will be located in either the <tt>/opt/sfw/bin</tt> or |
duke@2 | 445 | <tt>/usr/sfw/bin</tt> directory. |
duke@2 | 446 | </li> |
duke@2 | 447 | <li> |
duke@2 | 448 | <strong>Windows:</strong> |
duke@2 | 449 | Make sure you start your build inside a bash/sh/ksh shell. |
duke@2 | 450 | <br> |
duke@2 | 451 | <b>WARNING:</b> Watch out for make version 3.81, it may |
duke@2 | 452 | not work due to a lack of support for drive letter paths |
duke@2 | 453 | like <tt>C:/</tt>. Use a 3.80 version, or find a newer |
duke@2 | 454 | version that has this problem fixed. |
duke@2 | 455 | </li> |
duke@2 | 456 | </ul> |
duke@2 | 457 | <p> |
duke@2 | 458 | Information on GNU make, and access to ftp download sites, are |
duke@2 | 459 | available on the |
duke@2 | 460 | <a href="http://www.gnu.org/software/make/make.html"> |
duke@2 | 461 | GNU make web site |
duke@2 | 462 | </a>. |
duke@2 | 463 | The latest source to GNU make is available at |
duke@2 | 464 | <a href="http://ftp.gnu.org/pub/gnu/make/">ftp.gnu.org/pub/gnu/make/</a>. |
duke@2 | 465 | </blockquote> |
duke@2 | 466 | |
duke@2 | 467 | <!-- ------------------------------------------------------ --> |
duke@2 | 468 | <hr noshade="noshade" size="3"> |
duke@2 | 469 | |
duke@2 | 470 | <h3><a name="linux">Basic Linux System Setup</a></h3> |
duke@2 | 471 | |
duke@2 | 472 | <blockquote> |
duke@2 | 473 | <p> |
duke@2 | 474 | <strong>i586 only:</strong> |
duke@2 | 475 | The minimum recommended hardware for building the Linux version |
duke@2 | 476 | is a Pentium class processor or better, at least 256 MB of RAM, and |
duke@2 | 477 | approximately 1.5 GB of free disk space. |
duke@2 | 478 | <p> |
duke@2 | 479 | <strong>X64 only:</strong> |
duke@2 | 480 | The minimum recommended hardware for building the Linux |
duke@2 | 481 | version is an AMD Opteron class processor, at least 512 MB of RAM, and |
duke@2 | 482 | approximately 4 GB of free disk space. |
duke@2 | 483 | <p> |
duke@2 | 484 | The build will use the tools contained in |
duke@2 | 485 | <tt>/bin</tt> and |
duke@2 | 486 | <tt>/usr/bin</tt> |
duke@2 | 487 | of a standard installation of the Linux operating environment. |
duke@2 | 488 | You should ensure that these directories are in your |
duke@2 | 489 | <tt>PATH</tt>. |
duke@2 | 490 | <p> |
duke@2 | 491 | Note that some Linux systems have a habit of pre-populating |
duke@2 | 492 | your environment variables for you, for example <tt>JAVA_HOME</tt> |
duke@2 | 493 | might get pre-defined for you to refer to the JDK installed on |
duke@2 | 494 | your Linux system. |
duke@2 | 495 | You will need to unset <tt>JAVA_HOME</tt>. |
duke@2 | 496 | It's a good idea to run <tt>env</tt> and verify the |
duke@2 | 497 | environment variables you are getting from the default system |
duke@2 | 498 | settings make sense for building the |
duke@2 | 499 | OpenJDK. |
duke@2 | 500 | </blockquote> |
duke@2 | 501 | |
duke@2 | 502 | <!-- ------------------------------------------------------ --> |
duke@2 | 503 | |
duke@2 | 504 | <h4><a name="linux_checklist">Basic Linux Check List</a></h4> |
duke@2 | 505 | |
duke@2 | 506 | <blockquote> |
duke@2 | 507 | <ol> |
duke@2 | 508 | <li> |
duke@2 | 509 | Install the |
duke@2 | 510 | <a href="#bootjdk">Bootstrap JDK</a>, set |
duke@2 | 511 | <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>. |
duke@2 | 512 | </li> |
duke@2 | 513 | <li> |
duke@2 | 514 | Install the |
duke@2 | 515 | <a href="#binaryplugs">Binary Plugs</a>, set |
duke@2 | 516 | <tt><a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</a></tt>. |
duke@2 | 517 | </li> |
duke@2 | 518 | <li> |
duke@2 | 519 | Install or upgrade the <a href="#freetype">FreeType development |
duke@2 | 520 | package</a>. |
duke@2 | 521 | </li> |
duke@2 | 522 | </ol> |
duke@2 | 523 | </blockquote> |
duke@2 | 524 | |
duke@2 | 525 | <!-- ------------------------------------------------------ --> |
duke@2 | 526 | <hr noshade="noshade" size="3"> |
duke@2 | 527 | |
duke@2 | 528 | <h3><a name="solaris">Basic Solaris System Setup</a></h3> |
duke@2 | 529 | |
duke@2 | 530 | <blockquote> |
duke@2 | 531 | <p> |
duke@2 | 532 | The minimum recommended hardware for building the |
duke@2 | 533 | Solaris SPARC version is an UltraSPARC with 512 MB of RAM. |
duke@2 | 534 | For building |
duke@2 | 535 | the Solaris x86 version, a Pentium class processor or better and at |
duke@2 | 536 | least 128 MB of RAM are recommended. |
duke@2 | 537 | Approximately 1.4 GB of free disk |
duke@2 | 538 | space is needed for a 32-bit build. |
duke@2 | 539 | <p> |
duke@2 | 540 | If you are building the 64bit version, you should |
duke@2 | 541 | run the command "isainfo -v" to verify that you have a |
duke@2 | 542 | 64-bit installation. |
duke@2 | 543 | An additional 7 GB of free disk space is needed |
duke@2 | 544 | for a 64-bit build. |
duke@2 | 545 | <p> |
duke@2 | 546 | The build uses the tools contained in <tt>/usr/ccs/bin</tt> |
duke@2 | 547 | and <tt>/usr/bin</tt> of a standard developer or full installation of |
duke@2 | 548 | the Solaris operating environment. |
duke@2 | 549 | </blockquote> |
duke@2 | 550 | |
duke@2 | 551 | <!-- ------------------------------------------------------ --> |
duke@2 | 552 | |
duke@2 | 553 | <h4><a name="solaris_checklist">Basic Solaris Check List</a></h4> |
duke@2 | 554 | |
duke@2 | 555 | <blockquote> |
duke@2 | 556 | <ol> |
duke@2 | 557 | <li> |
duke@2 | 558 | Install the |
duke@2 | 559 | <a href="#bootjdk">Bootstrap JDK</a>, set |
duke@2 | 560 | <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>. |
duke@2 | 561 | </li> |
duke@2 | 562 | <li> |
duke@2 | 563 | Install the |
duke@2 | 564 | <a href="#binaryplugs">Binary Plugs</a>, set |
duke@2 | 565 | <tt><a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</a></tt>. |
duke@2 | 566 | </li> |
duke@2 | 567 | <li> |
duke@2 | 568 | Install the |
duke@2 | 569 | <a href="#studio">Sun Studio Compilers</a>, set |
duke@2 | 570 | <a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a>. |
duke@2 | 571 | </li> |
duke@2 | 572 | <li> |
duke@2 | 573 | Install the |
duke@2 | 574 | <a href="#cups">CUPS Include files</a>, set |
duke@2 | 575 | <tt><a href="#ALT_CUPS_HEADERS_PATH">ALT_CUPS_HEADERS_PATH</a></tt>. |
duke@2 | 576 | </li> |
duke@2 | 577 | </ol> |
duke@2 | 578 | </blockquote> |
duke@2 | 579 | |
duke@2 | 580 | <!-- ------------------------------------------------------ --> |
duke@2 | 581 | <hr noshade="noshade" size="3"> |
duke@2 | 582 | |
duke@2 | 583 | <h3><a name="windows">Basic Windows System Setup</a></h3> |
duke@2 | 584 | |
duke@2 | 585 | <blockquote> |
duke@2 | 586 | <p> |
duke@2 | 587 | <strong>i586 only:</strong> |
duke@2 | 588 | The minimum recommended hardware for building the 32bit or X86 |
duke@2 | 589 | Windows version is an Pentium class processor or better, at least |
duke@2 | 590 | 512 MB of RAM, and approximately 600 MB of free disk space. |
duke@2 | 591 | <strong> |
duke@2 | 592 | NOTE: The Windows 2000 build machines need to use the |
duke@2 | 593 | file system NTFS. |
duke@2 | 594 | Build machines formatted to FAT32 will not work |
duke@2 | 595 | because FAT32 doesn't support case-sensitivity in file names. |
duke@2 | 596 | </strong> |
duke@2 | 597 | <p> |
duke@2 | 598 | <strong>X64 only:</strong> |
duke@2 | 599 | The minimum recommended hardware for building |
duke@2 | 600 | the Windows X64 version is an AMD Opteron class processor, at least 1 |
duke@2 | 601 | GB of RAM, and approximately 10 GB of free disk space. |
duke@2 | 602 | </blockquote> |
duke@2 | 603 | |
duke@2 | 604 | <!-- ------------------------------------------------------ --> |
duke@2 | 605 | |
duke@2 | 606 | <h4><a name="paths">Windows Paths</a></h4> |
duke@2 | 607 | |
duke@2 | 608 | <blockquote> |
duke@2 | 609 | <p> |
duke@2 | 610 | <strong>Windows:</strong> |
duke@2 | 611 | Note that GNU make is a historic utility and is based very |
duke@2 | 612 | heavily on shell scripting, so it does not tolerate the Windows habit |
duke@2 | 613 | of having spaces in pathnames or the use of the <tt>\</tt>characters in pathnames. |
duke@2 | 614 | Luckily on most Windows systems, you can use <tt>/</tt>instead of \, and |
duke@2 | 615 | there is always a 'short' pathname without spaces for any path that |
duke@2 | 616 | contains spaces. |
duke@2 | 617 | Unfortunately, this short pathname can be somewhat dynamic and the |
duke@2 | 618 | formula is difficult to explain. |
duke@2 | 619 | You can use <tt>cygpath</tt> utility to map pathnames with spaces |
duke@2 | 620 | or the <tt>\</tt>character into the <tt>C:/</tt> style of pathname |
duke@2 | 621 | (called 'mixed'), e.g. |
duke@2 | 622 | <tt>cygpath -s -m "<i>path</i>"</tt>. |
duke@2 | 623 | <p> |
duke@2 | 624 | The makefiles will try to translate any pathnames supplied |
duke@2 | 625 | to it into the <tt>C:/</tt> style automatically. |
duke@2 | 626 | <p> |
duke@2 | 627 | Note that use of CYGWIN creates a unique problem with regards to |
duke@2 | 628 | setting <a href="#path"><tt>PATH</tt></a>. Normally on Windows |
duke@2 | 629 | the <tt>PATH</tt> variable contains directories |
duke@2 | 630 | separated with the ";" character (Solaris and Linux uses ":"). |
duke@2 | 631 | With CYGWIN, it uses ":", but that means that paths like "C:/path" |
duke@2 | 632 | cannot be placed in the CYGWIN version of <tt>PATH</tt> and |
duke@2 | 633 | instead CYGWIN uses something like <tt>/cygdrive/c/path</tt> |
duke@2 | 634 | which CYGWIN understands, but only CYGWIN understands. |
duke@2 | 635 | So be careful with paths on Windows. |
duke@2 | 636 | </blockquote> |
duke@2 | 637 | |
duke@2 | 638 | <!-- ------------------------------------------------------ --> |
duke@2 | 639 | |
duke@2 | 640 | <h4><a name="windows_checklist">Basic Windows Check List</a></h4> |
duke@2 | 641 | |
duke@2 | 642 | <blockquote> |
duke@2 | 643 | <ol> |
duke@2 | 644 | <li> |
duke@2 | 645 | Install the |
duke@2 | 646 | <a href="#cygwin">CYGWIN product</a>. |
duke@2 | 647 | </li> |
duke@2 | 648 | <li> |
duke@2 | 649 | Install the |
duke@2 | 650 | <a href="#bootjdk">Bootstrap JDK</a>, set |
duke@2 | 651 | <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>. |
duke@2 | 652 | </li> |
duke@2 | 653 | <li> |
duke@2 | 654 | Install the |
duke@2 | 655 | <a href="#binaryplugs">Binary Plugs</a>, set |
duke@2 | 656 | <tt><a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</a></tt>.. |
duke@2 | 657 | </li> |
duke@2 | 658 | <li> |
duke@2 | 659 | Install the |
duke@2 | 660 | <a href="#msvc">Microsoft Visual Studio .NET 2003 Professional</a> or the |
duke@2 | 661 | <a href="#mssdk">Microsoft Platform SDK</a>. |
duke@2 | 662 | </li> |
duke@2 | 663 | <li> |
duke@2 | 664 | Setup all environment variables for compilers |
duke@2 | 665 | (see <a href="#msvc">compilers</a>). |
duke@2 | 666 | </li> |
duke@2 | 667 | <li> |
duke@2 | 668 | Install |
duke@2 | 669 | <a href="#dxsdk">Microsoft DirectX SDK</a>. |
duke@2 | 670 | </li> |
duke@2 | 671 | </ol> |
duke@2 | 672 | </blockquote> |
duke@2 | 673 | |
duke@2 | 674 | <!-- ------------------------------------------------------ --> |
duke@2 | 675 | <hr noshade="noshade" size="3"> |
duke@2 | 676 | |
duke@2 | 677 | <h3><a name="dependencies">Build Dependencies</a></h3> |
duke@2 | 678 | |
duke@2 | 679 | <blockquote> |
duke@2 | 680 | <p> |
duke@2 | 681 | Depending on the platform, the |
duke@2 | 682 | OpenJDK |
duke@2 | 683 | build process has some basic |
duke@2 | 684 | dependencies on components not part of the |
duke@2 | 685 | OpenJDK |
duke@2 | 686 | sources. |
duke@2 | 687 | Some of these are specific to a platform, some even specific to |
duke@2 | 688 | an architecture. |
duke@2 | 689 | Each dependency will have a set of ALT variables that can be set |
duke@2 | 690 | to tell the makefiles where to locate the component. |
duke@2 | 691 | In most cases setting these ALT variables may not be necessary |
duke@2 | 692 | and the makefiles will find defaults on the system in standard |
duke@2 | 693 | install locations or through component specific variables. |
duke@2 | 694 | |
duke@2 | 695 | <h4><a name="bootjdk">Bootstrap JDK</a></h4> |
duke@2 | 696 | |
duke@2 | 697 | <blockquote> |
duke@2 | 698 | <p> |
duke@2 | 699 | All |
duke@2 | 700 | OpenJDK |
duke@2 | 701 | builds require access to the previously released |
duke@2 | 702 | JDK 6, this is often called a bootstrap JDK. |
duke@2 | 703 | The JDK 6 binaries can be downloaded from Sun's |
duke@2 | 704 | <a href="http://java.sun.com/javase/1.6.0/download.html">JDK 6 download site</a>. |
duke@2 | 705 | For build performance reasons |
duke@2 | 706 | is very important that this bootstrap JDK be made available on the |
duke@2 | 707 | local disk of the machine doing the build. |
duke@2 | 708 | You should always set |
duke@2 | 709 | <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt> |
duke@2 | 710 | to point to the location of |
duke@2 | 711 | the bootstrap JDK installation, this is the directory pathname |
duke@2 | 712 | that contains a <tt>bin, lib, and include</tt> |
duke@2 | 713 | It's also a good idea to also place its <tt>bin</tt> directory |
duke@2 | 714 | in the <tt>PATH</tt> environment variable, although it's |
duke@2 | 715 | not required. |
duke@2 | 716 | <p> |
duke@2 | 717 | <strong>Solaris:</strong> |
duke@2 | 718 | Some pre-installed JDK images may be available to you in the |
duke@2 | 719 | directory <tt>/usr/jdk/instances</tt>. |
duke@2 | 720 | If you don't set |
duke@2 | 721 | <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt> |
duke@2 | 722 | the makefiles will look in that location for a JDK it can use. |
duke@2 | 723 | </blockquote> |
duke@2 | 724 | |
duke@2 | 725 | <h4><a name="binaryplugs">Binary Plugs</a></h4> |
duke@2 | 726 | |
duke@2 | 727 | <blockquote> |
duke@2 | 728 | <p> |
duke@2 | 729 | Not all of the source code that makes up the JDK is available |
duke@2 | 730 | under an open-source license. |
duke@2 | 731 | In order to build an OpenJDK binary from source code, |
duke@2 | 732 | you must first download and install the appropriate |
duke@2 | 733 | binary plug bundles from the OpenJDK Download area. |
duke@2 | 734 | During the OpenJDK build process these "binary plugs" |
duke@2 | 735 | for the encumbered components will be copied into your |
duke@2 | 736 | resulting OpenJDK binary build image. |
duke@2 | 737 | These binary plug files are only for the purpose of |
duke@2 | 738 | building an OpenJDK binary. |
duke@2 | 739 | Download the Binary Plugs by selecting the <b>Downloads</b> |
duke@2 | 740 | link at |
duke@2 | 741 | <a href="http://openjdk.java.net/">the OpenJDK site</a>, |
duke@2 | 742 | install the bundle, |
duke@2 | 743 | and make sure you set |
duke@2 | 744 | <tt><a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</a></tt> |
duke@2 | 745 | to the root of this installation. |
duke@2 | 746 | </blockquote> |
duke@2 | 747 | |
duke@2 | 748 | <h4><a name="cacerts">Certificate Authority File (cacert)</a></h4> |
duke@2 | 749 | |
duke@2 | 750 | <blockquote> |
duke@2 | 751 | <p> |
duke@2 | 752 | See <a href="http://en.wikipedia.org/wiki/CAcert"> |
duke@2 | 753 | www.wikipedia.org/wiki/CAcert</a> |
duke@2 | 754 | for a better understanding of the Certificate Authority (CA). |
duke@2 | 755 | A certificates file named "cacerts" |
duke@2 | 756 | represents a system-wide keystore with CA certificates. |
duke@2 | 757 | In JDK and JRE |
duke@2 | 758 | binary bundles, the "cacerts" file contains root CA certificates from |
duke@2 | 759 | several public CAs (e.g., VeriSign, Thawte, and Baltimore). |
duke@2 | 760 | The source contain a cacerts file |
duke@2 | 761 | without CA root certificates. |
duke@2 | 762 | Formal JDK builders will need to secure |
duke@2 | 763 | permission from each public CA and include the certificates into their |
duke@2 | 764 | own custom cacerts file. |
duke@2 | 765 | Failure to provide a populated cacerts file |
duke@2 | 766 | will result in verification errors of a certificate chain during runtime. |
duke@2 | 767 | The variable |
duke@2 | 768 | <tt><a href="#ALT_CACERTS_FILE">ALT_CACERTS_FILE</a></tt> |
duke@2 | 769 | can be used to override the default location of the |
duke@2 | 770 | cacerts file that will get placed in your build. |
duke@2 | 771 | By default an empty cacerts file is provided and that should be |
duke@2 | 772 | fine for most JDK developers. |
duke@2 | 773 | </blockquote> |
duke@2 | 774 | |
duke@2 | 775 | <h4><a name="compilers">Compilers</a></h4> |
duke@2 | 776 | |
duke@2 | 777 | <blockquote> |
duke@2 | 778 | |
duke@2 | 779 | <a name="gcc"> |
duke@2 | 780 | <strong>Linux gcc/binutils</strong> |
duke@2 | 781 | </a> |
duke@2 | 782 | |
duke@2 | 783 | <blockquote> |
duke@2 | 784 | <p> |
duke@2 | 785 | The GNU gcc compiler version should be 3.2.2 or newer. |
duke@2 | 786 | The binutils package should be 2.11.93.0.2-11 or newer. |
duke@2 | 787 | The compiler used should be the default compiler installed |
duke@2 | 788 | in <tt>/usr/bin</tt>. |
duke@2 | 789 | </blockquote> |
duke@2 | 790 | |
duke@2 | 791 | <strong><a name="studio">Solaris: Sun Studio</a></strong> |
duke@2 | 792 | |
duke@2 | 793 | <blockquote> |
duke@2 | 794 | <p> |
duke@2 | 795 | At a minimum, the |
duke@2 | 796 | <a href="http://developers.sun.com/sunstudio/index.jsp"> |
duke@2 | 797 | Sun Studio 11 Compilers</a> |
duke@2 | 798 | (containing version 5.8 of the C and C++ compilers) is required, |
duke@2 | 799 | with patches from the |
duke@2 | 800 | <a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/patch-access"> |
duke@2 | 801 | SunSolve web site</a>. |
duke@2 | 802 | <p> |
duke@2 | 803 | Set |
duke@2 | 804 | <a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a> |
duke@2 | 805 | to point to the location of |
duke@2 | 806 | the compiler binaries, and place this location in the <tt>PATH</tt>. |
duke@2 | 807 | <p> |
duke@2 | 808 | The Sun Studio Express compilers at: |
duke@2 | 809 | <a href="http://developers.sun.com/sunstudio/downloads/express.jsp"> |
duke@2 | 810 | Sun Studio Express Download site</a> |
duke@2 | 811 | are also an option, although these compilers have not |
duke@2 | 812 | been extensively used yet. |
duke@2 | 813 | </blockquote> |
duke@2 | 814 | |
duke@2 | 815 | <a name="msvc"> |
duke@2 | 816 | <strong>Windows i586: Microsoft Visual Studio .NET 2003 Professional</strong> |
duke@2 | 817 | </a> |
duke@2 | 818 | |
duke@2 | 819 | <blockquote> |
duke@2 | 820 | <p> |
duke@2 | 821 | The 32-bit |
duke@2 | 822 | OpenJDK |
duke@2 | 823 | Windows build |
duke@2 | 824 | requires Microsoft Visual Studio .NET 2003 (VS2003) Professional |
duke@2 | 825 | Edition compiler. |
duke@2 | 826 | The compiler and other tools are expected to reside |
duke@2 | 827 | in the location defined by the variable <tt>VS71COMNTOOLS</tt> which |
duke@2 | 828 | is set by the Microsoft Visual Studio .NET installer. |
duke@2 | 829 | <p> |
duke@2 | 830 | Once the compiler is installed, |
duke@2 | 831 | it is recommended that you run <tt>VCVARS32.BAT</tt> |
duke@2 | 832 | to set the compiler environment variables |
duke@2 | 833 | <tt>MSVCDIR</tt>, |
duke@2 | 834 | <tt>INCLUDE</tt>, |
duke@2 | 835 | <tt>LIB</tt>, and |
duke@2 | 836 | <tt>PATH</tt> |
duke@2 | 837 | prior to building the |
duke@2 | 838 | OpenJDK. |
duke@2 | 839 | The above environment variables <b>MUST</b> be set. |
duke@2 | 840 | <p> |
duke@2 | 841 | The Microsoft Visual Studio .NET 2005 (VS2005) compiler |
duke@2 | 842 | will not work at this time due to the new runtime dll |
duke@2 | 843 | and the manifest requirements. |
duke@2 | 844 | </blockquote> |
duke@2 | 845 | |
duke@2 | 846 | <a name="mssdk"> |
duke@2 | 847 | <strong>Windows X64: Microsoft Platform SDK April 2005</strong> |
duke@2 | 848 | </a> |
duke@2 | 849 | |
duke@2 | 850 | <blockquote> |
duke@2 | 851 | <p> |
duke@2 | 852 | On <b>X64</b>, |
duke@2 | 853 | the Microsoft Platform Software |
duke@2 | 854 | Development Kit (SDK), April 2005 Edition compiler, is required for |
duke@2 | 855 | building the |
duke@2 | 856 | OpenJDK |
duke@2 | 857 | because it contains the C/C++ compiler. |
duke@2 | 858 | You will need to minimally install the Core SDK and |
duke@2 | 859 | the MDAC SDK features of this compiler. |
duke@2 | 860 | <p> |
duke@2 | 861 | Once the Platform SDK is installed, |
duke@2 | 862 | it is recommended that you run <tt>SetEnv.Cmd /X64</tt> |
duke@2 | 863 | to set the compiler environment variables |
duke@2 | 864 | <tt>MSSDK</tt>, |
duke@2 | 865 | <tt>MSTOOLS</tt>, |
duke@2 | 866 | <tt>INCLUDE</tt>, |
duke@2 | 867 | <tt>LIB</tt>, and |
duke@2 | 868 | <tt>PATH</tt> |
duke@2 | 869 | prior to building the |
duke@2 | 870 | OpenJDK. |
duke@2 | 871 | The above environment variables <b>MUST</b> be set. |
duke@2 | 872 | <p> |
duke@2 | 873 | Note that this compiler may say it's version is a |
duke@2 | 874 | Microsoft Visual Studio .NET 2005 (VS2005), but be careful, |
duke@2 | 875 | it will not match the official VS2005 product. |
duke@2 | 876 | This Platform SDK compiler is only used on X64 builds. |
duke@2 | 877 | </blockquote> |
duke@2 | 878 | |
duke@2 | 879 | </blockquote> |
duke@2 | 880 | |
duke@2 | 881 | <h4><a name="cups">Common UNIX Printing System (CUPS) Headers (Solaris & Linux)</a></h4> |
duke@2 | 882 | |
duke@2 | 883 | <blockquote> |
duke@2 | 884 | <p> |
duke@2 | 885 | <strong>Solaris:</strong> |
duke@2 | 886 | CUPS header files are required for building the |
duke@2 | 887 | OpenJDK on Solaris. |
duke@2 | 888 | The Solaris header files can be obtained by installing |
duke@2 | 889 | the package <strong>SFWcups</strong> from the Solaris Software |
duke@2 | 890 | Companion CD/DVD, these often will be installed into |
duke@2 | 891 | <tt>/opt/sfw/cups</tt>. |
duke@2 | 892 | <p> |
duke@2 | 893 | <strong>Linux:</strong> |
duke@2 | 894 | CUPS header files are required for building the |
duke@2 | 895 | OpenJDK on Linux. |
duke@2 | 896 | The Linux header files are usually available from a "cups" |
duke@2 | 897 | development package, it's recommended that you try and use |
duke@2 | 898 | the package provided by the particular version of Linux that |
duke@2 | 899 | you are using. |
duke@2 | 900 | <p> |
duke@2 | 901 | The CUPS header files can always be downloaded from |
duke@2 | 902 | <a href="http://www.cups.org">www.cups.org</a>. |
duke@2 | 903 | The variable |
duke@2 | 904 | <tt><a href="#ALT_CUPS_HEADERS_PATH">ALT_CUPS_HEADERS_PATH</a></tt> |
duke@2 | 905 | can be used to override the default location of the |
duke@2 | 906 | CUPS Header files. |
duke@2 | 907 | </blockquote> |
duke@2 | 908 | |
duke@2 | 909 | <h4><a name="freetype">FreeType 2</a></h4> |
duke@2 | 910 | |
duke@2 | 911 | <blockquote> |
duke@2 | 912 | <p> |
duke@2 | 913 | Version 2.3 or newer of FreeType is required for building the OpenJDK. |
duke@2 | 914 | On Unix systems required files can be available as part of your |
duke@2 | 915 | distribution (while you still may need to upgrade them). |
duke@2 | 916 | Note that you need development version of package that |
duke@2 | 917 | includes both FreeType library and header files. |
duke@2 | 918 | </p> |
duke@2 | 919 | <p> |
duke@2 | 920 | You can always download latest FreeType version from the |
duke@2 | 921 | <a href="http://www.freetype.org">FreeType website</a>. |
duke@2 | 922 | </p> |
duke@2 | 923 | <p> |
duke@2 | 924 | Makefiles will try to pick FreeType from /usr/lib and /usr/include. |
duke@2 | 925 | In case it is installed elsewhere you will need to set environment |
duke@2 | 926 | variables |
duke@2 | 927 | <tt><a href="#ALT_FREETYPE_LIB_PATH">ALT_FREETYPE_LIB_PATH</a></tt> |
duke@2 | 928 | and |
duke@2 | 929 | <tt><a href="#ALT_FREETYPE_HEADERS_PATH">ALT_FREETYPE_HEADERS_PATH</a></tt> |
duke@2 | 930 | to refer to place where library and header files are installed. |
duke@2 | 931 | </p> |
duke@2 | 932 | </blockquote> |
duke@2 | 933 | |
duke@2 | 934 | <h4><a name="alsa">Advanced Linux Sound Architecture (ALSA) (Linux only)</a></h4> |
duke@2 | 935 | |
duke@2 | 936 | <blockquote> |
duke@2 | 937 | <p> |
duke@2 | 938 | <strong>Linux only:</strong> |
duke@2 | 939 | Version 0.9.1 or newer of the ALSA files are |
duke@2 | 940 | required for building the |
duke@2 | 941 | OpenJDK on Linux. |
duke@2 | 942 | These Linux files are usually available from an "alsa" |
duke@2 | 943 | of "libasound" |
duke@2 | 944 | development package, it's recommended that you try and use |
duke@2 | 945 | the package provided by the particular version of Linux that |
duke@2 | 946 | you are using. |
duke@2 | 947 | The makefiles will check this emit a sanity error if it is |
duke@2 | 948 | missing or the wrong version. |
duke@2 | 949 | As a last resort you can go to the |
duke@2 | 950 | <a href="http://www.alsa-project.org" target="_blank"> |
duke@2 | 951 | Advanced Linux Sound Architecture Site</a>. |
duke@2 | 952 | </blockquote> |
duke@2 | 953 | |
duke@2 | 954 | <h4>Windows Specific Dependencies</h4> |
duke@2 | 955 | |
duke@2 | 956 | <blockquote> |
duke@2 | 957 | |
duke@2 | 958 | <strong>Unix Command Tools (<a name="cygwin">CYGWIN</a>)</strong> |
duke@2 | 959 | |
duke@2 | 960 | <blockquote> |
duke@2 | 961 | <p> |
duke@2 | 962 | The |
duke@2 | 963 | OpenJDK |
duke@2 | 964 | requires access to a set of unix command tools |
duke@2 | 965 | on Windows which can be supplied by |
duke@2 | 966 | <a href="http://www.cygwin.com">CYGWIN</a>. |
duke@2 | 967 | <p> |
duke@2 | 968 | The |
duke@2 | 969 | OpenJDK |
duke@2 | 970 | build |
duke@2 | 971 | requires CYGWIN version 1.5.12 or newer. |
duke@2 | 972 | Information about CYGWIN can |
duke@2 | 973 | be obtained from the CYGWIN website at |
duke@2 | 974 | <a href="http://www.cygwin.com">www.cygwin.com</a>. |
duke@2 | 975 | <p> |
duke@2 | 976 | By default CYGWIN doesn't install all the tools required for building |
duke@2 | 977 | the OpenJDK. |
duke@2 | 978 | Along with the default installation, you need to install |
duke@2 | 979 | the following tools. |
duke@2 | 980 | <blockquote> |
duke@2 | 981 | <table border="1"> |
duke@2 | 982 | <thead> |
duke@2 | 983 | <tr> |
duke@2 | 984 | <td>Binary Name</td> |
duke@2 | 985 | <td>Package</td> |
duke@2 | 986 | <td>Description</td> |
duke@2 | 987 | </tr> |
duke@2 | 988 | </thead> |
duke@2 | 989 | <tbody> |
duke@2 | 990 | <tr> |
duke@2 | 991 | <td>ar.exe</td> |
duke@2 | 992 | <td>Devel</td> |
duke@2 | 993 | <td>binutils: The GNU assembler, linker and binary |
duke@2 | 994 | utilities</td> |
duke@2 | 995 | </tr> |
duke@2 | 996 | <tr> |
duke@2 | 997 | <td>make.exe</td> |
duke@2 | 998 | <td>Devel</td> |
duke@2 | 999 | <td>make: The GNU version of the 'make' utility</td> |
duke@2 | 1000 | </tr> |
duke@2 | 1001 | <tr> |
duke@2 | 1002 | <td>m4.exe</td> |
duke@2 | 1003 | <td>Interpreters</td> |
duke@2 | 1004 | <td>m4: GNU implementation of the traditional Unix macro |
duke@2 | 1005 | processor</td> |
duke@2 | 1006 | </tr> |
duke@2 | 1007 | <tr> |
duke@2 | 1008 | <td>cpio.exe</td> |
duke@2 | 1009 | <td>Utils</td> |
duke@2 | 1010 | <td>cpio: A program to manage archives of files</td> |
duke@2 | 1011 | </tr> |
duke@2 | 1012 | <tr> |
duke@2 | 1013 | <td>file.exe</td> |
duke@2 | 1014 | <td>Utils</td> |
duke@2 | 1015 | <td>file: Determines file type using 'magic' numbers</td> |
duke@2 | 1016 | </tr> |
duke@2 | 1017 | </tbody> |
duke@2 | 1018 | </table> |
duke@2 | 1019 | </blockquote> |
duke@2 | 1020 | </blockquote> |
duke@2 | 1021 | |
duke@2 | 1022 | <a name="dxsdk"> |
duke@2 | 1023 | <strong>Microsoft DirectX 9.0 SDK header files and libraries</strong> |
duke@2 | 1024 | </a> |
duke@2 | 1025 | |
duke@2 | 1026 | <blockquote> |
duke@2 | 1027 | <p> |
duke@2 | 1028 | Microsoft DirectX 9.0 SDK (Summer 2004) |
duke@2 | 1029 | headers are required for building |
duke@2 | 1030 | OpenJDK. |
duke@2 | 1031 | This SDK can be downloaded from |
duke@2 | 1032 | <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=FD044A42-9912-42A3-9A9E-D857199F888E&displaylang=en"> |
duke@2 | 1033 | Microsoft DirectX 9.0 SDK (Summer 2004)</a>. |
duke@2 | 1034 | If the link above becomes obsolete, the SDK can be found from |
duke@2 | 1035 | <a href="http://download.microsoft.com">the Microsoft Download Site</a> |
duke@2 | 1036 | (search with "DirectX 9.0 SDK Update Summer 2004"). |
duke@2 | 1037 | The location of this SDK can be set with |
duke@2 | 1038 | <tt><a href="#ALT_DXSDK_PATH">ALT_DXSDK_PATH</a></tt> |
duke@2 | 1039 | but it's normally found via the DirectX environment variable |
duke@2 | 1040 | <tt>DXSDK_DIR</tt>. |
duke@2 | 1041 | </blockquote> |
duke@2 | 1042 | |
duke@2 | 1043 | <a name="msvcrt"> |
duke@2 | 1044 | <strong><tt>MSVCRT.DLL</tt></strong> |
duke@2 | 1045 | </a> |
duke@2 | 1046 | |
duke@2 | 1047 | <blockquote> |
duke@2 | 1048 | <p> |
duke@2 | 1049 | <strong>i586 only:</strong> |
duke@2 | 1050 | The |
duke@2 | 1051 | OpenJDK |
duke@2 | 1052 | 32bit build requires |
duke@2 | 1053 | access to <tt>MSVCRT.DLL</tt> |
duke@2 | 1054 | version 6.00.8337.0 or newer. |
duke@2 | 1055 | If the <tt>MSVCRT.DLL</tt> is not installed in |
duke@2 | 1056 | the system32 directory set the |
duke@2 | 1057 | <a href="#ALT_MSVCRT_DLL_PATH"><tt>ALT_MSVCRT_DLL_PATH</tt></a> |
duke@2 | 1058 | variable to the location. |
duke@2 | 1059 | <p> |
duke@2 | 1060 | <strong>X64 only:</strong> |
duke@2 | 1061 | The OpenJDK 64bit build requires access to |
duke@2 | 1062 | <tt>MSVCRT.DLL</tt> version 7.0.3790.0 or newer, which is |
duke@2 | 1063 | usually supplied by the |
duke@2 | 1064 | <a href="#mssdk">Platform SDK</a>. |
duke@2 | 1065 | If it is not available from the Platform SDK, |
duke@2 | 1066 | set the |
duke@2 | 1067 | <a href="#ALT_MSVCRT_DLL_PATH"><tt>ALT_MSVCRT_DLL_PATH</tt></a> |
duke@2 | 1068 | variable to the location. |
duke@2 | 1069 | </blockquote> |
duke@2 | 1070 | |
duke@2 | 1071 | <a name="msvcr71"> |
duke@2 | 1072 | <strong><tt>MSVCR71.DLL</tt></strong> |
duke@2 | 1073 | </a> |
duke@2 | 1074 | |
duke@2 | 1075 | <blockquote> |
duke@2 | 1076 | <p> |
duke@2 | 1077 | <strong>i586 only:</strong> |
duke@2 | 1078 | The |
duke@2 | 1079 | OpenJDK |
duke@2 | 1080 | build requires access to |
duke@2 | 1081 | MSVCR71.DLL version 7.10.3052.4 or newer which should be |
duke@2 | 1082 | supplied by the |
duke@2 | 1083 | <a href="#msvc">Visual Studio product</a> |
duke@2 | 1084 | If the <tt>MSVCR71.DLL</tt> is not available from the |
duke@2 | 1085 | Visual Studio product |
duke@2 | 1086 | set the |
duke@2 | 1087 | <a href="#ALT_MSVCR71_DLL_PATH"><tt>ALT_MSVCR71_DLL_PATH</tt></a> |
duke@2 | 1088 | variable to the location. |
duke@2 | 1089 | </blockquote> |
duke@2 | 1090 | |
duke@2 | 1091 | </blockquote> |
duke@2 | 1092 | |
duke@2 | 1093 | |
duke@2 | 1094 | </blockquote> |
duke@2 | 1095 | |
duke@2 | 1096 | |
duke@2 | 1097 | <hr noshade="noshade" size="3"> |
duke@2 | 1098 | |
duke@2 | 1099 | <h2><a name="creating">Creating the Build</a></h2> |
duke@2 | 1100 | |
duke@2 | 1101 | <blockquote> |
duke@2 | 1102 | <p> |
duke@2 | 1103 | Once a machine is setup to build the |
duke@2 | 1104 | OpenJDK, |
duke@2 | 1105 | the steps to create the |
duke@2 | 1106 | build are fairly simple. |
duke@2 | 1107 | The various ALT settings can either be made into variables |
duke@2 | 1108 | or can be supplied on the |
duke@2 | 1109 | <a href="#gmake"><tt><i>gmake</i></tt></a> |
duke@2 | 1110 | command. |
duke@2 | 1111 | <p> |
duke@2 | 1112 | <ol> |
duke@2 | 1113 | <li>Use the sanity rule to double check all the ALT settings: |
duke@2 | 1114 | <blockquote> |
duke@2 | 1115 | <tt> |
duke@2 | 1116 | <i>gmake</i> |
duke@2 | 1117 | sanity |
duke@2 | 1118 | [ARCH_DATA_MODEL=<i>32 or 64</i>] |
duke@2 | 1119 | [other "ALT_" overrides] |
duke@2 | 1120 | </tt> |
duke@2 | 1121 | </blockquote> |
duke@2 | 1122 | </li> |
duke@2 | 1123 | <li>Start the build with the command: |
duke@2 | 1124 | <blockquote> |
duke@2 | 1125 | <tt> |
duke@2 | 1126 | <i>gmake</i> |
duke@2 | 1127 | [ARCH_DATA_MODEL=<i>32 or 64</i>] |
duke@2 | 1128 | [ALT_OUTPUTDIR=<i>output_directory</i>] |
duke@2 | 1129 | [other "ALT_" overrides] |
duke@2 | 1130 | </tt> |
duke@2 | 1131 | </blockquote> |
duke@2 | 1132 | </li> |
duke@2 | 1133 | </ol> |
duke@2 | 1134 | <p> |
duke@2 | 1135 | <strong>Solaris:</strong> |
duke@2 | 1136 | Note that ARCH_DATA_MODEL is really only needed on Solaris to |
duke@2 | 1137 | indicate you want to built the 64-bit version. |
duke@2 | 1138 | And before the Solaris 64-bit binaries can be used, they |
duke@2 | 1139 | must be merged with the binaries from a separate 32-bit build. |
duke@2 | 1140 | The merged binaries may then be used in either 32-bit or 64-bit mode, with |
duke@2 | 1141 | the selection occurring at runtime |
duke@2 | 1142 | with the <tt>-d32</tt> or <tt>-d64</tt> options. |
duke@2 | 1143 | </blockquote> |
duke@2 | 1144 | |
duke@2 | 1145 | <!-- ------------------------------------------------------ --> |
duke@2 | 1146 | <hr noshade="noshade" size="3"> |
duke@2 | 1147 | |
duke@2 | 1148 | <h2><a name="testing">Testing the Build</a></h2> |
duke@2 | 1149 | |
duke@2 | 1150 | <blockquote> |
duke@2 | 1151 | <p> |
duke@2 | 1152 | When the build is completed, you should see the generated |
duke@2 | 1153 | binaries and associated files in the <tt>j2sdk-image</tt> |
duke@2 | 1154 | directory in the output directory. |
duke@2 | 1155 | The default output directory is |
duke@2 | 1156 | <tt>build/<i>platform</i></tt>, |
duke@2 | 1157 | where <tt><i>platform</i></tt> is one of |
duke@2 | 1158 | <tt><ul> |
duke@2 | 1159 | <li>solaris-sparc</li> |
duke@2 | 1160 | <li>solaris-sparcv9</li> |
duke@2 | 1161 | <li>solaris-i586</li> |
duke@2 | 1162 | <li>solaris-amd64</li> |
duke@2 | 1163 | <li>linux-i586</li> |
duke@2 | 1164 | <li>linux-amd64</li> |
duke@2 | 1165 | <li>windows-i586</li> |
duke@2 | 1166 | <li>windows-amd64</li> |
duke@2 | 1167 | </ul></tt> |
duke@2 | 1168 | In particular, the |
duke@2 | 1169 | <tt>build/<i>platform</i>/j2sdk-image/bin</tt> |
duke@2 | 1170 | directory should contain executables for the |
duke@2 | 1171 | OpenJDK |
duke@2 | 1172 | tools and utilities. |
duke@2 | 1173 | <p> |
duke@2 | 1174 | You can test that the build completed properly by using the build |
duke@2 | 1175 | to run the various demos that you will find in the |
duke@2 | 1176 | <tt>build/<i>platform</i>/j2sdk-image/demo</tt> |
duke@2 | 1177 | directory. |
duke@2 | 1178 | <p> |
duke@2 | 1179 | The provided regression tests can be run with the <tt>jtreg</tt> |
duke@2 | 1180 | utility from |
duke@2 | 1181 | <a href="http://openjdk.java.net/jtreg/">the jtreg site</a>. |
duke@2 | 1182 | </blockquote> |
duke@2 | 1183 | |
duke@2 | 1184 | <!-- ------------------------------------------------------ --> |
duke@2 | 1185 | <hr noshade="noshade" size="3"> |
duke@2 | 1186 | |
duke@2 | 1187 | <h2><a name="variables">Environment/Make Variables</a></h2> |
duke@2 | 1188 | |
duke@2 | 1189 | <p> |
duke@2 | 1190 | Some of the |
duke@2 | 1191 | environment or make variables (just called <b>variables</b> in this |
duke@2 | 1192 | document) that can impact the build are: |
duke@2 | 1193 | |
duke@2 | 1194 | <blockquote> |
duke@2 | 1195 | |
duke@2 | 1196 | <dl> |
duke@2 | 1197 | |
duke@2 | 1198 | <dt><a name="path"><tt>PATH</tt></a> </dt> |
duke@2 | 1199 | <dd>Typically you want to set the <tt>PATH</tt> to include: |
duke@2 | 1200 | <ul> |
duke@2 | 1201 | <li>The location of the GNU make binary</li> |
duke@2 | 1202 | <li>The location of the JDK 6 <tt>java</tt> |
duke@2 | 1203 | (see <a href="#bootjdk">Bootstrap JDK</a>)</li> |
duke@2 | 1204 | <li>The location of the C/C++ compilers |
duke@2 | 1205 | (see <a href="#compilers"><tt>compilers</tt></a>)</li> |
duke@2 | 1206 | <li>The location or locations for the Unix command utilities |
duke@2 | 1207 | (e.g. <tt>/usr/bin</tt>)</li> |
duke@2 | 1208 | </ul> |
duke@2 | 1209 | </dd> |
duke@2 | 1210 | |
duke@2 | 1211 | <dt><a name="arch_data_model"><tt>ARCH_DATA_MODEL</tt></a></dt> |
duke@2 | 1212 | <dd>The <tt>ARCH_DATA_MODEL</tt> variable |
duke@2 | 1213 | is used to specify whether the build is to generate 32-bit or 64-bit |
duke@2 | 1214 | binaries. |
duke@2 | 1215 | The Solaris build supports either 32-bit or 64-bit builds, but |
duke@2 | 1216 | Windows and Linux will support only one, depending on the specific |
duke@2 | 1217 | OS being used. |
duke@2 | 1218 | Normally, setting this variable is only necessary on Solaris. |
duke@2 | 1219 | Set <tt>ARCH_DATA_MODEL</tt> to <tt>32</tt> for generating 32-bit binaries, |
duke@2 | 1220 | or to <tt>64</tt> for generating 64-bit binaries. |
duke@2 | 1221 | </dd> |
duke@2 | 1222 | |
duke@2 | 1223 | <dt><a name="ALT_BOOTDIR"><tt>ALT_BOOTDIR</tt></a></dt> |
duke@2 | 1224 | <dd> |
duke@2 | 1225 | The location of the bootstrap JDK installation. |
duke@2 | 1226 | See <a href="#bootjdk">Bootstrap JDK</a> for more information. |
duke@2 | 1227 | You should always install your own local Bootstrap JDK and |
duke@2 | 1228 | always set <tt>ALT_BOOTDIR</tt> explicitly. |
duke@2 | 1229 | </dd> |
duke@2 | 1230 | |
duke@2 | 1231 | <dt><a name="ALT_OUTPUTDIR"><tt>ALT_OUTPUTDIR</tt></a> </dt> |
duke@2 | 1232 | <dd> |
duke@2 | 1233 | An override for specifying the (absolute) path of where the |
duke@2 | 1234 | build output is to go. |
duke@2 | 1235 | The default output directory will be build/<i>platform</i>. |
duke@2 | 1236 | </dd> |
duke@2 | 1237 | |
duke@2 | 1238 | <dt><a name="ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a> </dt> |
duke@2 | 1239 | <dd> |
duke@2 | 1240 | The location of the C/C++ compiler. |
duke@2 | 1241 | The default varies depending on the platform. |
duke@2 | 1242 | </dd> |
duke@2 | 1243 | |
duke@2 | 1244 | <dt><tt><a name="ALT_CACERTS_FILE">ALT_CACERTS_FILE</a></tt></dt> |
duke@2 | 1245 | <dd> |
duke@2 | 1246 | The location of the <a href="#cacerts">cacerts</a> file. |
duke@2 | 1247 | The default will refer to |
duke@2 | 1248 | <tt>jdk/src/share/lib/security/cacerts</tt>. |
duke@2 | 1249 | </dd> |
duke@2 | 1250 | |
duke@2 | 1251 | <dt><a name="ALT_BINARY_PLUGS_PATH"><tt>ALT_BINARY_PLUGS_PATH</tt></a></dt> |
duke@2 | 1252 | <dd> |
duke@2 | 1253 | The location of the binary plugs installation. |
duke@2 | 1254 | See <a href="#binaryplugs">Binary Plugs</a> for more information. |
duke@2 | 1255 | You should always have a local copy of a |
duke@2 | 1256 | recent Binary Plugs install image |
duke@2 | 1257 | and set this variable to that location. |
duke@2 | 1258 | </dd> |
duke@2 | 1259 | |
duke@2 | 1260 | <dt><a name="ALT_CUPS_HEADERS_PATH"><tt>ALT_CUPS_HEADERS_PATH</tt></a> </dt> |
duke@2 | 1261 | <dd> |
duke@2 | 1262 | The location of the CUPS header files. |
duke@2 | 1263 | See <a href="#cups">CUPS information</a> for more information. |
duke@2 | 1264 | If this path does not exist the fallback path is |
duke@2 | 1265 | <tt>/usr/include</tt>. |
duke@2 | 1266 | </dd> |
duke@2 | 1267 | |
duke@2 | 1268 | |
duke@2 | 1269 | <dt><a name="ALT_FREETYPE_LIB_PATH"><tt>ALT_FREETYPE_LIB_PATH</tt></a></dt> |
duke@2 | 1270 | <dd> |
duke@2 | 1271 | The location of the FreeType shared library. |
duke@2 | 1272 | See <a href="#freetype">FreeType information</a> for details. |
duke@2 | 1273 | </dd> |
duke@2 | 1274 | |
duke@2 | 1275 | <dt><a name="ALT_FREETYPE_HEADERS_PATH"><tt>ALT_FREETYPE_HEADERS_PATH</tt></a></dt> |
duke@2 | 1276 | <dd> |
duke@2 | 1277 | The location of the FreeType header files. |
duke@2 | 1278 | See <a href="#freetype">FreeType information</a> for details. |
duke@2 | 1279 | </dd> |
duke@2 | 1280 | |
duke@2 | 1281 | <dt><strong>Windows specific:</strong></dt> |
duke@2 | 1282 | <dd> |
duke@2 | 1283 | <dl> |
duke@2 | 1284 | <dt><a name="ALT_MSDEVTOOLS_PATH"><tt>ALT_MSDEVTOOLS_PATH</tt></a> </dt> |
duke@2 | 1285 | <dd> |
duke@2 | 1286 | The location of the Microsoft Visual Studio .NET 2003 |
duke@2 | 1287 | tools 'bin' directory. |
duke@2 | 1288 | The default is usually derived from |
duke@2 | 1289 | <a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a>. |
duke@2 | 1290 | </dd> |
duke@2 | 1291 | |
duke@2 | 1292 | <dt><tt><a name="ALT_DXSDK_PATH">ALT_DXSDK_PATH</a></tt> </dt> |
duke@2 | 1293 | <dd> |
duke@2 | 1294 | The location of the |
duke@2 | 1295 | <a href="#dxsdk">Microsoft DirectX 9 SDK</a>. |
duke@2 | 1296 | The default will be to try and use the DirectX environment |
duke@2 | 1297 | variable <tt>DXSDK_DIR</tt>, |
duke@2 | 1298 | failing that, look in <tt>C:/DXSDK</tt>. |
duke@2 | 1299 | </dd> |
duke@2 | 1300 | |
duke@2 | 1301 | <dt><tt><a name="ALT_MSVCRT_DLL_PATH">ALT_MSVCRT_DLL_PATH</a></tt> </dt> |
duke@2 | 1302 | <dd> |
duke@2 | 1303 | The location of the |
duke@2 | 1304 | <a href="#msvcrt"><tt>MSVCRT.DLL</tt></a>. |
duke@2 | 1305 | </dd> |
duke@2 | 1306 | |
duke@2 | 1307 | <dt><tt><a name="ALT_MSVCR71_DLL_PATH">ALT_MSVCR71_DLL_PATH</a></tt> </dt> |
duke@2 | 1308 | <dd> |
duke@2 | 1309 | <strong>i586 only:</strong> |
duke@2 | 1310 | The location of the |
duke@2 | 1311 | <a href="#msvcr71"><tt>MSVCR71.DLL</tt></a>. |
duke@2 | 1312 | </dd> |
duke@2 | 1313 | </dl> |
duke@2 | 1314 | </dd> |
duke@2 | 1315 | |
duke@2 | 1316 | </dl> |
duke@2 | 1317 | </blockquote> |
duke@2 | 1318 | |
duke@2 | 1319 | <!-- ------------------------------------------------------ --> |
duke@2 | 1320 | <hr noshade="noshade" size="3"> |
duke@2 | 1321 | |
duke@2 | 1322 | <h2><a name="troubleshooting">Troubleshooting</a></h2> |
duke@2 | 1323 | |
duke@2 | 1324 | <blockquote> |
duke@2 | 1325 | <p> |
duke@2 | 1326 | A build can fail for any number of reasons. |
duke@2 | 1327 | Most failures |
duke@2 | 1328 | are a result of trying to build in an environment in which all the |
duke@2 | 1329 | pre-build requirements have not been met. |
duke@2 | 1330 | The first step in |
duke@2 | 1331 | troubleshooting a build failure is to recheck that you have satisfied |
duke@2 | 1332 | all the pre-build requirements for your platform. |
duke@2 | 1333 | Look for the check list of the platform you are building on in the |
duke@2 | 1334 | <a href="#contents">Table of Contents</a>. |
duke@2 | 1335 | |
duke@2 | 1336 | <p> |
duke@2 | 1337 | You can validate your build environment by using the <tt>sanity</tt> |
duke@2 | 1338 | target. |
duke@2 | 1339 | Any errors listed |
duke@2 | 1340 | will stop the build from starting, and any warnings may result in |
duke@2 | 1341 | a flawed product build. |
duke@2 | 1342 | We strongly encourage you to evaluate every |
duke@2 | 1343 | sanity check warning and fix it if required, before you proceed |
duke@2 | 1344 | further with your build. |
duke@2 | 1345 | |
duke@2 | 1346 | <p> |
duke@2 | 1347 | Some of the more common problems with builds are briefly described |
duke@2 | 1348 | below, with suggestions for remedies. |
duke@2 | 1349 | |
duke@2 | 1350 | <ul> |
duke@2 | 1351 | <li> |
duke@2 | 1352 | <b>Slow Builds:</b> |
duke@2 | 1353 | <blockquote> |
duke@2 | 1354 | <p> |
duke@2 | 1355 | If your build machine seems to be overloaded from too many |
duke@2 | 1356 | simultaneous C++ compiles, try setting the <tt>HOTSPOT_BUILD_JOBS</tt> |
duke@2 | 1357 | variable to <tt>1</tt> (if you're using a multiple CPU |
duke@2 | 1358 | machine, setting it to more than the the number of CPUs is probably |
duke@2 | 1359 | not a good idea). |
duke@2 | 1360 | <p> |
duke@2 | 1361 | Creating the javadocs can be very slow, if you are running |
duke@2 | 1362 | javadoc, consider skipping that step. |
duke@2 | 1363 | <p> |
duke@2 | 1364 | Faster hardware and more RAM always helps too. |
duke@2 | 1365 | The VM build tends to be CPU intensive (many C++ compiles), |
duke@2 | 1366 | and the rest of the JDK will often be disk intensive. |
duke@2 | 1367 | <p> |
duke@2 | 1368 | Faster compiles are possible using a tool called |
duke@2 | 1369 | <a href="http://ccache.samba.org/">ccache</a>. |
duke@2 | 1370 | </blockquote> |
duke@2 | 1371 | </li> |
duke@2 | 1372 | <li> |
duke@2 | 1373 | <b>File time issues:</b> |
duke@2 | 1374 | <blockquote> |
duke@2 | 1375 | <p> |
duke@2 | 1376 | If you see warnings that refer to file time stamps, e.g. |
duke@2 | 1377 | <blockquote> |
duke@2 | 1378 | <i>Warning message:</i><tt> File `xxx' has modification time in |
duke@2 | 1379 | the future.</tt> |
duke@2 | 1380 | <br> |
duke@2 | 1381 | <i>Warning message:</i> <tt> Clock skew detected. Your build may |
duke@2 | 1382 | be incomplete.</tt> |
duke@2 | 1383 | </blockquote> |
duke@2 | 1384 | <p> |
duke@2 | 1385 | These warnings can occur when the clock on the build machine is out of |
duke@2 | 1386 | sync with the timestamps on the source files. Other errors, apparently |
duke@2 | 1387 | unrelated but in fact caused by the clock skew, can occur along with |
duke@2 | 1388 | the clock skew warnings. These secondary errors may tend to obscure the |
duke@2 | 1389 | fact that the true root cause of the problem is an out-of-sync clock. |
duke@2 | 1390 | For example, an out-of-sync clock has been known to cause an old |
duke@2 | 1391 | version of javac to be used to compile some files, resulting in errors |
duke@2 | 1392 | when the pre-1.4 compiler ran across the new <tt>assert</tt> keyword |
duke@2 | 1393 | in the 1.4 source code. |
duke@2 | 1394 | <p> |
duke@2 | 1395 | If you see these warnings, reset the clock on the build |
duke@2 | 1396 | machine, run "<tt><i>gmake</i> clobber</tt>" or delete the directory |
duke@2 | 1397 | containing the build output, and restart the build from the beginning. |
duke@2 | 1398 | </blockquote> |
duke@2 | 1399 | </li> |
duke@2 | 1400 | <li> |
duke@2 | 1401 | <b>Error message: <tt>Trouble writing out table to disk</tt></b> |
duke@2 | 1402 | <blockquote> |
duke@2 | 1403 | <p> |
duke@2 | 1404 | Increase the amount of swap space on your build machine. |
duke@2 | 1405 | </blockquote> |
duke@2 | 1406 | </li> |
duke@2 | 1407 | <li> |
duke@2 | 1408 | <b>Error Message: <tt>libstdc++ not found:</tt></b> |
duke@2 | 1409 | <blockquote> |
duke@2 | 1410 | This is caused by a missing libstdc++.a library. |
duke@2 | 1411 | This is installed as part of a specific package |
duke@2 | 1412 | (e.g. libstdc++.so.devel.386). |
duke@2 | 1413 | By default some 64bit Linux versions (e.g. Fedora) |
duke@2 | 1414 | only install the 64bit version of the libstdc++ package. |
duke@2 | 1415 | Various parts of the JDK build require a static |
duke@2 | 1416 | link of the C++ runtime libraries to allow for maximum |
duke@2 | 1417 | portability of the built images. |
duke@2 | 1418 | </blockquote> |
duke@2 | 1419 | </li> |
duke@2 | 1420 | <li> |
duke@2 | 1421 | <b>Error Message: <tt>cannot restore segment prot after reloc</tt></b> |
duke@2 | 1422 | <blockquote> |
duke@2 | 1423 | This is probably an issue with SELinux (See |
duke@2 | 1424 | <a href="http://en.wikipedia.org/wiki/SELinux">http://en.wikipedia.org/wiki/SELinux</a>). |
duke@2 | 1425 | Parts of the VM is built without the <tt>-fPIC</tt> for |
duke@2 | 1426 | performance reasons. |
duke@2 | 1427 | <p> |
duke@2 | 1428 | To completely disable SELinux: |
duke@2 | 1429 | <ol><tt> |
duke@2 | 1430 | |
duke@2 | 1431 | <li>$ su root</li> |
duke@2 | 1432 | <li># system-config-securitylevel</li> |
duke@2 | 1433 | <li>In the window that appears, select the SELinux tab</li> |
duke@2 | 1434 | <li>Disable SELinux</li> |
duke@2 | 1435 | </ol></tt> |
duke@2 | 1436 | <p> |
duke@2 | 1437 | Alternatively, instead of completely disabling it you could |
duke@2 | 1438 | disable just this one check. |
duke@2 | 1439 | <ol><tt> |
duke@2 | 1440 | <li>Select System->Administration->SELinux Management</li> |
duke@2 | 1441 | <li>In the SELinux Management Tool which appears, |
duke@2 | 1442 | select "Boolean" from the menu on the left</li> |
duke@2 | 1443 | <li>Expand the "Memory Protection" group</li> |
duke@2 | 1444 | <li>Check the first item, labeled |
duke@2 | 1445 | "Allow all unconfined executables to use libraries requiring text relocation ..."</li> |
duke@2 | 1446 | </ol></tt> |
duke@2 | 1447 | </blockquote> |
duke@2 | 1448 | </li> |
duke@2 | 1449 | </ul> |
duke@2 | 1450 | </blockquote> |
duke@2 | 1451 | |
duke@2 | 1452 | <hr noshade="noshade" size="3"> |