README-builds.html

Wed, 17 Sep 2008 13:45:14 -0700

author
xdono
date
Wed, 17 Sep 2008 13:45:14 -0700
changeset 42
4b4f5fea8d7d
parent 41
1d9112b073d7
parent 37
52148b82cfff
child 49
541bdc5ad32f
permissions
-rw-r--r--

Merge

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

mercurial