README-builds.html

Wed, 09 Jul 2008 15:42:00 -0700

author
ohair
date
Wed, 09 Jul 2008 15:42:00 -0700
changeset 25
8a275f439862
parent 13
0f440f3321f5
child 31
746ca6b12c56
permissions
-rw-r--r--

6704966: OpenJDK README needs additional info on how to build freetype
6704968: OpenJDK Build README is missing ant requirement
6704973: OpenJDK Build readme needs cygwin package list improvements
6590549: Cygwin build of OpenJDK has problems and not very well documented
6462815: cygwin's gnumake 3.81-1 does not support MS-DOS path names
6597857: JDK build instructions need to be updated (BUILD_JDK_IMPORT_PATH, BUILD_BINARY_PLUGS_PATH)
Reviewed-by: jjg, igor

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

mercurial