0N/A<!
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
0N/A<
head><
title>OpenJDK Build README</
title></
head>
0N/A<!-- ------------------------------------------------------ --> 0N/A<
hr noshade="noshade" size="3">
0N/A <
h1>OpenJDK Build README</
h1>
0N/A<!-- ------------------------------------------------------ --> 0N/A<
hr noshade="noshade" size="3">
0N/A<
h2><
a name="introduction">Introduction</
a></
h2>
0N/A This README file contains build instructions for the
0N/A Building the source code for the
0N/A a certain degree of technical expertise.
0N/A<!-- ------------------------------------------------------ --> 0N/A<
hr noshade="noshade" size="3">
0N/A<
h2><
a name="contents">Contents</
a></
h2>
0N/A <
li><
a href="#introduction">Introduction</
a></
li>
0N/A <
li><
a href="#MBE">Minimum Build Environments</
a></
li>
0N/A <
li><
a href="#SDBE">Specific Developer Build Environments</
a></
li>
0N/A <
li><
a href="#directories">Source Directory Structure</
a> </
li>
0N/A <
li><
a href="#building">Build Information</
a>
0N/A <
li><
a href="#gmake">GNU Make (<
tt><
i>gmake</
i></
tt>)</
a> </
li>
0N/A <
li><
a href="#linux">Basic Linux System Setup</
a> </
li>
0N/A <
li><
a href="#solaris">Basic Solaris System Setup</
a> </
li>
0N/A <
li><
a href="#windows">Basic Windows System Setup</
a> </
li>
0N/A <
li><
a href="#dependencies">Build Dependencies</
a> </
li>
0N/A <
li><
a href="#bootjdk">Bootstrap JDK</
a> </
li>
0N/A <
li><
a href="#binaryplugs">Binary Plugs</
a> </
li>
0N/A <
li><
a href="#cacerts">Certificate Authority File (cacert)</
a> </
li>
0N/A <
li><
a href="#compilers">Compilers</
a>
0N/A <
li><
a href="#msvc">Microsoft Visual Studio</
a> </
li>
0N/A <
li><
a href="#mssdk">Microsoft Platform SDK</
a> </
li>
0N/A <
li><
a href="#studio">Sun Studio</
a> </
li>
0N/A <
li>Linux and Solaris:
0N/A <
li><
a href="#cups">CUPS Include files</
a> </
li>
0N/A <
li>Unix Command Tools (<
a href="#cygwin">CYGWIN</
a>)</
li>
0N/A <
li><
a href="#dxsdk">DirectX 9.0 SDK</
a> </
li>
0N/A <
li><
a href="#creating">Creating the Build</
a> </
li>
0N/A <
li><
a href="#testing">Testing the Build</
a> </
li>
0N/A <
li><
a href="#troubleshooting">Troubleshooting</
a></
li>
0N/A<!-- ------------------------------------------------------ --> 0N/A<
hr noshade="noshade" size="3">
0N/A<
h2><
a name="MBE">Minimum Build Environments</
a></
h2>
0N/A This file often describes specific requirements for what we call the
0N/A "minimum build environments" (MBE) for the JDK.
0N/A Building with the MBE will generate the most compatible
0N/A bits that install on, and run correctly on, the most variations
0N/A of the same base OS and hardware architecture.
0N/A These usually represent what is often called the
0N/A least common denominator platforms.
0N/A It is understood that most developers will NOT be using these
0N/A specific platforms, and in fact creating these specific platforms
0N/A may be difficult due to the age of some of this software.
0N/A The minimum OS and C/C++ compiler versions needed for building the
0N/A <
th>Base OS and Architecture</
th>
0N/A <
td>Linux X86 (32bit)</
td>
0N/A <
td>Red Hat Enterprise Linux 4 </
td>
0N/A <
td>Linux X64 (64bit)</
td>
0N/A <
td>Red Hat Enterprise Linux 4 </
td>
0N/A <
td>Solaris SPARC (32bit)</
td>
0N/A <
td>Solaris 10 + patches
0N/A <
td>Sun Studio 11 </
td>
0N/A <
td>Solaris SPARCV9 (64bit)</
td>
0N/A <
td>Solaris 10 + patches
0N/A <
td>Sun Studio 11</
td>
0N/A <
td>Solaris X86 (32bit)</
td>
0N/A <
td>Solaris 10 + patches
0N/A <
td>Sun Studio 11</
td>
0N/A <
td>Solaris X64 (64bit)</
td>
0N/A <
td>Solaris 10 + patches
0N/A <
td>Sun Studio 11</
td>
0N/A <
td>Windows X86 (32bit)</
td>
0N/A <
td>Microsoft Visual Studio .NET 2003 Professional</
td>
0N/A <
td>Windows X64 (64bit)</
td>
0N/A <
td>Windows Server 2003 - Enterprise x64 Edition</
td>
0N/A <
td>Microsoft Platform SDK - April 2005</
td>
0N/A<!-- ------------------------------------------------------ --> 0N/A<
hr noshade="noshade" size="3">
0N/A<
h2><
a name="SDBE">Specific Developer Build Environments</
a></
h2>
0N/A We won't be listing all the possible environments, but
0N/A we will try to provide what information we have available to us.
0N/A<
h3><
a name="fedora">Fedora</
a></
h3>
0N/A<
h3><
a name="debian">Debian</
a></
h3>
0N/A<
h3><
a name="ubuntu">Ubuntu</
a></
h3>
0N/A In addition to needing the Bootstrap JDK and the Binary Plugs,
0N/A when building on Ubuntu you will need to
0N/A make sure certain packages are installed.
0N/A In particular, certain X11 packages, make, m4, gawk, gcc 4,
0N/A binutils, cups, freetype
0N/A <
h4>Ubuntu 6.06</
h4>
0N/A The following list of packages for Ubuntu 6.06 is a working set that
0N/A does appear to work.
0N/A <
b>Note that it's quite possible that some of these
0N/A packages are not required, so anyone discovering that some of the
0N/A packages listed below are NOT required,
0N/A All the packages below can be installed with the
0N/A Synaptic Package manager provided with the base Ubuntu 6.06 release.
0N/A <
li>binutils (2.16.1cvs20060117-1ubuntu2.1)</
li>
0N/A <
li>cpp (4:4.0.3-1)</
li>
0N/A <
li>cpp-4.0 (4.0.3-1ubuntu5)</
li>
0N/A <
li>libfreetype6-dev</
li>
0N/A <
li>g++ (4:4.0.3-1)</
li>
0N/A <
li>g++-4.0 (4.0.3-1ubuntu5)</
li>
0N/A <
li>gawk (1:3.1.5-2build1)</
li>
0N/A <
li>gcc (4:4.0.3-1)</
li>
0N/A <
li>gcc-4.0 (4.0.3-1ubuntu5)</
li>
0N/A <
li>libasound2-dev (1.0.10-2ubuntu4)</
li>
0N/A <
li>libc6 (2.3.6-0ubuntu20) to 2.3.6-0ubuntu20.4</
li>
0N/A <
li>libc6-dev (2.3.6-0ubuntu20.4)</
li>
0N/A <
li>libc6-i686 (2.3.6-0ubuntu20) to 2.3.6-0ubuntu20.4</
li>
0N/A <
li>libcupsys2-dev (1.2.2-0ubuntu0.6.06)</
li>
0N/A <
li>libgcrypt11-dev (1.2.2-1)</
li>
0N/A <
li>libgnutls-dev (1.2.9-2ubuntu1.1)</
li>
0N/A <
li>libgnutls12 (1.2.9-2ubuntu1) to 1.2.9-2ubuntu1.1</
li>
0N/A <
li>libgpg-error-dev (1.1-4)</
li>
0N/A <
li>libice-dev (2:1.0.0-0ubuntu2)</
li>
0N/A <
li>liblockfile1 (1.06.1)</
li>
0N/A <
li>libopencdk8-dev (0.5.7-2)</
li>
0N/A <
li>libpopt-dev (1.7-5)</
li>
0N/A <
li>libsm-dev (2:1.0.0-0ubuntu2)</
li>
0N/A <
li>libstdc++6-4.0-dev (4.0.3-1ubuntu5)</
li>
0N/A <
li>libtasn1-2-dev (0.2.17-1ubuntu1)</
li>
0N/A <
li>libx11-dev (2:1.0.0-0ubuntu9)</
li>
0N/A <
li>libxau-dev (1:1.0.0-0ubuntu4)</
li>
0N/A <
li>libxaw-headers (2:1.0.1-0ubuntu3)</
li>
0N/A <
li>libxaw7-dev (2:1.0.1-0ubuntu3)</
li>
0N/A <
li>libxdmcp-dev (1:1.0.0-0ubuntu2)</
li>
0N/A <
li>libxext-dev (2:1.0.0-0ubuntu4)</
li>
0N/A <
li>libxi-dev (2:1.0.0-0ubuntu3) </
li>
0N/A <
li>libxmu-dev (2:1.0.0-0ubuntu3)</
li>
0N/A <
li>libxmu-headers (2:1.0.0-0ubuntu3)</
li>
0N/A <
li>libxmuu-dev (2:1.0.0-0ubuntu3)</
li>
0N/A <
li>libxp-dev (6.8.2-11ubuntu2)</
li>
0N/A <
li>libxpm-dev (1:3.5.4.2-0ubuntu3)</
li>
0N/A <
li>libxrandr-dev (1:1.1.0.2-0ubuntu4)</
li>
0N/A <
li>libxt-dev (1:1.0.0-0ubuntu3)</
li>
0N/A <
li>libxtrap-dev (2:1.0.0-0ubuntu2)</
li>
0N/A <
li>libxtst-dev (2:1.0.1-0ubuntu2)</
li>
0N/A <
li>libxv-dev (2:1.0.1-0ubuntu3)</
li>
0N/A <
li>linux-kernel-headers (2.6.11.2-0ubuntu18)</
li>
0N/A <
li>m4 (1.4.4-1)</
li>
0N/A <
li>ssl-cert (1.0.13)</
li>
0N/A <
li>x-dev (7.0.4-0ubuntu2)</
li>
0N/A <
li>x11proto-core-dev (7.0.4-0ubuntu2)</
li>
0N/A <
li>x11proto-input-dev (1.3.2-0ubuntu2)</
li>
0N/A <
li>x11proto-kb-dev (1.0.2-0ubuntu2)</
li>
0N/A <
li>x11proto-randr-dev (1.1.2-0ubuntu2)</
li>
0N/A <
li>x11proto-record-dev (1.13.2-0ubuntu2)</
li>
0N/A <
li>x11proto-trap-dev (3.4.3-0ubuntu2)</
li>
0N/A <
li>x11proto-video-dev (2.2.2-0ubuntu2)</
li>
0N/A <
li>x11proto-xext-dev (7.0.2-0ubuntu2)</
li>
0N/A <
li>xlibs-dev (7.0.0-0ubuntu45)</
li>
0N/A <
li>zlib1g-dev (1:1.2.3-6ubuntu4)</
li>
0N/A <
h4>Ubuntu 7.04</
h4>
0N/A Using the Synaptic Package Manager, download the following
0N/A packages (double indented packages are automatically aquired
0N/A due to package dependencies):
0N/A <
li>build-essential</
li>
0N/A <
li>libstdc++6.4.1-dev</
li>
0N/A <
li>linux-libc-dev</
li>
0N/A <
li>libasound2-dev</
li>
0N/A <
li>libcupsys2-dev</
li>
0N/A <
li>libgcrypt11-dev</
li>
0N/A <
li>lgnutls-dev</
li>
0N/A <
li>libgpg-error-dev</
li>
0N/A <
li>libopencdk8-dev</
li>
0N/A <
li>libpopt-dev</
li>
0N/A <
li>libtasn1-3-dev</
li>
0N/A <
li>sun-java6-jdk</
li>
0N/A <
li>java-common</
li>
0N/A <
li>odbcinst1debian1</
li>
0N/A <
li>sun-java6-bin</
li>
0N/A <
li>sun-java6-jre</
li>
0N/A <
li>x11proto-print-dev</
li>
0N/A <
li>libxaw7-dev</
li>
0N/A <
li>libxaw-headers</
li>
0N/A <
li>libfreetype6-dev</
li>
0N/A<!-- ------------------------------------------------------ --> 0N/A<
hr noshade="noshade" size="3">
0N/A<
h2><
a name="directories">Source Directory Structure</
a></
h2>
0N/A The source code for the
0N/A delivered in <
i>3</
i> sibling directories:
0N/A The <
tt>hotspot</
tt> directory contains the source code and make
0N/A Hotspot Virtual Machine.
0N/A directory contains the source code and make files for
0N/A runtime libraries, tools and demos.
0N/A The top level Makefile is used to build the complete OpenJDK
0N/A release including building the hotspot
0N/A VM, staging the VM binaries, and building the
0N/A<!-- ------------------------------------------------------ --> 0N/A<
hr noshade="noshade" size="3">
0N/A<
h2><
a name="building">Build Information</
a></
h2>
0N/A is done with a <
tt><
i>gmake</
i></
tt>
0N/A command line and various
0N/A environment or make variable settings that direct the make rules
0N/A to where various components have been installed.
0N/A Where possible the makefiles will attempt to located the various
0N/A components in the default locations or any component specific
0N/A When the normal defaults fail or components cannot be found,
0N/A <
tt>ALT_*</
tt> variables (alternates)
0N/A can be used to help the makefiles locate components.
0N/A if you need help in setting up your environment variables.
0N/A A build could be as simple as:
0N/A <
i>gmake</
i> sanity && <
i>gmake</
i>
0N/A Of course ksh or sh would work too.
0N/A But some customization will probably be necessary.
0N/A The <
tt>sanity</
tt> rule will make some basic checks on build
0N/A dependencies and generate appropriate warning messages
0N/A regarding missing, out of date, or newer than expected components
0N/A found on your system.
0N/A<!-- ------------------------------------------------------ --> 0N/A<
hr noshade="noshade" size="3">
0N/A<
h3><
a name="gmake">GNU make (<
tt><
i>gmake</
i></
tt>)</
a></
h3>
0N/A The Makefiles in the
0N/A are only valid when used with the
0N/A GNU version of the utility command <
tt>make</
tt>
0N/A (<
tt><
i>gmake</
i></
tt>).
0N/A A few notes about using GNU make:
0N/A In general, you need GNU make version 3.78.1 or newer.
0N/A Place the location of the GNU make binary in the <
tt>PATH</
tt>.
0N/A <
strong>Linux:</
strong>
0N/A <
strong>Solaris:</
strong>
0N/A If your Solaris system has the software
0N/A from the Solaris Companion CD installed,
0N/A you should use <
tt>gmake</
tt>
0N/A which will be located in either the <
tt>/
opt/
sfw/
bin</
tt> or
0N/A <
strong>Windows:</
strong>
0N/A <
b>WARNING:</
b> Watch out for make version 3.81, it may
0N/A not work due to a lack of support for drive letter paths
0N/A like <
tt>C:/</
tt>. Use a 3.80 version, or find a newer
0N/A version that has this problem fixed.
0N/A Information on GNU make, and access to ftp download sites, are
0N/A The latest source to GNU make is available at
0N/A<!-- ------------------------------------------------------ --> 0N/A<
hr noshade="noshade" size="3">
0N/A<
h3><
a name="linux">Basic Linux System Setup</
a></
h3>
0N/A <
strong>i586 only:</
strong>
0N/A The minimum recommended hardware for building the Linux version
0N/A is a Pentium class processor or better, at least 256 MB of RAM, and
0N/A approximately 1.5 GB of free disk space.
0N/A <
strong>X64 only:</
strong>
0N/A The minimum recommended hardware for building the Linux
0N/A version is an AMD Opteron class processor, at least 512 MB of RAM, and
0N/A approximately 4 GB of free disk space.
0N/A The build will use the tools contained in
0N/A of a standard installation of the Linux operating environment.
0N/A You should ensure that these directories are in your
0N/A Note that some Linux systems have a habit of pre-populating
0N/A your environment variables for you, for example <
tt>JAVA_HOME</
tt>
0N/A might get pre-defined for you to refer to the JDK installed on
0N/A You will need to unset <
tt>JAVA_HOME</
tt>.
0N/A It's a good idea to run <
tt>env</
tt> and verify the
0N/A environment variables you are getting from the default system
0N/A settings make sense for building the
0N/A<!-- ------------------------------------------------------ --> 0N/A<
h4><
a name="linux_checklist">Basic Linux Check List</
a></
h4>
0N/A <
a href="#bootjdk">Bootstrap JDK</
a>, set
0N/A <
tt><
a href="#ALT_BOOTDIR">ALT_BOOTDIR</
a></
tt>.
0N/A <
a href="#binaryplugs">Binary Plugs</
a>, set
0N/A <
tt><
a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</
a></
tt>.
0N/A Install or upgrade the <
a href="#freetype">FreeType development
0N/A<!-- ------------------------------------------------------ --> 0N/A<
hr noshade="noshade" size="3">
0N/A<
h3><
a name="solaris">Basic Solaris System Setup</
a></
h3>
0N/A The minimum recommended hardware for building the
0N/A Solaris SPARC version is an UltraSPARC with 512 MB of RAM.
0N/A the Solaris x86 version, a Pentium class processor or better and at
0N/A least 128 MB of RAM are recommended.
0N/A Approximately 1.4 GB of free disk
0N/A space is needed for a 32-bit build.
0N/A If you are building the 64bit version, you should
0N/A run the command "isainfo -v" to verify that you have a
0N/A 64-bit installation.
0N/A An additional 7 GB of free disk space is needed
0N/A and <
tt>/
usr/
bin</
tt> of a standard developer or full installation of
0N/A the Solaris operating environment.
0N/A<!-- ------------------------------------------------------ --> 0N/A<
h4><
a name="solaris_checklist">Basic Solaris Check List</
a></
h4>
0N/A <
a href="#bootjdk">Bootstrap JDK</
a>, set
0N/A <
tt><
a href="#ALT_BOOTDIR">ALT_BOOTDIR</
a></
tt>.
0N/A <
a href="#binaryplugs">Binary Plugs</
a>, set
0N/A <
tt><
a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</
a></
tt>.
0N/A <
a href="#studio">Sun Studio Compilers</
a>, set
0N/A <
a href="#ALT_COMPILER_PATH"><
tt>ALT_COMPILER_PATH</
tt></
a>.
0N/A <
a href="#cups">CUPS Include files</
a>, set
0N/A <
tt><
a href="#ALT_CUPS_HEADERS_PATH">ALT_CUPS_HEADERS_PATH</
a></
tt>.
0N/A<!-- ------------------------------------------------------ --> 0N/A<
hr noshade="noshade" size="3">
0N/A<
h3><
a name="windows">Basic Windows System Setup</
a></
h3>
0N/A <
strong>i586 only:</
strong>
0N/A The minimum recommended hardware for building the 32bit or X86
0N/A Windows version is an Pentium class processor or better, at least
0N/A 512 MB of RAM, and approximately 600 MB of free disk space.
0N/A NOTE: The Windows 2000 build machines need to use the
0N/A Build machines formatted to FAT32 will not work
0N/A because FAT32 doesn't support case-sensitivity in file names.
0N/A <
strong>X64 only:</
strong>
0N/A The minimum recommended hardware for building
0N/A the Windows X64 version is an AMD Opteron class processor, at least 1
0N/A GB of RAM, and approximately 10 GB of free disk space.
0N/A<!-- ------------------------------------------------------ --> 0N/A<
h4><
a name="paths">Windows Paths</
a></
h4>
0N/A <
strong>Windows:</
strong>
0N/A Note that GNU make is a historic utility and is based very
0N/A heavily on shell scripting, so it does not tolerate the Windows habit
0N/A of having spaces in pathnames or the use of the <
tt>\</
tt>characters in pathnames.
0N/A Luckily on most Windows systems, you can use <
tt>/</
tt>instead of \, and
0N/A there is always a 'short' pathname without spaces for any path that
0N/A Unfortunately, this short pathname can be somewhat dynamic and the
0N/A formula is difficult to explain.
0N/A You can use <
tt>cygpath</
tt> utility to map pathnames with spaces
0N/A or the <
tt>\</
tt>character into the <
tt>C:/</
tt> style of pathname
0N/A <
tt>cygpath -s -m "<
i>path</
i>"</
tt>.
0N/A The makefiles will try to translate any pathnames supplied
0N/A to it into the <
tt>C:/</
tt> style automatically.
0N/A Note that use of CYGWIN creates a unique problem with regards to
0N/A setting <
a href="#path"><
tt>PATH</
tt></
a>. Normally on Windows
0N/A the <
tt>PATH</
tt> variable contains directories
0N/A separated with the ";" character (Solaris and Linux uses ":").
0N/A With CYGWIN, it uses ":", but that means that paths like "C:/path"
0N/A cannot be placed in the CYGWIN version of <
tt>PATH</
tt> and
0N/A which CYGWIN understands, but only CYGWIN understands.
0N/A So be careful with paths on Windows.
0N/A<!-- ------------------------------------------------------ --> 0N/A<
h4><
a name="windows_checklist">Basic Windows Check List</
a></
h4>
0N/A <
a href="#cygwin">CYGWIN product</
a>.
0N/A <
a href="#bootjdk">Bootstrap JDK</
a>, set
0N/A <
tt><
a href="#ALT_BOOTDIR">ALT_BOOTDIR</
a></
tt>.
0N/A <
a href="#binaryplugs">Binary Plugs</
a>, set
0N/A <
tt><
a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</
a></
tt>..
0N/A <
a href="#msvc">Microsoft Visual Studio .NET 2003 Professional</
a> or the
0N/A <
a href="#mssdk">Microsoft Platform SDK</
a>.
0N/A Setup all environment variables for compilers
0N/A (see <
a href="#msvc">compilers</
a>).
0N/A <
a href="#dxsdk">Microsoft DirectX SDK</
a>.
0N/A<!-- ------------------------------------------------------ --> 0N/A<
hr noshade="noshade" size="3">
0N/A<
h3><
a name="dependencies">Build Dependencies</
a></
h3>
0N/A Depending on the platform, the
0N/A build process has some basic
0N/A dependencies on components not part of the
0N/A Some of these are specific to a platform, some even specific to
0N/A Each dependency will have a set of ALT variables that can be set
0N/A to tell the makefiles where to locate the component.
0N/A In most cases setting these ALT variables may not be necessary
0N/A and the makefiles will find defaults on the system in standard
0N/A install locations or through component specific variables.
0N/A <
h4><
a name="bootjdk">Bootstrap JDK</
a></
h4>
0N/A builds require access to the previously released
0N/A JDK 6, this is often called a bootstrap JDK.
0N/A The JDK 6 binaries can be downloaded from Sun's
0N/A For build performance reasons
0N/A is very important that this bootstrap JDK be made available on the
0N/A local disk of the machine doing the build.
0N/A You should always set
0N/A <
tt><
a href="#ALT_BOOTDIR">ALT_BOOTDIR</
a></
tt>
0N/A to point to the location of
0N/A the bootstrap JDK installation, this is the directory pathname
0N/A that contains a <
tt>bin, lib, and include</
tt>
0N/A It's also a good idea to also place its <
tt>bin</
tt> directory
0N/A in the <
tt>PATH</
tt> environment variable, although it's
0N/A <
strong>Solaris:</
strong>
0N/A Some pre-installed JDK images may be available to you in the
0N/A <
tt><
a href="#ALT_BOOTDIR">ALT_BOOTDIR</
a></
tt>
0N/A the makefiles will look in that location for a JDK it can use.
0N/A <
h4><
a name="binaryplugs">Binary Plugs</
a></
h4>
0N/A Not all of the source code that makes up the JDK is available
0N/A under an open-source license.
0N/A In order to build an OpenJDK binary from source code,
0N/A you must first download and install the appropriate
0N/A binary plug bundles from the OpenJDK Download area.
0N/A During the OpenJDK build process these "binary plugs"
0N/A for the encumbered components will be copied into your
0N/A resulting OpenJDK binary build image.
0N/A These binary plug files are only for the purpose of
0N/A building an OpenJDK binary.
0N/A Download the Binary Plugs by selecting the <
b>Downloads</
b>
0N/A and make sure you set
0N/A <
tt><
a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</
a></
tt>
0N/A to the root of this installation.
0N/A <
h4><
a name="cacerts">Certificate Authority File (cacert)</
a></
h4>
0N/A for a better understanding of the Certificate Authority (CA).
0N/A A certificates file named "cacerts"
0N/A represents a system-wide keystore with CA certificates.
0N/A binary bundles, the "cacerts" file contains root CA certificates from
0N/A several public CAs (
e.g., VeriSign, Thawte, and Baltimore).
0N/A The source contain a cacerts file
0N/A without CA root certificates.
0N/A Formal JDK builders will need to secure
0N/A permission from each public CA and include the certificates into their
0N/A own custom cacerts file.
0N/A Failure to provide a populated cacerts file
0N/A will result in verification errors of a certificate chain during runtime.
0N/A <
tt><
a href="#ALT_CACERTS_FILE">ALT_CACERTS_FILE</
a></
tt>
0N/A can be used to override the default location of the
0N/A cacerts file that will get placed in your build.
0N/A By default an empty cacerts file is provided and that should be
0N/A fine for most JDK developers.
0N/A <
h4><
a name="compilers">Compilers</
a></
h4>
0N/A The GNU gcc compiler version should be 3.2.2 or newer.
0N/A The binutils package should be 2.11.93.0.2-11 or newer.
0N/A The compiler used should be the default compiler installed
0N/A <
strong><
a name="studio">Solaris: Sun Studio</
a></
strong>
0N/A Sun Studio 11 Compilers</
a>
0N/A (containing version 5.8 of the C and C++ compilers) is required,
0N/A with patches from the
0N/A SunSolve web site</
a>.
0N/A <
a href="#ALT_COMPILER_PATH"><
tt>ALT_COMPILER_PATH</
tt></
a>
0N/A to point to the location of
0N/A the compiler binaries, and place this location in the <
tt>PATH</
tt>.
0N/A The Sun Studio Express compilers at:
0N/A Sun Studio Express Download site</
a>
0N/A are also an option, although these compilers have not
0N/A been extensively used yet.
0N/A <
strong>Windows i586: Microsoft Visual Studio .NET 2003 Professional</
strong>
0N/A requires Microsoft Visual Studio .NET 2003 (VS2003) Professional
0N/A The compiler and other tools are expected to reside
0N/A in the location defined by the variable <
tt>VS71COMNTOOLS</
tt> which
0N/A is set by the Microsoft Visual Studio .NET installer.
0N/A Once the compiler is installed,
0N/A to set the compiler environment variables
0N/A prior to building the
0N/A The above environment variables <
b>MUST</
b> be set.
0N/A The Microsoft Visual Studio .NET 2005 (VS2005) compiler
0N/A will not work at this time due to the new runtime dll
0N/A and the manifest requirements.
0N/A <
strong>Windows X64: Microsoft Platform SDK April 2005</
strong>
0N/A the Microsoft Platform Software
0N/A Development Kit (SDK), April 2005 Edition compiler, is required for
0N/A because it contains the C/C++ compiler.
0N/A You will need to minimally install the Core SDK and
0N/A the MDAC SDK features of this compiler.
0N/A Once the Platform SDK is installed,
0N/A to set the compiler environment variables
0N/A prior to building the
0N/A The above environment variables <
b>MUST</
b> be set.
0N/A Note that this compiler may say it's version is a
0N/A Microsoft Visual Studio .NET 2005 (VS2005), but be careful,
0N/A it will not match the official VS2005 product.
0N/A This Platform SDK compiler is only used on X64 builds.
0N/A <
h4><
a name="cups">Common UNIX Printing System (CUPS) Headers (Solaris & Linux)</
a></
h4>
0N/A <
strong>Solaris:</
strong>
0N/A CUPS header files are required for building the
0N/A The Solaris header files can be obtained by installing
0N/A the package <
strong>SFWcups</
strong> from the Solaris Software
0N/A Companion
CD/
DVD, these often will be installed into
0N/A <
strong>Linux:</
strong>
0N/A CUPS header files are required for building the
0N/A The Linux header files are usually available from a "cups"
0N/A development package, it's recommended that you try and use
0N/A the package provided by the particular version of Linux that
0N/A The CUPS header files can always be downloaded from
0N/A <
tt><
a href="#ALT_CUPS_HEADERS_PATH">ALT_CUPS_HEADERS_PATH</
a></
tt>
0N/A can be used to override the default location of the
0N/A <
h4><
a name="freetype">FreeType 2</
a></
h4>
0N/A Version 2.3 or newer of FreeType is required for building the OpenJDK.
0N/A On Unix systems required files can be available as part of your
0N/A distribution (while you still may need to upgrade them).
0N/A Note that you need development version of package that
0N/A includes both FreeType library and header files.
0N/A You can always download latest FreeType version from the
0N/A In case it is installed elsewhere you will need to set environment
0N/A <
tt><
a href="#ALT_FREETYPE_LIB_PATH">ALT_FREETYPE_LIB_PATH</
a></
tt>
0N/A <
tt><
a href="#ALT_FREETYPE_HEADERS_PATH">ALT_FREETYPE_HEADERS_PATH</
a></
tt>
0N/A to refer to place where library and header files are installed.
0N/A <
h4><
a name="alsa">Advanced Linux Sound Architecture (ALSA) (Linux only)</
a></
h4>
0N/A <
strong>Linux only:</
strong>
0N/A Version 0.9.1 or newer of the ALSA files are
0N/A required for building the
0N/A These Linux files are usually available from an "alsa"
0N/A development package, it's recommended that you try and use
0N/A the package provided by the particular version of Linux that
0N/A The makefiles will check this emit a sanity error if it is
0N/A missing or the wrong version.
0N/A As a last resort you can go to the
0N/A Advanced Linux Sound Architecture Site</
a>.
0N/A <
h4>Windows Specific Dependencies</
h4>
0N/A <
strong>Unix Command Tools (<
a name="cygwin">CYGWIN</
a>)</
strong>
0N/A requires access to a set of unix command tools
0N/A on Windows which can be supplied by
0N/A requires CYGWIN version 1.5.12 or newer.
0N/A Information about CYGWIN can
0N/A be obtained from the CYGWIN website at
0N/A By default CYGWIN doesn't install all the tools required for building
0N/A Along with the default installation, you need to install
0N/A the following tools.
0N/A <
td>Binary Name</
td>
0N/A <
td>Description</
td>
0N/A <
td>binutils: The GNU assembler, linker and binary
0N/A <
td>make: The GNU version of the 'make' utility</
td>
0N/A <
td>Interpreters</
td>
0N/A <
td>m4: GNU implementation of the traditional Unix macro
0N/A <
td>cpio: A program to manage archives of files</
td>
0N/A <
td>file: Determines file type using 'magic' numbers</
td>
0N/A <
strong>Microsoft DirectX 9.0 SDK header files and libraries</
strong>
0N/A Microsoft DirectX 9.0 SDK (Summer 2004)
0N/A headers are required for building
0N/A This SDK can be downloaded from
0N/A Microsoft DirectX 9.0 SDK (Summer 2004)</
a>.
0N/A If the link above becomes obsolete, the SDK can be found from
0N/A (search with "DirectX 9.0 SDK Update Summer 2004").
0N/A The location of this SDK can be set with
0N/A <
tt><
a href="#ALT_DXSDK_PATH">ALT_DXSDK_PATH</
a></
tt>
0N/A but it's normally found via the DirectX environment variable
0N/A <
strong>i586 only:</
strong>
0N/A 32bit build requires
0N/A version 6.00.8337.0 or newer.
0N/A the system32 directory set the
0N/A <
a href="#ALT_MSVCRT_DLL_PATH"><
tt>ALT_MSVCRT_DLL_PATH</
tt></
a>
0N/A variable to the location.
0N/A <
strong>X64 only:</
strong>
0N/A The OpenJDK 64bit build requires access to
0N/A usually supplied by the
0N/A <
a href="#mssdk">Platform SDK</
a>.
0N/A If it is not available from the Platform SDK,
0N/A <
a href="#ALT_MSVCRT_DLL_PATH"><
tt>ALT_MSVCRT_DLL_PATH</
tt></
a>
0N/A variable to the location.
0N/A <
strong>i586 only:</
strong>
0N/A build requires access to
0N/A <
a href="#msvc">Visual Studio product</
a>
0N/A Visual Studio product
0N/A <
a href="#ALT_MSVCR71_DLL_PATH"><
tt>ALT_MSVCR71_DLL_PATH</
tt></
a>
0N/A variable to the location.
0N/A<
hr noshade="noshade" size="3">
0N/A<
h2><
a name="creating">Creating the Build</
a></
h2>
0N/A Once a machine is setup to build the
0N/A the steps to create the
0N/A build are fairly simple.
0N/A The various ALT settings can either be made into variables
0N/A or can be supplied on the
0N/A <
a href="#gmake"><
tt><
i>gmake</
i></
tt></
a>
0N/A <
li>Use the sanity rule to double check all the ALT settings:
0N/A [ARCH_DATA_MODEL=<
i>32 or 64</
i>]
0N/A [other "ALT_" overrides]
0N/A <
li>Start the build with the command:
0N/A [ARCH_DATA_MODEL=<
i>32 or 64</
i>]
0N/A [ALT_OUTPUTDIR=<
i>output_directory</
i>]
0N/A [other "ALT_" overrides]
0N/A <
strong>Solaris:</
strong>
0N/A Note that ARCH_DATA_MODEL is really only needed on Solaris to
0N/A indicate you want to built the 64-bit version.
0N/A And before the Solaris 64-bit binaries can be used, they
0N/A must be merged with the binaries from a separate 32-bit build.
0N/A The merged binaries may then be used in either 32-bit or 64-bit mode, with
0N/A the selection occurring at runtime
0N/A with the <
tt>-d32</
tt> or <
tt>-d64</
tt> options.
0N/A<!-- ------------------------------------------------------ --> 0N/A<
hr noshade="noshade" size="3">
0N/A<
h2><
a name="testing">Testing the Build</
a></
h2>
0N/A When the build is completed, you should see the generated
0N/A binaries and associated files in the <
tt>j2sdk-image</
tt>
0N/A directory in the output directory.
0N/A The default output directory is
0N/A <
tt>build/<
i>platform</
i></
tt>,
0N/A where <
tt><
i>platform</
i></
tt> is one of
0N/A <
li>solaris-sparc</
li>
0N/A <
li>solaris-sparcv9</
li>
0N/A <
li>solaris-i586</
li>
0N/A <
li>solaris-amd64</
li>
0N/A <
li>linux-amd64</
li>
0N/A <
li>windows-i586</
li>
0N/A <
li>windows-amd64</
li>
0N/A directory should contain executables for the
0N/A tools and utilities.
0N/A You can test that the build completed properly by using the build
0N/A to run the various demos that you will find in the
0N/A The provided regression tests can be run with the <
tt>jtreg</
tt>
0N/A<!-- ------------------------------------------------------ --> 0N/A<
hr noshade="noshade" size="3">
0N/Aenvironment or make variables (just called <
b>variables</
b> in this
0N/Adocument) that can impact the build are:
0N/A <
dt><
a name="path"><
tt>PATH</
tt></
a> </
dt>
0N/A <
dd>Typically you want to set the <
tt>PATH</
tt> to include:
0N/A <
li>The location of the GNU make binary</
li>
0N/A <
li>The location of the JDK 6 <
tt>java</
tt>
0N/A (see <
a href="#bootjdk">Bootstrap JDK</
a>)</
li>
0N/A <
li>The location of the C/C++ compilers
0N/A (see <
a href="#compilers"><
tt>compilers</
tt></
a>)</
li>
0N/A <
li>The location or locations for the Unix command utilities
0N/A <
dt><
a name="arch_data_model"><
tt>ARCH_DATA_MODEL</
tt></
a></
dt>
0N/A <
dd>The <
tt>ARCH_DATA_MODEL</
tt> variable
0N/A is used to specify whether the build is to generate 32-bit or 64-bit
0N/A The Solaris build supports either 32-bit or 64-bit builds, but
0N/A Windows and Linux will support only one, depending on the specific
0N/A Normally, setting this variable is only necessary on Solaris.
0N/A Set <
tt>ARCH_DATA_MODEL</
tt> to <
tt>32</
tt> for generating 32-bit binaries,
0N/A or to <
tt>64</
tt> for generating 64-bit binaries.
0N/A <
dt><
a name="ALT_BOOTDIR"><
tt>ALT_BOOTDIR</
tt></
a></
dt>
0N/A The location of the bootstrap JDK installation.
0N/A See <
a href="#bootjdk">Bootstrap JDK</
a> for more information.
0N/A You should always install your own local Bootstrap JDK and
0N/A always set <
tt>ALT_BOOTDIR</
tt> explicitly.
0N/A <
dt><
a name="ALT_OUTPUTDIR"><
tt>ALT_OUTPUTDIR</
tt></
a> </
dt>
0N/A An override for specifying the (absolute) path of where the
0N/A build output is to go.
0N/A The default output directory will be build/<
i>platform</
i>.
0N/A <
dt><
a name="ALT_COMPILER_PATH"><
tt>ALT_COMPILER_PATH</
tt></
a> </
dt>
0N/A The location of the C/C++ compiler.
0N/A The default varies depending on the platform.
0N/A <
dt><
tt><
a name="ALT_CACERTS_FILE">ALT_CACERTS_FILE</
a></
tt></
dt>
0N/A The location of the <
a href="#cacerts">cacerts</
a> file.
0N/A The default will refer to
0N/A <
dt><
a name="ALT_BINARY_PLUGS_PATH"><
tt>ALT_BINARY_PLUGS_PATH</
tt></
a></
dt>
0N/A The location of the binary plugs installation.
0N/A See <
a href="#binaryplugs">Binary Plugs</
a> for more information.
0N/A You should always have a local copy of a
0N/A recent Binary Plugs install image
0N/A and set this variable to that location.
0N/A <
dt><
a name="ALT_CUPS_HEADERS_PATH"><
tt>ALT_CUPS_HEADERS_PATH</
tt></
a> </
dt>
0N/A The location of the CUPS header files.
0N/A See <
a href="#cups">CUPS information</
a> for more information.
0N/A If this path does not exist the fallback path is
0N/A <
dt><
a name="ALT_FREETYPE_LIB_PATH"><
tt>ALT_FREETYPE_LIB_PATH</
tt></
a></
dt>
0N/A The location of the FreeType shared library.
0N/A See <
a href="#freetype">FreeType information</
a> for details.
0N/A <
dt><
a name="ALT_FREETYPE_HEADERS_PATH"><
tt>ALT_FREETYPE_HEADERS_PATH</
tt></
a></
dt>
0N/A The location of the FreeType header files.
0N/A See <
a href="#freetype">FreeType information</
a> for details.
0N/A <
dt><
strong>Windows specific:</
strong></
dt>
0N/A <
dt><
a name="ALT_MSDEVTOOLS_PATH"><
tt>ALT_MSDEVTOOLS_PATH</
tt></
a> </
dt>
0N/A The location of the Microsoft Visual Studio .NET 2003
0N/A tools 'bin' directory.
0N/A The default is usually derived from
0N/A <
a href="#ALT_COMPILER_PATH"><
tt>ALT_COMPILER_PATH</
tt></
a>.
0N/A <
dt><
tt><
a name="ALT_DXSDK_PATH">ALT_DXSDK_PATH</
a></
tt> </
dt>
0N/A <
a href="#dxsdk">Microsoft DirectX 9 SDK</
a>.
0N/A The default will be to try and use the DirectX environment
0N/A variable <
tt>DXSDK_DIR</
tt>,
0N/A failing that, look in <
tt>C:/DXSDK</
tt>.
0N/A <
dt><
tt><
a name="ALT_MSVCRT_DLL_PATH">ALT_MSVCRT_DLL_PATH</
a></
tt> </
dt>
0N/A <
dt><
tt><
a name="ALT_MSVCR71_DLL_PATH">ALT_MSVCR71_DLL_PATH</
a></
tt> </
dt>
0N/A <
strong>i586 only:</
strong>
0N/A<!-- ------------------------------------------------------ --> 0N/A<
hr noshade="noshade" size="3">
0N/A<
h2><
a name="troubleshooting">Troubleshooting</
a></
h2>
0N/A A build can fail for any number of reasons.
0N/A are a result of trying to build in an environment in which all the
0N/A pre-build requirements have not been met.
0N/A troubleshooting a build failure is to recheck that you have satisfied
0N/A all the pre-build requirements for your platform.
0N/A Look for the check list of the platform you are building on in the
0N/A <
a href="#contents">Table of Contents</
a>.
0N/A You can validate your build environment by using the <
tt>sanity</
tt>
0N/A will stop the build from starting, and any warnings may result in
0N/A a flawed product build.
0N/A We strongly encourage you to evaluate every
0N/A sanity check warning and fix it if required, before you proceed
0N/A further with your build.
0N/A Some of the more common problems with builds are briefly described
0N/A below, with suggestions for remedies.
0N/A If your build machine seems to be overloaded from too many
0N/A simultaneous C++ compiles, try setting the <
tt>HOTSPOT_BUILD_JOBS</
tt>
0N/A variable to <
tt>1</
tt> (if you're using a multiple CPU
0N/A machine, setting it to more than the the number of CPUs is probably
0N/A Creating the javadocs can be very slow, if you are running
0N/A javadoc, consider skipping that step.
0N/A Faster hardware and more RAM always helps too.
0N/A The VM build tends to be CPU intensive (many C++ compiles),
0N/A and the rest of the JDK will often be disk intensive.
0N/A Faster compiles are possible using a tool called
0N/A <
b>File time issues:</
b>
0N/A If you see warnings that refer to file time stamps,
e.g. 0N/A <
i>Warning message:</
i><
tt> File `xxx' has modification time in
0N/A <
i>Warning message:</
i> <
tt> Clock skew detected. Your build may
0N/A These warnings can occur when the clock on the build machine is out of
0N/A sync with the timestamps on the source files. Other errors, apparently
0N/A unrelated but in fact caused by the clock skew, can occur along with
0N/A the clock skew warnings. These secondary errors may tend to obscure the
0N/A fact that the true root cause of the problem is an out-of-sync clock.
0N/A For example, an out-of-sync clock has been known to cause an old
0N/A version of javac to be used to compile some files, resulting in errors
0N/A when the pre-1.4 compiler ran across the new <
tt>assert</
tt> keyword
0N/A in the 1.4 source code.
0N/A If you see these warnings, reset the clock on the build
0N/A machine, run "<
tt><
i>gmake</
i> clobber</
tt>" or delete the directory
0N/A containing the build output, and restart the build from the beginning.
0N/A <
b>Error message: <
tt>Trouble writing out table to disk</
tt></
b>
0N/A Increase the amount of swap space on your build machine.
0N/A <
b>Error Message: <
tt>libstdc++ not found:</
tt></
b>
0N/A This is caused by a missing libstdc++.a library.
0N/A This is installed as part of a specific package
0N/A By default some 64bit Linux versions (
e.g. Fedora)
0N/A only install the 64bit version of the libstdc++ package.
0N/A Various parts of the JDK build require a static
0N/A link of the C++ runtime libraries to allow for maximum
0N/A portability of the built images.
0N/A <
b>Error Message: <
tt>cannot restore segment prot after reloc</
tt></
b>
0N/A This is probably an issue with SELinux (See
0N/A Parts of the VM is built without the <
tt>-fPIC</
tt> for
0N/A performance reasons.
0N/A To completely disable SELinux:
0N/A <
li># system-config-securitylevel</
li>
0N/A <
li>In the window that appears, select the SELinux tab</
li>
0N/A <
li>Disable SELinux</
li>
0N/A Alternatively, instead of completely disabling it you could
0N/A disable just this one check.
0N/A <
li>Select System->Administration->SELinux Management</
li>
0N/A <
li>In the SELinux Management Tool which appears,
0N/A select "Boolean" from the menu on the left</
li>
0N/A <
li>Expand the "Memory Protection" group</
li>
0N/A <
li>Check the first item, labeled
0N/A "Allow all unconfined executables to use libraries requiring text relocation ..."</
li>
0N/A<
hr noshade="noshade" size="3">