duke@2: duke@2: duke@2: duke@2: OpenJDK Build README duke@2: duke@2: duke@2:
duke@2: duke@2:
duke@2:

OpenJDK Build README

duke@2:
duke@2: duke@2: duke@2:
duke@2: duke@2:

Introduction

duke@2: duke@2:
duke@2:

duke@2: This README file contains build instructions for the duke@2: OpenJDK. duke@2: Building the source code for the duke@2: OpenJDK duke@2: requires duke@2: a certain degree of technical expertise. duke@2:

duke@2: duke@2: duke@2:
duke@2: duke@2:

Contents

duke@2: duke@2:
duke@2: duke@2:
duke@2: duke@2: duke@2:
duke@2: duke@2:

Minimum Build Environments

duke@2: duke@2:
duke@2:

duke@2: This file often describes specific requirements for what we call the duke@2: "minimum build environments" (MBE) for the JDK. duke@2: Building with the MBE will generate the most compatible duke@2: bits that install on, and run correctly on, the most variations duke@2: of the same base OS and hardware architecture. duke@2: These usually represent what is often called the duke@2: least common denominator platforms. duke@2: It is understood that most developers will NOT be using these duke@2: specific platforms, and in fact creating these specific platforms duke@2: may be difficult due to the age of some of this software. duke@2:

duke@2: duke@2:

duke@2: The minimum OS and C/C++ compiler versions needed for building the duke@2: OpenJDK: duke@2:

duke@2:

duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2:
Base OS and ArchitectureOSCompiler
Linux X86 (32bit)Red Hat Enterprise Linux 4 gcc 4
Linux X64 (64bit)Red Hat Enterprise Linux 4 gcc 4
Solaris SPARC (32bit)Solaris 10 + patches duke@2:
duke@2: See SunSolve for patch downloads. duke@2:
Sun Studio 11
Solaris SPARCV9 (64bit)Solaris 10 + patches duke@2:
duke@2: See SunSolve for patch downloads. duke@2:
Sun Studio 11
Solaris X86 (32bit)Solaris 10 + patches duke@2:
duke@2: See SunSolve for patch downloads. duke@2:
Sun Studio 11
Solaris X64 (64bit)Solaris 10 + patches duke@2:
duke@2: See SunSolve for patch downloads. duke@2:
Sun Studio 11
Windows X86 (32bit)Windows XPMicrosoft Visual Studio .NET 2003 Professional
Windows X64 (64bit)Windows Server 2003 - Enterprise x64 EditionMicrosoft Platform SDK - April 2005
duke@2:
duke@2:
duke@2: duke@2: duke@2:
duke@2: duke@2:

Specific Developer Build Environments

duke@2: duke@2:
duke@2:

duke@2: We won't be listing all the possible environments, but duke@2: we will try to provide what information we have available to us. duke@2:

duke@2: duke@2:

Fedora

duke@2: duke@2:
duke@2: TBD duke@2:
duke@2: duke@2:

Debian

duke@2: duke@2:
duke@2: TBD duke@2:
duke@2: duke@2:

Ubuntu

duke@2: duke@2:
duke@2:

duke@2: In addition to needing the Bootstrap JDK and the Binary Plugs, duke@2: when building on Ubuntu you will need to duke@2: make sure certain packages are installed. duke@2: In particular, certain X11 packages, make, m4, gawk, gcc 4, duke@2: binutils, cups, freetype duke@2: and alsa. duke@2: duke@2:

Ubuntu 6.06

duke@2: duke@2:

duke@2: The following list of packages for Ubuntu 6.06 is a working set that duke@2: does appear to work. duke@2: duke@2:

duke@2: Note that it's quite possible that some of these duke@2: packages are not required, so anyone discovering that some of the duke@2: packages listed below are NOT required, duke@2: please let the duke@2: OpenJDK duke@2: team know. duke@2:

duke@2: All the packages below can be installed with the duke@2: Synaptic Package manager provided with the base Ubuntu 6.06 release. duke@2: duke@2:

duke@2: duke@2:
duke@2: duke@2:

Ubuntu 7.04

duke@2: duke@2:

duke@2: Using the Synaptic Package Manager, download the following duke@2: packages (double indented packages are automatically aquired duke@2: due to package dependencies): duke@2: duke@2:

duke@2: duke@2:
duke@2:
duke@2: duke@2: duke@2:
duke@2: duke@2:

