README-builds.html

Fri, 05 Dec 2008 17:18:04 -0800

author
ohair
date
Fri, 05 Dec 2008 17:18:04 -0800
changeset 51
60aab86966e9
parent 49
541bdc5ad32f
child 74
caba6a812b19
permissions
-rw-r--r--

6781784: Fix ant link in build readme
Reviewed-by: michaelm

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

mercurial