3988N/A<!
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3988N/A <
title>OpenJDK Build README</
title>
3988N/A <
body style="background-color:lightcyan">
3988N/A <!-- ====================================================== --> 3988N/A <
h1>OpenJDK Build README</
h1>
3988N/A <!-- ------------------------------------------------------ --> 3988N/A <
h2><
a name="introduction">Introduction</
a></
h2>
3988N/A This README file contains build instructions for the
3988N/A Building the source code for the
3988N/A a certain degree of technical expertise.
3988N/A <!-- ------------------------------------------------------ --> 3988N/A <
h2><
a name="contents">Contents</
a></
h2>
3988N/A <
li><
a href="#introduction">Introduction</
a></
li>
3988N/A <
li><
a href="#MBE">Minimum Build Environments</
a></
li>
4011N/A <
li><
a href="#SDBE">Specific Developer Build Environments</
a>
3988N/A <
li><
a href="#fedora">Fedora Linux</
a> </
li>
3988N/A <
li><
a href="#centos">CentOS Linux</
a> </
li>
3988N/A <
li><
a href="#ubuntu">Ubuntu Linux</
a> </
li>
3988N/A <
li><
a href="#opensuse">OpenSUSE</
a></
li>
3988N/A <
li><
a href="#mandriva">Mandriva</
a></
li>
3988N/A <
li><
a href="#opensolaris">OpenSolaris</
a></
li>
3988N/A <
li><
a href="#directories">Source Directory Structure</
a> </
li>
3988N/A <
li><
a href="#building">Build Information</
a>
3988N/A <
li><
a href="#gmake">GNU Make (<
tt><
i>gmake</
i></
tt>)</
a> </
li>
3988N/A <
li><
a href="#linux">Basic Linux System Setup</
a> </
li>
3988N/A <
li><
a href="#solaris">Basic Solaris System Setup</
a> </
li>
3988N/A <
li><
a href="#windows">Basic Windows System Setup</
a> </
li>
3988N/A <
li><
a href="#dependencies">Build Dependencies</
a> </
li>
3988N/A <
li><
a href="#bootjdk">Bootstrap JDK</
a> </
li>
3988N/A <
li><
a href="#binaryplugs">Binary Plugs</
a> </
li>
3988N/A <
li><
a href="#importjdk">Optional Import JDK</
a> </
li>
3988N/A <
li><
a href="#ant">Ant</
a> </
li>
3988N/A <
li><
a href="#cacerts">Certificate Authority File (cacert)</
a> </
li>
3988N/A <
li><
a href="#compilers">Compilers</
a>
4011N/A <
li><
a href="#msvc64">Microsoft Visual Studio Professional for 64 bit</
a> </
li>
3988N/A <
li><
a href="#mssdk64">Microsoft Windows SDK for 64 bit</
a> </
li>
3988N/A <
li><
a href="#studio">Sun Studio</
a> </
li>
4134N/A <
li><
a href="#zip">Zip and Unzip</
a> </
li>
3988N/A <
li><
a href="#freetype">FreeType2 Fonts</
a> </
li>
3988N/A <
li><
a href="#cups">CUPS Include files</
a> </
li>
3988N/A <
li><
a href="#xrender">XRender Include files</
a></
li>
3988N/A <
li><
a href="#alsa">ALSA files</
a> </
li>
3988N/A <
li>Unix Command Tools (<
a href="#cygwin">CYGWIN</
a>)</
li>
3988N/A <
li><
a href="#dxsdk">DirectX 9.0 SDK</
a> </
li>
3988N/A <
li><
a href="#creating">Creating the Build</
a> </
li>
3988N/A <
li><
a href="#testing">Testing the Build</
a> </
li>
3988N/A <
li><
a href="#troubleshooting">Troubleshooting</
a></
li>
3988N/A <!-- ------------------------------------------------------ --> 3988N/A <
h2><
a name="MBE">Minimum Build Environments</
a></
h2>
3988N/A This file often describes specific requirements for what we call the
4802N/A "minimum build environments" (MBE) for this
3988N/A specific release of the JDK,
3988N/A Building with the MBE will generate the most compatible
4134N/A bits that install on, and run correctly on, the most variations
3988N/A of the same base OS and hardware architecture.
3988N/A These usually represent what is often called the
3988N/A least common denominator platforms.
4134N/A It is understood that most developers will NOT be using these
4134N/A specific platforms, and in fact creating these specific platforms
4134N/A may be difficult due to the age of some of this software.
3988N/A The minimum OS and C/C++ compiler versions needed for building the
3988N/A <
th>Base OS and Architecture</
th>
3988N/A <
td>Linux X86 (32-bit)</
td>
3988N/A <
td>Linux X64 (64-bit)</
td>
3988N/A <
td>Solaris SPARC (32-bit)</
td>
3988N/A SunSolve</
a> for patch downloads.
3988N/A <
td>Sun Studio 12 Update 1 + patches</
td>
3988N/A <
td>Solaris SPARCV9 (64-bit)</
td>
3988N/A SunSolve</
a> for patch downloads.
3988N/A <
td>Sun Studio 12 Update 1 + patches</
td>
3988N/A <
td>Solaris X86 (32-bit)</
td>
3988N/A SunSolve</
a> for patch downloads.
3988N/A <
td>Sun Studio 12 Update 1 + patches</
td>
3988N/A <
td>Solaris X64 (64-bit)</
td>
3988N/A SunSolve</
a> for patch downloads.
3988N/A <
td>Sun Studio 12 Update 1 + patches</
td>
3988N/A <
td>Windows X86 (32-bit)</
td>
3988N/A <
td>Microsoft Visual Studio C++ 2010 Professional Edition</
td>
3988N/A <
td>Windows X64 (64-bit)</
td>
3988N/A <
td>Windows Server 2003 - Enterprise x64 Edition</
td>
3988N/A <
td>Microsoft Visual Studio C++ 2010 Professional Edition</
td>
3988N/A These same sources do indeed build on many more systems than the
3988N/A above older generation systems, again the above is just a minimum.
3988N/A Compilation problems with newer or different C/C++ compilers is a
3988N/A Similarly, compilation problems related to changes to the
3988N/A common problem with newer or unreleased OS versions.
3988N/A Please report these types of problems as bugs so that they
3988N/A can be dealt with accordingly.
3988N/A <!-- ------------------------------------------------------ --> 3988N/A <
h2><
a name="SDBE">Specific Developer Build Environments</
a></
h2>
4641N/A We won't be listing all the possible environments, but
4641N/A we will try to provide what information we have available to us.
3988N/A <!-- ------------------------------------------------------ --> 3988N/A <
h3><
a name="fedora">Fedora</
a></
h3>
3988N/A you need to install several build dependencies. The simplest
3988N/A way to do it is to execute the following commands as user
3988N/A <
code>yum-builddep java-openjdk</
code>
3988N/A <
code>yum install gcc gcc-c++</
code>
3988N/A In addition, it's necessary to set a few environment variables for the build:
3988N/A you need to install several build dependencies. The simplest
3988N/A way to do it is to execute the following commands as user
3988N/A <
code>yum-builddep java-1.6.0-openjdk</
code>
3988N/A <
code>yum install gcc gcc-c++</
code>
3988N/A In addition, it's necessary to set a few environment variables for the build:
3988N/A you need to install several build dependencies. The simplest
4641N/A way to do it is to execute the following commands as user
3988N/A <
code>yum-builddep java-1.6.0-openjdk</
code>
3988N/A <
code>yum install gcc gcc-c++</
code>
3988N/A In addition, it's necessary to set a few environment variables for the build:
3988N/A <!-- ------------------------------------------------------ --> 3988N/A <
h3><
a name="centos">CentOS 5.2</
a></
h3>
4011N/A you need to make sure you have
3988N/A the following Development bundles installed:
3988N/A <
li>Development Libraries</
li>
3988N/A <
li>X Software Development</
li>
4802N/A Plus the following packages:
3988N/A <
li>cups devel: Cups Development Package</
li>
3988N/A <
li>alsa devel: Alsa Development Package</
li>
3988N/A The freetype 2.3 packages don't seem to be available,
3988N/A but the freetype 2.3 sources can be downloaded, built,
3988N/A and installed easily enough from
3988N/A Build and install with something like:
3988N/A Mercurial packages could not be found easily, but a Google
3988N/A search should find ones, and they usually include Python if
4011N/A <!-- ------------------------------------------------------ --> 4011N/A <
h3><
a name="debian">Debian</
a></
h3>
3988N/A <
h4>Debian 5.0 (Lenny)</
h4>
3988N/A you need to install several build dependencies.
3988N/A The simplest way to install the build dependencies is to
4011N/A execute the following commands as user <
tt>root</
tt>:
3988N/A <
code>aptitude build-dep openjdk-6</
code>
3988N/A <
code>aptitude install openjdk-6-jdk libmotif-dev</
code>
3988N/A In addition, it's necessary to set a few environment variables for the build:
3988N/A <!-- ====================================================== --> 4802N/A <
h3><
a name="ubuntu">Ubuntu</
a></
h3>
3988N/A you need to install several build dependencies.
3988N/A First, you need to enable the universe repository in the
3988N/A Software Sources application and reload the repository
3988N/A information. The Software Sources application is available
3988N/A The simplest way to install the build dependencies is to
3988N/A execute the following commands:
3988N/A <
code>sudo aptitude build-dep openjdk-6</
code>
4011N/A <
code>sudo aptitude install openjdk-6-jdk</
code>
3988N/A In addition, it's necessary to set a few environment variables for the build:
3988N/A you need to install several build dependencies. The simplest
3988N/A way to do it is to execute the following commands:
3988N/A <
code>sudo aptitude build-dep openjdk-6</
code>
3988N/A <
code>sudo aptitude install openjdk-6-jdk</
code>
3988N/A In addition, it's necessary to set a few environment variables for the build:
3988N/A you need to install several build dependencies. The simplest
3988N/A way to do it is to execute the following commands:
3988N/A <
code>sudo aptitude build-dep openjdk-6</
code>
3988N/A <
code>sudo aptitude install openjdk-6-jdk</
code>
3988N/A In addition, it's necessary to set a few environment variables for the build:
3988N/A <!-- ====================================================== --> 3988N/A <
h3><
a name="opensuse">OpenSUSE</
a></
h3>
3988N/A you need to install several build dependencies.
3988N/A The simplest way to install the build dependencies is to
3988N/A execute the following commands:
3988N/A <
code>sudo zypper source-install -d java-1_6_0-openjdk</
code>
3988N/A <
code>sudo zypper install make</
code>
3988N/A In addition, it is necessary to set a few environment variables for the build:
3988N/A Finally, you need to unset the <
code>JAVA_HOME</
code> environment variable:
3988N/A <
code>export -n JAVA_HOME</
code>
3988N/A <!-- ====================================================== --> 3988N/A <
h3><
a name="mandriva">Mandriva</
a></
h3>
3988N/A <
h4>Mandriva Linux One 2009 Spring</
h4>
3988N/A you need to install several build dependencies.
3988N/A The simplest way to install the build dependencies is to
3988N/A execute the following commands as user <
tt>root</
tt>:
3988N/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>
3988N/A In addition, it is necessary to set a few environment variables for the build:
3988N/A <!-- ====================================================== --> 3988N/A <
h3><
a name="opensolaris">OpenSolaris</
a></
h3>
3988N/A <
h4>OpenSolaris 2009.06</
h4>
3988N/A you need to install several build dependencies.
3988N/A The simplest way to install the build dependencies is to
3988N/A execute the following commands:
3988N/A <
code>pfexec pkg install SUNWgmake SUNWj6dev SUNWant sunstudioexpress SUNWcups SUNWzip SUNWunzip SUNWxwhl SUNWxorg-headers SUNWaudh SUNWfreetype2</
code>
3988N/A In addition, it is necessary to set a few environment variables for the build:
3988N/A Finally, you need to make sure that the build process can find the Sun Studio compilers:
3988N/A <!-- ------------------------------------------------------ --> 3988N/A <
h2><
a name="directories">Source Directory Structure</
a></
h2>
3988N/A The source code for the OpenJDK is delivered in a set of
3988N/A The <
tt>hotspot</
tt> directory contains the source code and make
3988N/A files for building the OpenJDK Hotspot Virtual Machine.
3988N/A The <
tt>langtools</
tt> directory contains the source code and make
3988N/A files for building the OpenJDK javac and language tools.
3988N/A The <
tt>corba</
tt> directory contains the source code and make
3988N/A files for building the OpenJDK Corba files.
3988N/A The <
tt>jaxws</
tt> directory contains the source code and make
3988N/A files for building the OpenJDK JAXWS files.
3988N/A The <
tt>jaxp</
tt> directory contains the source code and make
3988N/A files for building the OpenJDK JAXP files.
3988N/A The <
tt>jdk</
tt> directory contains the source code and make files for
3988N/A building the OpenJDK runtime libraries and misc files.
3988N/A The top level <
tt>Makefile</
tt>
3988N/A is used to build the entire OpenJDK.
3988N/A <!-- ------------------------------------------------------ --> 3988N/A <
h2><
a name="building">Build Information</
a></
h2>
3988N/A is done with a <
tt><
i>gmake</
i></
tt>
3988N/A environment or make variable settings that direct the make rules
3988N/A to where various components have been installed.
3988N/A Where possible the makefiles will attempt to located the various
3988N/A components in the default locations or any component specific
3988N/A When the normal defaults fail or components cannot be found,
3988N/A <
tt>ALT_*</
tt> variables (alternates)
3988N/A can be used to help the makefiles locate components.
3988N/A if you need help in setting up your environment variables.
3988N/A A build could be as simple as:
3988N/A <
i>gmake</
i> sanity && <
i>gmake</
i>
3988N/A Of course ksh or sh would work too.
3988N/A But some customization will probably be necessary.
3988N/A The <
tt>sanity</
tt> rule will make some basic checks on build
3988N/A dependencies and generate appropriate warning messages
3988N/A regarding missing, out of date, or newer than expected components
3988N/A <!-- ------------------------------------------------------ --> 3988N/A <
h3><
a name="gmake">GNU make (<
tt><
i>gmake</
i></
tt>)</
a></
h3>
3988N/A The Makefiles in the OpenJDK are only valid when used with the
3988N/A GNU version of the utility command <
tt>make</
tt>
3988N/A A few notes about using GNU make:
3988N/A In general, you need GNU make version 3.81 or newer.
3988N/A Place the location of the GNU make binary in the <
tt>PATH</
tt>.
3988N/A If your Solaris system has the software
3988N/A from the Solaris Companion CD installed,
3988N/A you should use <
tt>gmake</
tt>
3988N/A In more recent versions of Solaris GNU make can be found
3988N/A <
b>WARNING:</
b> Watch out for make version 3.81, it may
3988N/A not work due to a lack of support for MS-DOS drive letter paths
3988N/A like <
tt>C:/</
tt> or <
tt>C:\</
tt>.
3988N/A Use a 3.80 version, or find a newer
3988N/A version that has this problem fixed.
3988N/A no longer installed by default by the cygwin installer.
3988N/A mozilla developer center</
a>
3988N/A It's hoped that when make 3.82 starts shipping in a future cygwin
3988N/A release that this MS-DOS path issue will be fixed.
4011N/A Information on GNU make, and access to ftp download sites, are
4011N/A The latest source to GNU make is available at
4011N/A <!-- ------------------------------------------------------ --> 4011N/A <
h3><
a name="linux">Basic Linux System Setup</
a></
h3>
3988N/A <
strong>i586 only:</
strong>
3988N/A The minimum recommended hardware for building the Linux version
3988N/A is a Pentium class processor or better, at least 256 MB of RAM, and
3988N/A approximately 1.5 GB of free disk space.
4011N/A The minimum recommended hardware for building the Linux
4011N/A version is an AMD Opteron class processor, at least 512 MB of RAM, and
4011N/A approximately 4 GB of free disk space.
4011N/A The build will use the tools contained in
4011N/A of a standard installation of the Linux operating environment.
4011N/A You should ensure that these directories are in your
4011N/A Note that some Linux systems have a habit of pre-populating
4011N/A your environment variables for you, for example <
tt>JAVA_HOME</
tt>
4011N/A might get pre-defined for you to refer to the JDK installed on
4011N/A You will need to unset <
tt>JAVA_HOME</
tt>.
4011N/A It's a good idea to run <
tt>env</
tt> and verify the
4011N/A environment variables you are getting from the default system
4011N/A settings make sense for building the
4011N/A <!-- ------------------------------------------------------ --> 4011N/A <
h4><
a name="linux_checklist">Basic Linux Check List</
a></
h4>
4011N/A <
a href="#bootjdk">Bootstrap JDK</
a>, set
4011N/A <
tt><
a href="#ALT_BOOTDIR">ALT_BOOTDIR</
a></
tt>.
4011N/A <
a href="#binaryplugs">Binary Plugs</
a>, set
4011N/A <
tt><
a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</
a></
tt>.
3988N/A <
a href="#importjdk">Optional Import JDK</
a>, set
3988N/A <
tt><
a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</
a></
tt>.
3988N/A Install or upgrade the <
a href="#freetype">FreeType development
3988N/A make sure it is in your PATH.
3988N/A <!-- ------------------------------------------------------ --> 3988N/A <
h3><
a name="solaris">Basic Solaris System Setup</
a></
h3>
3988N/A The minimum recommended hardware for building the
3988N/A Solaris SPARC version is an UltraSPARC with 512 MB of RAM.
3988N/A the Solaris x86 version, a Pentium class processor or better and at
3988N/A least 512 MB of RAM are recommended.
3988N/A Approximately 1.4 GB of free disk
3988N/A space is needed for a 32-bit build.
3988N/A If you are building the 64-bit version, you should
3988N/A run the command "isainfo -v" to verify that you have a
3988N/A 64-bit installation, it should say <
tt>sparcv9</
tt> or
3988N/A An additional 7 GB of free disk space is needed
3988N/A and <
tt>/
usr/
bin</
tt> of a standard developer or full installation of
3988N/A the Solaris operating environment.
3988N/A Solaris patches specific to the JDK can be downloaded from the
3988N/A SunSolve JDK Solaris patches download page</
a>.
3988N/A You should ensure that the latest patch cluster for
3988N/A your version of the Solaris operating environment has also
3988N/A <!-- ------------------------------------------------------ --> 3988N/A <
h4><
a name="solaris_checklist">Basic Solaris Check List</
a></
h4>
3988N/A <
a href="#bootjdk">Bootstrap JDK</
a>, set
3988N/A <
tt><
a href="#ALT_BOOTDIR">ALT_BOOTDIR</
a></
tt>.
3988N/A <
a href="#binaryplugs">Binary Plugs</
a>, set
3988N/A <
tt><
a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</
a></
tt>.
3988N/A <
a href="#importjdk">Optional Import JDK</
a>, set
3988N/A <
tt><
a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</
a></
tt>.
3988N/A <
a href="#studio">Sun Studio Compilers</
a>, set
3988N/A <
a href="#ALT_COMPILER_PATH"><
tt>ALT_COMPILER_PATH</
tt></
a>.
3988N/A <
a href="#cups">CUPS Include files</
a>, set
3988N/A <
tt><
a href="#ALT_CUPS_HEADERS_PATH">ALT_CUPS_HEADERS_PATH</
a></
tt>.
3988N/A Install the <
a href="#xrender">XRender Include files</
a>.
3988N/A make sure it is in your PATH.
3988N/A <!-- ------------------------------------------------------ --> 3988N/A <
h3><
a name="windows">Basic Windows System Setup</
a></
h3>
3988N/A <
strong>i586 only:</
strong>
3988N/A The minimum recommended hardware for building the 32-bit or X86
3988N/A Windows version is an Pentium class processor or better, at least
3988N/A 512 MB of RAM, and approximately 600 MB of free disk space.
3988N/A NOTE: The Windows build machines need to use the
3988N/A Build machines formatted to FAT32 will not work
3988N/A because FAT32 doesn't support case-sensitivity in file names.
4802N/A The minimum recommended hardware for building
4802N/A the Windows X64 version is an AMD Opteron class processor, at least 1
3988N/A GB of RAM, and approximately 10 GB of free disk space.
3988N/A <!-- ------------------------------------------------------ --> 3988N/A <
h4><
a name="paths">Windows Paths</
a></
h4>
3988N/A Note that GNU make is a historic utility and is based very
3988N/A heavily on shell scripting, so it does not tolerate the Windows habit
3988N/A of having spaces in pathnames or the use of the <
tt>\</
tt>characters in pathnames.
3988N/A Luckily on most Windows systems, you can use <
tt>/</
tt>instead of \, and
3988N/A there is always a 'short' pathname without spaces for any path that
3988N/A Unfortunately, this short pathname can be somewhat dynamic and the
3988N/A formula is difficult to explain.
3988N/A You can use <
tt>cygpath</
tt> utility to map pathnames with spaces
4802N/A or the <
tt>\</
tt>character into the <
tt>C:/</
tt> style of pathname
4802N/A <
tt>cygpath -s -m "<
i>path</
i>"</
tt>.
3988N/A The makefiles will try to translate any pathnames supplied
3988N/A to it into the <
tt>C:/</
tt> style automatically.
3988N/A Note that use of CYGWIN creates a unique problem with regards to
3988N/A setting <
a href="#path"><
tt>PATH</
tt></
a>. Normally on Windows
3988N/A the <
tt>PATH</
tt> variable contains directories
3988N/A separated with the ";" character (Solaris and Linux uses ":").
3988N/A With CYGWIN, it uses ":", but that means that paths like "C:/path"
4134N/A cannot be placed in the CYGWIN version of <
tt>PATH</
tt> and
3988N/A which CYGWIN understands, but only CYGWIN understands.
3988N/A So be careful with paths on Windows.
3988N/A <!-- ------------------------------------------------------ --> 3988N/A <
h4><
a name="windows_checklist">Basic Windows Check List</
a></
h4>
3988N/A <
a href="#cygwin">CYGWIN product</
a>.
3988N/A <
a href="#bootjdk">Bootstrap JDK</
a>, set
3988N/A <
tt><
a href="#ALT_BOOTDIR">ALT_BOOTDIR</
a></
tt>.
3988N/A <
a href="#binaryplugs">Binary Plugs</
a>, set
3988N/A <
tt><
a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</
a></
tt>..
3988N/A <
a href="#importjdk">Optional Import JDK</
a>, set
3988N/A <
tt><
a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</
a></
tt>.
4802N/A <
a href="#msvc32">Microsoft Visual Studio Compilers</
a>).
3988N/A Setup all environment variables for compilers
3988N/A (see <
a href="#msvc32">compilers</
a>).
3988N/A <
a href="#dxsdk">Microsoft DirectX SDK</
a>.
3988N/A make sure it is in your PATH and set
4802N/A <
tt><
a href="#ANT_HOME">ANT_HOME</
a></
tt>.
3988N/A <!-- ------------------------------------------------------ --> 3988N/A <
h3><
a name="dependencies">Build Dependencies</
a></
h3>
3988N/A Depending on the platform, the OpenJDK build process has some basic
3988N/A dependencies on components not part of the OpenJDK sources.
3988N/A Some of these are specific to a platform, some even specific to
3988N/A Each dependency will have a set of ALT variables that can be set
3988N/A to tell the makefiles where to locate the component.
3988N/A In most cases setting these ALT variables may not be necessary
3988N/A and the makefiles will find defaults on the system in standard
3988N/A install locations or through component specific variables.
3988N/A <!-- ------------------------------------------------------ --> 3988N/A <
h4><
a name="bootjdk">Bootstrap JDK</
a></
h4>
3988N/A All OpenJDK builds require access to the previously released
3988N/A JDK 6, this is often called a bootstrap JDK.
3988N/A The JDK 6 binaries can be downloaded from Sun's
3988N/A target="_blank">JDK 6 download site</
a>.
3988N/A For build performance reasons
3988N/A is very important that this bootstrap JDK be made available on the
3988N/A local disk of the machine doing the build.
3988N/A <
tt><
a href="#ALT_BOOTDIR">ALT_BOOTDIR</
a></
tt>
3988N/A to point to the location of
3988N/A the bootstrap JDK installation, this is the directory pathname
3988N/A that contains a <
tt>bin, lib, and include</
tt>
3988N/A It's also a good idea to also place its <
tt>bin</
tt> directory
3988N/A in the <
tt>PATH</
tt> environment variable, although it's
4011N/A Some pre-installed JDK images may be available to you in the
4011N/A <
tt><
a href="#ALT_BOOTDIR">ALT_BOOTDIR</
a></
tt>
4011N/A the makefiles will look in that location for a JDK it can use.
4011N/A <!-- ------------------------------------------------------ --> 4011N/A <
h4><
a name="binaryplugs">Binary Plugs</
a></
h4>
4011N/A Not all of the source code that makes up the JDK is available
4011N/A under an open-source license.
4011N/A This is a temporary situation and these binary plugs will be
3988N/A replaced with fully open source replacements as soon as possible.
3988N/A So currently, in order to build a complete OpenJDK image,
4011N/A you must first download and install the appropriate
4011N/A binary plug bundles for the OpenJDK, go to the
3988N/A link and download the binaryplugs for
3988N/A The file downloaded is a jar file that must be extracted by running
3988N/A <
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>
3988N/A A prompt will be issued for acceptance of these binary plug files.
3988N/A During the OpenJDK build process these "binary plugs"
3988N/A for the encumbered components will be copied into your
3988N/A resulting OpenJDK binary build image.
3988N/A These binary plug files are only for the purpose of
3988N/A building an OpenJDK binary.
3988N/A <
tt><
a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</
a></
tt>
3988N/A to the root of this installation.
3988N/A <!-- ------------------------------------------------------ --> 3988N/A <
h4><
a name="importjdk">Optional Import JDK</
a></
h4>
3988N/A The <
tt><
a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</
a></
tt>
3988N/A setting is only needed if you are not building the entire
3988N/A JDK. For example, if you have built the entire JDK once, and
3988N/A wanted to avoid repeatedly building the Hotspot VM, you could
4011N/A set this to the location of the previous JDK install image
4011N/A and the build will copy the needed files from this import area.
4011N/A <!-- ------------------------------------------------------ --> 4011N/A <
h4><
a name="ant">Ant</
a></
h4>
4011N/A All OpenJDK builds require access to least Ant 1.6.5.
4011N/A The Ant tool is available from the
3988N/A You should always make sure <
tt>ant</
tt> is in your PATH, and
4011N/A on Windows you may also need to set
4011N/A <
tt><
a href="#ANT_HOME">ANT_HOME</
a></
tt>
4011N/A to point to the location of
4011N/A the Ant installation, this is the directory pathname
4011N/A that contains a <
tt>bin and lib</
tt>.
4011N/A <!-- ------------------------------------------------------ --> 4011N/A <
h4><
a name="cacerts">Certificate Authority File (cacert)</
a></
h4>
4075N/A for a better understanding of the Certificate Authority (CA).
4075N/A A certificates file named "cacerts"
4075N/A represents a system-wide keystore with CA certificates.
4011N/A binary bundles, the "cacerts" file contains root CA certificates from
4011N/A several public CAs (
e.g., VeriSign, Thawte, and Baltimore).
4011N/A The source contain a cacerts file
4011N/A without CA root certificates.
4011N/A Formal JDK builders will need to secure
4802N/A permission from each public CA and include the certificates into their
4011N/A Failure to provide a populated cacerts file
4011N/A will result in verification errors of a certificate chain during runtime.
4011N/A <
tt><
a href="#ALT_CACERTS_FILE">ALT_CACERTS_FILE</
a></
tt>
4011N/A can be used to override the default location of the
3988N/A cacerts file that will get placed in your build.
4011N/A By default an empty cacerts file is provided and that should be
4011N/A fine for most JDK developers.
4011N/A <!-- ------------------------------------------------------ --> 4011N/A <
h4><
a name="compilers">Compilers</
a></
h4>
4011N/A The GNU gcc compiler version should be 4 or newer.
4011N/A The compiler used should be the default compiler installed
4075N/A <
strong><
a name="studio">Solaris: Sun Studio</
a></
strong>
4011N/A Sun Studio 12 Update 1 Compilers</
a>
4011N/A (containing version 5.10 of the C and C++ compilers) is required,
4011N/A including specific patches.
4011N/A The Solaris SPARC patch list is:
3988N/A 118683-05: SunOS 5.10: Patch for profiling libraries and assembler
3988N/A 119963-21: SunOS 5.10: Shared library patch for C++
3988N/A 120753-08: SunOS 5.10: Microtasking libraries (libmtsk) patch
3988N/A 128228-09: Sun Studio 12 Update 1: Patch for Sun C++ Compiler
3988N/A 141860-03: Sun Studio 12 Update 1: Patch for Compiler Common patch for Sun C C++ F77 F95
3988N/A 141861-05: Sun Studio 12 Update 1: Patch for Sun C Compiler
3988N/A 142371-01: Sun Studio 12.1 Update 1: Patch for dbx
3988N/A 143384-02: Sun Studio 12 Update 1: Patch for debuginfo handling
3988N/A 143385-02: Sun Studio 12 Update 1: Patch for Compiler Common patch for Sun C C++ F77 F95
3988N/A 142369-01: Sun Studio 12.1: Patch for Performance Analyzer Tools
3988N/A The Solaris X86 patch list is:
3988N/A 119961-07: SunOS 5.10_x86, x64, Patch for profiling libraries and assembler
4011N/A 119964-21: SunOS 5.10_x86: Shared library patch for C++_x86
4011N/A 120754-08: SunOS 5.10_x86: Microtasking libraries (libmtsk) patch
4011N/A 141858-06: Sun Studio 12 Update 1_x86: Sun Compiler Common patch for x86 backend
4011N/A 128229-09: Sun Studio 12 Update 1_x86: Patch for C++ Compiler
4011N/A 142363-05: Sun Studio 12 Update 1_x86: Patch for C Compiler
4011N/A 142368-01: Sun Studio 12.1_x86: Patch for Performance Analyzer Tools
4802N/A <
a href="#ALT_COMPILER_PATH"><
tt>ALT_COMPILER_PATH</
tt></
a>
4011N/A to point to the location of
4011N/A the compiler binaries, and place this location in the <
tt>PATH</
tt>.
4011N/A The Oracle Solaris Studio Express compilers at:
4075N/A Oracle Solaris Studio Express Download site</
a>
4075N/A are also an option, although these compilers have not
4011N/A <
strong><
a name="msvc32">Windows i586: Microsoft Visual Studio 2010 Compilers</
a></
strong>
4011N/A<
b>BEGIN WARNING</
b>: At this time (
Spring/
Summer 2010) JDK 7 is starting a transition to
4011N/Ause the newest VS2010 Microsoft compilers. These build instructions are updated
4011N/Ato show where we are going. We have a QA process to go through before
4011N/Aofficial builds actually use VS2010. So for now, official builds are
4011N/Astill using VS2003. No other compilers are known to build the entire JDK,
3988N/Aincluding non-open portions.
4011N/ASo for now you should be able to build with either VS2003 or VS2010.
4011N/AWe do not guarantee that VS2008 will work, although there is sufficient
4011N/Amakefile support to make at least basic JDK builds plausible.
4011N/AVisual Studio 2010 Express compilers are now able to build all the
4011N/Aopen source repositories, but this is 32 bit only. To build 64 bit
4011N/AWindows binaries use the the 7.1 Windows SDK.<
b>END WARNING.</
b>
4011N/A The 32-bit OpenJDK Windows build
4011N/A Microsoft Visual Studio C++ 2010 (VS2010) Professional
4802N/A Edition or Express compiler.
4011N/A The compiler and other tools are expected to reside
4075N/A in the location defined by the variable
4075N/A <
tt>VS100COMNTOOLS</
tt> which
4075N/A is set by the Microsoft Visual Studio installer.
4011N/A Once the compiler is installed,
4011N/A to set the compiler environment variables
3988N/A The above environment variables <
b>MUST</
b> be set.
3988N/A This compiler also contains the Windows SDK v 7.0a,
3988N/A which is an update to the Windows 7 SDK.
3988N/A <
b>WARNING:</
b> Make sure you check out the
3988N/A <
strong><
a name="msvc64">Windows x64: Microsoft Visual Studio 2010 Professional Compiler</
a></
strong>
3988N/A For <
b>X64</
b>, builds, when using the VS2010 Professional
3988N/A compiler, the 64 bit build set up is much the same as 32 bit
3988N/A to set the compiler environment variables.
4011N/A Previously 64 bit builds had used the 64 bit compiler in
3988N/A an unbundled Windows SDK but this is no longer necessary if
3988N/A you have VS2010 Professional.
3988N/A <
strong><
a name="mssdk64">Windows x64: Microsoft Windows 7.1 SDK 64 bit compilers.</
a></
strong>
3988N/A For a free alternative for 64 bit builds, use the 7.1 SDK.
3988N/A Microsoft say that to set up your paths for this run
3988N/A What was tested is just directly setting up LIB, INCLUDE,
3988N/A PATH and based on the installation directories using the
3988N/A DOS short name appropriate for the system, (you will
3988N/A need to set them for yours, not just blindly copy this) eg :
3988N/A set VSINSTALLDIR=c:\PROGRA~2\MICROS~1.0
3988N/A set WindowsSdkDir=c:\PROGRA~1\MICROS~1\Windows\v7.1
3988N/A set PATH=%VSINSTALLDIR%\vc\bin\amd64;%VSINSTALLDIR%\Common7\IDE;%WindowsSdkDir%\bin;%PATH%
3988N/A set INCLUDE=%VSINSTALLDIR%\vc\include;%WindowsSdkDir%\include
3988N/A set LIB=%VSINSTALLDIR%\vc\lib\amd64;%WindowsSdkDir%\lib\x64
3988N/A <!-- ------------------------------------------------------ --> 3988N/A <
h4><
a name="zip">Zip and Unzip</
a></
h4>
3988N/A Version 2.2 (November 3rd 1997) or newer of the zip utility
3988N/A and version 5.12 or newer of the unzip utility is needed
3988N/A With Solaris, Linux, and Windows CYGWIN, the zip and unzip
3988N/A utilities installed on the system should be fine.
3988N/A Information and the source code for
3988N/A target="_blank">info-zip web site</
a>.
3988N/A <!-- ------------------------------------------------------ --> 3988N/A <
h4><
a name="cups">Common UNIX Printing System (CUPS) Headers (Solaris & Linux)</
a></
h4>
3988N/A CUPS header files are required for building the
3988N/A The Solaris header files can be obtained by installing
3988N/A the package <
strong>SFWcups</
strong> from the Solaris Software
3988N/A Companion
CD/
DVD, these often will be installed into
3988N/A CUPS header files are required for building the
3988N/A The Linux header files are usually available from a "cups"
3988N/A development package, it's recommended that you try and use
3988N/A the package provided by the particular version of Linux that
3988N/A The CUPS header files can always be downloaded from
3988N/A <
tt><
a href="#ALT_CUPS_HEADERS_PATH">ALT_CUPS_HEADERS_PATH</
a></
tt>
3988N/A can be used to override the default location of the
3988N/A <!-- ------------------------------------------------------ --> 3988N/A <
h4><
a name="xrender">XRender Extension Headers (Solaris & Linux)</
a></
h4>
3988N/A XRender header files are required for building the
3988N/A The XRender header file is included with the other X11 header files
3988N/A in the package <
strong>SFWxwinc</
strong> on new enough versions of
3988N/A Solaris and will be installed in
3988N/A XRender header files are required for building the
3988N/A The Linux header files are usually available from a "Xrender"
3988N/A development package, it's recommended that you try and use
3988N/A the package provided by the particular distribution of Linux that
3988N/A <!-- ------------------------------------------------------ --> 3988N/A <
h4><
a name="freetype">FreeType 2</
a></
h4>
3988N/A Version 2.3 or newer of FreeType is required for building the OpenJDK.
3988N/A On Unix systems required files can be available as part of your
3988N/A distribution (while you still may need to upgrade them).
3988N/A Note that you need development version of package that
3988N/A includes both FreeType library and header files.
3988N/A You can always download latest FreeType version from the
3988N/A In case it is installed elsewhere you will need to set environment
3988N/A <
tt><
a href="#ALT_FREETYPE_LIB_PATH">ALT_FREETYPE_LIB_PATH</
a></
tt>
3988N/A <
tt><
a href="#ALT_FREETYPE_HEADERS_PATH">ALT_FREETYPE_HEADERS_PATH</
a></
tt>
3988N/A to refer to place where library and header files are installed.
3988N/A Building the freetype 2 libraries from scratch is also possible,
3988N/A however on Windows refer to the
3988N/A Windows FreeType DLL build instructions</
a>.
3988N/A Note that by default FreeType is built with byte code hinting
3988N/A support disabled due to licensing restrictions.
3988N/A In this case, text appearance and metrics are expected to
3988N/A differ from Sun's official JDK build.
3988N/A the SourceForge FreeType2 Home Page
3988N/A <!-- ------------------------------------------------------ --> 3988N/A <
h4><
a name="alsa">Advanced Linux Sound Architecture (ALSA) (Linux only)</
a></
h4>
4011N/A <
strong>Linux only:</
strong>
3988N/A Version 0.9.1 or newer of the ALSA files are
3988N/A required for building the OpenJDK on Linux.
3988N/A These Linux files are usually available from an "alsa"
3988N/A development package, it's highly recommended that you try and use
3988N/A the package provided by the particular version of Linux that
4802N/A The makefiles will check this emit a sanity error if it is
3988N/A missing or the wrong version.
4075N/A In particular, older Linux systems will likely not have the
4075N/A right version of ALSA installed, for example
3988N/A Redhat AS 2.1 U2 and SuSE 8.1 do not include a sufficiently
3988N/A On rpm-based systems, you can see if ALSA is installed by
4134N/A <
tt>rpm -qa | grep alsa</
tt>
3988N/A Both <
tt>alsa</
tt> and <
tt>alsa-devel</
tt> packages are needed.
3988N/A If your distribution does not come with ALSA, and you can't
3988N/A find ALSA packages built for your particular system,
3988N/A you can try to install the pre-built ALSA rpm packages from
3988N/A Note that installing a newer ALSA could
3988N/A break sound output if an older version of ALSA was previously
3988N/A installed on the system, but it will enable JDK compilation.
3988N/A Installation: execute as root<
br>
3988N/A [i586]: <
code>rpm -ev alsa-lib-devel-0.9.1-rh61</
code><
br>
3988N/A [x64]:<
code>rpm -ev alsa-lib-devel-0.9.8-amd64</
code><
br>
3988N/A Make sure that you do not link to the static library
3988N/A As a last resort you can go to the
3988N/A Advanced Linux Sound Architecture Site</
a> and build it from
3988N/A Download driver and library
3988N/A As root, execute the following
3988N/A commands (you may need to adapt the version number):
3988N/A Should one of the above steps fail, refer to the documentation on
3988N/A Note that this is a minimum install that enables
3988N/A building the JDK platform. To actually use ALSA sound drivers, more
3988N/A steps are necessary as outlined in the documentation on ALSA's homepage.
4802N/A ALSA can be uninstalled by executing <
tt>make uninstall</
tt> first in
3988N/A the <
tt>alsa-lib-0.9.1</
tt> directory and then in
4075N/A <
tt>alsa-driver-0.9.1</
tt>.
4075N/A There are no ALT* variables to change the assumed locations of ALSA,
3988N/A the makefiles will expect to find the ALSA include files and library at:
3988N/A <!-- ------------------------------------------------------ --> 3988N/A <
h4>Windows Specific Dependencies</
h4>
3988N/A <
strong>Unix Command Tools (<
a name="cygwin">CYGWIN</
a>)</
strong>
3988N/A The OpenJDK requires access to a set of unix command tools
3988N/A on Windows which can be supplied by
3988N/A The OpenJDK build requires CYGWIN version 1.5.12 or newer.
4011N/A Information about CYGWIN can
4011N/A be obtained from the CYGWIN website at
4011N/A By default CYGWIN doesn't install all the tools required for building
4011N/A Along with the default installation, you need to install
4011N/A <
td>The GNU assembler, linker and binary
4011N/A <
td>The GNU version of the 'make' utility built for CYGWIN.<
br>
4011N/A <
b>NOTE</
b>: See <
a href="#gmake">the GNU make section</
a></
td>
4011N/A <
td>GNU implementation of the traditional Unix macro
4011N/A <
td>A program to manage archives of files</
td>
4053N/A <
td>Pattern-directed scanning and processing language</
td>
4053N/A <
td>Determines file type using 'magic' numbers</
td>
4053N/A <
td>Package and compress (archive) files</
td>
4011N/A <
td>Extract compressed files in a ZIP archive</
td>
4011N/A <
td>Display amount of free and used memory in the system</
td>
4011N/A Note that the CYGWIN software can conflict with other non-CYGWIN
4011N/A software on your Windows system.
4011N/A known issues and problems, of particular interest is the
4011N/A BLODA (applications that interfere with CYGWIN)</
a>.
4011N/A with the Visual Studio version. You need the Visual Studio
4011N/A So it's important that the Visual Studio paths in PATH preceed
4011N/A <
strong><
a name="dxsdk">Microsoft DirectX 9.0 SDK header files and libraries</
a></
strong>
4011N/A Microsoft DirectX 9.0 SDK (Summer 2004)
4011N/A headers are required for building
4011N/A This SDK can be downloaded from
4066N/A Microsoft DirectX 9.0 SDK (Summer 2004)</
a>.
4011N/A If the link above becomes obsolete, the SDK can be found from
4011N/A (search with "DirectX 9.0 SDK Update Summer 2004").
4011N/A The location of this SDK can be set with
4011N/A <
tt><
a href="#ALT_DXSDK_PATH">ALT_DXSDK_PATH</
a></
tt>
4011N/A but it's normally found via the DirectX environment variable
4011N/A The OpenJDK build requires access to a redistributable
4011N/A This is usually picked up automatically from the redist
4011N/A directories of Visual Studio 2010.
4011N/A If this cannot be found set the
4011N/A <
a href="#ALT_MSVCRT_DLL_PATH"><
tt>ALT_MSVCRT_DLL_PATH</
tt></
a>
4011N/A variable to the location of this file.
4011N/A <!-- ------------------------------------------------------ --> 4011N/A <
h2><
a name="creating">Creating the Build</
a></
h2>
4011N/A Once a machine is setup to build the OpenJDK,
4011N/A the steps to create the build are fairly simple.
4011N/A The various ALT settings can either be made into variables
4011N/A <
a href="#gmake"><
tt><
i>gmake</
i></
tt></
a>
4011N/A <
li>Use the sanity rule to double check all the ALT settings:
4011N/A [ARCH_DATA_MODEL=<
i>32 or 64</
i>]
4011N/A <
li>Start the build with the command:
3988N/A [ARCH_DATA_MODEL=<
i>32 or 64</
i>]
3988N/A [ALT_OUTPUTDIR=<
i>output_directory</
i>]
3988N/A Note that ARCH_DATA_MODEL is really only needed on Solaris to
3988N/A indicate you want to built the 64-bit version.
3988N/A And before the Solaris 64-bit binaries can be used, they
3988N/A must be merged with the binaries from a separate 32-bit build.
4011N/A The merged binaries may then be used in either 32-bit or 64-bit mode, with
3988N/A the selection occurring at runtime
3988N/A with the <
tt>-d32</
tt> or <
tt>-d64</
tt> options.
3988N/A <!-- ------------------------------------------------------ --> 3988N/A <
h2><
a name="testing">Testing the Build</
a></
h2>
3988N/A When the build is completed, you should see the generated
3988N/A binaries and associated files in the <
tt>j2sdk-image</
tt>
3988N/A directory in the output directory.
3988N/A The default output directory is
3988N/A <
tt>build/<
i>platform</
i></
tt>,
3988N/A where <
tt><
i>platform</
i></
tt> is one of
3988N/A directory should contain executables for the
3988N/A OpenJDK tools and utilities.
4011N/A You can test that the build completed properly by using the build
3988N/A to run the various demos that you will find in the
3988N/A The provided regression tests can be run with the <
tt>jtreg</
tt>
3988N/A <!-- ------------------------------------------------------ --> 3988N/A environment or make variables (just called <
b>variables</
b> in this
3988N/A document) that can impact the build are:
3988N/A <
dt><
a name="path"><
tt>PATH</
tt></
a> </
dt>
4802N/A <
dd>Typically you want to set the <
tt>PATH</
tt> to include:
3988N/A <
li>The location of the GNU make binary</
li>
3988N/A <
li>The location of the Bootstrap JDK <
tt>java</
tt>
3988N/A (see <
a href="#bootjdk">Bootstrap JDK</
a>)</
li>
3988N/A <
li>The location of the C/C++ compilers
3988N/A (see <
a href="#compilers"><
tt>compilers</
tt></
a>)</
li>
3988N/A <
li>The location or locations for the Unix command utilities
3988N/A <
dt><
tt>MILESTONE</
tt> </
dt>
3988N/A The milestone name for the build (<
i>
e.g.</
i>"beta").
3988N/A The default value is "internal".
3988N/A <
dt><
tt>BUILD_NUMBER</
tt> </
dt>
3988N/A The build number for the build (<
i>
e.g.</
i> "b27").
4011N/A The default value is "b00".
3988N/A <
dt><
a name="arch_data_model"><
tt>ARCH_DATA_MODEL</
tt></
a></
dt>
3988N/A <
dd>The <
tt>ARCH_DATA_MODEL</
tt> variable
3988N/A is used to specify whether the build is to generate 32-bit or 64-bit
3988N/A The Solaris build supports either 32-bit or 64-bit builds, but
3988N/A Windows and Linux will support only one, depending on the specific
3988N/A Normally, setting this variable is only necessary on Solaris.
4075N/A Set <
tt>ARCH_DATA_MODEL</
tt> to <
tt>32</
tt> for generating 32-bit binaries,
4075N/A or to <
tt>64</
tt> for generating 64-bit binaries.
3988N/A <
dt><
a name="ALT_BOOTDIR"><
tt>ALT_BOOTDIR</
tt></
a></
dt>
3988N/A The location of the bootstrap JDK installation.
3988N/A See <
a href="#bootjdk">Bootstrap JDK</
a> for more information.
3988N/A You should always install your own local Bootstrap JDK and
3988N/A always set <
tt>ALT_BOOTDIR</
tt> explicitly.
3988N/A <
dt><
a name="ALT_BINARY_PLUGS_PATH"><
tt>ALT_BINARY_PLUGS_PATH</
tt></
a></
dt>
4802N/A The location of the binary plugs installation.
3988N/A See <
a href="#binaryplugs">Binary Plugs</
a> for more information.
3988N/A You should always have a local copy of a
3988N/A recent Binary Plugs install image
3988N/A and set this variable to that location.
3988N/A <
dt><
a name="ALT_JDK_IMPORT_PATH"><
tt>ALT_JDK_IMPORT_PATH</
tt></
a></
dt>
3988N/A The location of a previously built JDK installation.
3988N/A See <
a href="#importjdk">Optional Import JDK</
a> for more information.
3988N/A <
dt><
a name="ALT_OUTPUTDIR"><
tt>ALT_OUTPUTDIR</
tt></
a> </
dt>
3988N/A An override for specifying the (absolute) path of where the
3988N/A The default output directory will be build/<
i>platform</
i>.
3988N/A <
dt><
a name="ALT_COMPILER_PATH"><
tt>ALT_COMPILER_PATH</
tt></
a> </
dt>
3988N/A The location of the C/C++ compiler.
3988N/A The default varies depending on the platform.
3988N/A <
dt><
tt><
a name="ALT_CACERTS_FILE">ALT_CACERTS_FILE</
a></
tt></
dt>
3988N/A The location of the <
a href="#cacerts">cacerts</
a> file.
4075N/A <
dt><
a name="ALT_CUPS_HEADERS_PATH"><
tt>ALT_CUPS_HEADERS_PATH</
tt></
a> </
dt>
4075N/A The location of the CUPS header files.
3988N/A See <
a href="#cups">CUPS information</
a> for more information.
3988N/A If this path does not exist the fallback path is
3988N/A <
dt><
a name="ALT_FREETYPE_LIB_PATH"><
tt>ALT_FREETYPE_LIB_PATH</
tt></
a></
dt>
4802N/A The location of the FreeType shared library.
3988N/A See <
a href="#freetype">FreeType information</
a> for details.
4802N/A <
dt><
a name="ALT_FREETYPE_HEADERS_PATH"><
tt>ALT_FREETYPE_HEADERS_PATH</
tt></
a></
dt>
3988N/A The location of the FreeType header files.
4802N/A See <
a href="#freetype">FreeType information</
a> for details.
3988N/A <
dt><
a name="ALT_JDK_DEVTOOLS_PATH"><
tt>ALT_JDK_DEVTOOLS_PATH</
tt></
a></
dt>
3988N/A The default root location of the devtools.
3988N/A <
tt>$(ALT_SLASH_JAVA)/devtools</
tt>.
3988N/A <
dt><
tt><
a name="ALT_DEVTOOLS_PATH">ALT_DEVTOOLS_PATH</
a></
tt> </
dt>
3988N/A The location of tools like the
3988N/A <
a href="#zip"><
tt>zip</
tt> and <
tt>unzip</
tt></
a>
3988N/A binaries, but might also contain the GNU make utility
4066N/A So this area is a bit of a grab bag, especially on Windows.
3988N/A The default value depends on the platform and
3988N/A On Linux the default will be
3988N/A <
tt>$(ALT_JDK_DEVTOOLS_PATH)/<
i>{sparc,i386}</
i>/bin</
tt>,
3988N/A <
dt><
a name="ALT_UNIXCCS_PATH"><
tt>ALT_UNIXCCS_PATH</
tt></
a></
dt>
3988N/A <
strong>Solaris only:</
strong>
3988N/A An override for specifying where the Unix CCS
3988N/A <
dt><
a name="ALT_SLASH_JAVA"><
tt>ALT_SLASH_JAVA</
tt></
a></
dt>
3988N/A The default root location for many of the ALT path locations
3988N/A of the following ALT variables.
3988N/A <
tt>"/java"</
tt> on Solaris and Linux,
3988N/A <
dt><
a name="ALT_BUILD_JDK_IMPORT_PATH"><
tt>ALT_BUILD_JDK_IMPORT_PATH</
tt></
a></
dt>
3988N/A These are useful in managing builds on multiple platforms.
3988N/A The default network location for all of the import JDK images
3988N/A If <
tt><
a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</
a></
tt>
3988N/A is not set, this directory will be used and should contain
3988N/A Where each of these directories contain the import JDK image
3988N/A <
dt><
a name="ALT_BUILD_BINARY_PLUGS_PATH"><
tt>ALT_BUILD_BINARY_PLUGS_PATH</
tt></
a></
dt>
3988N/A These are useful in managing builds on multiple platforms.
3988N/A The default network location for all of the binary plug images
3988N/A If <
tt><
a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</
a></
tt>
3988N/A is not set, this directory will be used and should contain
3988N/A Where each of these directories contain the binary plugs image
3988N/A <
dt><
strong>Windows specific:</
strong></
dt>
3988N/A <
dt><
a name="ALT_WINDOWSSDKDIR"><
tt>ALT_WINDOWSSDKDIR</
tt></
a> </
dt>
3988N/A Microsoft Windows SDK where some tools will be
3988N/A The default is whatever WINDOWSSDKDIR is set to
3988N/A (or WindowsSdkDir) or the path
3988N/A c:\Program Files\Microsoft SDKs\Windows\v6.1a
3988N/A <
dt><
tt><
a name="ALT_DXSDK_PATH">ALT_DXSDK_PATH</
a></
tt> </
dt>
3988N/A <
a href="#dxsdk">Microsoft DirectX 9 SDK</
a>.
3988N/A The default will be to try and use the DirectX environment
3988N/A variable <
tt>DXSDK_DIR</
tt>,
3988N/A failing that, look in <
tt>C:/DXSDK</
tt>.
3988N/A <
dt><
tt><
a name="ALT_MSVCRT_DLL_PATH">ALT_MSVCRT_DLL_PATH</
a></
tt> </
dt>
3988N/A <
dt><
tt><
a name="ALT_MSVCRNN_DLL_PATH">ALT_MSVCRNN_DLL_PATH</
a></
tt> </
dt>
4075N/A <!-- ------------------------------------------------------ --> 3988N/A <
h2><
a name="troubleshooting">Troubleshooting</
a></
h2>
3988N/A A build can fail for any number of reasons.
3988N/A are a result of trying to build in an environment in which all the
3988N/A pre-build requirements have not been met.
3988N/A troubleshooting a build failure is to recheck that you have satisfied
3988N/A all the pre-build requirements for your platform.
3988N/A Look for the check list of the platform you are building on in the
3988N/A <
a href="#contents">Table of Contents</
a>.
3988N/A You can validate your build environment by using the <
tt>sanity</
tt>
3988N/A will stop the build from starting, and any warnings may result in
3988N/A We strongly encourage you to evaluate every
3988N/A sanity check warning and fix it if required, before you proceed
3988N/A Some of the more common problems with builds are briefly described
3988N/A below, with suggestions for remedies.
3988N/A If your build machine seems to be overloaded from too many
3988N/A simultaneous C++ compiles, try setting the <
tt>HOTSPOT_BUILD_JOBS</
tt>
3988N/A variable to <
tt>1</
tt> (if you're using a multiple CPU
4802N/A machine, setting it to more than the the number of CPUs is probably
4802N/A Creating the javadocs can be very slow, if you are running
3988N/A javadoc, consider skipping that step.
4802N/A Faster hardware and more RAM always helps too.
3988N/A The VM build tends to be CPU intensive (many C++ compiles),
3988N/A and the rest of the JDK will often be disk intensive.
3988N/A Faster compiles are possible using a tool called
3988N/A If you see warnings that refer to file time stamps,
e.g. 3988N/A <
i>Warning message:</
i><
tt> File `xxx' has modification time in
3988N/A <
i>Warning message:</
i> <
tt> Clock skew detected. Your build may
3988N/A These warnings can occur when the clock on the build machine is out of
3988N/A sync with the timestamps on the source files. Other errors, apparently
3988N/A unrelated but in fact caused by the clock skew, can occur along with
3988N/A the clock skew warnings. These secondary errors may tend to obscure the
3988N/A fact that the true root cause of the problem is an out-of-sync clock.
3988N/A For example, an out-of-sync clock has been known to cause an old
3988N/A version of javac to be used to compile some files, resulting in errors
3988N/A when the pre-1.4 compiler ran across the new <
tt>assert</
tt> keyword
3988N/A If you see these warnings, reset the clock on the build
3988N/A machine, run "<
tt><
i>gmake</
i> clobber</
tt>" or delete the directory
3988N/A containing the build output, and restart the build from the beginning.
3988N/A <
b>Error message: <
tt>Trouble writing out table to disk</
tt></
b>
3988N/A Increase the amount of swap space on your build machine.
3988N/A <
b>Error Message: <
tt>libstdc++ not found:</
tt></
b>
3988N/A This is caused by a missing libstdc++.a library.
3988N/A This is installed as part of a specific package
3988N/A By default some 64-bit Linux versions (
e.g. Fedora)
3988N/A only install the 64-bit version of the libstdc++ package.
3988N/A Various parts of the JDK build require a static
4224N/A link of the C++ runtime libraries to allow for maximum
3988N/A portability of the built images.
3988N/A <
b>Error Message: <
tt>cannot restore segment prot after reloc</
tt></
b>
3988N/A This is probably an issue with SELinux (See
4199N/A Parts of the VM is built without the <
tt>-fPIC</
tt> for
3988N/A To completely disable SELinux:
3988N/A <
li># system-config-securitylevel</
li>
3988N/A <
li>In the window that appears, select the SELinux tab</
li>
3988N/A Alternatively, instead of completely disabling it you could
3988N/A disable just this one check.
3988N/A <
li>Select System->Administration->SELinux Management</
li>
3988N/A <
li>In the SELinux Management Tool which appears,
3988N/A select "Boolean" from the menu on the left</
li>
3988N/A <
li>Expand the "Memory Protection" group</
li>
3988N/A <
li>Check the first item, labeled
3988N/A "Allow all unconfined executables to use libraries requiring text relocation ..."</
li>
3988N/A <
b>Windows Error Message: <
tt>*** fatal error - couldn't allocate heap, ... </
tt></
b>
4802N/A The CYGWIN software can conflict with other non-CYGWIN
3988N/A software. See the CYGWIN FAQ section on
3988N/A BLODA (applications that interfere with CYGWIN)</
a>.
3988N/A <
b>Windows Error Message: <
tt>*** multiple target patterns. Stop.</
tt></
b>
4134N/A The CYGWIN make version 3.81 may not like the Windows <
tt>C:/</
tt>
3988N/A style paths, it may not like the ':' character in the path
3988N/A when used in a makefile target definition.
3988N/A See the <
a href="#gmake"><
tt><
i>gmake</
i></
tt></
a> section.