Source Directory Structure

duke@2: duke@2:
duke@2:

ohair@5: The source code for the OpenJDK is delivered in a set of ohair@5: directories: duke@2: hotspot, duke@2: langtools, duke@2: corba, duke@2: jaxws, duke@2: jaxp, duke@2: and ohair@5: jdk. duke@2: The hotspot directory contains the source code and make ohair@5: files for building the OpenJDK Hotspot Virtual Machine. ohair@5: The langtools directory contains the source code and make ohair@5: files for building the OpenJDK javac and language tools. ohair@5: The corba directory contains the source code and make ohair@5: files for building the OpenJDK Corba files. ohair@5: The jaxws directory contains the source code and make ohair@5: files for building the OpenJDK JAXWS files. ohair@5: The jaxp directory contains the source code and make ohair@5: files for building the OpenJDK JAXP files. ohair@5: The jdk directory contains the source code and make files for ohair@5: building the OpenJDK runtime libraries and misc files. ohair@5: The top level Makefile ohair@5: is used to build the entire OpenJDK. duke@2:

duke@2: duke@2: duke@2:
duke@2: duke@2:

Build Information

duke@2: duke@2:
duke@2:

duke@2: Building the duke@2: OpenJDK duke@2: is done with a gmake duke@2: command line and various duke@2: environment or make variable settings that direct the make rules duke@2: to where various components have been installed. duke@2: Where possible the makefiles will attempt to located the various duke@2: components in the default locations or any component specific duke@2: variable settings. duke@2: When the normal defaults fail or components cannot be found, duke@2: the various duke@2: ALT_* variables (alternates) duke@2: can be used to help the makefiles locate components. duke@2:

duke@2: Refer to the bash/sh/ksh setup file duke@2: jdk/make/jdk_generic_profile.sh duke@2: if you need help in setting up your environment variables. duke@2: A build could be as simple as: duke@2:

duke@2:

duke@2:                 bash
duke@2:                 . jdk/make/jdk_generic_profile.sh
duke@2:                 gmake sanity && gmake
duke@2:         
duke@2:
duke@2:

duke@2: Of course ksh or sh would work too. duke@2: But some customization will probably be necessary. duke@2: The sanity rule will make some basic checks on build duke@2: dependencies and generate appropriate warning messages duke@2: regarding missing, out of date, or newer than expected components duke@2: found on your system. duke@2:

duke@2: duke@2: duke@2:
duke@2: duke@2:

GNU make (gmake)

duke@2: duke@2:
duke@2:

duke@2: The Makefiles in the duke@2: OpenJDK duke@2: are only valid when used with the duke@2: GNU version of the utility command make duke@2: (gmake). duke@2: A few notes about using GNU make: duke@2:

duke@2:

duke@2: Information on GNU make, and access to ftp download sites, are duke@2: available on the duke@2: duke@2: GNU make web site duke@2: . duke@2: The latest source to GNU make is available at duke@2: ftp.gnu.org/pub/gnu/make/. duke@2:

duke@2: duke@2: duke@2:
duke@2: duke@2:

Basic Linux System Setup

duke@2: duke@2:
duke@2:

duke@2: i586 only: duke@2: The minimum recommended hardware for building the Linux version duke@2: is a Pentium class processor or better, at least 256 MB of RAM, and duke@2: approximately 1.5 GB of free disk space. duke@2:

duke@2: X64 only: duke@2: The minimum recommended hardware for building the Linux duke@2: version is an AMD Opteron class processor, at least 512 MB of RAM, and duke@2: approximately 4 GB of free disk space. duke@2:

duke@2: The build will use the tools contained in duke@2: /bin and duke@2: /usr/bin duke@2: of a standard installation of the Linux operating environment. duke@2: You should ensure that these directories are in your duke@2: PATH. duke@2:

duke@2: Note that some Linux systems have a habit of pre-populating duke@2: your environment variables for you, for example JAVA_HOME duke@2: might get pre-defined for you to refer to the JDK installed on duke@2: your Linux system. duke@2: You will need to unset JAVA_HOME. duke@2: It's a good idea to run env and verify the duke@2: environment variables you are getting from the default system duke@2: settings make sense for building the duke@2: OpenJDK. duke@2:

duke@2: duke@2: duke@2: duke@2:

Basic Linux Check List

