duke@2: duke@2: ohair@13:
ohair@13:ohair@25: ohair@13: | ohair@13:
ohair@13: OpenJDK Build READMEohair@13: |
ohair@13:
ohair@13:ohair@13: ohair@13:ohair@13: This README file contains build instructions for the ohair@13: OpenJDK. ohair@13: Building the source code for the ohair@13: OpenJDK ohair@13: requires ohair@13: a certain degree of technical expertise. ohair@13:
ohair@13:ohair@13: ohair@13:ohair@13:
ohair@13:- Introduction
ohair@13:- Minimum Build Environments
ohair@13:- Specific Developer Build Environments
ohair@41:ohair@41:
ohair@13:- Fedora Linux
ohair@41:- CentOS Linux
ohair@41:- Ubuntu Linux
ohair@41:- Source Directory Structure
ohair@13:- Build Information ohair@13:
ohair@13:ohair@13:
ohair@13:- GNU Make (gmake)
ohair@13:- Basic Linux System Setup
ohair@13:- Basic Solaris System Setup
ohair@13:- Basic Windows System Setup
ohair@13:- Build Dependencies
duke@2:ohair@13:
ohair@13:- Bootstrap JDK
ohair@13:- Binary Plugs
ohair@13:- Optional Import JDK
ohair@25:- Ant
ohair@13:- Certificate Authority File (cacert)
ohair@13:- Compilers ohair@13:
ohair@13:ohair@13:
ohair@13:- Microsoft Visual Studio
ohair@13:- Microsoft Platform SDK
ohair@13:- Linux gcc/binutils
ohair@13:- Sun Studio
ohair@13:- Zip and Unzip
ohair@13:- FreeType2 Fonts
ohair@13:- Linux and Solaris: ohair@13:
ohair@13:ohair@13:
ohair@13:- CUPS Include files
ohair@13:- Linux only: ohair@13:
ohair@13:ohair@13:
ohair@13:- ALSA files
ohair@13:- Windows only: ohair@13:
duke@2:ohair@13:
ohair@13:- Unix Command Tools (CYGWIN)
ohair@13:- DirectX 9.0 SDK
ohair@13:- Creating the Build
ohair@13:- Testing the Build
ohair@13:- Environment/Make Variables
ohair@13:- Troubleshooting
ohair@13:
ohair@13: This file often describes specific requirements for what we call the ohair@49: "minimum build environments" (MBE) for this ohair@49: specific release of the JDK, ohair@13: Building with the MBE will generate the most compatible ohair@13: bits that install on, and run correctly on, the most variations ohair@13: of the same base OS and hardware architecture. ohair@13: These usually represent what is often called the ohair@13: least common denominator platforms. ohair@13: It is understood that most developers will NOT be using these ohair@13: specific platforms, and in fact creating these specific platforms ohair@13: may be difficult due to the age of some of this software. ohair@13:ohair@13: ohair@13:ohair@13: The minimum OS and C/C++ compiler versions needed for building the ohair@13: OpenJDK: ohair@13:
ohair@13:
ohair@13: ohair@13:
ohair@49:ohair@13: ohair@13: ohair@13: ohair@13:Base OS and Architecture ohair@13:OS ohair@49:C/C++ Compiler ohair@13:ohair@49: ohair@13:Linux X86 (32-bit) ohair@49:Fedora 9 ohair@13:gcc 4 ohair@13:ohair@49: ohair@13:Linux X64 (64-bit) ohair@49:Fedora 9 ohair@13:gcc 4 ohair@13:ohair@49: ohair@13:Solaris SPARC (32-bit) ohair@13:Solaris 10 + patches ohair@13: ohair@30:
ohair@13: See ohair@13: SunSolve for patch downloads. ohair@13:Sun Studio 12 ohair@13:ohair@49: ohair@13:Solaris SPARCV9 (64-bit) ohair@13:Solaris 10 + patches ohair@13: ohair@30:
ohair@13: See ohair@13: SunSolve for patch downloads. ohair@13:Sun Studio 12 ohair@13:ohair@49: ohair@13:Solaris X86 (32-bit) ohair@13:Solaris 10 + patches ohair@13: ohair@30:
ohair@13: See ohair@13: SunSolve for patch downloads. ohair@13:Sun Studio 12 ohair@13:ohair@49: ohair@13:Solaris X64 (64-bit) ohair@13:Solaris 10 + patches ohair@13: ohair@30:
ohair@13: See ohair@13: SunSolve for patch downloads. ohair@13:Sun Studio 12 ohair@13:ohair@49: ohair@13:Windows X86 (32-bit) ohair@13:Windows XP ohair@49:Microsoft Visual Studio C++ 2008 Standard Edition ohair@13:ohair@49: ohair@13: ohair@13:Windows X64 (64-bit) ohair@13:Windows Server 2003 - Enterprise x64 Edition ohair@13:Microsoft Platform SDK - April 2005 ohair@13:ohair@49: These same sources do indeed build on many more systems than the ohair@49: above older generation systems, again the above is just a minimum. ohair@49:
ohair@49: Compilation problems with newer or different C/C++ compilers is a ohair@49: common problem. ohair@49: Similarly, compilation problems related to changes to the ohair@49: /usr/include or system header files is also a ohair@49: common problem with newer or unreleased OS versions. ohair@49: Please report these types of problems as bugs so that they ohair@49: can be dealt with accordingly. ohair@13:
ohair@13: We won't be listing all the possible environments, but ohair@13: we will try to provide what information we have available to us. ohair@13:ohair@13: ohair@41:
ohair@41: After installing ohair@41: Fedora 9 ohair@41: you need to make sure you have ohair@41: the "Software Development" bundle installed, plus the ohair@41: following packages: ohair@41:ohair@13: ohair@41:ohair@41:ohair@41:ohair@41:
ohair@41:- cups devel: Cups Development Package
ohair@41:- freetype 2.3+ devel: Freetype 2.3 Development Package
ohair@41:- hg: Mercurial, if you need to clone or manage source repositories
ohair@41:- ksh: May be needed when using webrev
ohair@41:ohair@41: Always a good idea to do a complete Software Update/Refresh ohair@41: after you get all the packages installed. ohair@13:
ohair@41: After installing ohair@41: CentOS 5.2 ohair@41: you need to make sure you have ohair@41: the following Development bundles installed: ohair@41:ohair@13: ohair@13:ohair@41:ohair@41:ohair@41:
ohair@41:- Development Libraries
ohair@41:- Development Tools
ohair@41:- Java Development
ohair@41:- X Software Development
ohair@41:ohair@41: Plus the following packages: ohair@41:
ohair@41:ohair@41:ohair@41:
ohair@41:- cups devel: Cups Development Package
ohair@41:- alsa devel: Alsa Development Package
ohair@41:- ant: Ant Package
ohair@41:- Xi devel: libXi.so Development Package
ohair@41:ohair@41: The freetype 2.3 packages don't seem to be available, ohair@41: but the freetype 2.3 sources can be downloaded, built, ohair@41: and installed easily enough from ohair@41: ohair@41: the freetype site. ohair@41: Build and install with something like: ohair@41:
ohair@41: ./configure && make && sudo -u root make install ohair@41:ohair@41:ohair@41: Mercurial packages could not be found easily, but a Google ohair@41: search should find ones, and they usually include Python if ohair@41: it's needed. ohair@13:
ohair@13: In addition to needing the Bootstrap JDK and the Binary Plugs, ohair@13: when building on Ubuntu you will need to ohair@13: make sure certain packages are installed. ohair@13: In particular, certain X11 packages, make, m4, gawk, gcc 4, ohair@13: binutils, cups, freetype ohair@13: and alsa. ohair@13: ohair@13:ohair@13: ohair@13:Ubuntu 6.06
ohair@13:ohair@13: The following list of packages for Ubuntu 6.06 is a working set that ohair@13: does appear to work. ohair@13:
ohair@13: Note that it's quite possible that some of these ohair@13: packages are not required, so anyone discovering that some of the ohair@13: packages listed below are NOT required, ohair@13: please let the ohair@13: OpenJDK ohair@13: team know. ohair@13:
ohair@13: All the packages below can be installed with the ohair@13: Synaptic Package manager provided with the base Ubuntu 6.06 release. ohair@13:
ohair@13:ohair@13: ohair@13:ohair@13:
ohair@13:- binutils (2.16.1cvs20060117-1ubuntu2.1)
ohair@13:- cpp (4:4.0.3-1)
ohair@13:- cpp-4.0 (4.0.3-1ubuntu5)
ohair@13:- libfreetype6-dev
ohair@13:- g++ (4:4.0.3-1)
ohair@13:- g++-4.0 (4.0.3-1ubuntu5)
ohair@13:- gawk (1:3.1.5-2build1)
ohair@13:- gcc (4:4.0.3-1)
ohair@13:- gcc-4.0 (4.0.3-1ubuntu5)
ohair@13:- libasound2-dev (1.0.10-2ubuntu4)
ohair@13:- libc6 (2.3.6-0ubuntu20) to 2.3.6-0ubuntu20.4
ohair@13:- libc6-dev (2.3.6-0ubuntu20.4)
ohair@13:- libc6-i686 (2.3.6-0ubuntu20) to 2.3.6-0ubuntu20.4
ohair@13:- libcupsys2-dev (1.2.2-0ubuntu0.6.06)
ohair@13:- libgcrypt11-dev (1.2.2-1)
ohair@13:- libgnutls-dev (1.2.9-2ubuntu1.1)
ohair@13:- libgnutls12 (1.2.9-2ubuntu1) to 1.2.9-2ubuntu1.1
ohair@13:- libgpg-error-dev (1.1-4)
ohair@13:- libice-dev (2:1.0.0-0ubuntu2)
ohair@13:- liblockfile1 (1.06.1)
ohair@13:- libopencdk8-dev (0.5.7-2)
ohair@13:- libpopt-dev (1.7-5)
ohair@13:- libsm-dev (2:1.0.0-0ubuntu2)
ohair@13:- libstdc++6-4.0-dev (4.0.3-1ubuntu5)
ohair@13:- libtasn1-2-dev (0.2.17-1ubuntu1)
ohair@13:- libx11-dev (2:1.0.0-0ubuntu9)
ohair@13:- libxau-dev (1:1.0.0-0ubuntu4)
ohair@13:- libxaw-headers (2:1.0.1-0ubuntu3)
ohair@13:- libxaw7-dev (2:1.0.1-0ubuntu3)
ohair@13:- libxdmcp-dev (1:1.0.0-0ubuntu2)
ohair@13:- libxext-dev (2:1.0.0-0ubuntu4)
ohair@13:- libxi-dev (2:1.0.0-0ubuntu3)
ohair@13:- libxmu-dev (2:1.0.0-0ubuntu3)
ohair@13:- libxmu-headers (2:1.0.0-0ubuntu3)
ohair@13:- libxmuu-dev (2:1.0.0-0ubuntu3)
ohair@13:- libxp-dev (6.8.2-11ubuntu2)
ohair@13:- libxpm-dev (1:3.5.4.2-0ubuntu3)
ohair@13:- libxrandr-dev (1:1.1.0.2-0ubuntu4)
ohair@13:- libxt-dev (1:1.0.0-0ubuntu3)
ohair@13:- libxtrap-dev (2:1.0.0-0ubuntu2)
ohair@13:- libxtst-dev (2:1.0.1-0ubuntu2)
ohair@13:- libxv-dev (2:1.0.1-0ubuntu3)
ohair@13:- linux-kernel-headers (2.6.11.2-0ubuntu18)
ohair@13:- m4 (1.4.4-1)
ohair@13:- make (3.80+3.81.b4-1)
ohair@13:- ssl-cert (1.0.13)
ohair@13:- x-dev (7.0.4-0ubuntu2)
ohair@13:- x11proto-core-dev (7.0.4-0ubuntu2)
ohair@13:- x11proto-input-dev (1.3.2-0ubuntu2)
ohair@13:- x11proto-kb-dev (1.0.2-0ubuntu2)
ohair@13:- x11proto-randr-dev (1.1.2-0ubuntu2)
ohair@13:- x11proto-record-dev (1.13.2-0ubuntu2)
ohair@13:- x11proto-trap-dev (3.4.3-0ubuntu2)
ohair@13:- x11proto-video-dev (2.2.2-0ubuntu2)
ohair@13:- x11proto-xext-dev (7.0.2-0ubuntu2)
ohair@13:- xlibs-dev (7.0.0-0ubuntu45)
ohair@13:- zlib1g-dev (1:1.2.3-6ubuntu4)
duke@2:Ubuntu 7.04
ohair@13:ohair@13: Using the Synaptic Package Manager, download the following ohair@13: packages (double indented packages are automatically aquired ohair@13: due to package dependencies): ohair@13:
ohair@13:ohair@13:ohair@13:
ohair@13:- build-essential
ohair@13:ohair@13:
ohair@13:- dpkg-dev
ohair@13:- g++
ohair@13:- g++-4.1
ohair@13:- libc6-dev
ohair@13:- libstdc++6.4.1-dev
ohair@13:- linux-libc-dev
ohair@13:- gawk
ohair@13:- m4
ohair@13:- libasound2-dev
ohair@13:- libcupsys2-dev
ohair@13:ohair@13:
ohair@13:- libgcrypt11-dev
ohair@13:- lgnutls-dev
ohair@13:- libgpg-error-dev
ohair@13:- liblzo-dev
ohair@13:- libopencdk8-dev
ohair@13:- libpopt-dev
ohair@13:- libtasn1-3-dev
ohair@13:- zlib1g-dev
ohair@13:- sun-java6-jdk
ohair@13:ohair@13:
ohair@13:- java-common
ohair@13:- libltdl3
ohair@13:- odbcinst1debian1
ohair@13:- sun-java6-bin
ohair@13:- sun-java6-jre
ohair@13:- unixodbc
ohair@13:- xlibs-dev
ohair@13:ohair@13:
ohair@13:- (many)
ohair@13:- x11proto-print-dev
ohair@13:- libxaw7-dev
ohair@13:ohair@13:
ohair@13:- libxaw-headers
ohair@13:- libxp-dev
ohair@13:- libfreetype6-dev
ohair@13:
ohair@13:ohair@13: ohair@13:ohair@13: The source code for the OpenJDK is delivered in a set of ohair@13: directories: ohair@13: hotspot, ohair@13: langtools, ohair@13: corba, ohair@13: jaxws, ohair@13: jaxp, ohair@13: and ohair@13: jdk. ohair@13: The hotspot directory contains the source code and make ohair@13: files for building the OpenJDK Hotspot Virtual Machine. ohair@13: The langtools directory contains the source code and make ohair@13: files for building the OpenJDK javac and language tools. ohair@13: The corba directory contains the source code and make ohair@13: files for building the OpenJDK Corba files. ohair@13: The jaxws directory contains the source code and make ohair@13: files for building the OpenJDK JAXWS files. ohair@13: The jaxp directory contains the source code and make ohair@13: files for building the OpenJDK JAXP files. ohair@13: The jdk directory contains the source code and make files for ohair@13: building the OpenJDK runtime libraries and misc files. ohair@13: The top level Makefile ohair@13: is used to build the entire OpenJDK. ohair@13:
ohair@13: Building the OpenJDK ohair@13: is done with a gmake ohair@13: command line and various ohair@13: environment or make variable settings that direct the make rules ohair@13: to where various components have been installed. ohair@13: Where possible the makefiles will attempt to located the various ohair@13: components in the default locations or any component specific ohair@13: variable settings. ohair@13: When the normal defaults fail or components cannot be found, ohair@13: the various ohair@13: ALT_* variables (alternates) ohair@13: can be used to help the makefiles locate components. ohair@13:ohair@13: ohair@13:ohair@13: Refer to the bash/sh/ksh setup file ohair@13: jdk/make/jdk_generic_profile.sh ohair@13: if you need help in setting up your environment variables. ohair@13: A build could be as simple as: ohair@13:
ohair@13:ohair@13:duke@2: bash duke@2: . jdk/make/jdk_generic_profile.sh duke@2: gmake sanity && gmake ohair@13:ohair@13:ohair@13: Of course ksh or sh would work too. ohair@13: But some customization will probably be necessary. ohair@13: The sanity rule will make some basic checks on build ohair@13: dependencies and generate appropriate warning messages ohair@13: regarding missing, out of date, or newer than expected components ohair@13: found on your system. ohair@13:
ohair@13: The Makefiles in the OpenJDK are only valid when used with the ohair@13: GNU version of the utility command make ohair@13: (gmake). ohair@13: A few notes about using GNU make: ohair@13:ohair@13: ohair@13:ohair@13:
ohair@13:- ohair@13: In general, you need GNU make version 3.78.1 or newer. ohair@13:
ohair@13:- ohair@13: Place the location of the GNU make binary in the PATH. ohair@13:
ohair@13:- ohair@13: Linux: ohair@13: The /usr/bin/make command should work fine for you. ohair@13:
ohair@13:- ohair@13: Solaris: ohair@13: Do NOT use /usr/bin/make on Solaris. ohair@13: If your Solaris system has the software ohair@13: from the Solaris Companion CD installed, ohair@13: you should use gmake ohair@13: which will be located in either the /opt/sfw/bin or ohair@13: /usr/sfw/bin directory. ohair@25: In more recent versions of Solaris GNU make can be found ohair@25: at /usr/bin/gmake. ohair@13:
ohair@13:- ohair@13: Windows: ohair@13: Make sure you start your build inside a bash/sh/ksh shell. ohair@13:
ohair@13:
ohair@13: WARNING: Watch out for make version 3.81, it may ohair@25: not work due to a lack of support for MS-DOS drive letter paths ohair@25: like C:/ or C:\. ohair@13: Use a 3.80 version, or find a newer ohair@49: version that has this problem fixed. ohair@13: The older 3.80 version of make.exe can be downloaded with this ohair@13: ohair@13: link. ohair@25: Use of this older 3.80 make.exe may require that you install the ohair@25: libintl2.dll library or libintl2 cygwin package which is ohair@25: no longer installed by default by the cygwin installer. ohair@25:
ohair@13: Also see the ohair@13: ohair@13: mozilla developer center ohair@13: on this topic. ohair@25:
ohair@25: It's hoped that when make 3.82 starts shipping in a future cygwin ohair@25: release that this MS-DOS path issue will be fixed. ohair@25: In addition to the above 3.80 make.exe you can download ohair@25: this ohair@25: ohair@25: www.cmake.org make.exe which will not have a libintl2.dll ohair@25: dependency. ohair@13:ohair@13: Information on GNU make, and access to ftp download sites, are ohair@13: available on the ohair@13: ohair@13: GNU make web site ohair@13: . ohair@13: The latest source to GNU make is available at ohair@13: ohair@13: ftp.gnu.org/pub/gnu/make/. ohair@13:
ohair@13: i586 only: ohair@13: The minimum recommended hardware for building the Linux version ohair@13: is a Pentium class processor or better, at least 256 MB of RAM, and ohair@13: approximately 1.5 GB of free disk space. ohair@13:ohair@13: ohair@13:ohair@13: X64 only: ohair@13: The minimum recommended hardware for building the Linux ohair@13: version is an AMD Opteron class processor, at least 512 MB of RAM, and ohair@13: approximately 4 GB of free disk space. ohair@13:
ohair@13: The build will use the tools contained in ohair@13: /bin and ohair@13: /usr/bin ohair@13: of a standard installation of the Linux operating environment. ohair@13: You should ensure that these directories are in your ohair@13: PATH. ohair@13:
ohair@13: Note that some Linux systems have a habit of pre-populating ohair@13: your environment variables for you, for example JAVA_HOME ohair@13: might get pre-defined for you to refer to the JDK installed on ohair@13: your Linux system. ohair@13: You will need to unset JAVA_HOME. ohair@13: It's a good idea to run env and verify the ohair@13: environment variables you are getting from the default system ohair@13: settings make sense for building the ohair@13: OpenJDK. ohair@13:
ohair@13:ohair@13: ohair@13:ohair@13:
ohair@13:- ohair@13: Install the ohair@13: Bootstrap JDK, set ohair@13: ALT_BOOTDIR. ohair@13:
ohair@13:- ohair@13: Install the ohair@13: Binary Plugs, set ohair@13: ALT_BINARY_PLUGS_PATH. ohair@13:
ohair@13:- ohair@13: Optional Import JDK, set ohair@13: ALT_JDK_IMPORT_PATH. ohair@13:
ohair@13:- ohair@13: Install or upgrade the FreeType development ohair@13: package. ohair@13:
ohair@25:- ohair@25: Install ohair@49: Ant, ohair@49: make sure it is in your PATH. ohair@25:
ohair@13:
ohair@13: The minimum recommended hardware for building the ohair@13: Solaris SPARC version is an UltraSPARC with 512 MB of RAM. ohair@13: For building ohair@13: the Solaris x86 version, a Pentium class processor or better and at ohair@13: least 512 MB of RAM are recommended. ohair@13: Approximately 1.4 GB of free disk ohair@13: space is needed for a 32-bit build. ohair@13:ohair@13: ohair@13:ohair@49: If you are building the 64-bit version, you should ohair@13: run the command "isainfo -v" to verify that you have a ohair@13: 64-bit installation, it should say sparcv9 or ohair@13: amd64. ohair@13: An additional 7 GB of free disk space is needed ohair@13: for a 64-bit build. ohair@13:
ohair@13: The build uses the tools contained in /usr/ccs/bin ohair@13: and /usr/bin of a standard developer or full installation of ohair@13: the Solaris operating environment. ohair@13:
ohair@13: Solaris patches specific to the JDK can be downloaded from the ohair@13: ohair@13: SunSolve JDK Solaris patches download page. ohair@13: You should ensure that the latest patch cluster for ohair@13: your version of the Solaris operating environment has also ohair@13: been installed. ohair@13:
ohair@13:ohair@13: ohair@13:ohair@13:
ohair@13:- ohair@13: Install the ohair@13: Bootstrap JDK, set ohair@13: ALT_BOOTDIR. ohair@13:
ohair@13:- ohair@13: Install the ohair@13: Binary Plugs, set ohair@13: ALT_BINARY_PLUGS_PATH. ohair@13:
ohair@13:- ohair@13: Optional Import JDK, set ohair@13: ALT_JDK_IMPORT_PATH. ohair@13:
ohair@13:- ohair@13: Install the ohair@13: Sun Studio Compilers, set ohair@13: ALT_COMPILER_PATH. ohair@13:
ohair@13:- ohair@13: Install the ohair@13: CUPS Include files, set ohair@13: ALT_CUPS_HEADERS_PATH. ohair@13:
ohair@25:- ohair@25: Install ohair@49: Ant, ohair@49: make sure it is in your PATH. ohair@25:
ohair@13:
ohair@13: i586 only: ohair@49: The minimum recommended hardware for building the 32-bit or X86 ohair@13: Windows version is an Pentium class processor or better, at least ohair@13: 512 MB of RAM, and approximately 600 MB of free disk space. ohair@13: ohair@49: NOTE: The Windows build machines need to use the ohair@13: file system NTFS. ohair@13: Build machines formatted to FAT32 will not work ohair@13: because FAT32 doesn't support case-sensitivity in file names. ohair@13: ohair@13:ohair@13: ohair@13:ohair@13: X64 only: ohair@13: The minimum recommended hardware for building ohair@13: the Windows X64 version is an AMD Opteron class processor, at least 1 ohair@13: GB of RAM, and approximately 10 GB of free disk space. ohair@13:
duke@2: Windows: ohair@13: Note that GNU make is a historic utility and is based very ohair@13: heavily on shell scripting, so it does not tolerate the Windows habit ohair@13: of having spaces in pathnames or the use of the \characters in pathnames. ohair@13: Luckily on most Windows systems, you can use /instead of \, and ohair@13: there is always a 'short' pathname without spaces for any path that ohair@13: contains spaces. ohair@13: Unfortunately, this short pathname can be somewhat dynamic and the ohair@13: formula is difficult to explain. ohair@13: You can use cygpath utility to map pathnames with spaces ohair@13: or the \character into the C:/ style of pathname ohair@13: (called 'mixed'), e.g. ohair@13: cygpath -s -m "path". ohair@13:ohair@13: ohair@13:ohair@13: The makefiles will try to translate any pathnames supplied ohair@13: to it into the C:/ style automatically. ohair@13:
ohair@13: Note that use of CYGWIN creates a unique problem with regards to ohair@13: setting PATH. Normally on Windows ohair@13: the PATH variable contains directories ohair@13: separated with the ";" character (Solaris and Linux uses ":"). ohair@13: With CYGWIN, it uses ":", but that means that paths like "C:/path" ohair@13: cannot be placed in the CYGWIN version of PATH and ohair@13: instead CYGWIN uses something like /cygdrive/c/path ohair@13: which CYGWIN understands, but only CYGWIN understands. ohair@13: So be careful with paths on Windows. ohair@13:
ohair@13:ohair@13: ohair@13:ohair@13:
duke@2:- ohair@13: Install the ohair@13: CYGWIN product. ohair@13:
ohair@13:- ohair@13: Install the ohair@13: Bootstrap JDK, set ohair@13: ALT_BOOTDIR. ohair@13:
ohair@13:- ohair@13: Install the ohair@13: Binary Plugs, set ohair@13: ALT_BINARY_PLUGS_PATH.. ohair@13:
ohair@13:- ohair@13: Optional Import JDK, set ohair@13: ALT_JDK_IMPORT_PATH. ohair@13:
ohair@13:- ohair@13: Install the ohair@49: Microsoft Visual Studio Compilers (32-bit). ohair@49:
ohair@49:- ohair@49: Install the ohair@49: Microsoft Platform SDK. ohair@13:
ohair@13:- ohair@13: Setup all environment variables for compilers ohair@13: (see compilers). ohair@13:
ohair@13:- ohair@13: Install ohair@13: Microsoft DirectX SDK. ohair@13:
ohair@25:- ohair@25: Install ohair@49: Ant, ohair@49: make sure it is in your PATH and set ohair@25: ANT_HOME. ohair@25:
ohair@13:
ohair@13: Depending on the platform, the OpenJDK build process has some basic ohair@13: dependencies on components not part of the OpenJDK sources. ohair@13: Some of these are specific to a platform, some even specific to ohair@13: an architecture. ohair@13: Each dependency will have a set of ALT variables that can be set ohair@13: to tell the makefiles where to locate the component. ohair@13: In most cases setting these ALT variables may not be necessary ohair@13: and the makefiles will find defaults on the system in standard ohair@13: install locations or through component specific variables. ohair@13: ohair@13:ohair@13: ohair@13:Bootstrap JDK
ohair@13:ohair@13: All OpenJDK builds require access to the previously released ohair@13: JDK 6, this is often called a bootstrap JDK. ohair@13: The JDK 6 binaries can be downloaded from Sun's ohair@13: JDK 6 download site. ohair@13: For build performance reasons ohair@13: is very important that this bootstrap JDK be made available on the ohair@13: local disk of the machine doing the build. ohair@13: You should always set ohair@13: ALT_BOOTDIR ohair@13: to point to the location of ohair@13: the bootstrap JDK installation, this is the directory pathname ohair@13: that contains a bin, lib, and include ohair@13: It's also a good idea to also place its bin directory ohair@13: in the PATH environment variable, although it's ohair@13: not required. ohair@13:ohair@13: ohair@13:ohair@13: Solaris: ohair@13: Some pre-installed JDK images may be available to you in the ohair@13: directory /usr/jdk/instances. ohair@13: If you don't set ohair@13: ALT_BOOTDIR ohair@13: the makefiles will look in that location for a JDK it can use. ohair@13:
Binary Plugs
ohair@13:ohair@13: Not all of the source code that makes up the JDK is available ohair@13: under an open-source license. ohair@13: This is a temporary situation and these binary plugs will be ohair@13: replaced with fully open source replacements as soon as possible. ohair@13: So currently, in order to build a complete OpenJDK image, ohair@13: you must first download and install the appropriate ohair@13: binary plug bundles for the OpenJDK, go to the ohair@13: OpenJDK site and select ohair@49: the ohair@49: "Bundles(7)" ohair@49: link and download the binaryplugs for ohair@13: your particular platform. ohair@13: The file downloaded is a jar file that must be extracted by running ohair@13: the jar file with: ohair@13:ohair@13: ohair@13:ohair@13:ohair@13: A prompt will be issued for acceptance of these binary plug files. ohair@13: During the OpenJDK build process these "binary plugs" ohair@13: for the encumbered components will be copied into your ohair@13: resulting OpenJDK binary build image. ohair@13: These binary plug files are only for the purpose of ohair@13: building an OpenJDK binary. ohair@13: Make sure you set ohair@13: ALT_BINARY_PLUGS_PATH ohair@13: to the root of this installation. ohair@13:ohair@13: java -jar jdk-7-ea-plug-bnn-os-arch-dd_month_year.jar ohair@13:ohair@13:Optional Import JDK
ohair@13:ohair@13: The ALT_JDK_IMPORT_PATH ohair@13: setting is only needed if you are not building the entire ohair@13: JDK. For example, if you have built the entire JDK once, and ohair@13: wanted to avoid repeatedly building the Hotspot VM, you could ohair@13: set this to the location of the previous JDK install image ohair@13: and the build will copy the needed files from this import area. ohair@13:ohair@13: ohair@25:Ant
ohair@25:ohair@25: All OpenJDK builds require access to least Ant 1.6.5. ohair@25: The Ant tool is available from the ohair@51: ohair@25: Ant download site. ohair@49: You should always make sure ant is in your PATH, and ohair@49: on Windows you may also need to set ohair@25: ANT_HOME ohair@25: to point to the location of ohair@25: the Ant installation, this is the directory pathname ohair@25: that contains a bin and lib. ohair@25:ohair@25: ohair@13:Certificate Authority File (cacert)
ohair@13:ohair@13: See ohair@13: http://en.wikipedia.org/wiki/Certificate_Authority ohair@13: for a better understanding of the Certificate Authority (CA). ohair@13: A certificates file named "cacerts" ohair@13: represents a system-wide keystore with CA certificates. ohair@13: In JDK and JRE ohair@13: binary bundles, the "cacerts" file contains root CA certificates from ohair@13: several public CAs (e.g., VeriSign, Thawte, and Baltimore). ohair@13: The source contain a cacerts file ohair@13: without CA root certificates. ohair@13: Formal JDK builders will need to secure ohair@13: permission from each public CA and include the certificates into their ohair@13: own custom cacerts file. ohair@13: Failure to provide a populated cacerts file ohair@13: will result in verification errors of a certificate chain during runtime. ohair@13: The variable ohair@13: ALT_CACERTS_FILE ohair@13: can be used to override the default location of the ohair@13: cacerts file that will get placed in your build. ohair@13: By default an empty cacerts file is provided and that should be ohair@13: fine for most JDK developers. ohair@13:ohair@13: ohair@13:Compilers
ohair@13:ohair@13: Linux gcc/binutils ohair@13:ohair@13: ohair@13:ohair@49: The GNU gcc compiler version should be 4 or newer. ohair@13: The compiler used should be the default compiler installed ohair@13: in /usr/bin. ohair@13:ohair@13: Solaris: Sun Studio ohair@13:ohair@13: At a minimum, the ohair@13: ohair@30: Sun Studio 12 Compilers ohair@30: (containing version 5.9 of the C and C++ compilers) is required, ohair@13: with patches from the ohair@13: ohair@13: SunSolve web site. ohair@13:ohair@49: Windows i586: Microsoft Visual Studio Compilers ohair@13:ohair@13: Set ohair@13: ALT_COMPILER_PATH ohair@13: to point to the location of ohair@13: the compiler binaries, and place this location in the PATH. ohair@13:
ohair@13: The Sun Studio Express compilers at: ohair@13: ohair@13: Sun Studio Express Download site ohair@13: are also an option, although these compilers have not ohair@13: been extensively used yet. ohair@13:
ohair@13: The 32-bit OpenJDK Windows build ohair@49: requires ohair@49: Microsoft Visual Studio C++ 2008 (VS2008) Standard ohair@13: Edition compiler. ohair@13: The compiler and other tools are expected to reside ohair@49: in the location defined by the variable ohair@49: VS90COMNTOOLS which ohair@49: is set by the Microsoft Visual Studio installer. ohair@13:ohair@49: Windows: Microsoft Platform SDK ohair@13:ohair@13: Once the compiler is installed, ohair@13: it is recommended that you run VCVARS32.BAT ohair@13: to set the compiler environment variables ohair@13: INCLUDE, ohair@13: LIB, and ohair@13: PATH ohair@13: prior to building the ohair@13: OpenJDK. ohair@13: The above environment variables MUST be set. ohair@13:
ohair@41: WARNING: Make sure you check out the ohair@41: CYGWIN link.exe WARNING. ohair@41: The path /usr/bin must be after the path to the ohair@41: Visual Studio product. ohair@13:
ohair@13: On X64, the Microsoft Platform Software ohair@13: Development Kit (SDK), April 2005 Edition compiler, ohair@13: is required for building the OpenJDK ohair@13: because it contains the C/C++ compiler. ohair@13: You will need to minimally install the Core SDK and ohair@13: the MDAC SDK features of this compiler. ohair@13:ohair@13:ohair@13: Once the Platform SDK is installed, ohair@13: it is recommended that you run SetEnv.Cmd /X64 ohair@13: to set the compiler environment variables ohair@13: MSSDK, ohair@13: MSTOOLS, ohair@13: INCLUDE, ohair@13: LIB, and ohair@13: PATH ohair@13: prior to building the ohair@13: OpenJDK. ohair@13: The above environment variables MUST be set. ohair@13:
ohair@49: This Platform SDK compiler is only used on X64 builds ohair@49: but other parts of the Platform SDK may be used ohair@49: for the X86 builds. ohair@13:
Zip and Unzip
ohair@13:ohair@13: Version 2.2 (November 3rd 1997) or newer of the zip utility ohair@13: and version 5.12 or newer of the unzip utility is needed ohair@13: to build the JDK. ohair@13: With Solaris, Linux, and Windows CYGWIN, the zip and unzip ohair@13: utilities installed on the system should be fine. ohair@13: Information and the source code for ohair@13: ZIP.EXE and UNZIP.EXE is available on the ohair@13: info-zip web site. ohair@13:ohair@13: ohair@13:Common UNIX Printing System (CUPS) Headers (Solaris & Linux)
ohair@13:ohair@13: Solaris: ohair@13: CUPS header files are required for building the ohair@13: OpenJDK on Solaris. ohair@13: The Solaris header files can be obtained by installing ohair@13: the package SFWcups from the Solaris Software ohair@13: Companion CD/DVD, these often will be installed into ohair@13: /opt/sfw/cups. ohair@13:ohair@13: ohair@13:ohair@13: Linux: ohair@13: CUPS header files are required for building the ohair@13: OpenJDK on Linux. ohair@13: The Linux header files are usually available from a "cups" ohair@13: development package, it's recommended that you try and use ohair@13: the package provided by the particular version of Linux that ohair@13: you are using. ohair@13:
ohair@13: The CUPS header files can always be downloaded from ohair@13: www.cups.org. ohair@13: The variable ohair@13: ALT_CUPS_HEADERS_PATH ohair@13: can be used to override the default location of the ohair@13: CUPS Header files. ohair@13:
FreeType 2
ohair@13:ohair@13: Version 2.3 or newer of FreeType is required for building the OpenJDK. ohair@13: On Unix systems required files can be available as part of your ohair@13: distribution (while you still may need to upgrade them). ohair@13: Note that you need development version of package that ohair@13: includes both FreeType library and header files. ohair@13:ohair@13: ohair@13:ohair@13: You can always download latest FreeType version from the ohair@13: FreeType website. ohair@13:
ohair@13: Makefiles will try to pick FreeType from /usr/lib and /usr/include. ohair@13: In case it is installed elsewhere you will need to set environment ohair@13: variables ohair@13: ALT_FREETYPE_LIB_PATH ohair@13: and ohair@13: ALT_FREETYPE_HEADERS_PATH ohair@13: to refer to place where library and header files are installed. ohair@25:
ohair@25: Building the freetype 2 libraries from scratch is also possible, ohair@25: however on Windows refer to the ohair@25: ohair@25: Windows FreeType DLL build instructions. ohair@25:
ohair@25: Note that by default FreeType is built with byte code hinting ohair@25: support disabled due to licensing restrictions. ohair@25: In this case, text appearance and metrics are expected to ohair@25: differ from Sun's official JDK build. ohair@25: See ohair@25: ohair@25: the SourceForge FreeType2 Home Page ohair@25: ohair@25: for more information. ohair@13:
Advanced Linux Sound Architecture (ALSA) (Linux only)
ohair@13:ohair@13: Linux only: ohair@13: Version 0.9.1 or newer of the ALSA files are ohair@13: required for building the OpenJDK on Linux. ohair@13: These Linux files are usually available from an "alsa" ohair@13: of "libasound" ohair@13: development package, it's highly recommended that you try and use ohair@13: the package provided by the particular version of Linux that ohair@13: you are using. ohair@13: The makefiles will check this emit a sanity error if it is ohair@13: missing or the wrong version. ohair@13:ohair@13: There are no ALT* variables to change the assumed locations of ALSA, ohair@13: the makefiles will expect to find the ALSA include files and library at: ohair@13: /usr/include/alsa and /usr/lib/libasound.so. duke@2:ohair@13: In particular, older Linux systems will likely not have the ohair@13: right version of ALSA installed, for example ohair@13: Redhat AS 2.1 U2 and SuSE 8.1 do not include a sufficiently ohair@13: recent ALSA distribution. ohair@13: On rpm-based systems, you can see if ALSA is installed by ohair@13: running this command: ohair@13:
ohair@13: rpm -qa | grep alsa ohair@13:ohair@13: Both alsa and alsa-devel packages are needed. ohair@13:ohair@13: If your distribution does not come with ALSA, and you can't ohair@13: find ALSA packages built for your particular system, ohair@13: you can try to install the pre-built ALSA rpm packages from ohair@13: ohair@13: www.freshrpms.net. ohair@13: Note that installing a newer ALSA could ohair@13: break sound output if an older version of ALSA was previously ohair@13: installed on the system, but it will enable JDK compilation. ohair@13:
ohair@13: Installation: execute as rootohair@13: As a last resort you can go to the ohair@13: ohair@13: Advanced Linux Sound Architecture Site and build it from ohair@13: source. ohair@13:
ohair@13: [i586]:rpm -Uv --force alsa-lib-devel-0.9.1-rh61.i386.rpm
ohair@13: [x64]:rpm -Uv --force alsa-lib-devel-0.9.8-amd64.x86_64.rpm
ohair@13: Uninstallation:
ohair@13: [i586]:rpm -ev alsa-lib-devel-0.9.1-rh61
ohair@13: [x64]:rpm -ev alsa-lib-devel-0.9.8-amd64
ohair@13: Make sure that you do not link to the static library ohair@13: (libasound.a), ohair@13: by verifying that the dynamic library (libasound.so) is ohair@13: correctly installed in /usr/lib. ohair@13:ohair@13: Download driver and library ohair@13: source tarballs from ohair@13: ALSA's homepage. ohair@13: As root, execute the following ohair@13: commands (you may need to adapt the version number): ohair@13:ohair@13: Note that this is a minimum install that enables ohair@13: building the JDK platform. To actually use ALSA sound drivers, more ohair@13: steps are necessary as outlined in the documentation on ALSA's homepage. ohair@13:ohair@13: ohair@13: $ tar xjf alsa-driver-0.9.1.tar.bz2 ohair@13: $ cd alsa-driver-0.9.1 ohair@13: $ ./configure ohair@13: $ make install ohair@13: $ cd .. ohair@13: $ tar xjf alsa-lib-0.9.1.tar.bz2 ohair@13: $ cd alsa-lib-0.9.1 ohair@13: $ ./configure ohair@13: $ make install ohair@13: ohair@13:ohair@13: Should one of the above steps fail, refer to the documentation on ohair@13: ALSA's home page. ohair@13:ohair@13: ALSA can be uninstalled by executing make uninstall first in ohair@13: the alsa-lib-0.9.1 directory and then in ohair@13: alsa-driver-0.9.1. ohair@13:
ohair@13: Unix Command Tools (CYGWIN) ohair@13:ohair@13: ohair@13:ohair@13: The OpenJDK requires access to a set of unix command tools ohair@13: on Windows which can be supplied by ohair@13: CYGWIN. ohair@13:ohair@13: Microsoft DirectX 9.0 SDK header files and libraries duke@2:ohair@13: The OpenJDK build requires CYGWIN version 1.5.12 or newer. ohair@13: Information about CYGWIN can ohair@13: be obtained from the CYGWIN website at ohair@13: www.cygwin.com. ohair@13:
ohair@13: By default CYGWIN doesn't install all the tools required for building ohair@13: the OpenJDK. ohair@13: Along with the default installation, you need to install ohair@13: the following tools. ohair@13:
ohair@13:ohair@13:ohair@13: ohair@13:
ohair@13:ohair@13: ohair@13: ohair@13: ohair@13:Binary Name ohair@41:Category ohair@13:Package ohair@13:Description ohair@13:ohair@13: ohair@13:ar.exe ohair@13:Devel ohair@41:binutils ohair@41:The GNU assembler, linker and binary ohair@13: utilities ohair@13:ohair@13: ohair@13:make.exe ohair@13:Devel ohair@41:make ohair@41:The GNU version of the 'make' utility built for CYGWIN. ohair@13:
ohair@25: NOTE: See the GNU make sectionohair@13: ohair@13:m4.exe ohair@13:Interpreters ohair@41:m4 ohair@41:GNU implementation of the traditional Unix macro ohair@13: processor ohair@13:ohair@13: ohair@13:cpio.exe ohair@13:Utils ohair@41:cpio ohair@41:A program to manage archives of files ohair@13:ohair@25: ohair@13:gawk.exe ohair@13:Utils ohair@41:awk ohair@41:Pattern-directed scanning and processing language ohair@13:ohair@13: ohair@13:file.exe ohair@13:Utils ohair@41:file ohair@41:Determines file type using 'magic' numbers ohair@13:ohair@13: ohair@13:zip.exe ohair@25:Archive ohair@41:zip ohair@41:Package and compress (archive) files ohair@13:ohair@13: ohair@13:unzip.exe ohair@25:Archive ohair@41:unzip ohair@41:Extract compressed files in a ZIP archive ohair@13:ohair@13: ohair@13: ohair@13:free.exe ohair@41:System ohair@41:procps ohair@41:Display amount of free and used memory in the system ohair@13:ohair@13: Note that the CYGWIN software can conflict with other non-CYGWIN ohair@13: software on your Windows system. ohair@13: CYGWIN provides a ohair@13: FAQ for ohair@13: known issues and problems, of particular interest is the ohair@13: section on ohair@13: ohair@13: BLODA (applications that interfere with CYGWIN). ohair@41:
ohair@41: WARNING: ohair@41: Be very careful with link.exe, it will conflict ohair@41: with the Visual Studio version. You need the Visual Studio ohair@41: version of link.exe, not the CYGWIN one. ohair@41: So it's important that the Visual Studio paths in PATH preceed ohair@41: the CYGWIN path /usr/bin. ohair@13:
ohair@13: Microsoft DirectX 9.0 SDK (Summer 2004) ohair@13: headers are required for building ohair@13: OpenJDK. ohair@13: This SDK can be downloaded from ohair@13: ohair@13: Microsoft DirectX 9.0 SDK (Summer 2004). ohair@13: If the link above becomes obsolete, the SDK can be found from ohair@13: the Microsoft Download Site ohair@13: (search with "DirectX 9.0 SDK Update Summer 2004"). ohair@13: The location of this SDK can be set with ohair@13: ALT_DXSDK_PATH ohair@13: but it's normally found via the DirectX environment variable ohair@13: DXSDK_DIR. ohair@13:ohair@13: MSVCRT.DLL ohair@13:ohair@13: i586 only: ohair@49: The OpenJDK 32-bit build requires access to a redistributable ohair@49: MSVCRT.DLL. ohair@13: If the MSVCRT.DLL is not installed in ohair@13: the system32 directory set the ohair@13: ALT_MSVCRT_DLL_PATH ohair@49: variable to the location of this file. ohair@13:ohair@49: MSVCR90.DLL ohair@13:ohair@13: X64 only: ohair@49: The OpenJDK 64-bit build requires access to a redistributable ohair@49: MSVCRT.DLL, which is ohair@13: usually supplied by the ohair@13: Platform SDK. ohair@13: If it is not available from the Platform SDK, ohair@13: set the ohair@13: ALT_MSVCRT_DLL_PATH ohair@49: variable to the location of this file. ohair@13:
ohair@13: i586 only: ohair@13: The ohair@13: OpenJDK ohair@49: build requires access to a redistributable ohair@49: MSVCR90.DLL which should be ohair@13: supplied by the ohair@49: Visual Studio product. ohair@49: If the MSVCR90.DLL is not available from the ohair@13: Visual Studio product ohair@13: set the ohair@49: ALT_MSVCR90_DLL_PATH ohair@49: variable to the location of this file. duke@2:duke@2:
ohair@13: Once a machine is setup to build the OpenJDK, ohair@13: the steps to create the build are fairly simple. ohair@13: The various ALT settings can either be made into variables ohair@13: or can be supplied on the ohair@13: gmake ohair@13: command. ohair@13:ohair@13: ohair@13:ohair@13:
duke@2:- Use the sanity rule to double check all the ALT settings: ohair@13:
ohair@13:ohair@13: ohair@13: gmake ohair@13: sanity ohair@13: [ARCH_DATA_MODEL=32 or 64] ohair@13: [other "ALT_" overrides] ohair@13: ohair@13:ohair@13:- Start the build with the command: ohair@13:
ohair@13:ohair@13: ohair@13: gmake ohair@13: [ARCH_DATA_MODEL=32 or 64] ohair@13: [ALT_OUTPUTDIR=output_directory] ohair@13: [other "ALT_" overrides] ohair@13: ohair@13:ohair@13:ohair@13: Solaris: ohair@13: Note that ARCH_DATA_MODEL is really only needed on Solaris to ohair@13: indicate you want to built the 64-bit version. ohair@13: And before the Solaris 64-bit binaries can be used, they ohair@13: must be merged with the binaries from a separate 32-bit build. ohair@13: The merged binaries may then be used in either 32-bit or 64-bit mode, with ohair@13: the selection occurring at runtime ohair@13: with the -d32 or -d64 options. duke@2:
ohair@13: When the build is completed, you should see the generated ohair@13: binaries and associated files in the j2sdk-image ohair@13: directory in the output directory. ohair@13: The default output directory is ohair@13: build/platform, ohair@13: where platform is one of ohair@13:ohair@13: ohair@13:ohair@13:
ohair@13: In particular, the ohair@13: build/platform/j2sdk-image/bin ohair@13: directory should contain executables for the ohair@13: OpenJDK tools and utilities. duke@2:- solaris-sparc
ohair@13:- solaris-sparcv9
ohair@13:- solaris-i586
ohair@13:- solaris-amd64
ohair@13:- linux-i586
ohair@13:- linux-amd64
ohair@13:- windows-i586
ohair@13:- windows-amd64
ohair@13:ohair@13: You can test that the build completed properly by using the build ohair@13: to run the various demos that you will find in the ohair@13: build/platform/j2sdk-image/demo ohair@13: directory. ohair@13:
ohair@13: The provided regression tests can be run with the jtreg ohair@13: utility from ohair@13: the jtreg site. duke@2:
ohair@13: Some of the ohair@13: environment or make variables (just called variables in this ohair@13: document) that can impact the build are: duke@2:
duke@2:ohair@13: ohair@13:ohair@49:
ohair@13:- PATH
ohair@49:- Typically you want to set the PATH to include: ohair@49:
ohair@49:ohair@49:
ohair@49:- The location of the GNU make binary
ohair@49:- The location of the Bootstrap JDK java ohair@49: (see Bootstrap JDK)
ohair@49:- The location of the C/C++ compilers ohair@49: (see compilers)
ohair@49:- The location or locations for the Unix command utilities ohair@49: (e.g. /usr/bin)
ohair@49:- MILESTONE
ohair@49:- ohair@49: The milestone name for the build (e.g."beta"). ohair@49: The default value is "internal". ohair@49:
ohair@49:- BUILD_NUMBER
ohair@49:- ohair@49: The build number for the build (e.g. "b27"). ohair@49: The default value is "b00". ohair@49:
ohair@49:- ARCH_DATA_MODEL
ohair@49:- The ARCH_DATA_MODEL variable ohair@49: is used to specify whether the build is to generate 32-bit or 64-bit ohair@49: binaries. ohair@49: The Solaris build supports either 32-bit or 64-bit builds, but ohair@49: Windows and Linux will support only one, depending on the specific ohair@49: OS being used. ohair@49: Normally, setting this variable is only necessary on Solaris. ohair@49: Set ARCH_DATA_MODEL to 32 for generating 32-bit binaries, ohair@49: or to 64 for generating 64-bit binaries. ohair@49:
ohair@49:- ALT_BOOTDIR
ohair@49:- ohair@49: The location of the bootstrap JDK installation. ohair@49: See Bootstrap JDK for more information. ohair@49: You should always install your own local Bootstrap JDK and ohair@49: always set ALT_BOOTDIR explicitly. ohair@49:
ohair@25:- ALT_BINARY_PLUGS_PATH
duke@2:- ohair@25: The location of the binary plugs installation. ohair@25: See Binary Plugs for more information. ohair@25: You should always have a local copy of a ohair@25: recent Binary Plugs install image ohair@25: and set this variable to that location. ohair@13:
ohair@49:- ALT_JDK_IMPORT_PATH
duke@2:- ohair@49: The location of a previously built JDK installation. ohair@49: See Optional Import JDK for more information. ohair@49:
ohair@49:- ALT_OUTPUTDIR
ohair@49:- ohair@49: An override for specifying the (absolute) path of where the ohair@49: build output is to go. ohair@49: The default output directory will be build/platform. ohair@49:
ohair@49:- ALT_COMPILER_PATH
ohair@49:- ohair@49: The location of the C/C++ compiler. ohair@49: The default varies depending on the platform. ohair@49:
ohair@49:- ALT_CACERTS_FILE
ohair@49:- ohair@49: The location of the cacerts file. ohair@49: The default will refer to ohair@49: jdk/src/share/lib/security/cacerts. ohair@49:
ohair@49:- ALT_CUPS_HEADERS_PATH
ohair@49:- ohair@49: The location of the CUPS header files. ohair@49: See CUPS information for more information. ohair@49: If this path does not exist the fallback path is ohair@49: /usr/include. ohair@49:
ohair@49:- ALT_FREETYPE_LIB_PATH
ohair@49:- ohair@49: The location of the FreeType shared library. ohair@49: See FreeType information for details. ohair@49:
ohair@49:- ALT_FREETYPE_HEADERS_PATH
ohair@49:- ohair@49: The location of the FreeType header files. ohair@49: See FreeType information for details. ohair@49:
ohair@49:- ALT_JDK_DEVTOOLS_PATH
ohair@49:- ohair@49: The default root location of the devtools. ohair@49: The default value is ohair@49: $(ALT_SLASH_JAVA)/devtools. ohair@49:
ohair@49:- ALT_DEVTOOLS_PATH
ohair@49:- ohair@49: The location of tools like the ohair@49: zip and unzip ohair@49: binaries, but might also contain the GNU make utility ohair@49: (gmake). ohair@49: So this area is a bit of a grab bag, especially on Windows. ohair@49: The default value depends on the platform and ohair@49: Unix Commands being used. ohair@49: On Linux the default will be ohair@49: $(ALT_JDK_DEVTOOLS_PATH)/linux/bin, ohair@49: on Solaris ohair@49: $(ALT_JDK_DEVTOOLS_PATH)/{sparc,i386}/bin, ohair@49: and on Windows with CYGWIN ohair@49: /usr/bin. ohair@49:
ohair@49:- ALT_UNIXCCS_PATH
ohair@49:- ohair@49: Solaris only: ohair@49: An override for specifying where the Unix CCS ohair@49: command set are located. ohair@49: The default location is /usr/ccs/bin ohair@49:
ohair@49:- ALT_SLASH_JAVA
ohair@49:- ohair@49: The default root location for many of the ALT path locations ohair@49: of the following ALT variables. ohair@49: The default value is ohair@49: "/java" on Solaris and Linux, ohair@49: "J:" on Windows. ohair@49:
ohair@49:- ALT_BUILD_JDK_IMPORT_PATH
ohair@49:- ohair@49: These are useful in managing builds on multiple platforms. ohair@49: The default network location for all of the import JDK images ohair@49: for all platforms. ohair@49: If ALT_JDK_IMPORT_PATH ohair@49: is not set, this directory will be used and should contain ohair@49: the following directories: ohair@49: solaris-sparc, ohair@49: solaris-i586, ohair@49: solaris-sparcv9, ohair@49: solaris-amd64, ohair@49: linux-i586, ohair@49: linux-amd64, ohair@49: windows-i586, ohair@49: and ohair@49: windows-amd64. ohair@49: Where each of these directories contain the import JDK image ohair@49: for that platform. duke@2:
ohair@25:- ALT_BUILD_BINARY_PLUGS_PATH
duke@2:- ohair@25: These are useful in managing builds on multiple platforms. ohair@25: The default network location for all of the binary plug images ohair@25: for all platforms. ohair@25: If ALT_BINARY_PLUGS_PATH ohair@25: is not set, this directory will be used and should contain ohair@25: the following directories: ohair@25: solaris-sparc, ohair@25: solaris-i586, ohair@25: solaris-sparcv9, ohair@25: solaris-amd64, ohair@25: linux-i586, ohair@25: linux-amd64, ohair@25: windows-i586, ohair@25: and ohair@25: windows-amd64. ohair@25: Where each of these directories contain the binary plugs image ohair@25: for that platform. ohair@13:
ohair@49:- Windows specific:
ohair@13:- ohair@49:
duke@2:ohair@49:
duke@2:- ALT_MSDEVTOOLS_PATH
ohair@49:- ohair@49: The location of the ohair@49: Microsoft Visual Studio ohair@49: tools 'bin' directory. ohair@49: The default is usually derived from ohair@49: ALT_COMPILER_PATH. ohair@49:
ohair@49:- ALT_DXSDK_PATH
ohair@49:- ohair@49: The location of the ohair@49: Microsoft DirectX 9 SDK. ohair@49: The default will be to try and use the DirectX environment ohair@49: variable DXSDK_DIR, ohair@49: failing that, look in C:/DXSDK. ohair@49:
ohair@49:- ALT_MSVCRT_DLL_PATH
ohair@49:- ohair@49: The location of the ohair@49: MSVCRT.DLL. ohair@49:
ohair@49:- ALT_MSVCR90_DLL_PATH
ohair@49:- ohair@49: i586 only: ohair@49: The location of the ohair@49: MSVCR90.DLL. ohair@49:
ohair@49:
ohair@13: A build can fail for any number of reasons. ohair@13: Most failures ohair@13: are a result of trying to build in an environment in which all the ohair@13: pre-build requirements have not been met. ohair@13: The first step in ohair@13: troubleshooting a build failure is to recheck that you have satisfied ohair@13: all the pre-build requirements for your platform. ohair@13: Look for the check list of the platform you are building on in the ohair@13: Table of Contents. ohair@13:ohair@13:ohair@13: You can validate your build environment by using the sanity ohair@13: target. ohair@13: Any errors listed ohair@13: will stop the build from starting, and any warnings may result in ohair@13: a flawed product build. ohair@13: We strongly encourage you to evaluate every ohair@13: sanity check warning and fix it if required, before you proceed ohair@13: further with your build. ohair@13:
ohair@13: Some of the more common problems with builds are briefly described ohair@13: below, with suggestions for remedies. ohair@13:
ohair@13:
ohair@13:- ohair@13: Slow Builds: ohair@13:
ohair@13:ohair@13: If your build machine seems to be overloaded from too many ohair@13: simultaneous C++ compiles, try setting the HOTSPOT_BUILD_JOBS ohair@13: variable to 1 (if you're using a multiple CPU ohair@13: machine, setting it to more than the the number of CPUs is probably ohair@13: not a good idea). ohair@13:ohair@13:ohair@13: Creating the javadocs can be very slow, if you are running ohair@13: javadoc, consider skipping that step. ohair@13:
ohair@13: Faster hardware and more RAM always helps too. ohair@13: The VM build tends to be CPU intensive (many C++ compiles), ohair@13: and the rest of the JDK will often be disk intensive. ohair@13:
ohair@13: Faster compiles are possible using a tool called ohair@13: ccache. ohair@13:
- ohair@13: File time issues: ohair@13:
ohair@13:ohair@13: If you see warnings that refer to file time stamps, e.g. ohair@13:ohair@13:ohair@13: Warning message: File `xxx' has modification time in ohair@13: the future. ohair@13:ohair@13: These warnings can occur when the clock on the build machine is out of ohair@13: sync with the timestamps on the source files. Other errors, apparently ohair@13: unrelated but in fact caused by the clock skew, can occur along with ohair@13: the clock skew warnings. These secondary errors may tend to obscure the ohair@13: fact that the true root cause of the problem is an out-of-sync clock. ohair@13: For example, an out-of-sync clock has been known to cause an old ohair@13: version of javac to be used to compile some files, resulting in errors ohair@13: when the pre-1.4 compiler ran across the new assert keyword ohair@13: in the 1.4 source code. ohair@13:
ohair@13: Warning message: Clock skew detected. Your build may ohair@13: be incomplete. ohair@13:ohair@13: If you see these warnings, reset the clock on the build ohair@13: machine, run "gmake clobber" or delete the directory ohair@13: containing the build output, and restart the build from the beginning. ohair@13:
- ohair@13: Error message: Trouble writing out table to disk ohair@13:
ohair@13:ohair@13: Increase the amount of swap space on your build machine. ohair@13:ohair@13:- ohair@13: Error Message: libstdc++ not found: ohair@13:
ohair@13:ohair@13: This is caused by a missing libstdc++.a library. ohair@13: This is installed as part of a specific package ohair@13: (e.g. libstdc++.so.devel.386). ohair@49: By default some 64-bit Linux versions (e.g. Fedora) ohair@49: only install the 64-bit version of the libstdc++ package. ohair@13: Various parts of the JDK build require a static ohair@13: link of the C++ runtime libraries to allow for maximum ohair@13: portability of the built images. ohair@13:ohair@13:- ohair@13: Error Message: cannot restore segment prot after reloc ohair@13:
ohair@13:ohair@13: This is probably an issue with SELinux (See ohair@13: ohair@13: http://en.wikipedia.org/wiki/SELinux). ohair@13: Parts of the VM is built without the -fPIC for ohair@13: performance reasons. ohair@13:ohair@13:ohair@13: To completely disable SELinux: ohair@13: ohair@13:
ohair@13:
ohair@13: ohair@13:- $ su root
ohair@13:- # system-config-securitylevel
ohair@13:- In the window that appears, select the SELinux tab
ohair@13:- Disable SELinux
ohair@13:ohair@13: Alternatively, instead of completely disabling it you could ohair@13: disable just this one check. ohair@13: ohair@13:
ohair@13:
ohair@13: ohair@13:- Select System->Administration->SELinux Management
ohair@13:- In the SELinux Management Tool which appears, ohair@13: select "Boolean" from the menu on the left
ohair@13:- Expand the "Memory Protection" group
ohair@13:- Check the first item, labeled ohair@13: "Allow all unconfined executables to use libraries requiring text relocation ..."
ohair@13:- ohair@13: Windows Error Message: *** fatal error - couldn't allocate heap, ... ohair@13:
ohair@13:ohair@13: The CYGWIN software can conflict with other non-CYGWIN ohair@13: software. See the CYGWIN FAQ section on ohair@13: ohair@13: BLODA (applications that interfere with CYGWIN). ohair@13:ohair@13:- ohair@13: Windows Error Message: *** multiple target patterns. Stop. ohair@13:
ohair@13:ohair@13: The CYGWIN make version 3.81 may not like the Windows C:/ ohair@13: style paths, it may not like the ':' character in the path ohair@13: when used in a makefile target definition. ohair@13: See the gmake section. ohair@13:ohair@13: