0N/A<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
0N/A<html>
11N/A <head>
11N/A <title>OpenJDK Build README</title>
11N/A </head>
11N/A <body style="background-color:lightcyan">
11N/A <!-- ====================================================== -->
39N/A <table width="100%">
11N/A <tr>
11N/A <td align="center">
23N/A <img alt="OpenJDK"
23N/A src="http://openjdk.java.net/images/openjdk.png"
23N/A width=256 />
11N/A </td>
11N/A </tr>
11N/A <tr>
11N/A <td align=center>
11N/A <h1>OpenJDK Build README</h1>
11N/A </td>
11N/A </tr>
0N/A </table>
11N/A <!-- ------------------------------------------------------ -->
11N/A <hr>
11N/A <h2><a name="introduction">Introduction</a></h2>
11N/A <blockquote>
11N/A <p>
274N/A This README file contains build instructions for the
274N/A <a href="http://openjdk.java.net" target="_blank">OpenJDK</a>.
274N/A Building the source code for the
274N/A OpenJDK
274N/A requires
274N/A a certain degree of technical expertise.
11N/A </blockquote>
11N/A <!-- ------------------------------------------------------ -->
11N/A <hr>
11N/A <h2><a name="contents">Contents</a></h2>
11N/A <blockquote>
0N/A <ul>
11N/A <li><a href="#introduction">Introduction</a></li>
274N/A <li><a href="#hg">Use of Mercurial</a>
274N/A <ul>
274N/A <li><a href="#get_source">Getting the Source</a></li>
274N/A </ul>
274N/A </li>
11N/A <li><a href="#MBE">Minimum Build Environments</a></li>
130N/A <li><a href="#SDBE">Specific Developer Build Environments</a>
39N/A <ul>
39N/A <li><a href="#fedora">Fedora Linux</a> </li>
39N/A <li><a href="#centos">CentOS Linux</a> </li>
274N/A <li><a href="#debian">Debian GNU/Linux</a></li>
274N/A <li><a href="#ubuntu">Ubuntu Linux</a> </li>
274N/A <li><a href="#opensuse">OpenSUSE</a></li>
274N/A <li><a href="#mandriva">Mandriva</a></li>
274N/A <li><a href="#opensolaris">OpenSolaris</a></li>
39N/A </ul>
274N/A </li>
318N/A <li><a href="#directories">Source Directory Structure</a>
318N/A <ul>
318N/A <li><a href="#drops">Managing the Source Drops</a></li>
318N/A </ul>
318N/A </li>
11N/A <li><a href="#building">Build Information</a>
11N/A <ul>
11N/A <li><a href="#gmake">GNU Make (<tt><i>gmake</i></tt>)</a> </li>
11N/A <li><a href="#linux">Basic Linux System Setup</a> </li>
11N/A <li><a href="#solaris">Basic Solaris System Setup</a> </li>
11N/A <li><a href="#windows">Basic Windows System Setup</a> </li>
450N/A <li><a href="#macosx">Basic Mac OS X System Setup</a></li>
274N/A <li><a href="#dependencies">Build Dependencies</a>
274N/A <ul>
274N/A <li><a href="#bootjdk">Bootstrap JDK</a> </li>
274N/A <li><a href="#importjdk">Optional Import JDK</a> </li>
318N/A <li><a href="#ant">Ant 1.7.1</a> </li>
274N/A <li><a href="#cacerts">Certificate Authority File (cacert)</a> </li>
274N/A <li><a href="#compilers">Compilers</a>
274N/A <ul>
274N/A <li><a href="#msvc32">Microsoft Visual Studio Professional/Express for 32 bit</a> </li>
274N/A <li><a href="#msvc64">Microsoft Visual Studio Professional for 64 bit</a> </li>
274N/A <li><a href="#mssdk64">Microsoft Windows SDK for 64 bit</a> </li>
274N/A <li><a href="#gcc">Linux gcc/binutils</a> </li>
274N/A <li><a href="#studio">Sun Studio</a> </li>
274N/A </ul>
274N/A </li>
274N/A <li><a href="#zip">Zip and Unzip</a> </li>
274N/A <li><a href="#freetype">FreeType2 Fonts</a> </li>
274N/A <li>Linux and Solaris:
274N/A <ul>
274N/A <li><a href="#cups">CUPS Include files</a> </li>
274N/A <li><a href="#xrender">XRender Include files</a></li>
274N/A </ul>
274N/A </li>
274N/A <li>Linux only:
274N/A <ul>
274N/A <li><a href="#alsa">ALSA files</a> </li>
274N/A </ul>
274N/A </li>
274N/A <li>Windows only:
274N/A <ul>
274N/A <li>Unix Command Tools (<a href="#cygwin">CYGWIN</a>)</li>
274N/A <li><a href="#dxsdk">DirectX 9.0 SDK</a> </li>
274N/A </ul>
274N/A </li>
274N/A </ul>
274N/A </li>
11N/A </ul>
11N/A </li>
11N/A <li><a href="#creating">Creating the Build</a> </li>
11N/A <li><a href="#testing">Testing the Build</a> </li>
11N/A <li><a href="#variables">Environment/Make Variables</a></li>
11N/A <li><a href="#troubleshooting">Troubleshooting</a></li>
0N/A </ul>
11N/A </blockquote>
274N/A
274N/A <!-- ------------------------------------------------------ -->
274N/A <hr>
274N/A <h2><a name="hg">Use of Mercurial</a></h2>
274N/A <blockquote>
274N/A The OpenJDK sources are maintained with the revision control system
274N/A <a href="http://mercurial.selenic.com/wiki/Mercurial">Mercurial</a>.
274N/A If you are new to Mercurial, please see the
274N/A <a href="http://mercurial.selenic.com/wiki/BeginnersGuides">Beginner Guides</a>
318N/A or refer to the <a href="http://hgbook.red-bean.com/">Mercurial Book</a>.
274N/A The first few chapters of the book provide an excellent overview of
274N/A Mercurial, what it is and how it works.
274N/A <br>
274N/A For using Mercurial with the OpenJDK refer to the
318N/A <a href="http://openjdk.java.net/guide/repositories.html#installConfig">
318N/A Developer Guide: Installing and Configuring Mercurial</a>
274N/A section for more information.
274N/A The Forest Extension is not part of the Mercurial install,
274N/A and is optional,
274N/A but can be obtained with the following commands:
274N/A <blockquote>
274N/A <tt>
274N/A hg clone https://bitbucket.org/pmezard/hgforest-crew/overview/ <i>YourHgForest</i>
274N/A </tt>
274N/A </blockquote>
274N/A Once you have the file <tt>forest.py</tt>, you need to add these
274N/A lines to your <tt>${HOME}/.hgrc</tt> file:
274N/A <blockquote>
274N/A <tt>
274N/A [extensions]
274N/A <br>forest = <i>YourHgForest</i>/forest.py
274N/A </tt>
274N/A </blockquote>
274N/A
274N/A <!-- ------------------------------------------------------ -->
274N/A <h3><a name="get_source">Getting the Source</a></h3>
274N/A <blockquote>
274N/A To get the entire set of OpenJDK Mercurial repositories
274N/A using the Forest Extension:
274N/A <blockquote>
274N/A <tt>
318N/A hg fclone http://hg.openjdk.java.net/jdk7/jdk7 <i>YourOpenJDK</i>
274N/A </tt>
274N/A </blockquote>
274N/A To get the entire set of OpenJDK Mercurial repositories
274N/A without using the Forest Extension:
274N/A <blockquote>
274N/A <tt>
318N/A hg clone http://hg.openjdk.java.net/jdk7/jdk7 <i>YourOpenJDK</i>
274N/A <br>cd <i>YourOpenJDK</i>
274N/A <br>sh /get_source.sh
274N/A </tt>
274N/A </blockquote>
274N/A Once you have all the repositories, the
274N/A script <tt>make/scripts/hgforest.sh</tt>
274N/A can be used to repeat the same <tt>hg</tt>
274N/A command on every repository in the forest, e.g.
274N/A <blockquote>
274N/A <tt>
274N/A cd <i>YourOpenJDK</i>
274N/A <br>sh /make/scripts/hgforest.sh pull -u
274N/A </tt>
274N/A </blockquote>
274N/A You may find this script <tt>make/scripts/hgforest.sh</tt> faster
274N/A than the <tt>hg</tt> forest commands provided by the
274N/A Forest Extension.
274N/A </blockquote>
274N/A
274N/A </blockquote>
274N/A
11N/A <!-- ------------------------------------------------------ -->
11N/A <hr>
11N/A <h2><a name="MBE">Minimum Build Environments</a></h2>
11N/A <blockquote>
11N/A This file often describes specific requirements for what we call the
47N/A "minimum build environments" (MBE) for this
47N/A specific release of the JDK,
11N/A Building with the MBE will generate the most compatible
11N/A bits that install on, and run correctly on, the most variations
11N/A of the same base OS and hardware architecture.
11N/A These usually represent what is often called the
11N/A least common denominator platforms.
11N/A It is understood that most developers will NOT be using these
11N/A specific platforms, and in fact creating these specific platforms
11N/A may be difficult due to the age of some of this software.
11N/A <p>
274N/A The minimum OS and C/C++ compiler versions needed for building the
274N/A OpenJDK:
11N/A <p>
11N/A <table border="1">
11N/A <thead>
11N/A <tr>
11N/A <th>Base OS and Architecture</th>
11N/A <th>OS</th>
47N/A <th>C/C++ Compiler</th>
103N/A <th>BOOT JDK</th>
11N/A </tr>
11N/A </thead>
11N/A <tbody>
11N/A <tr>
47N/A <td>Linux X86 (32-bit)</td>
47N/A <td>Fedora 9</td>
318N/A <td>gcc 4.3 </td>
318N/A <td>JDK 6u18</td>
11N/A </tr>
11N/A <tr>
47N/A <td>Linux X64 (64-bit)</td>
47N/A <td>Fedora 9</td>
318N/A <td>gcc 4.3 </td>
318N/A <td>JDK 6u18</td>
11N/A </tr>
11N/A <tr>
47N/A <td>Solaris SPARC (32-bit)</td>
318N/A <td>Solaris 10 Update 6</td>
209N/A <td>Sun Studio 12 Update 1 + patches</td>
318N/A <td>JDK 6u18</td>
11N/A </tr>
11N/A <tr>
47N/A <td>Solaris SPARCV9 (64-bit)</td>
318N/A <td>Solaris 10 Update 6</td>
209N/A <td>Sun Studio 12 Update 1 + patches</td>
318N/A <td>JDK 6u18</td>
11N/A </tr>
11N/A <tr>
47N/A <td>Solaris X86 (32-bit)</td>
318N/A <td>Solaris 10 Update 6</td>
209N/A <td>Sun Studio 12 Update 1 + patches</td>
318N/A <td>JDK 6u18</td>
11N/A </tr>
11N/A <tr>
47N/A <td>Solaris X64 (64-bit)</td>
318N/A <td>Solaris 10 Update 6</td>
209N/A <td>Sun Studio 12 Update 1 + patches</td>
318N/A <td>JDK 6u18</td>
11N/A </tr>
11N/A <tr>
47N/A <td>Windows X86 (32-bit)</td>
11N/A <td>Windows XP</td>
173N/A <td>Microsoft Visual Studio C++ 2010 Professional Edition</td>
318N/A <td>JDK 6u18</td>
11N/A </tr>
11N/A <tr>
47N/A <td>Windows X64 (64-bit)</td>
11N/A <td>Windows Server 2003 - Enterprise x64 Edition</td>
173N/A <td>Microsoft Visual Studio C++ 2010 Professional Edition</td>
318N/A <td>JDK 6u18</td>
11N/A </tr>
450N/A <tr>
450N/A <td>Mac OS X X64 (64-bit)</td>
450N/A <td>Mac OS X 10.7.3 "Lion"</td>
450N/A <td>XCode 4.1 or later</td>
450N/A <td>Java for OS X Lion Update 1</td>
450N/A </tr>
11N/A </tbody>
11N/A </table>
274N/A <p>
47N/A These same sources do indeed build on many more systems than the
47N/A above older generation systems, again the above is just a minimum.
274N/A <p>
47N/A Compilation problems with newer or different C/C++ compilers is a
47N/A common problem.
47N/A Similarly, compilation problems related to changes to the
274N/A <tt>/usr/include</tt> or system header files is also a
47N/A common problem with newer or unreleased OS versions.
47N/A Please report these types of problems as bugs so that they
47N/A can be dealt with accordingly.
11N/A </blockquote>
11N/A <!-- ------------------------------------------------------ -->
11N/A <hr>
11N/A <h2><a name="SDBE">Specific Developer Build Environments</a></h2>
11N/A <blockquote>
11N/A We won't be listing all the possible environments, but
11N/A we will try to provide what information we have available to us.
11N/A </blockquote>
11N/A <!-- ------------------------------------------------------ -->
130N/A <h3><a name="fedora">Fedora</a></h3>
11N/A <blockquote>
274N/A <h4>Fedora 9</h4>
274N/A <p>
274N/A <blockquote>
274N/A After installing <a href="http://fedoraproject.org">Fedora</a> 9
130N/A you need to install several build dependencies. The simplest
130N/A way to do it is to execute the following commands as user
274N/A <tt>root</tt>:
274N/A <p/>
318N/A <code>yum-builddep java-1.6.0-openjdk</code>
274N/A <p/>
274N/A <code>yum install gcc gcc-c++</code>
274N/A <p/>
130N/A In addition, it's necessary to set a few environment variables for the build:
130N/A
274N/A <p/>
274N/A <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk</code>
39N/A </blockquote>
274N/A <h4>Fedora 10</h4>
274N/A <p>
274N/A <blockquote>
274N/A After installing <a href="http://fedoraproject.org">Fedora</a> 10
130N/A you need to install several build dependencies. The simplest
130N/A way to do it is to execute the following commands as user
274N/A <tt>root</tt>:
274N/A <p/>
274N/A <code>yum-builddep java-1.6.0-openjdk</code>
274N/A <p/>
274N/A <code>yum install gcc gcc-c++</code>
274N/A <p/>
130N/A In addition, it's necessary to set a few environment variables for the build:
130N/A
274N/A <p/>
274N/A <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk</code>
130N/A </blockquote>
274N/A <h4>Fedora 11</h4>
274N/A <p>
274N/A <blockquote>
274N/A After installing <a href="http://fedoraproject.org">Fedora</a> 11
130N/A you need to install several build dependencies. The simplest
130N/A way to do it is to execute the following commands as user
274N/A <tt>root</tt>:
274N/A <p/>
274N/A <code>yum-builddep java-1.6.0-openjdk</code>
274N/A <p/>
274N/A <code>yum install gcc gcc-c++</code>
274N/A <p/>
130N/A In addition, it's necessary to set a few environment variables for the build:
130N/A
274N/A <p/>
274N/A <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk</code>
274N/A </blockquote>
11N/A </blockquote>
11N/A <!-- ------------------------------------------------------ -->
318N/A <h3><a name="centos">CentOS 5.5</a></h3>
11N/A <blockquote>
39N/A After installing
318N/A <a href="http://www.centos.org/">CentOS 5.5</a>
39N/A you need to make sure you have
39N/A the following Development bundles installed:
39N/A <blockquote>
39N/A <ul>
39N/A <li>Development Libraries</li>
39N/A <li>Development Tools</li>
39N/A <li>Java Development</li>
318N/A <li>X Software Development (Including XFree86-devel)</li>
39N/A </ul>
39N/A </blockquote>
39N/A <p>
274N/A Plus the following packages:
39N/A <blockquote>
39N/A <ul>
39N/A <li>cups devel: Cups Development Package</li>
39N/A <li>alsa devel: Alsa Development Package</li>
39N/A <li>ant: Ant Package</li>
39N/A <li>Xi devel: libXi.so Development Package</li>
39N/A </ul>
39N/A </blockquote>
39N/A <p>
274N/A The freetype 2.3 packages don't seem to be available,
274N/A but the freetype 2.3 sources can be downloaded, built,
274N/A and installed easily enough from
274N/A <a href="http://downloads.sourceforge.net/freetype">
274N/A the freetype site</a>.
274N/A Build and install with something like:
39N/A <blockquote>
39N/A <tt>/configure && make && sudo -u root make install</tt>
39N/A </blockquote>
39N/A <p>
274N/A Mercurial packages could not be found easily, but a Google
274N/A search should find ones, and they usually include Python if
274N/A it's needed.
11N/A </blockquote>
11N/A <!-- ------------------------------------------------------ -->
130N/A <h3><a name="debian">Debian</a></h3>
130N/A <blockquote>
130N/A <h4>Debian 5.0 (Lenny)</h4>
130N/A <p>
274N/A <blockquote>
130N/A After installing <a href="http://debian.org">Debian</a> 5
130N/A you need to install several build dependencies.
130N/A The simplest way to install the build dependencies is to
130N/A execute the following commands as user <tt>root</tt>:
274N/A <p/>
274N/A <code>aptitude build-dep openjdk-6</code>
274N/A <p/>
274N/A <code>aptitude install openjdk-6-jdk libmotif-dev</code>
274N/A <p/>
130N/A In addition, it's necessary to set a few environment variables for the build:
274N/A <p/>
274N/A <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code>
274N/A </blockquote>
130N/A </blockquote>
130N/A <!-- ====================================================== -->
274N/A <h3><a name="ubuntu">Ubuntu</a></h3>
11N/A <blockquote>
130N/A <h4>Ubuntu 8.04</h4>
11N/A <p>
274N/A <blockquote>
130N/A After installing <a href="http://ubuntu.org">Ubuntu</a> 8.04
130N/A you need to install several build dependencies.
274N/A <p/>
130N/A First, you need to enable the universe repository in the
130N/A Software Sources application and reload the repository
130N/A information. The Software Sources application is available
130N/A under the System/Administration menu.
274N/A <p/>
130N/A The simplest way to install the build dependencies is to
130N/A execute the following commands:
274N/A <p/>
274N/A <code>sudo aptitude build-dep openjdk-6</code>
274N/A <p/>
274N/A <code>sudo aptitude install openjdk-6-jdk</code>
274N/A <p/>
130N/A In addition, it's necessary to set a few environment variables for the build:
274N/A <p/>
274N/A <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code>
274N/A </blockquote>
274N/A <h4>Ubuntu 8.10</h4>
11N/A <p>
274N/A <blockquote>
130N/A After installing <a href="http://ubuntu.org">Ubuntu</a> 8.10
130N/A you need to install several build dependencies. The simplest
130N/A way to do it is to execute the following commands:
274N/A <p/>
274N/A <code>sudo aptitude build-dep openjdk-6</code>
274N/A <p/>
274N/A <code>sudo aptitude install openjdk-6-jdk</code>
274N/A <p/>
130N/A In addition, it's necessary to set a few environment variables for the build:
274N/A <p/>
274N/A <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code>
274N/A </blockquote>
274N/A <h4>Ubuntu 9.04</h4>
11N/A <p>
274N/A <blockquote>
130N/A After installing <a href="http://ubuntu.org">Ubuntu</a> 9.04
130N/A you need to install several build dependencies. The simplest
130N/A way to do it is to execute the following commands:
274N/A <p/>
274N/A <code>sudo aptitude build-dep openjdk-6</code>
274N/A <p/>
274N/A <code>sudo aptitude install openjdk-6-jdk</code>
274N/A <p/>
130N/A In addition, it's necessary to set a few environment variables for the build:
274N/A <p/>
274N/A <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code>
274N/A </blockquote>
130N/A </blockquote>
130N/A <!-- ====================================================== -->
130N/A <h3><a name="opensuse">OpenSUSE</a></h3>
130N/A <blockquote>
130N/A <h4>OpenSUSE 11.1</h4>
11N/A <p>
274N/A <blockquote>
130N/A After installing <a href="http://opensuse.org">OpenSUSE</a> 11.1
130N/A you need to install several build dependencies.
130N/A The simplest way to install the build dependencies is to
130N/A execute the following commands:
274N/A <p/>
274N/A <code>sudo zypper source-install -d java-1_6_0-openjdk</code>
274N/A <p/>
274N/A <code>sudo zypper install make</code>
274N/A <p/>
130N/A In addition, it is necessary to set a few environment variables for the build:
274N/A <p/>
274N/A <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-1.6.0-openjdk</code>
274N/A <p/>
130N/A Finally, you need to unset the <code>JAVA_HOME</code> environment variable:
274N/A <p/>
274N/A <code>export -n JAVA_HOME</code>
274N/A </blockquote>
274N/A </blockquote>
130N/A <!-- ====================================================== -->
130N/A <h3><a name="mandriva">Mandriva</a></h3>
130N/A <blockquote>
130N/A <h4>Mandriva Linux One 2009 Spring</h4>
130N/A <p>
274N/A <blockquote>
130N/A After installing <a href="http://mandriva.org">Mandriva</a> Linux One 2009 Spring
130N/A you need to install several build dependencies.
130N/A The simplest way to install the build dependencies is to
130N/A execute the following commands as user <tt>root</tt>:
274N/A <p/>
274N/A <code>urpmi java-1.6.0-openjdk-devel ant make gcc gcc-c++ freetype-devel zip unzip libcups2-devel libxrender1-devel libalsa2-devel libstc++-static-devel libxtst6-devel libxi-devel</code>
130N/A <p/>
130N/A In addition, it is necessary to set a few environment variables for the build:
274N/A <p/>
274N/A <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-1.6.0-openjdk</code>
274N/A </blockquote>
11N/A </blockquote>
130N/A <!-- ====================================================== -->
130N/A <h3><a name="opensolaris">OpenSolaris</a></h3>
130N/A <blockquote>
130N/A <h4>OpenSolaris 2009.06</h4>
130N/A <p>
274N/A <blockquote>
130N/A After installing <a href="http://opensolaris.org">OpenSolaris</a> 2009.06
130N/A you need to install several build dependencies.
130N/A The simplest way to install the build dependencies is to
130N/A execute the following commands:
274N/A <p/>
274N/A <code>pfexec pkg install SUNWgmake SUNWj6dev SUNWant sunstudioexpress SUNWcups SUNWzip SUNWunzip SUNWxwhl SUNWxorg-headers SUNWaudh SUNWfreetype2</code>
130N/A <p/>
130N/A In addition, it is necessary to set a few environment variables for the build:
274N/A <p/>
274N/A <code>export LANG=C ALT_COMPILER_PATH=/opt/SunStudioExpress/bin/ ALT_CUPS_HEADERS_PATH=/usr/include/</code>
274N/A <p/>
130N/A Finally, you need to make sure that the build process can find the Sun Studio compilers:
274N/A <p/>
274N/A <code>export PATH=$PATH:/opt/SunStudioExpress/bin/</code>
274N/A </blockquote>
130N/A </blockquote>
130N/A <!-- ------------------------------------------------------ -->
11N/A <hr>
11N/A <h2><a name="directories">Source Directory Structure</a></h2>
11N/A <blockquote>
11N/A <p>
274N/A The source code for the OpenJDK is delivered in a set of
274N/A directories:
274N/A <tt>hotspot</tt>,
274N/A <tt>langtools</tt>,
274N/A <tt>corba</tt>,
274N/A <tt>jaxws</tt>,
274N/A <tt>jaxp</tt>,
274N/A and
274N/A <tt>jdk</tt>.
274N/A The <tt>hotspot</tt> directory contains the source code and make
274N/A files for building the OpenJDK Hotspot Virtual Machine.
274N/A The <tt>langtools</tt> directory contains the source code and make
274N/A files for building the OpenJDK javac and language tools.
274N/A The <tt>corba</tt> directory contains the source code and make
274N/A files for building the OpenJDK Corba files.
274N/A The <tt>jaxws</tt> directory contains the source code and make
274N/A files for building the OpenJDK JAXWS files.
274N/A The <tt>jaxp</tt> directory contains the source code and make
274N/A files for building the OpenJDK JAXP files.
274N/A The <tt>jdk</tt> directory contains the source code and make files for
274N/A building the OpenJDK runtime libraries and misc files.
274N/A The top level <tt>Makefile</tt>
274N/A is used to build the entire OpenJDK.
318N/A
318N/A <h3><a name="drops">Managing the Source Drops</a></h3>
318N/A <blockquote>
318N/A <p>
318N/A The repositories <tt>jaxp</tt> and <tt>jaxws</tt> actually
318N/A do not contain the sources for JAXP or JAX-WS.
318N/A These products have their own open source procedures at their
318N/A <a href="http://jaxp.java.net/">JAXP</a> and
318N/A <a href="http://jax-ws.java.net/">JAX-WS</a> home pages.
318N/A The OpenJDK project does need access to these sources to build
318N/A a complete JDK image because JAXP and JAX-WS are part of the JDK.
318N/A The current process for delivery of the JAXP and JAX-WS sources
318N/A involves so called "source drop bundles" downloaded from a public
318N/A website.
318N/A There are many reasons for this current mechanism, and it is
318N/A understood that this is not ideal for the open source community.
318N/A It is possible this process could change in the future.
318N/A <br>
318N/A <b>NOTE:</b> The <a href="http://download.java.net/openjdk/jdk7/">
318N/A Complete OpenJDK Source Bundles</a> <u>will</u> contain the JAXP and
318N/A JAX-WS sources.
318N/A </p>
318N/A
318N/A <h4><a name="dropcreation">Creation of New Source Drop Bundles</a></h4>
318N/A <blockquote>
318N/A <ol>
318N/A <li>
318N/A The JAXP or JAX-WS team prepares a new zip bundle,
318N/A places a copy in a public download area on java.net,
318N/A sends us a link and a list of CRs (Change Request Numbers).
318N/A The older download bundles should not be deleted.
318N/A It is the responsibility of the JAXP and JAX-WS team to
318N/A place the proper GPL legal notices on the sources
318N/A and do any filtering or java re-packaging for the
318N/A OpenJDK instances of these classes.
318N/A </li>
318N/A <li>
318N/A The OpenJDK team copies this new bundle into shared
318N/A area (e.g. <tt>/java/devtools/share/jdk7-drops</tt>).
318N/A Older bundles are never deleted so we retain the history.
318N/A </li>
318N/A <li>
318N/A The OpenJDK team edits the ant property file
318N/A <tt>jaxp/jaxp.properties</tt> or
318N/A <tt>jaxws/jaxws.properties</tt> to update the
318N/A base URL, the zip bundle name, and the MD5 checksum
318N/A of the zip bundle
318N/A (on Solaris: <tt>sum -c md5 <i>bundlename</i></tt>)
318N/A </li>
318N/A <li>
318N/A OpenJDK team reviews and commits those changes with the
318N/A given CRs.
318N/A </li>
318N/A </ol>
318N/A </blockquote>
318N/A
318N/A <h4><a name="dropusage">Using Source Drop Bundles</a></h4>
318N/A <blockquote>
318N/A <p>
318N/A The ant scripts that build <tt>jaxp</tt> and <tt>jaxws</tt>
318N/A will attempt to locate these zip bundles from the directory
318N/A in the environment variable
318N/A <tt><a href="#ALT_DROPS_DIR">ALT_DROPS_DIR</a></tt>.
318N/A The checksums protect from getting the wrong, corrupted, or
318N/A improperly modified sources.
318N/A Once the sources are made available, the population will not
318N/A happen again unless a <tt>make clobber</tt> is requested
318N/A or the <tt>jaxp/drop/</tt> or <tt>jaxws/drop/</tt>
318N/A directory is explicitly deleted.
318N/A <br>
318N/A <b>NOTE:</b> The default Makefile and ant script behavior
318N/A is to NOT download these bundles from the public http site.
318N/A In general, doing downloads
318N/A during the build process is not advised, it creates too much
318N/A unpredictability in the build process.
318N/A However, you can use <tt>make ALLOW_DOWNLOADS=true</tt> to
318N/A tell the ant script that the download of the zip bundle is
318N/A acceptable.
318N/A </p>
318N/A <p>
318N/A The recommended procedure for keeping a cache of these
318N/A source bundles would be to download them once, place them
318N/A in a directory outside the repositories, and then set
318N/A <tt><a href="#ALT_DROPS_DIR">ALT_DROPS_DIR</a></tt> to refer
318N/A to that directory.
318N/A These drop bundles do change occasionally, so the newer
318N/A bundles may need to be added to this area from time to time.
318N/A </p>
318N/A </blockquote>
318N/A </blockquote>
11N/A </blockquote>
11N/A <!-- ------------------------------------------------------ -->
11N/A <hr>
11N/A <h2><a name="building">Build Information</a></h2>
11N/A <blockquote>
11N/A Building the OpenJDK
318N/A is done with a <a href="#gmake">GNU <tt>make</tt></a> command line
318N/A and various
318N/A environment or make variable settings that direct the makefile rules
11N/A to where various components have been installed.
11N/A Where possible the makefiles will attempt to located the various
11N/A components in the default locations or any component specific
11N/A variable settings.
11N/A When the normal defaults fail or components cannot be found,
11N/A the various
11N/A <tt>ALT_*</tt> variables (alternates)
11N/A can be used to help the makefiles locate components.
11N/A <p>
274N/A Refer to the bash/sh/ksh setup file
274N/A <tt>jdk/make/jdk_generic_profile.sh</tt>
274N/A if you need help in setting up your environment variables.
274N/A A build could be as simple as:
11N/A <blockquote>
11N/A <pre><tt>
0N/A bash
0N/A . jdk/make/jdk_generic_profile.sh
318N/A <a href="#gmake"><tt>make</tt></a> sanity &amp;&amp; <a href="#gmake"><tt>make</tt></a>
11N/A </tt></pre>
11N/A </blockquote>
11N/A <p>
274N/A Of course ksh or sh would work too.
274N/A But some customization will probably be necessary.
274N/A The <tt>sanity</tt> rule will make some basic checks on build
274N/A dependencies and generate appropriate warning messages
274N/A regarding missing, out of date, or newer than expected components
274N/A found on your system.
11N/A </blockquote>
11N/A <!-- ------------------------------------------------------ -->
11N/A <hr>
11N/A <h3><a name="gmake">GNU make (<tt><i>gmake</i></tt>)</a></h3>
11N/A <blockquote>
11N/A The Makefiles in the OpenJDK are only valid when used with the
11N/A GNU version of the utility command <tt>make</tt>
11N/A (<tt><i>gmake</i></tt>).
11N/A A few notes about using GNU make:
11N/A <ul>
11N/A <li>
318N/A You need GNU make version 3.81 or newer.
11N/A </li>
11N/A <li>
11N/A Place the location of the GNU make binary in the <tt>PATH</tt>.
11N/A </li>
11N/A <li>
11N/A <strong>Linux:</strong>
318N/A The <tt>/usr/bin/make</tt> should be 3.81 or newer
318N/A and should work fine for you.
318N/A If this version is not 3.81 or newer,
318N/A see the <a href="#buildgmake">"Building GNU make"</a> section.
11N/A </li>
11N/A <li>
11N/A <strong>Solaris:</strong>
11N/A Do NOT use <tt>/usr/bin/make</tt> on Solaris.
11N/A If your Solaris system has the software
11N/A from the Solaris Companion CD installed,
318N/A you should try and use <tt>gmake</tt>
11N/A which will be located in either the <tt>/opt/sfw/bin</tt> or
11N/A <tt>/usr/sfw/bin</tt> directory.
318N/A In more recent versions of Solaris GNU make might be found
318N/A at <tt>/usr/bin/gmake</tt>.<br>
318N/A <b>NOTE:</b> It is very likely that this <tt>gmake</tt>
318N/A could be 3.80, you need 3.81, in which case,
318N/A see the <a href="#buildgmake">"Building GNU make"</a> section.
11N/A </li>
11N/A <li>
11N/A <strong>Windows:</strong>
136N/A Make sure you start your build inside a bash/sh/ksh shell
136N/A and are using a <tt>make.exe</tt> utility built for that
136N/A environment (a cygwin <tt>make.exe</tt> is not the same
136N/A as a <tt>make.exe</tt> built for something like
136N/A <a href="http://www.mkssoftware.com/">MKS</a>).
11N/A <br>
318N/A <b>WARNING:</b> Watch out on some make 3.81 versions, it may
23N/A not work due to a lack of support for MS-DOS drive letter paths
23N/A like <tt>C:/</tt> or <tt>C:\</tt>.
23N/A <br>
318N/A You may be able to use the information at the
11N/A <a href="http://developer.mozilla.org/en/docs/Windows_build_prerequisites_using_cygwin#make" target="_blank">
274N/A mozilla developer center</a>
11N/A on this topic.
23N/A <br>
23N/A It's hoped that when make 3.82 starts shipping in a future cygwin
23N/A release that this MS-DOS path issue will be fixed.
318N/A <br>
318N/A It may be possible to download the version at
23N/A <a href="http://www.cmake.org/files/cygwin/make.exe">
318N/A www.cmake.org make.exe</a>.
318N/A <br>
318N/A It might be necessary for you to build your own GNU make 3.81,
318N/A see the <a href="#buildgmake">"Building GNU make"</a> section
318N/A in that case.
11N/A </li>
11N/A </ul>
11N/A <p>
274N/A Information on GNU make, and access to ftp download sites, are
274N/A available on the
274N/A <a href="http://www.gnu.org/software/make/make.html" target="_blank">
274N/A GNU make web site
274N/A </a>.
274N/A The latest source to GNU make is available at
274N/A <a href="http://ftp.gnu.org/pub/gnu/make/" target="_blank">
274N/A ftp.gnu.org/pub/gnu/make/</a>.
318N/A </p>
318N/A <!-- ------------------------------------------------------ -->
318N/A <h4><a name="buildgmake">Building GNU make</a></h4>
318N/A <blockquote>
318N/A First step is to get the GNU make 3.81 source from
318N/A <a href="http://ftp.gnu.org/pub/gnu/make/" target="_blank">
318N/A ftp.gnu.org/pub/gnu/make/</a>.
318N/A Building is a little different depending on the OS and unix toolset
318N/A on Windows:
318N/A <ul>
318N/A <li>
318N/A <strong>Linux:</strong>
318N/A <tt>/configure && make</tt>
318N/A </li>
318N/A <li>
318N/A <strong>Solaris:</strong>
318N/A <tt>/configure && gmake CC=gcc</tt>
318N/A </li>
318N/A <li>
318N/A <strong>Windows for CYGWIN:</strong>
318N/A <tt>/configure && make</tt>
318N/A </li>
318N/A <li>
318N/A <strong>Windows for MKS: (CYGWIN is recommended)</strong>
318N/A <tt>/configure && make -f Makefile.win32</tt>
318N/A </li>
318N/A </ul>
318N/A </blockquote>
11N/A </blockquote>
11N/A <!-- ------------------------------------------------------ -->
11N/A <hr>
11N/A <h3><a name="linux">Basic Linux System Setup</a></h3>
11N/A <blockquote>
11N/A <strong>i586 only:</strong>
11N/A The minimum recommended hardware for building the Linux version
11N/A is a Pentium class processor or better, at least 256 MB of RAM, and
11N/A approximately 1.5 GB of free disk space.
11N/A <p>
274N/A <strong>X64 only:</strong>
274N/A The minimum recommended hardware for building the Linux
274N/A version is an AMD Opteron class processor, at least 512 MB of RAM, and
274N/A approximately 4 GB of free disk space.
11N/A <p>
274N/A The build will use the tools contained in
274N/A <tt>/bin</tt> and
274N/A <tt>/usr/bin</tt>
274N/A of a standard installation of the Linux operating environment.
274N/A You should ensure that these directories are in your
274N/A <tt>PATH</tt>.
11N/A <p>
274N/A Note that some Linux systems have a habit of pre-populating
274N/A your environment variables for you, for example <tt>JAVA_HOME</tt>
274N/A might get pre-defined for you to refer to the JDK installed on
274N/A your Linux system.
274N/A You will need to unset <tt>JAVA_HOME</tt>.
274N/A It's a good idea to run <tt>env</tt> and verify the
274N/A environment variables you are getting from the default system
274N/A settings make sense for building the
274N/A OpenJDK.
11N/A </blockquote>
11N/A <!-- ------------------------------------------------------ -->
11N/A <h4><a name="linux_checklist">Basic Linux Check List</a></h4>
11N/A <blockquote>
11N/A <ol>
11N/A <li>
11N/A Install the
11N/A <a href="#bootjdk">Bootstrap JDK</a>, set
11N/A <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>.
11N/A </li>
11N/A <li>
11N/A <a href="#importjdk">Optional Import JDK</a>, set
11N/A <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>.
11N/A </li>
11N/A <li>
11N/A Install or upgrade the <a href="#freetype">FreeType development
274N/A package</a>.
11N/A </li>
23N/A <li>
23N/A Install
318N/A <a href="#ant">Ant 1.7.1 or newer</a>,
47N/A make sure it is in your PATH.
23N/A </li>
11N/A </ol>
11N/A </blockquote>
11N/A <!-- ------------------------------------------------------ -->
11N/A <hr>
11N/A <h3><a name="solaris">Basic Solaris System Setup</a></h3>
11N/A <blockquote>
11N/A The minimum recommended hardware for building the
11N/A Solaris SPARC version is an UltraSPARC with 512 MB of RAM.
11N/A For building
11N/A the Solaris x86 version, a Pentium class processor or better and at
11N/A least 512 MB of RAM are recommended.
11N/A Approximately 1.4 GB of free disk
11N/A space is needed for a 32-bit build.
11N/A <p>
274N/A If you are building the 64-bit version, you should
274N/A run the command "isainfo -v" to verify that you have a
274N/A 64-bit installation, it should say <tt>sparcv9</tt> or
274N/A <tt>amd64</tt>.
274N/A An additional 7 GB of free disk space is needed
274N/A for a 64-bit build.
11N/A <p>
274N/A The build uses the tools contained in <tt>/usr/ccs/bin</tt>
274N/A and <tt>/usr/bin</tt> of a standard developer or full installation of
274N/A the Solaris operating environment.
11N/A <p>
274N/A Solaris patches specific to the JDK can be downloaded from the
274N/A <a href="http://sunsolve.sun.com/show.do?target=patches/JavaSE" target="_blank">
274N/A SunSolve JDK Solaris patches download page</a>.
274N/A You should ensure that the latest patch cluster for
274N/A your version of the Solaris operating environment has also
274N/A been installed.
11N/A </blockquote>
11N/A <!-- ------------------------------------------------------ -->
11N/A <h4><a name="solaris_checklist">Basic Solaris Check List</a></h4>
11N/A <blockquote>
11N/A <ol>
11N/A <li>
11N/A Install the
11N/A <a href="#bootjdk">Bootstrap JDK</a>, set
11N/A <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>.
11N/A </li>
11N/A <li>
11N/A <a href="#importjdk">Optional Import JDK</a>, set
11N/A <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>.
11N/A </li>
11N/A <li>
11N/A Install the
11N/A <a href="#studio">Sun Studio Compilers</a>, set
11N/A <a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a>.
11N/A </li>
11N/A <li>
11N/A Install the
11N/A <a href="#cups">CUPS Include files</a>, set
11N/A <tt><a href="#ALT_CUPS_HEADERS_PATH">ALT_CUPS_HEADERS_PATH</a></tt>.
11N/A </li>
23N/A <li>
88N/A Install the <a href="#xrender">XRender Include files</a>.
88N/A </li>
88N/A <li>
23N/A Install
318N/A <a href="#ant">Ant 1.7.1 or newer</a>,
47N/A make sure it is in your PATH.
23N/A </li>
11N/A </ol>
11N/A </blockquote>
11N/A <!-- ------------------------------------------------------ -->
11N/A <hr>
11N/A <h3><a name="windows">Basic Windows System Setup</a></h3>
11N/A <blockquote>
11N/A <strong>i586 only:</strong>
47N/A The minimum recommended hardware for building the 32-bit or X86
11N/A Windows version is an Pentium class processor or better, at least
11N/A 512 MB of RAM, and approximately 600 MB of free disk space.
11N/A <strong>
47N/A NOTE: The Windows build machines need to use the
11N/A file system NTFS.
11N/A Build machines formatted to FAT32 will not work
11N/A because FAT32 doesn't support case-sensitivity in file names.
11N/A </strong>
11N/A <p>
274N/A <strong>X64 only:</strong>
274N/A The minimum recommended hardware for building
274N/A the Windows X64 version is an AMD Opteron class processor, at least 1
274N/A GB of RAM, and approximately 10 GB of free disk space.
11N/A </blockquote>
11N/A <!-- ------------------------------------------------------ -->
11N/A <h4><a name="paths">Windows Paths</a></h4>
11N/A <blockquote>
0N/A <strong>Windows:</strong>
11N/A Note that GNU make is a historic utility and is based very
11N/A heavily on shell scripting, so it does not tolerate the Windows habit
11N/A of having spaces in pathnames or the use of the <tt>\</tt>characters in pathnames.
11N/A Luckily on most Windows systems, you can use <tt>/</tt>instead of \, and
11N/A there is always a 'short' pathname without spaces for any path that
11N/A contains spaces.
11N/A Unfortunately, this short pathname can be somewhat dynamic and the
11N/A formula is difficult to explain.
11N/A You can use <tt>cygpath</tt> utility to map pathnames with spaces
11N/A or the <tt>\</tt>character into the <tt>C:/</tt> style of pathname
11N/A (called 'mixed'), e.g.
11N/A <tt>cygpath -s -m "<i>path</i>"</tt>.
11N/A <p>
274N/A The makefiles will try to translate any pathnames supplied
274N/A to it into the <tt>C:/</tt> style automatically.
11N/A <p>
274N/A Note that use of CYGWIN creates a unique problem with regards to
274N/A setting <a href="#path"><tt>PATH</tt></a>. Normally on Windows
274N/A the <tt>PATH</tt> variable contains directories
274N/A separated with the ";" character (Solaris and Linux uses ":").
274N/A With CYGWIN, it uses ":", but that means that paths like "C:/path"
274N/A cannot be placed in the CYGWIN version of <tt>PATH</tt> and
274N/A instead CYGWIN uses something like <tt>/cygdrive/c/path</tt>
274N/A which CYGWIN understands, but only CYGWIN understands.
274N/A So be careful with paths on Windows.
11N/A </blockquote>
11N/A <!-- ------------------------------------------------------ -->
11N/A <h4><a name="windows_checklist">Basic Windows Check List</a></h4>
11N/A <blockquote>
11N/A <ol>
11N/A <li>
11N/A Install the
11N/A <a href="#cygwin">CYGWIN product</a>.
11N/A </li>
11N/A <li>
11N/A Install the
11N/A <a href="#bootjdk">Bootstrap JDK</a>, set
11N/A <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>.
11N/A </li>
11N/A <li>
11N/A <a href="#importjdk">Optional Import JDK</a>, set
11N/A <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>.
11N/A </li>
11N/A <li>
11N/A Install the
185N/A <a href="#msvc32">Microsoft Visual Studio Compilers</a>).
11N/A </li>
11N/A <li>
11N/A Setup all environment variables for compilers
185N/A (see <a href="#msvc32">compilers</a>).
11N/A </li>
11N/A <li>
11N/A Install
11N/A <a href="#dxsdk">Microsoft DirectX SDK</a>.
11N/A </li>
23N/A <li>
23N/A Install
318N/A <a href="#ant">Ant 1.7.1 or newer</a>,
47N/A make sure it is in your PATH and set
23N/A <tt><a href="#ANT_HOME">ANT_HOME</a></tt>.
23N/A </li>
11N/A </ol>
11N/A </blockquote>
11N/A <!-- ------------------------------------------------------ -->
11N/A <hr>
450N/A <h3><a name="macosx">Basic Mac OS X System Setup</a></h3>
450N/A <blockquote>
450N/A <strong>X64 only:</strong>
450N/A The minimum recommended hardware for building
450N/A the Mac OS X version is any 64-bit capable Intel processor, at least 2
450N/A GB of RAM, and approximately 3 GB of free disk space. You should also
450N/A have OS X Lion 10.7.3 installed.
450N/A </blockquote>
450N/A <!-- ------------------------------------------------------ -->
450N/A
450N/A <h4><a name="macosx_checklist">Basic Mac OS X Check List</a></h4>
450N/A <blockquote>
450N/A <ol>
450N/A <li>
450N/A Install <a href="https://developer.apple.com/xcode/">XCode 4.1</a> or newer.
450N/A If you install XCode 4.3 or newer, make sure you also install
450N/A "Command line tools" found under the preferences pane "Downloads".
450N/A </li>
450N/A <li>
450N/A Install <a href="http://support.apple.com/kb/dl1421" target="_blank">"Java for OS X Lion Update 1"</a>,
450N/A set <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a> to <code>`/usr/libexec/java_home -v 1.6`</code></tt>
450N/A </li>
450N/A <li>
450N/A <a href="#importjdk">Optional Import JDK</a>, set
450N/A <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>.
450N/A </li>
450N/A </ol>
450N/A </blockquote>
450N/A <!-- ------------------------------------------------------ -->
450N/A <hr>
11N/A <h3><a name="dependencies">Build Dependencies</a></h3>
0N/A <blockquote>
11N/A Depending on the platform, the OpenJDK build process has some basic
11N/A dependencies on components not part of the OpenJDK sources.
11N/A Some of these are specific to a platform, some even specific to
11N/A an architecture.
11N/A Each dependency will have a set of ALT variables that can be set
11N/A to tell the makefiles where to locate the component.
11N/A In most cases setting these ALT variables may not be necessary
11N/A and the makefiles will find defaults on the system in standard
11N/A install locations or through component specific variables.
11N/A <!-- ------------------------------------------------------ -->
11N/A <h4><a name="bootjdk">Bootstrap JDK</a></h4>
11N/A <blockquote>
11N/A All OpenJDK builds require access to the previously released
11N/A JDK 6, this is often called a bootstrap JDK.
11N/A The JDK 6 binaries can be downloaded from Sun's
136N/A <a href="http://java.sun.com/javase/downloads/index.jsp"
274N/A target="_blank">JDK 6 download site</a>.
11N/A For build performance reasons
11N/A is very important that this bootstrap JDK be made available on the
11N/A local disk of the machine doing the build.
11N/A You should always set
11N/A <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>
11N/A to point to the location of
11N/A the bootstrap JDK installation, this is the directory pathname
11N/A that contains a <tt>bin, lib, and include</tt>
11N/A It's also a good idea to also place its <tt>bin</tt> directory
11N/A in the <tt>PATH</tt> environment variable, although it's
11N/A not required.
11N/A <p>
274N/A <strong>Solaris:</strong>
274N/A Some pre-installed JDK images may be available to you in the
274N/A directory <tt>/usr/jdk/instances</tt>.
274N/A If you don't set
274N/A <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>
274N/A the makefiles will look in that location for a JDK it can use.
11N/A </blockquote>
11N/A <!-- ------------------------------------------------------ -->
11N/A <h4><a name="importjdk">Optional Import JDK</a></h4>
11N/A <blockquote>
11N/A The <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>
11N/A setting is only needed if you are not building the entire
11N/A JDK. For example, if you have built the entire JDK once, and
11N/A wanted to avoid repeatedly building the Hotspot VM, you could
11N/A set this to the location of the previous JDK install image
11N/A and the build will copy the needed files from this import area.
11N/A </blockquote>
11N/A <!-- ------------------------------------------------------ -->
23N/A <h4><a name="ant">Ant</a></h4>
23N/A <blockquote>
296N/A All OpenJDK builds require access to least Ant 1.7.1.
23N/A The Ant tool is available from the
318N/A <a href="http://archive.apache.org/dist/ant/binaries/apache-ant-1.7.1-bin.zip" target="_blank">
318N/A Ant 1.7.1 archive download site</a>.
47N/A You should always make sure <tt>ant</tt> is in your PATH, and
47N/A on Windows you may also need to set
23N/A <tt><a href="#ANT_HOME">ANT_HOME</a></tt>
23N/A to point to the location of
23N/A the Ant installation, this is the directory pathname
23N/A that contains a <tt>bin and lib</tt>.
318N/A <br>
318N/A <b>WARNING:</b> Ant versions used from IDE tools like NetBeans
318N/A or installed via system packages may not operate the same
318N/A as the one obtained from the Ant download bundles.
318N/A These system and IDE installers sometimes choose to change
318N/A the ant installation enough to cause differences.
23N/A </blockquote>
23N/A <!-- ------------------------------------------------------ -->
11N/A <h4><a name="cacerts">Certificate Authority File (cacert)</a></h4>
11N/A <blockquote>
11N/A See <a href="http://en.wikipedia.org/wiki/Certificate_Authority" target="_blank">
274N/A http://en.wikipedia.org/wiki/Certificate_Authority</a>
11N/A for a better understanding of the Certificate Authority (CA).
11N/A A certificates file named "cacerts"
11N/A represents a system-wide keystore with CA certificates.
11N/A In JDK and JRE
11N/A binary bundles, the "cacerts" file contains root CA certificates from
11N/A several public CAs (e.g., VeriSign, Thawte, and Baltimore).
11N/A The source contain a cacerts file
11N/A without CA root certificates.
11N/A Formal JDK builders will need to secure
11N/A permission from each public CA and include the certificates into their
11N/A own custom cacerts file.
11N/A Failure to provide a populated cacerts file
11N/A will result in verification errors of a certificate chain during runtime.
11N/A The variable
11N/A <tt><a href="#ALT_CACERTS_FILE">ALT_CACERTS_FILE</a></tt>
11N/A can be used to override the default location of the
11N/A cacerts file that will get placed in your build.
11N/A By default an empty cacerts file is provided and that should be
11N/A fine for most JDK developers.
11N/A </blockquote>
11N/A <!-- ------------------------------------------------------ -->
11N/A <h4><a name="compilers">Compilers</a></h4>
11N/A <blockquote>
11N/A <strong><a name="gcc">Linux gcc/binutils</a></strong>
11N/A <blockquote>
318N/A The GNU gcc compiler version should be 4.3 or newer.
11N/A The compiler used should be the default compiler installed
11N/A in <tt>/usr/bin</tt>.
11N/A </blockquote>
11N/A <strong><a name="studio">Solaris: Sun Studio</a></strong>
11N/A <blockquote>
11N/A At a minimum, the
209N/A <a href="http://www.oracle.com/technetwork/server-storage/solarisstudio/downloads/index.htm" target="_blank">
274N/A Sun Studio 12 Update 1 Compilers</a>
209N/A (containing version 5.10 of the C and C++ compilers) is required,
209N/A including specific patches.
274N/A <p>
209N/A The Solaris SPARC patch list is:
274N/A <ul>
274N/A <li>
274N/A 118683-05: SunOS 5.10: Patch for profiling libraries and assembler
274N/A </li>
274N/A <li>
274N/A 119963-21: SunOS 5.10: Shared library patch for C++
274N/A </li>
274N/A <li>
274N/A 120753-08: SunOS 5.10: Microtasking libraries (libmtsk) patch
274N/A </li>
274N/A <li>
274N/A 128228-09: Sun Studio 12 Update 1: Patch for Sun C++ Compiler
274N/A </li>
274N/A <li>
274N/A 141860-03: Sun Studio 12 Update 1: Patch for Compiler Common patch for Sun C C++ F77 F95
274N/A </li>
274N/A <li>
274N/A 141861-05: Sun Studio 12 Update 1: Patch for Sun C Compiler
274N/A </li>
274N/A <li>
274N/A 142371-01: Sun Studio 12.1 Update 1: Patch for dbx
274N/A </li>
274N/A <li>
274N/A 143384-02: Sun Studio 12 Update 1: Patch for debuginfo handling
274N/A </li>
274N/A <li>
274N/A 143385-02: Sun Studio 12 Update 1: Patch for Compiler Common patch for Sun C C++ F77 F95
274N/A </li>
274N/A <li>
274N/A 142369-01: Sun Studio 12.1: Patch for Performance Analyzer Tools
274N/A </li>
209N/A </ul>
209N/A <p>
274N/A The Solaris X86 patch list is:
209N/A <ul>
274N/A <li>
274N/A 119961-07: SunOS 5.10_x86, x64, Patch for profiling libraries and assembler
274N/A </li>
274N/A <li>
274N/A 119964-21: SunOS 5.10_x86: Shared library patch for C++_x86
274N/A </li>
274N/A <li>
274N/A 120754-08: SunOS 5.10_x86: Microtasking libraries (libmtsk) patch
274N/A </li>
274N/A <li>
274N/A 141858-06: Sun Studio 12 Update 1_x86: Sun Compiler Common patch for x86 backend
274N/A </li>
274N/A <li>
274N/A 128229-09: Sun Studio 12 Update 1_x86: Patch for C++ Compiler
274N/A </li>
274N/A <li>
274N/A 142363-05: Sun Studio 12 Update 1_x86: Patch for C Compiler
274N/A </li>
274N/A <li>
274N/A 142368-01: Sun Studio 12.1_x86: Patch for Performance Analyzer Tools
274N/A </li>
209N/A </ul>
11N/A <p>
274N/A Set
274N/A <a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a>
274N/A to point to the location of
274N/A the compiler binaries, and place this location in the <tt>PATH</tt>.
11N/A <p>
274N/A The Oracle Solaris Studio Express compilers at:
274N/A <a href="http://developers.sun.com/sunstudio/downloads/express.jsp" target="_blank">
274N/A Oracle Solaris Studio Express Download site</a>
274N/A are also an option, although these compilers have not
274N/A been extensively used yet.
11N/A </blockquote>
185N/A <strong><a name="msvc32">Windows i586: Microsoft Visual Studio 2010 Compilers</a></strong>
11N/A <blockquote>
274N/A <p>
318N/A <b>BEGIN WARNING</b>: JDK 7 has transitioned to
318N/A use the newest VS2010 Microsoft compilers.
318N/A No other compilers are known to build the entire JDK,
274N/A including non-open portions.
274N/A Visual Studio 2010 Express compilers are now able to build all the
274N/A open source repositories, but this is 32 bit only. To build 64 bit
318N/A Windows binaries use the the 7.1 Windows SDK.
318N/A <b>END WARNING.</b>
274N/A <p>
318N/A The 32-bit OpenJDK Windows build requires
274N/A Microsoft Visual Studio C++ 2010 (VS2010) Professional
274N/A Edition or Express compiler.
274N/A The compiler and other tools are expected to reside
274N/A in the location defined by the variable
274N/A <tt>VS100COMNTOOLS</tt> which
274N/A is set by the Microsoft Visual Studio installer.
11N/A <p>
274N/A Once the compiler is installed,
274N/A it is recommended that you run <tt>VCVARS32.BAT</tt>
274N/A to set the compiler environment variables
274N/A <tt>INCLUDE</tt>,
274N/A <tt>LIB</tt>, and
274N/A <tt>PATH</tt>
274N/A prior to building the
274N/A OpenJDK.
274N/A The above environment variables <b>MUST</b> be set.
274N/A This compiler also contains the Windows SDK v 7.0a,
274N/A which is an update to the Windows 7 SDK.
11N/A <p>
274N/A <b>WARNING:</b> Make sure you check out the
274N/A <a href="#cygwin">CYGWIN link.exe WARNING</a>.
274N/A The path <tt>/usr/bin</tt> must be after the path to the
274N/A Visual Studio product.
11N/A </blockquote>
185N/A <strong><a name="msvc64">Windows x64: Microsoft Visual Studio 2010 Professional Compiler</a></strong>
11N/A <blockquote>
318N/A For <b>X64</b>, the set up is much the same as 32 bit
173N/A except that you run <tt>amd64\VCVARS64.BAT</tt>
173N/A to set the compiler environment variables.
318N/A Previously 64 bit builds had to use the 64 bit compiler in
185N/A an unbundled Windows SDK but this is no longer necessary if
185N/A you have VS2010 Professional.
11N/A </blockquote>
185N/A <strong><a name="mssdk64">Windows x64: Microsoft Windows 7.1 SDK 64 bit compilers.</a></strong>
274N/A For a free alternative for 64 bit builds, use the 7.1 SDK.
274N/A Microsoft say that to set up your paths for this run
274N/A <pre>
185N/A c:\Program Files\Microsoft SDKs\Windows\v7.1\bin\setenv.cmd /x64.
274N/A </pre>
274N/A What was tested is just directly setting up LIB, INCLUDE,
274N/A PATH and based on the installation directories using the
274N/A DOS short name appropriate for the system, (you will
274N/A need to set them for yours, not just blindly copy this) eg :
274N/A <pre>
185N/A set VSINSTALLDIR=c:\PROGRA~2\MICROS~1.0
185N/A set WindowsSdkDir=c:\PROGRA~1\MICROS~1\Windows\v7.1
185N/A set PATH=%VSINSTALLDIR%\vc\bin\amd64;%VSINSTALLDIR%\Common7\IDE;%WindowsSdkDir%\bin;%PATH%
185N/A set INCLUDE=%VSINSTALLDIR%\vc\include;%WindowsSdkDir%\include
185N/A set LIB=%VSINSTALLDIR%\vc\lib\amd64;%WindowsSdkDir%\lib\x64
274N/A </pre>
450N/A <strong><a name="llvmgcc">OS X Lion 10.7.3: LLVM GCC</a></strong>
450N/A <blockquote>
450N/A LLVM GCC is bundled with XCode. The version should be at least 4.2.1.
450N/A </blockquote>
11N/A </blockquote>
11N/A <!-- ------------------------------------------------------ -->
11N/A <h4><a name="zip">Zip and Unzip</a></h4>
11N/A <blockquote>
11N/A Version 2.2 (November 3rd 1997) or newer of the zip utility
11N/A and version 5.12 or newer of the unzip utility is needed
11N/A to build the JDK.
11N/A With Solaris, Linux, and Windows CYGWIN, the zip and unzip
11N/A utilities installed on the system should be fine.
11N/A Information and the source code for
11N/A ZIP.EXE and UNZIP.EXE is available on the
11N/A <a href="http://www.info-zip.org"
11N/A target="_blank">info-zip web site</a>.
11N/A </blockquote>
11N/A <!-- ------------------------------------------------------ -->
11N/A <h4><a name="cups">Common UNIX Printing System (CUPS) Headers (Solaris &amp; Linux)</a></h4>
11N/A <blockquote>
11N/A <strong>Solaris:</strong>
11N/A CUPS header files are required for building the
11N/A OpenJDK on Solaris.
11N/A The Solaris header files can be obtained by installing
11N/A the package <strong>SFWcups</strong> from the Solaris Software
11N/A Companion CD/DVD, these often will be installed into
11N/A <tt>/opt/sfw/cups</tt>.
11N/A <p>
274N/A <strong>Linux:</strong>
274N/A CUPS header files are required for building the
274N/A OpenJDK on Linux.
274N/A The Linux header files are usually available from a "cups"
274N/A development package, it's recommended that you try and use
274N/A the package provided by the particular version of Linux that
274N/A you are using.
11N/A <p>
274N/A The CUPS header files can always be downloaded from
274N/A <a href="http://www.cups.org" target="_blank">www.cups.org</a>.
274N/A The variable
274N/A <tt><a href="#ALT_CUPS_HEADERS_PATH">ALT_CUPS_HEADERS_PATH</a></tt>
274N/A can be used to override the default location of the
274N/A CUPS Header files.
11N/A </blockquote>
11N/A <!-- ------------------------------------------------------ -->
88N/A <h4><a name="xrender">XRender Extension Headers (Solaris &amp; Linux)</a></h4>
88N/A <blockquote>
88N/A <p>
274N/A <strong>Solaris:</strong>
274N/A XRender header files are required for building the
274N/A OpenJDK on Solaris.
274N/A The XRender header file is included with the other X11 header files
274N/A in the package <strong>SFWxwinc</strong> on new enough versions of
274N/A Solaris and will be installed in
274N/A <tt>/usr/X11/include/X11/extensions/Xrender.h</tt>
88N/A </p><p>
274N/A <strong>Linux:</strong>
274N/A XRender header files are required for building the
274N/A OpenJDK on Linux.
274N/A The Linux header files are usually available from a "Xrender"
274N/A development package, it's recommended that you try and use
274N/A the package provided by the particular distribution of Linux that
274N/A you are using.
274N/A </p>
88N/A </blockquote>
88N/A <!-- ------------------------------------------------------ -->
11N/A <h4><a name="freetype">FreeType 2</a></h4>
11N/A <blockquote>
11N/A Version 2.3 or newer of FreeType is required for building the OpenJDK.
11N/A On Unix systems required files can be available as part of your
11N/A distribution (while you still may need to upgrade them).
11N/A Note that you need development version of package that
11N/A includes both FreeType library and header files.
11N/A <p>
274N/A You can always download latest FreeType version from the
274N/A <a href="http://www.freetype.org" target="_blank">FreeType website</a>.
11N/A <p>
274N/A Makefiles will try to pick FreeType from /usr/lib and /usr/include.
274N/A In case it is installed elsewhere you will need to set environment
274N/A variables
274N/A <tt><a href="#ALT_FREETYPE_LIB_PATH">ALT_FREETYPE_LIB_PATH</a></tt>
274N/A and
274N/A <tt><a href="#ALT_FREETYPE_HEADERS_PATH">ALT_FREETYPE_HEADERS_PATH</a></tt>
274N/A to refer to place where library and header files are installed.
23N/A <p>
274N/A Building the freetype 2 libraries from scratch is also possible,
274N/A however on Windows refer to the
274N/A <a href="http://freetype.freedesktop.org/wiki/FreeType_DLL">
274N/A Windows FreeType DLL build instructions</a>.
23N/A <p>
274N/A Note that by default FreeType is built with byte code hinting
274N/A support disabled due to licensing restrictions.
274N/A In this case, text appearance and metrics are expected to
274N/A differ from Sun's official JDK build.
274N/A See
274N/A <a href="http://freetype.sourceforge.net/freetype2/index.html">
274N/A the SourceForge FreeType2 Home Page
274N/A </a>
274N/A for more information.
11N/A </blockquote>
11N/A <!-- ------------------------------------------------------ -->
11N/A <h4><a name="alsa">Advanced Linux Sound Architecture (ALSA) (Linux only)</a></h4>
11N/A <blockquote>
11N/A <strong>Linux only:</strong>
11N/A Version 0.9.1 or newer of the ALSA files are
11N/A required for building the OpenJDK on Linux.
11N/A These Linux files are usually available from an "alsa"
11N/A of "libasound"
11N/A development package, it's highly recommended that you try and use
11N/A the package provided by the particular version of Linux that
11N/A you are using.
11N/A The makefiles will check this emit a sanity error if it is
11N/A missing or the wrong version.
11N/A <p>
274N/A In particular, older Linux systems will likely not have the
274N/A right version of ALSA installed, for example
274N/A Redhat AS 2.1 U2 and SuSE 8.1 do not include a sufficiently
274N/A recent ALSA distribution.
274N/A On rpm-based systems, you can see if ALSA is installed by
274N/A running this command:
11N/A <pre>
11N/A <tt>rpm -qa | grep alsa</tt>
11N/A </pre>
11N/A Both <tt>alsa</tt> and <tt>alsa-devel</tt> packages are needed.
11N/A <p>
274N/A If your distribution does not come with ALSA, and you can't
274N/A find ALSA packages built for your particular system,
274N/A you can try to install the pre-built ALSA rpm packages from
274N/A <a href="http://www.freshrpms.net/" target="_blank">
274N/A <tt>www.freshrpms.net</tt></a>.
274N/A Note that installing a newer ALSA could
274N/A break sound output if an older version of ALSA was previously
274N/A installed on the system, but it will enable JDK compilation.
11N/A <blockquote>
11N/A Installation: execute as root<br>
11N/A [i586]: <code>rpm -Uv --force alsa-lib-devel-0.9.1-rh61.i386.rpm</code><br>
11N/A [x64]: <code>rpm -Uv --force alsa-lib-devel-0.9.8-amd64.x86_64.rpm</code><br>
11N/A Uninstallation:<br>
11N/A [i586]: <code>rpm -ev alsa-lib-devel-0.9.1-rh61</code><br>
11N/A [x64]:<code>rpm -ev alsa-lib-devel-0.9.8-amd64</code><br>
11N/A Make sure that you do not link to the static library
11N/A (<tt>libasound.a</tt>),
11N/A by verifying that the dynamic library (<tt>libasound.so</tt>) is
11N/A correctly installed in <tt>/usr/lib</tt>.
11N/A </blockquote>
11N/A As a last resort you can go to the
11N/A <a href="http://www.alsa-project.org" target="_blank">
274N/A Advanced Linux Sound Architecture Site</a> and build it from
11N/A source.
11N/A <blockquote>
11N/A Download driver and library
11N/A source tarballs from
11N/A <a href="http://www.alsa-project.org" target="_blank">ALSA's homepage</a>.
11N/A As root, execute the following
11N/A commands (you may need to adapt the version number):
11N/A <pre>
11N/A <tt>
11N/A $ tar xjf alsa-driver-0.9.1.tar.bz2
11N/A $ cd alsa-driver-0.9.1
11N/A $ /configure
11N/A $ make install
11N/A $ cd ..
11N/A $ tar xjf alsa-lib-0.9.1.tar.bz2
11N/A $ cd alsa-lib-0.9.1
11N/A $ /configure
11N/A $ make install
11N/A </tt>
11N/A </pre>
11N/A Should one of the above steps fail, refer to the documentation on
11N/A ALSA's home page.
11N/A </blockquote>
11N/A Note that this is a minimum install that enables
11N/A building the JDK platform. To actually use ALSA sound drivers, more
11N/A steps are necessary as outlined in the documentation on ALSA's homepage.
11N/A <p>
274N/A ALSA can be uninstalled by executing <tt>make uninstall</tt> first in
274N/A the <tt>alsa-lib-0.9.1</tt> directory and then in
274N/A <tt>alsa-driver-0.9.1</tt>.
11N/A </blockquote>
11N/A There are no ALT* variables to change the assumed locations of ALSA,
11N/A the makefiles will expect to find the ALSA include files and library at:
11N/A <tt>/usr/include/alsa</tt> and <tt>/usr/lib/libasound.so</tt>.
0N/A </blockquote>
11N/A <!-- ------------------------------------------------------ -->
11N/A <h4>Windows Specific Dependencies</h4>
11N/A <blockquote>
11N/A <strong>Unix Command Tools (<a name="cygwin">CYGWIN</a>)</strong>
11N/A <blockquote>
11N/A The OpenJDK requires access to a set of unix command tools
11N/A on Windows which can be supplied by
11N/A <a href="http://www.cygwin.com" target="_blank">CYGWIN</a>.
11N/A <p>
274N/A The OpenJDK build requires CYGWIN version 1.5.12 or newer.
274N/A Information about CYGWIN can
274N/A be obtained from the CYGWIN website at
274N/A <a href="http://www.cygwin.com" target="_blank">www.cygwin.com</a>.
11N/A <p>
274N/A By default CYGWIN doesn't install all the tools required for building
274N/A the OpenJDK.
274N/A Along with the default installation, you need to install
274N/A the following tools.
11N/A <blockquote>
11N/A <table border="1">
11N/A <thead>
11N/A <tr>
11N/A <td>Binary Name</td>
39N/A <td>Category</td>
11N/A <td>Package</td>
11N/A <td>Description</td>
11N/A </tr>
11N/A </thead>
11N/A <tbody>
11N/A <tr>
11N/A <td>ar.exe</td>
11N/A <td>Devel</td>
39N/A <td>binutils</td>
39N/A <td>The GNU assembler, linker and binary
274N/A utilities</td>
11N/A </tr>
11N/A <tr>
11N/A <td>make.exe</td>
11N/A <td>Devel</td>
39N/A <td>make</td>
39N/A <td>The GNU version of the 'make' utility built for CYGWIN.<br>
274N/A <b>NOTE</b>: See <a href="#gmake">the GNU make section</a></td>
11N/A </tr>
11N/A <tr>
11N/A <td>m4.exe</td>
11N/A <td>Interpreters</td>
39N/A <td>m4</td>
39N/A <td>GNU implementation of the traditional Unix macro
274N/A processor</td>
11N/A </tr>
11N/A <tr>
11N/A <td>cpio.exe</td>
11N/A <td>Utils</td>
39N/A <td>cpio</td>
39N/A <td>A program to manage archives of files</td>
11N/A </tr>
11N/A <tr>
23N/A <td>gawk.exe</td>
11N/A <td>Utils</td>
39N/A <td>awk</td>
39N/A <td>Pattern-directed scanning and processing language</td>
11N/A </tr>
11N/A <tr>
11N/A <td>file.exe</td>
11N/A <td>Utils</td>
39N/A <td>file</td>
39N/A <td>Determines file type using 'magic' numbers</td>
11N/A </tr>
11N/A <tr>
11N/A <td>zip.exe</td>
23N/A <td>Archive</td>
39N/A <td>zip</td>
39N/A <td>Package and compress (archive) files</td>
11N/A </tr>
11N/A <tr>
11N/A <td>unzip.exe</td>
23N/A <td>Archive</td>
39N/A <td>unzip</td>
39N/A <td>Extract compressed files in a ZIP archive</td>
11N/A </tr>
11N/A <tr>
11N/A <td>free.exe</td>
39N/A <td>System</td>
39N/A <td>procps</td>
39N/A <td>Display amount of free and used memory in the system</td>
11N/A </tr>
11N/A </tbody>
11N/A </table>
11N/A </blockquote>
11N/A <p>
274N/A Note that the CYGWIN software can conflict with other non-CYGWIN
274N/A software on your Windows system.
274N/A CYGWIN provides a
274N/A <a href="http://cygwin.com/faq/faq.using.html" target="_blank">FAQ</a> for
274N/A known issues and problems, of particular interest is the
274N/A section on
274N/A <a href="http://cygwin.com/faq/faq.using.html#faq.using.bloda" target="_blank">
274N/A BLODA (applications that interfere with CYGWIN)</a>.
39N/A <p>
274N/A <b>WARNING:</b>
274N/A Be very careful with <b><tt>link.exe</tt></b>, it will conflict
274N/A with the Visual Studio version. You need the Visual Studio
274N/A version of <tt>link.exe</tt>, not the CYGWIN one.
274N/A So it's important that the Visual Studio paths in PATH preceed
274N/A the CYGWIN path <tt>/usr/bin</tt>.
11N/A </blockquote>
11N/A <strong><a name="dxsdk">Microsoft DirectX 9.0 SDK header files and libraries</a></strong>
0N/A <blockquote>
11N/A Microsoft DirectX 9.0 SDK (Summer 2004)
11N/A headers are required for building
11N/A OpenJDK.
11N/A This SDK can be downloaded from
11N/A <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=FD044A42-9912-42A3-9A9E-D857199F888E&amp;displaylang=en" target="_blank">
274N/A Microsoft DirectX 9.0 SDK (Summer 2004)</a>.
11N/A If the link above becomes obsolete, the SDK can be found from
11N/A <a href="http://download.microsoft.com" target="_blank">the Microsoft Download Site</a>
11N/A (search with "DirectX 9.0 SDK Update Summer 2004").
11N/A The location of this SDK can be set with
11N/A <tt><a href="#ALT_DXSDK_PATH">ALT_DXSDK_PATH</a></tt>
11N/A but it's normally found via the DirectX environment variable
11N/A <tt>DXSDK_DIR</tt>.
11N/A </blockquote>
289N/A <strong><a name="msvcrNN"><tt>MSVCR100.DLL</tt></a></strong>
11N/A <blockquote>
173N/A The OpenJDK build requires access to a redistributable
173N/A <tt>MSVCR100.DLL</tt>.
173N/A This is usually picked up automatically from the redist
173N/A directories of Visual Studio 2010.
173N/A If this cannot be found set the
289N/A <a href="#ALT_MSVCRNN_DLL_PATH"><tt>ALT_MSVCRNN_DLL_PATH</tt></a>
47N/A variable to the location of this file.
11N/A <p>
0N/A </blockquote>
0N/A </blockquote>
11N/A <!-- ------------------------------------------------------ -->
11N/A <hr>
11N/A <h2><a name="creating">Creating the Build</a></h2>
0N/A <blockquote>
11N/A Once a machine is setup to build the OpenJDK,
11N/A the steps to create the build are fairly simple.
11N/A The various ALT settings can either be made into variables
11N/A or can be supplied on the
11N/A <a href="#gmake"><tt><i>gmake</i></tt></a>
11N/A command.
11N/A <ol>
11N/A <li>Use the sanity rule to double check all the ALT settings:
11N/A <blockquote>
11N/A <tt>
11N/A <i>gmake</i>
11N/A sanity
11N/A [ARCH_DATA_MODEL=<i>32 or 64</i>]
11N/A [other "ALT_" overrides]
11N/A </tt>
11N/A </blockquote>
11N/A </li>
11N/A <li>Start the build with the command:
11N/A <blockquote>
11N/A <tt>
11N/A <i>gmake</i>
11N/A [ARCH_DATA_MODEL=<i>32 or 64</i>]
11N/A [ALT_OUTPUTDIR=<i>output_directory</i>]
11N/A [other "ALT_" overrides]
11N/A </tt>
11N/A </blockquote>
11N/A </li>
11N/A </ol>
0N/A <p>
274N/A <strong>Solaris:</strong>
274N/A Note that ARCH_DATA_MODEL is really only needed on Solaris to
274N/A indicate you want to built the 64-bit version.
274N/A And before the Solaris 64-bit binaries can be used, they
274N/A must be merged with the binaries from a separate 32-bit build.
274N/A The merged binaries may then be used in either 32-bit or 64-bit mode, with
274N/A the selection occurring at runtime
274N/A with the <tt>-d32</tt> or <tt>-d64</tt> options.
0N/A </blockquote>
11N/A <!-- ------------------------------------------------------ -->
11N/A <hr>
11N/A <h2><a name="testing">Testing the Build</a></h2>
0N/A <blockquote>
11N/A When the build is completed, you should see the generated
11N/A binaries and associated files in the <tt>j2sdk-image</tt>
11N/A directory in the output directory.
11N/A The default output directory is
11N/A <tt>build/<i>platform</i></tt>,
11N/A where <tt><i>platform</i></tt> is one of
274N/A <blockquote>
274N/A <ul>
274N/A <li><tt>solaris-sparc</tt></li>
274N/A <li><tt>solaris-sparcv9</tt></li>
274N/A <li><tt>solaris-i586</tt></li>
274N/A <li><tt>solaris-amd64</tt></li>
274N/A <li><tt>linux-i586</tt></li>
274N/A <li><tt>linux-amd64</tt></li>
274N/A <li><tt>windows-i586</tt></li>
274N/A <li><tt>windows-amd64</tt></li>
274N/A </ul>
274N/A </blockquote>
11N/A In particular, the
11N/A <tt>build/<i>platform</i>/j2sdk-image/bin</tt>
11N/A directory should contain executables for the
11N/A OpenJDK tools and utilities.
0N/A <p>
274N/A You can test that the build completed properly by using the build
274N/A to run the various demos that you will find in the
274N/A <tt>build/<i>platform</i>/j2sdk-image/demo</tt>
274N/A directory.
11N/A <p>
274N/A The provided regression tests can be run with the <tt>jtreg</tt>
274N/A utility from
274N/A <a href="http://openjdk.java.net/jtreg/" target="_blank">the jtreg site</a>.
0N/A </blockquote>
11N/A <!-- ------------------------------------------------------ -->
11N/A <hr>
11N/A <h2><a name="variables">Environment/Make Variables</a></h2>
11N/A <p>
274N/A Some of the
274N/A environment or make variables (just called <b>variables</b> in this
274N/A document) that can impact the build are:
11N/A <blockquote>
0N/A <dl>
47N/A <dt><a name="path"><tt>PATH</tt></a> </dt>
47N/A <dd>Typically you want to set the <tt>PATH</tt> to include:
47N/A <ul>
47N/A <li>The location of the GNU make binary</li>
47N/A <li>The location of the Bootstrap JDK <tt>java</tt>
274N/A (see <a href="#bootjdk">Bootstrap JDK</a>)</li>
47N/A <li>The location of the C/C++ compilers
274N/A (see <a href="#compilers"><tt>compilers</tt></a>)</li>
47N/A <li>The location or locations for the Unix command utilities
274N/A (e.g. <tt>/usr/bin</tt>)</li>
47N/A </ul>
47N/A </dd>
47N/A <dt><tt>MILESTONE</tt> </dt>
0N/A <dd>
47N/A The milestone name for the build (<i>e.g.</i>"beta").
47N/A The default value is "internal".
47N/A </dd>
47N/A <dt><tt>BUILD_NUMBER</tt> </dt>
47N/A <dd>
47N/A The build number for the build (<i>e.g.</i> "b27").
47N/A The default value is "b00".
47N/A </dd>
47N/A <dt><a name="arch_data_model"><tt>ARCH_DATA_MODEL</tt></a></dt>
47N/A <dd>The <tt>ARCH_DATA_MODEL</tt> variable
47N/A is used to specify whether the build is to generate 32-bit or 64-bit
47N/A binaries.
47N/A The Solaris build supports either 32-bit or 64-bit builds, but
47N/A Windows and Linux will support only one, depending on the specific
47N/A OS being used.
47N/A Normally, setting this variable is only necessary on Solaris.
47N/A Set <tt>ARCH_DATA_MODEL</tt> to <tt>32</tt> for generating 32-bit binaries,
47N/A or to <tt>64</tt> for generating 64-bit binaries.
11N/A </dd>
23N/A <dt><a name="ALT_BOOTDIR"><tt>ALT_BOOTDIR</tt></a></dt>
11N/A <dd>
23N/A The location of the bootstrap JDK installation.
23N/A See <a href="#bootjdk">Bootstrap JDK</a> for more information.
23N/A You should always install your own local Bootstrap JDK and
23N/A always set <tt>ALT_BOOTDIR</tt> explicitly.
11N/A </dd>
47N/A <dt><a name="ALT_JDK_IMPORT_PATH"><tt>ALT_JDK_IMPORT_PATH</tt></a></dt>
47N/A <dd>
47N/A The location of a previously built JDK installation.
47N/A See <a href="#importjdk">Optional Import JDK</a> for more information.
47N/A </dd>
47N/A <dt><a name="ALT_OUTPUTDIR"><tt>ALT_OUTPUTDIR</tt></a> </dt>
47N/A <dd>
47N/A An override for specifying the (absolute) path of where the
47N/A build output is to go.
47N/A The default output directory will be build/<i>platform</i>.
47N/A </dd>
47N/A <dt><a name="ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a> </dt>
47N/A <dd>
47N/A The location of the C/C++ compiler.
47N/A The default varies depending on the platform.
47N/A </dd>
47N/A <dt><tt><a name="ALT_CACERTS_FILE">ALT_CACERTS_FILE</a></tt></dt>
47N/A <dd>
47N/A The location of the <a href="#cacerts">cacerts</a> file.
47N/A The default will refer to
47N/A <tt>jdk/src/share/lib/security/cacerts</tt>.
47N/A </dd>
47N/A <dt><a name="ALT_CUPS_HEADERS_PATH"><tt>ALT_CUPS_HEADERS_PATH</tt></a> </dt>
47N/A <dd>
47N/A The location of the CUPS header files.
47N/A See <a href="#cups">CUPS information</a> for more information.
47N/A If this path does not exist the fallback path is
47N/A <tt>/usr/include</tt>.
47N/A </dd>
47N/A <dt><a name="ALT_FREETYPE_LIB_PATH"><tt>ALT_FREETYPE_LIB_PATH</tt></a></dt>
11N/A <dd>
47N/A The location of the FreeType shared library.
47N/A See <a href="#freetype">FreeType information</a> for details.
47N/A </dd>
47N/A <dt><a name="ALT_FREETYPE_HEADERS_PATH"><tt>ALT_FREETYPE_HEADERS_PATH</tt></a></dt>
47N/A <dd>
47N/A The location of the FreeType header files.
47N/A See <a href="#freetype">FreeType information</a> for details.
47N/A </dd>
47N/A <dt><a name="ALT_JDK_DEVTOOLS_PATH"><tt>ALT_JDK_DEVTOOLS_PATH</tt></a></dt>
47N/A <dd>
47N/A The default root location of the devtools.
47N/A The default value is
47N/A <tt>$(ALT_SLASH_JAVA)/devtools</tt>.
47N/A </dd>
47N/A <dt><tt><a name="ALT_DEVTOOLS_PATH">ALT_DEVTOOLS_PATH</a></tt> </dt>
47N/A <dd>
47N/A The location of tools like the
47N/A <a href="#zip"><tt>zip</tt> and <tt>unzip</tt></a>
47N/A binaries, but might also contain the GNU make utility
47N/A (<tt><i>gmake</i></tt>).
47N/A So this area is a bit of a grab bag, especially on Windows.
47N/A The default value depends on the platform and
47N/A Unix Commands being used.
47N/A On Linux the default will be
47N/A <tt>$(ALT_JDK_DEVTOOLS_PATH)/linux/bin</tt>,
47N/A on Solaris
47N/A <tt>$(ALT_JDK_DEVTOOLS_PATH)/<i>{sparc,i386}</i>/bin</tt>,
47N/A and on Windows with CYGWIN
47N/A <tt>/usr/bin</tt>.
47N/A </dd>
318N/A <dt><tt><a name="ALT_DROPS_DIR">ALT_DROPS_DIR</a></tt> </dt>
318N/A <dd>
318N/A The location of any source drop bundles
318N/A (see <a href="#drops">Managing the Source Drops</a>).
318N/A The default will be
318N/A <tt>$(ALT_JDK_DEVTOOLS_PATH)/share/jdk7-drops</tt>.
318N/A </dd>
47N/A <dt><a name="ALT_UNIXCCS_PATH"><tt>ALT_UNIXCCS_PATH</tt></a></dt>
47N/A <dd>
47N/A <strong>Solaris only:</strong>
47N/A An override for specifying where the Unix CCS
47N/A command set are located.
47N/A The default location is <tt>/usr/ccs/bin</tt>
47N/A </dd>
47N/A <dt><a name="ALT_SLASH_JAVA"><tt>ALT_SLASH_JAVA</tt></a></dt>
47N/A <dd>
47N/A The default root location for many of the ALT path locations
47N/A of the following ALT variables.
47N/A The default value is
47N/A <tt>"/java"</tt> on Solaris and Linux,
47N/A <tt>"J:"</tt> on Windows.
11N/A </dd>
11N/A <dt><a name="ALT_BUILD_JDK_IMPORT_PATH"><tt>ALT_BUILD_JDK_IMPORT_PATH</tt></a></dt>
0N/A <dd>
11N/A These are useful in managing builds on multiple platforms.
11N/A The default network location for all of the import JDK images
11N/A for all platforms.
11N/A If <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>
11N/A is not set, this directory will be used and should contain
11N/A the following directories:
11N/A <tt>solaris-sparc</tt>,
11N/A <tt>solaris-i586</tt>,
11N/A <tt>solaris-sparcv9</tt>,
11N/A <tt>solaris-amd64</tt>,
11N/A <tt>linux-i586</tt>,
11N/A <tt>linux-amd64</tt>,
11N/A <tt>windows-i586</tt>,
11N/A and
11N/A <tt>windows-amd64</tt>.
11N/A Where each of these directories contain the import JDK image
11N/A for that platform.
0N/A </dd>
321N/A <dt><a name="ALT_OPENWIN_HOME"><tt>ALT_OPENWIN_HOME</tt></a></dt>
321N/A <dd>
321N/A The top-level directory of the libraries and include files for the platform's
321N/A graphical programming environment. The default location is platform specific.
321N/A For example, on Linux it defaults to <tt>/usr/X11R6/</tt>.
321N/A </dd>
47N/A <dt><strong>Windows specific:</strong></dt>
23N/A <dd>
47N/A <dl>
273N/A <dt><a name="ALT_WINDOWSSDKDIR"><tt>ALT_WINDOWSSDKDIR</tt></a> </dt>
47N/A <dd>
47N/A The location of the
273N/A Microsoft Windows SDK where some tools will be
273N/A located.
273N/A The default is whatever WINDOWSSDKDIR is set to
273N/A (or WindowsSdkDir) or the path
318N/A <br>
318N/A <tt>c:\Program Files\Microsoft SDKs\Windows\v7.0a</tt>
47N/A </dd>
47N/A <dt><tt><a name="ALT_DXSDK_PATH">ALT_DXSDK_PATH</a></tt> </dt>
47N/A <dd>
47N/A The location of the
47N/A <a href="#dxsdk">Microsoft DirectX 9 SDK</a>.
47N/A The default will be to try and use the DirectX environment
47N/A variable <tt>DXSDK_DIR</tt>,
47N/A failing that, look in <tt>C:/DXSDK</tt>.
47N/A </dd>
173N/A <dt><tt><a name="ALT_MSVCRNN_DLL_PATH">ALT_MSVCRNN_DLL_PATH</a></tt> </dt>
47N/A <dd>
47N/A The location of the
289N/A <a href="#msvcrNN"><tt>MSVCR100.DLL</tt></a>.
47N/A </dd>
47N/A </dl>
0N/A </dd>
321N/A <dt><strong>Cross-Compilation Support:</strong></dt>
321N/A <dd>
321N/A <dl>
321N/A <dt><a name="CROSS_COMPILE_ARCH"><tt>CROSS_COMPILE_ARCH</tt></a> </dt>
321N/A <dd>
321N/A Set to the target architecture of a cross-compilation build. If set, this
321N/A variable is used to signify that we are cross-compiling. The expectation
321N/A is that <a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a> is set
321N/A to point to the cross-compiler and that any cross-compilation specific flags
321N/A are passed using <a href="#EXTRA_CFLAGS"><tt>EXTRA_CFLAGS</tt></a>.
321N/A The <a href="#ALT_OPENWIN_HOME"><tt>ALT_OPENWIN_HOME</tt></a> variable should
321N/A also be set to point to the graphical header files (e.g. X11) provided with
321N/A the cross-compiler.
321N/A When cross-compiling we skip execution of any demos etc that may be built, and
321N/A also skip binary-file verification.
321N/A </dd>
321N/A <dt><tt><a name="EXTRA_CFLAGS">EXTRA_CFLAGS</a></tt> </dt>
321N/A <dd>
321N/A Used to pass cross-compilation options to the cross-compiler.
321N/A These are added to the <tt>CFLAGS</tt> and <tt>CXXFLAGS</tt> variables.
321N/A </dd>
321N/A <dt><tt><a name="USE_ONLY_BOOTDIR_TOOLS">USE_ONLY_BOOTDIR_TOOLS</a></tt> </dt>
321N/A <dd>
321N/A Used primarily for cross-compilation builds (and always set in that case)
321N/A this variable indicates that tools from the boot JDK should be used during
321N/A the build process, not the tools (<tt>javac</tt>, <tt>javah</tt>, <tt>jar</tt>)
321N/A just built (which can't execute on the build host).
321N/A </dd>
321N/A <dt><tt><a name="HOST_CC">HOST_CC</a></tt> </dt>
321N/A <dd>
321N/A The location of the C compiler to generate programs to run on the build host.
321N/A Some parts of the build generate programs that are then compiled and executed
321N/A to produce other parts of the build. Normally the primary C compiler is used
321N/A to do this, but when cross-compiling that would be the cross-compiler and the
321N/A resulting program could not be executed.
321N/A On Linux this defaults to <tt>/usr/bin/gcc</tt>; on other platforms it must be
321N/A set explicitly.
321N/A </dd>
321N/A </dl>
321N/A <dt><strong>Specialized Build Options:</strong></dt>
321N/A <dd>
321N/A Some build variables exist to support specialized build environments and/or specialized
321N/A build products. Their use is only supported in those contexts:
321N/A <dl>
321N/A <dt><tt><a name="BUILD_CLIENT_ONLY">BUILD_CLIENT_ONLY</a></tt> </dt>
321N/A <dd>
321N/A Indicates this build will only contain the Hotspot client VM. In addition to
321N/A controlling the Hotspot build target, it ensures that we don't try to copy
321N/A any server VM files/directories, and defines a default <tt>jvm.cfg</tt> file
321N/A suitable for a client-only environment. Using this in a 64-bit build will
321N/A generate a sanity warning as 64-bit client builds are not directly supported.
321N/A </dd>
321N/A <dt><tt><a name="BUILD_HEADLESS_ONLY"></a>BUILD_HEADLESS_ONLY</tt> </dt>
321N/A <dd>
321N/A Used when the build environment has no graphical capabilities at all. This
321N/A excludes building anything that requires graphical libraries to be available.
321N/A </dd>
321N/A <dt><tt><a name="JAVASE_EMBEDDED"></a>JAVASE_EMBEDDED</tt> </dt>
321N/A <dd>
321N/A Used to indicate this is a build of the Oracle Java SE Embedded product.
321N/A This will enable the directives included in the SE-Embedded specific build
321N/A files.
321N/A </dd>
321N/A <dt><tt><a name="LIBZIP_CAN_USE_MMAP">LIBZIP_CAN_USE_MMAP</a></tt> </dt>
321N/A <dd>
321N/A If set to false, disables the use of mmap by the zip utility. Otherwise,
321N/A mmap will be used.
321N/A </dd>
321N/A <dt><tt><a name="COMPRESS_JARS"></a>COMPRESS_JARS</tt> </dt>
321N/A <dd>
321N/A If set to true, causes certain jar files that would otherwise be built without
321N/A compression, to use compression.
321N/A </dd>
321N/A </dl>
321N/A </dd>
0N/A </dl>
11N/A </blockquote>
11N/A <!-- ------------------------------------------------------ -->
11N/A <hr>
318N/A <h2><a name="hints">Hints and Tips</a></h2>
318N/A <blockquote>
318N/A You don't have to use all these hints and tips, and in fact people do actually
318N/A build with systems that contradict these, but they might prove to be
318N/A helpful to some.
318N/A <ul>
318N/A <li>
318N/A If <tt>make sanity</tt> does not work, find out why, fix that
318N/A before going any further. Or at least understand what the
318N/A complaints are from it.
318N/A </li>
318N/A <li>
318N/A JDK: Keep in mind that you are building a JDK, but you need
318N/A a JDK (BOOTDIR JDK) to build this JDK.
318N/A </li>
318N/A <li>
318N/A Ant: The ant utility is a java application and besides having
318N/A ant available to you, it's important that ant finds the right
318N/A java to run with. Make sure you can type <tt>ant -version</tt>
318N/A and get clean results with no error messages.
318N/A </li>
318N/A <li>
318N/A Linux: Try and favor the system packages over building your own
318N/A or getting packages from other areas.
318N/A Most Linux builds should be possible with the system's
318N/A available packages.
318N/A </li>
318N/A <li>
318N/A Solaris: Typically you will need to get compilers on your systems
318N/A and occasionally GNU make 3.81 if a gmake binary is not available.
318N/A The gmake binary might not be 3.81, be careful.
318N/A </li>
318N/A <li>
318N/A Windows VS2010:
318N/A <ul>
318N/A <li>
318N/A Only the C++ part of VS2010 is needed.
318N/A Try to let the installation go to the default install directory.
318N/A Always reboot your system after installing VS2010.
318N/A The system environment variable VS100COMNTOOLS should be
318N/A set in your environment.
318N/A </li>
318N/A <li>
318N/A Make sure that TMP and TEMP are also set in the environment
318N/A and refer to Windows paths that exist, like <tt>C:\temp</tt>,
318N/A not <tt>/tmp</tt>, not <tt>/cygdrive/c/temp</tt>, and not <tt>C:/temp</tt>.
318N/A <tt>C:\temp</tt> is just an example, it is assumed that this area is
318N/A private to the user, so by default after installs you should
318N/A see a unique user path in these variables.
318N/A </li>
318N/A <li>
318N/A You need to use vsvars32.bat or vsvars64.bat to get the
318N/A PATH, INCLUDE, LIB, LIBPATH, and WINDOWSSDKDIR
318N/A variables set in your shell environment.
318N/A These bat files are not easy to use from a shell environment.
318N/A However, there is a script placed in the root jdk7 repository called
318N/A vsvars.sh that can help, it should only be done once in a shell
318N/A that will be doing the build, e.g.<br>
318N/A <tt>sh /make/scripts/vsvars.sh -v10 > settings<br>
318N/A eval `cat settings`</tt><br>
318N/A Or just <tt>eval `sh /make/scripts/vsvars.sh -v10`</tt>.
318N/A </li>
318N/A </ul>
318N/A </li>
318N/A <li>
318N/A Windows: PATH order is critical, see the
318N/A <a href="#paths">paths</a> section for more information.
318N/A </li>
318N/A <li>
318N/A Windows 64bit builds: Use ARCH_DATA_MODEL=64.
318N/A </li>
318N/A </ul>
318N/A </blockquote>
318N/A <!-- ------------------------------------------------------ -->
318N/A <hr>
11N/A <h2><a name="troubleshooting">Troubleshooting</a></h2>
11N/A <blockquote>
11N/A A build can fail for any number of reasons.
11N/A Most failures
11N/A are a result of trying to build in an environment in which all the
11N/A pre-build requirements have not been met.
11N/A The first step in
11N/A troubleshooting a build failure is to recheck that you have satisfied
11N/A all the pre-build requirements for your platform.
11N/A Look for the check list of the platform you are building on in the
11N/A <a href="#contents">Table of Contents</a>.
11N/A <p>
274N/A You can validate your build environment by using the <tt>sanity</tt>
274N/A target.
274N/A Any errors listed
274N/A will stop the build from starting, and any warnings may result in
274N/A a flawed product build.
274N/A We strongly encourage you to evaluate every
274N/A sanity check warning and fix it if required, before you proceed
274N/A further with your build.
11N/A <p>
274N/A Some of the more common problems with builds are briefly described
274N/A below, with suggestions for remedies.
11N/A <ul>
11N/A <li>
318N/A <b>Corrupted Bundles on Windows:</b>
318N/A <blockquote>
318N/A Some virus scanning software has been known to corrupt the
318N/A downloading of zip bundles.
318N/A It may be necessary to disable the 'on access' or 'real time'
318N/A virus scanning features to prevent this corruption.
318N/A This type of "real time" virus scanning can also slow down the
318N/A build process significantly.
318N/A Temporarily disabling the feature, or excluding the build
318N/A output directory may be necessary to get correct and faster builds.
318N/A </blockquote>
318N/A </li>
318N/A <li>
11N/A <b>Slow Builds:</b>
11N/A <blockquote>
11N/A If your build machine seems to be overloaded from too many
11N/A simultaneous C++ compiles, try setting the <tt>HOTSPOT_BUILD_JOBS</tt>
11N/A variable to <tt>1</tt> (if you're using a multiple CPU
11N/A machine, setting it to more than the the number of CPUs is probably
11N/A not a good idea).
11N/A <p>
274N/A Creating the javadocs can be very slow, if you are running
274N/A javadoc, consider skipping that step.
11N/A <p>
274N/A Faster hardware and more RAM always helps too.
274N/A The VM build tends to be CPU intensive (many C++ compiles),
274N/A and the rest of the JDK will often be disk intensive.
11N/A <p>
274N/A Faster compiles are possible using a tool called
274N/A <a href="http://ccache.samba.org/" target="_blank">ccache</a>.
11N/A </blockquote>
11N/A </li>
11N/A <li>
11N/A <b>File time issues:</b>
11N/A <blockquote>
11N/A If you see warnings that refer to file time stamps, e.g.
11N/A <blockquote>
11N/A <i>Warning message:</i><tt> File `xxx' has modification time in
274N/A the future.</tt>
11N/A <br>
11N/A <i>Warning message:</i> <tt> Clock skew detected. Your build may
274N/A be incomplete.</tt>
11N/A </blockquote>
11N/A These warnings can occur when the clock on the build machine is out of
11N/A sync with the timestamps on the source files. Other errors, apparently
11N/A unrelated but in fact caused by the clock skew, can occur along with
11N/A the clock skew warnings. These secondary errors may tend to obscure the
11N/A fact that the true root cause of the problem is an out-of-sync clock.
11N/A For example, an out-of-sync clock has been known to cause an old
11N/A version of javac to be used to compile some files, resulting in errors
11N/A when the pre-1.4 compiler ran across the new <tt>assert</tt> keyword
11N/A in the 1.4 source code.
11N/A <p>
274N/A If you see these warnings, reset the clock on the build
274N/A machine, run "<tt><i>gmake</i> clobber</tt>" or delete the directory
274N/A containing the build output, and restart the build from the beginning.
11N/A </blockquote>
11N/A </li>
11N/A <li>
11N/A <b>Error message: <tt>Trouble writing out table to disk</tt></b>
11N/A <blockquote>
11N/A Increase the amount of swap space on your build machine.
11N/A </blockquote>
11N/A </li>
11N/A <li>
11N/A <b>Error Message: <tt>libstdc++ not found:</tt></b>
11N/A <blockquote>
11N/A This is caused by a missing libstdc++.a library.
11N/A This is installed as part of a specific package
11N/A (e.g. libstdc++.so.devel.386).
47N/A By default some 64-bit Linux versions (e.g. Fedora)
47N/A only install the 64-bit version of the libstdc++ package.
11N/A Various parts of the JDK build require a static
11N/A link of the C++ runtime libraries to allow for maximum
11N/A portability of the built images.
11N/A </blockquote>
11N/A </li>
11N/A <li>
11N/A <b>Error Message: <tt>cannot restore segment prot after reloc</tt></b>
11N/A <blockquote>
11N/A This is probably an issue with SELinux (See
11N/A <a href="http://en.wikipedia.org/wiki/SELinux" target="_blank">
274N/A http://en.wikipedia.org/wiki/SELinux</a>).
11N/A Parts of the VM is built without the <tt>-fPIC</tt> for
11N/A performance reasons.
11N/A <p>
274N/A To completely disable SELinux:
274N/A <ol>
274N/A <li><tt>$ su root</tt></li>
274N/A <li><tt># system-config-securitylevel</tt></li>
274N/A <li><tt>In the window that appears, select the SELinux tab</tt></li>
274N/A <li><tt>Disable SELinux</tt></li>
274N/A </ol>
11N/A <p>
274N/A Alternatively, instead of completely disabling it you could
274N/A disable just this one check.
274N/A <ol>
274N/A <li>Select System->Administration->SELinux Management</li>
274N/A <li>In the SELinux Management Tool which appears,
11N/A select "Boolean" from the menu on the left</li>
274N/A <li>Expand the "Memory Protection" group</li>
274N/A <li>Check the first item, labeled
11N/A "Allow all unconfined executables to use libraries requiring text relocation ..."</li>
274N/A </ol>
11N/A </blockquote>
11N/A </li>
11N/A <li>
318N/A <b>Windows Error Messages:</b><br>
318N/A <tt>*** fatal error - couldn't allocate heap, ... </tt><br>
318N/A <tt>rm fails with "Directory not empty"</tt><br>
318N/A <tt>unzip fails with "cannot create ... Permission denied"</tt><br>
318N/A <tt>unzip fails with "cannot create ... Error 50"</tt><br>
11N/A <blockquote>
11N/A The CYGWIN software can conflict with other non-CYGWIN
11N/A software. See the CYGWIN FAQ section on
11N/A <a href="http://cygwin.com/faq/faq.using.html#faq.using.bloda" target="_blank">
274N/A BLODA (applications that interfere with CYGWIN)</a>.
11N/A </blockquote>
11N/A </li>
11N/A <li>
318N/A <b>Windows Error Message: <tt>spawn failed</tt></b>
11N/A <blockquote>
318N/A Try rebooting the system, or there could be some kind of
318N/A issue with the disk or disk partition being used.
318N/A Sometimes it comes with a "Permission Denied" message.
11N/A </blockquote>
11N/A </li>
11N/A </ul>
11N/A </blockquote>
11N/A <hr>
11N/A </body>
11N/A</html>