duke@2: duke@2:
duke@2:
    duke@2:
  1. duke@2: Install the duke@2: Bootstrap JDK, set duke@2: ALT_BOOTDIR. duke@2:
  2. duke@2:
  3. duke@2: Install the duke@2: Binary Plugs, set duke@2: ALT_BINARY_PLUGS_PATH. duke@2:
  4. duke@2:
  5. duke@2: Install or upgrade the FreeType development duke@2: package. duke@2:
  6. duke@2:
duke@2:
duke@2: duke@2: duke@2:
duke@2: duke@2:

Basic Solaris System Setup

duke@2: duke@2:
duke@2:

duke@2: The minimum recommended hardware for building the duke@2: Solaris SPARC version is an UltraSPARC with 512 MB of RAM. duke@2: For building duke@2: the Solaris x86 version, a Pentium class processor or better and at duke@2: least 128 MB of RAM are recommended. duke@2: Approximately 1.4 GB of free disk duke@2: space is needed for a 32-bit build. duke@2:

duke@2: If you are building the 64bit version, you should duke@2: run the command "isainfo -v" to verify that you have a duke@2: 64-bit installation. duke@2: An additional 7 GB of free disk space is needed duke@2: for a 64-bit build. duke@2:

duke@2: The build uses the tools contained in /usr/ccs/bin duke@2: and /usr/bin of a standard developer or full installation of duke@2: the Solaris operating environment. duke@2:

duke@2: duke@2: duke@2: duke@2:

Basic Solaris Check List

duke@2: duke@2:
duke@2:
    duke@2:
  1. duke@2: Install the duke@2: Bootstrap JDK, set duke@2: ALT_BOOTDIR. duke@2:
  2. duke@2:
  3. duke@2: Install the duke@2: Binary Plugs, set duke@2: ALT_BINARY_PLUGS_PATH. duke@2:
  4. duke@2:
  5. duke@2: Install the duke@2: Sun Studio Compilers, set duke@2: ALT_COMPILER_PATH. duke@2:
  6. duke@2:
  7. duke@2: Install the duke@2: CUPS Include files, set duke@2: ALT_CUPS_HEADERS_PATH. duke@2:
  8. duke@2:
duke@2:
duke@2: duke@2: duke@2:
duke@2: duke@2:

Basic Windows System Setup

duke@2: duke@2:
duke@2:

duke@2: i586 only: duke@2: The minimum recommended hardware for building the 32bit or X86 duke@2: Windows version is an Pentium class processor or better, at least duke@2: 512 MB of RAM, and approximately 600 MB of free disk space. duke@2: duke@2: NOTE: The Windows 2000 build machines need to use the duke@2: file system NTFS. duke@2: Build machines formatted to FAT32 will not work duke@2: because FAT32 doesn't support case-sensitivity in file names. duke@2: duke@2:

duke@2: X64 only: duke@2: The minimum recommended hardware for building duke@2: the Windows X64 version is an AMD Opteron class processor, at least 1 duke@2: GB of RAM, and approximately 10 GB of free disk space. duke@2:

duke@2: duke@2: duke@2: duke@2:

Windows Paths

duke@2: duke@2:
duke@2:

duke@2: Windows: duke@2: Note that GNU make is a historic utility and is based very duke@2: heavily on shell scripting, so it does not tolerate the Windows habit duke@2: of having spaces in pathnames or the use of the \characters in pathnames. duke@2: Luckily on most Windows systems, you can use /instead of \, and duke@2: there is always a 'short' pathname without spaces for any path that duke@2: contains spaces. duke@2: Unfortunately, this short pathname can be somewhat dynamic and the duke@2: formula is difficult to explain. duke@2: You can use cygpath utility to map pathnames with spaces duke@2: or the \character into the C:/ style of pathname duke@2: (called 'mixed'), e.g. duke@2: cygpath -s -m "path". duke@2:

duke@2: The makefiles will try to translate any pathnames supplied duke@2: to it into the C:/ style automatically. duke@2:

duke@2: Note that use of CYGWIN creates a unique problem with regards to duke@2: setting PATH. Normally on Windows duke@2: the PATH variable contains directories duke@2: separated with the ";" character (Solaris and Linux uses ":"). duke@2: With CYGWIN, it uses ":", but that means that paths like "C:/path" duke@2: cannot be placed in the CYGWIN version of PATH and duke@2: instead CYGWIN uses something like /cygdrive/c/path duke@2: which CYGWIN understands, but only CYGWIN understands. duke@2: So be careful with paths on Windows. duke@2:

duke@2: duke@2: duke@2: duke@2:

Basic Windows Check List

duke@2: duke@2:
duke@2:
    duke@2:
  1. duke@2: Install the duke@2: CYGWIN product. duke@2:
  2. duke@2:
  3. duke@2: Install the duke@2: Bootstrap JDK, set duke@2: ALT_BOOTDIR. duke@2:
  4. duke@2:
  5. duke@2: Install the duke@2: Binary Plugs, set duke@2: ALT_BINARY_PLUGS_PATH.. duke@2:
  6. duke@2:
  7. duke@2: Install the duke@2: Microsoft Visual Studio .NET 2003 Professional or the duke@2: Microsoft Platform SDK. duke@2:
  8. duke@2:
  9. duke@2: Setup all environment variables for compilers duke@2: (see compilers). duke@2:
  10. duke@2:
  11. duke@2: Install duke@2: Microsoft DirectX SDK. duke@2:
  12. duke@2:
duke@2:
duke@2: duke@2: duke@2:
duke@2: duke@2:

Build Dependencies

duke@2: duke@2:
duke@2:

duke@2: Depending on the platform, the duke@2: OpenJDK duke@2: build process has some basic duke@2: dependencies on components not part of the duke@2: OpenJDK duke@2: sources. duke@2: Some of these are specific to a platform, some even specific to duke@2: an architecture. duke@2: Each dependency will have a set of ALT variables that can be set duke@2: to tell the makefiles where to locate the component. duke@2: In most cases setting these ALT variables may not be necessary duke@2: and the makefiles will find defaults on the system in standard duke@2: install locations or through component specific variables. duke@2: duke@2:

Bootstrap JDK

duke@2: duke@2:
duke@2:

duke@2: All duke@2: OpenJDK duke@2: builds require access to the previously released duke@2: JDK 6, this is often called a bootstrap JDK. duke@2: The JDK 6 binaries can be downloaded from Sun's duke@2: JDK 6 download site. duke@2: For build performance reasons duke@2: is very important that this bootstrap JDK be made available on the duke@2: local disk of the machine doing the build. duke@2: You should always set duke@2: ALT_BOOTDIR duke@2: to point to the location of duke@2: the bootstrap JDK installation, this is the directory pathname duke@2: that contains a bin, lib, and include duke@2: It's also a good idea to also place its bin directory duke@2: in the PATH environment variable, although it's duke@2: not required. duke@2:

duke@2: Solaris: duke@2: Some pre-installed JDK images may be available to you in the duke@2: directory /usr/jdk/instances. duke@2: If you don't set duke@2: ALT_BOOTDIR duke@2: the makefiles will look in that location for a JDK it can use. duke@2:

duke@2: duke@2:

Binary Plugs

duke@2: duke@2:
duke@2:

duke@2: Not all of the source code that makes up the JDK is available duke@2: under an open-source license. duke@2: In order to build an OpenJDK binary from source code, duke@2: you must first download and install the appropriate ohair@5: binary plug bundles from the OpenJDK, go to the ohair@5: OpenJDK site and select ohair@5: the "Bundles(7)" link. duke@2: During the OpenJDK build process these "binary plugs" duke@2: for the encumbered components will be copied into your duke@2: resulting OpenJDK binary build image. duke@2: These binary plug files are only for the purpose of duke@2: building an OpenJDK binary. ohair@5: Make sure you set duke@2: ALT_BINARY_PLUGS_PATH duke@2: to the root of this installation. duke@2:

duke@2: duke@2:

Certificate Authority File (cacert)

duke@2: duke@2:
duke@2:

duke@2: See duke@2: www.wikipedia.org/wiki/CAcert duke@2: for a better understanding of the Certificate Authority (CA). duke@2: A certificates file named "cacerts" duke@2: represents a system-wide keystore with CA certificates. duke@2: In JDK and JRE duke@2: binary bundles, the "cacerts" file contains root CA certificates from duke@2: several public CAs (e.g., VeriSign, Thawte, and Baltimore). duke@2: The source contain a cacerts file duke@2: without CA root certificates. duke@2: Formal JDK builders will need to secure duke@2: permission from each public CA and include the certificates into their duke@2: own custom cacerts file. duke@2: Failure to provide a populated cacerts file duke@2: will result in verification errors of a certificate chain during runtime. duke@2: The variable duke@2: ALT_CACERTS_FILE duke@2: can be used to override the default location of the duke@2: cacerts file that will get placed in your build. duke@2: By default an empty cacerts file is provided and that should be duke@2: fine for most JDK developers. duke@2:

duke@2: duke@2:

Compilers

duke@2: duke@2:
duke@2: duke@2: duke@2: Linux gcc/binutils duke@2: duke@2: duke@2:
duke@2:

duke@2: The GNU gcc compiler version should be 3.2.2 or newer. duke@2: The binutils package should be 2.11.93.0.2-11 or newer. duke@2: The compiler used should be the default compiler installed duke@2: in /usr/bin. duke@2:

duke@2: duke@2: Solaris: Sun Studio duke@2: duke@2:
duke@2:

duke@2: At a minimum, the duke@2: duke@2: Sun Studio 11 Compilers duke@2: (containing version 5.8 of the C and C++ compilers) is required, duke@2: with patches from the duke@2: duke@2: SunSolve web site. duke@2:

duke@2: Set duke@2: ALT_COMPILER_PATH duke@2: to point to the location of duke@2: the compiler binaries, and place this location in the PATH. duke@2:

duke@2: The Sun Studio Express compilers at: duke@2: duke@2: Sun Studio Express Download site duke@2: are also an option, although these compilers have not duke@2: been extensively used yet. duke@2:

duke@2: duke@2: duke@2: Windows i586: Microsoft Visual Studio .NET 2003 Professional duke@2: duke@2: duke@2:
duke@2:

duke@2: The 32-bit duke@2: OpenJDK duke@2: Windows build duke@2: requires Microsoft Visual Studio .NET 2003 (VS2003) Professional duke@2: Edition compiler. duke@2: The compiler and other tools are expected to reside duke@2: in the location defined by the variable VS71COMNTOOLS which duke@2: is set by the Microsoft Visual Studio .NET installer. duke@2:

duke@2: Once the compiler is installed, duke@2: it is recommended that you run VCVARS32.BAT duke@2: to set the compiler environment variables duke@2: MSVCDIR, duke@2: INCLUDE, duke@2: LIB, and duke@2: PATH duke@2: prior to building the duke@2: OpenJDK. duke@2: The above environment variables MUST be set. duke@2:

duke@2: The Microsoft Visual Studio .NET 2005 (VS2005) compiler duke@2: will not work at this time due to the new runtime dll duke@2: and the manifest requirements. duke@2:

duke@2: duke@2: duke@2: Windows X64: Microsoft Platform SDK April 2005 duke@2: duke@2: duke@2:
duke@2:

duke@2: On X64, duke@2: the Microsoft Platform Software duke@2: Development Kit (SDK), April 2005 Edition compiler, is required for duke@2: building the duke@2: OpenJDK duke@2: because it contains the C/C++ compiler. duke@2: You will need to minimally install the Core SDK and duke@2: the MDAC SDK features of this compiler. duke@2:

duke@2: Once the Platform SDK is installed, duke@2: it is recommended that you run SetEnv.Cmd /X64 duke@2: to set the compiler environment variables duke@2: MSSDK, duke@2: MSTOOLS, duke@2: INCLUDE, duke@2: LIB, and duke@2: PATH duke@2: prior to building the duke@2: OpenJDK. duke@2: The above environment variables MUST be set. duke@2:

duke@2: Note that this compiler may say it's version is a duke@2: Microsoft Visual Studio .NET 2005 (VS2005), but be careful, duke@2: it will not match the official VS2005 product. duke@2: This Platform SDK compiler is only used on X64 builds. duke@2:

duke@2: duke@2:
duke@2: duke@2:

Common UNIX Printing System (CUPS) Headers (Solaris & Linux)

duke@2: duke@2:
duke@2:

duke@2: Solaris: duke@2: CUPS header files are required for building the duke@2: OpenJDK on Solaris. duke@2: The Solaris header files can be obtained by installing duke@2: the package SFWcups from the Solaris Software duke@2: Companion CD/DVD, these often will be installed into duke@2: /opt/sfw/cups. duke@2:

duke@2: Linux: duke@2: CUPS header files are required for building the duke@2: OpenJDK on Linux. duke@2: The Linux header files are usually available from a "cups" duke@2: development package, it's recommended that you try and use duke@2: the package provided by the particular version of Linux that duke@2: you are using. duke@2:

duke@2: The CUPS header files can always be downloaded from duke@2: www.cups.org. duke@2: The variable duke@2: ALT_CUPS_HEADERS_PATH duke@2: can be used to override the default location of the duke@2: CUPS Header files. duke@2:

duke@2: duke@2:

FreeType 2

duke@2: duke@2:
duke@2:

duke@2: Version 2.3 or newer of FreeType is required for building the OpenJDK. duke@2: On Unix systems required files can be available as part of your duke@2: distribution (while you still may need to upgrade them). duke@2: Note that you need development version of package that duke@2: includes both FreeType library and header files. duke@2:

duke@2:

duke@2: You can always download latest FreeType version from the duke@2: FreeType website. duke@2:

duke@2:

duke@2: Makefiles will try to pick FreeType from /usr/lib and /usr/include. duke@2: In case it is installed elsewhere you will need to set environment duke@2: variables duke@2: ALT_FREETYPE_LIB_PATH duke@2: and duke@2: ALT_FREETYPE_HEADERS_PATH duke@2: to refer to place where library and header files are installed. duke@2:

duke@2:
duke@2: duke@2:

Advanced Linux Sound Architecture (ALSA) (Linux only)

duke@2: duke@2:
duke@2:

duke@2: Linux only: duke@2: Version 0.9.1 or newer of the ALSA files are duke@2: required for building the duke@2: OpenJDK on Linux. duke@2: These Linux files are usually available from an "alsa" duke@2: of "libasound" duke@2: development package, it's recommended that you try and use duke@2: the package provided by the particular version of Linux that duke@2: you are using. duke@2: The makefiles will check this emit a sanity error if it is duke@2: missing or the wrong version. duke@2: As a last resort you can go to the duke@2: duke@2: Advanced Linux Sound Architecture Site. duke@2:

duke@2: duke@2:

Windows Specific Dependencies

duke@2: duke@2:
duke@2: duke@2: Unix Command Tools (CYGWIN) duke@2: duke@2:
duke@2:

duke@2: The duke@2: OpenJDK duke@2: requires access to a set of unix command tools duke@2: on Windows which can be supplied by duke@2: CYGWIN. duke@2:

duke@2: The duke@2: OpenJDK duke@2: build duke@2: requires CYGWIN version 1.5.12 or newer. duke@2: Information about CYGWIN can duke@2: be obtained from the CYGWIN website at duke@2: www.cygwin.com. duke@2:

duke@2: By default CYGWIN doesn't install all the tools required for building duke@2: the OpenJDK. duke@2: Along with the default installation, you need to install duke@2: the following tools. duke@2:

duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2: duke@2:
Binary NamePackageDescription
ar.exeDevelbinutils: The GNU assembler, linker and binary duke@2: utilities
make.exeDevelmake: The GNU version of the 'make' utility
m4.exeInterpretersm4: GNU implementation of the traditional Unix macro duke@2: processor
cpio.exeUtilscpio: A program to manage archives of files
file.exeUtilsfile: Determines file type using 'magic' numbers
duke@2:
duke@2:
duke@2: duke@2: duke@2: Microsoft DirectX 9.0 SDK header files and libraries duke@2: duke@2: duke@2:
duke@2:

duke@2: Microsoft DirectX 9.0 SDK (Summer 2004) duke@2: headers are required for building duke@2: OpenJDK. duke@2: This SDK can be downloaded from duke@2: duke@2: Microsoft DirectX 9.0 SDK (Summer 2004). duke@2: If the link above becomes obsolete, the SDK can be found from duke@2: the Microsoft Download Site duke@2: (search with "DirectX 9.0 SDK Update Summer 2004"). duke@2: The location of this SDK can be set with duke@2: ALT_DXSDK_PATH duke@2: but it's normally found via the DirectX environment variable duke@2: DXSDK_DIR. duke@2:

duke@2: duke@2: duke@2: MSVCRT.DLL duke@2: duke@2: duke@2:
duke@2:

duke@2: i586 only: duke@2: The duke@2: OpenJDK duke@2: 32bit build requires duke@2: access to MSVCRT.DLL duke@2: version 6.00.8337.0 or newer. duke@2: If the MSVCRT.DLL is not installed in duke@2: the system32 directory set the duke@2: ALT_MSVCRT_DLL_PATH duke@2: variable to the location. duke@2:

duke@2: X64 only: duke@2: The OpenJDK 64bit build requires access to duke@2: MSVCRT.DLL version 7.0.3790.0 or newer, which is duke@2: usually supplied by the duke@2: Platform SDK. duke@2: If it is not available from the Platform SDK, duke@2: set the duke@2: ALT_MSVCRT_DLL_PATH duke@2: variable to the location. duke@2:

duke@2: duke@2: duke@2: MSVCR71.DLL duke@2: duke@2: duke@2:
duke@2:

duke@2: i586 only: duke@2: The duke@2: OpenJDK duke@2: build requires access to duke@2: MSVCR71.DLL version 7.10.3052.4 or newer which should be duke@2: supplied by the duke@2: Visual Studio product duke@2: If the MSVCR71.DLL is not available from the duke@2: Visual Studio product duke@2: set the duke@2: ALT_MSVCR71_DLL_PATH duke@2: variable to the location. duke@2:

duke@2: duke@2:
duke@2: duke@2: duke@2:
duke@2: duke@2: duke@2:
duke@2: duke@2:

Creating the Build

duke@2: duke@2:
duke@2:

duke@2: Once a machine is setup to build the duke@2: OpenJDK, duke@2: the steps to create the duke@2: build are fairly simple. duke@2: The various ALT settings can either be made into variables duke@2: or can be supplied on the duke@2: gmake duke@2: command. duke@2:

duke@2:

    duke@2:
  1. Use the sanity rule to double check all the ALT settings: duke@2:
    duke@2: duke@2: gmake duke@2: sanity duke@2: [ARCH_DATA_MODEL=32 or 64] duke@2: [other "ALT_" overrides] duke@2: duke@2:
    duke@2:
  2. duke@2:
  3. Start the build with the command: duke@2:
    duke@2: duke@2: gmake duke@2: [ARCH_DATA_MODEL=32 or 64] duke@2: [ALT_OUTPUTDIR=output_directory] duke@2: [other "ALT_" overrides] duke@2: duke@2:
    duke@2:
  4. duke@2:
duke@2:

duke@2: Solaris: duke@2: Note that ARCH_DATA_MODEL is really only needed on Solaris to duke@2: indicate you want to built the 64-bit version. duke@2: And before the Solaris 64-bit binaries can be used, they duke@2: must be merged with the binaries from a separate 32-bit build. duke@2: The merged binaries may then be used in either 32-bit or 64-bit mode, with duke@2: the selection occurring at runtime duke@2: with the -d32 or -d64 options. duke@2:

duke@2: duke@2: duke@2:
duke@2: duke@2:

Testing the Build

duke@2: duke@2:
duke@2:

duke@2: When the build is completed, you should see the generated duke@2: binaries and associated files in the j2sdk-image duke@2: directory in the output directory. duke@2: The default output directory is duke@2: build/platform, duke@2: where platform is one of duke@2:

duke@2: In particular, the duke@2: build/platform/j2sdk-image/bin duke@2: directory should contain executables for the duke@2: OpenJDK duke@2: tools and utilities. duke@2:

duke@2: You can test that the build completed properly by using the build duke@2: to run the various demos that you will find in the duke@2: build/platform/j2sdk-image/demo duke@2: directory. duke@2:

duke@2: The provided regression tests can be run with the jtreg duke@2: utility from duke@2: the jtreg site. duke@2:

duke@2: duke@2: duke@2:
duke@2: duke@2:

Environment/Make Variables

duke@2: duke@2:

duke@2: Some of the duke@2: environment or make variables (just called variables in this duke@2: document) that can impact the build are: duke@2: duke@2:

duke@2: duke@2:
duke@2: duke@2:
PATH
duke@2:
Typically you want to set the PATH to include: duke@2:
    duke@2:
  • The location of the GNU make binary
  • duke@2:
  • The location of the JDK 6 java duke@2: (see Bootstrap JDK)
  • duke@2:
  • The location of the C/C++ compilers duke@2: (see compilers)
  • duke@2:
  • The location or locations for the Unix command utilities duke@2: (e.g. /usr/bin)
  • duke@2:
duke@2:
duke@2: duke@2:
ARCH_DATA_MODEL
duke@2:
The ARCH_DATA_MODEL variable duke@2: is used to specify whether the build is to generate 32-bit or 64-bit duke@2: binaries. duke@2: The Solaris build supports either 32-bit or 64-bit builds, but duke@2: Windows and Linux will support only one, depending on the specific duke@2: OS being used. duke@2: Normally, setting this variable is only necessary on Solaris. duke@2: Set ARCH_DATA_MODEL to 32 for generating 32-bit binaries, duke@2: or to 64 for generating 64-bit binaries. duke@2:
duke@2: duke@2:
ALT_BOOTDIR
duke@2:
duke@2: The location of the bootstrap JDK installation. duke@2: See Bootstrap JDK for more information. duke@2: You should always install your own local Bootstrap JDK and duke@2: always set ALT_BOOTDIR explicitly. duke@2:
duke@2: duke@2:
ALT_OUTPUTDIR
duke@2:
duke@2: An override for specifying the (absolute) path of where the duke@2: build output is to go. duke@2: The default output directory will be build/platform. duke@2:
duke@2: duke@2:
ALT_COMPILER_PATH
duke@2:
duke@2: The location of the C/C++ compiler. duke@2: The default varies depending on the platform. duke@2:
duke@2: duke@2:
ALT_CACERTS_FILE
duke@2:
duke@2: The location of the cacerts file. duke@2: The default will refer to duke@2: jdk/src/share/lib/security/cacerts. duke@2:
duke@2: duke@2:
ALT_BINARY_PLUGS_PATH
duke@2:
duke@2: The location of the binary plugs installation. duke@2: See Binary Plugs for more information. duke@2: You should always have a local copy of a duke@2: recent Binary Plugs install image duke@2: and set this variable to that location. duke@2:
duke@2: duke@2:
ALT_CUPS_HEADERS_PATH
duke@2:
duke@2: The location of the CUPS header files. duke@2: See CUPS information for more information. duke@2: If this path does not exist the fallback path is duke@2: /usr/include. duke@2:
duke@2: duke@2: duke@2:
ALT_FREETYPE_LIB_PATH
duke@2:
duke@2: The location of the FreeType shared library. duke@2: See FreeType information for details. duke@2:
duke@2: duke@2:
ALT_FREETYPE_HEADERS_PATH
duke@2:
duke@2: The location of the FreeType header files. duke@2: See FreeType information for details. duke@2:
duke@2: duke@2:
Windows specific:
duke@2:
duke@2:
duke@2:
ALT_MSDEVTOOLS_PATH
duke@2:
duke@2: The location of the Microsoft Visual Studio .NET 2003 duke@2: tools 'bin' directory. duke@2: The default is usually derived from duke@2: ALT_COMPILER_PATH. duke@2:
duke@2: duke@2:
ALT_DXSDK_PATH
duke@2:
duke@2: The location of the duke@2: Microsoft DirectX 9 SDK. duke@2: The default will be to try and use the DirectX environment duke@2: variable DXSDK_DIR, duke@2: failing that, look in C:/DXSDK. duke@2:
duke@2: duke@2:
ALT_MSVCRT_DLL_PATH
duke@2:
duke@2: The location of the duke@2: MSVCRT.DLL. duke@2:
duke@2: duke@2:
ALT_MSVCR71_DLL_PATH
duke@2:
duke@2: i586 only: duke@2: The location of the duke@2: MSVCR71.DLL. duke@2:
duke@2:
duke@2:
duke@2: duke@2:
duke@2:
duke@2: duke@2: duke@2:
duke@2: duke@2:

Troubleshooting

duke@2: duke@2:
duke@2:

duke@2: A build can fail for any number of reasons. duke@2: Most failures duke@2: are a result of trying to build in an environment in which all the duke@2: pre-build requirements have not been met. duke@2: The first step in duke@2: troubleshooting a build failure is to recheck that you have satisfied duke@2: all the pre-build requirements for your platform. duke@2: Look for the check list of the platform you are building on in the duke@2: Table of Contents. duke@2: duke@2:

duke@2: You can validate your build environment by using the sanity duke@2: target. duke@2: Any errors listed duke@2: will stop the build from starting, and any warnings may result in duke@2: a flawed product build. duke@2: We strongly encourage you to evaluate every duke@2: sanity check warning and fix it if required, before you proceed duke@2: further with your build. duke@2: duke@2:

duke@2: Some of the more common problems with builds are briefly described duke@2: below, with suggestions for remedies. duke@2: duke@2:

duke@2:
duke@2: duke@2: