duke@2: duke@2: ohair@13: ohair@13: OpenJDK Build README ohair@13: ohair@632: ohair@632: ohair@13: ohair@41: ohair@13: ohair@13: ohair@13: ohair@13: ohair@13: ohair@13: ohair@13:
ohair@25: OpenJDK ohair@13:
ohair@13:

OpenJDK Build README

ohair@13:
ohair@632: ohair@632: ohair@13:
ohair@13:

Introduction

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

!!!!!!!!!!!!!!! THIS IS A MAJOR RE-WRITE of this document. !!!!!!!!!!!!!

ohair@632:
ohair@632: Some Headlines: ohair@632: ohair@632:
ohair@13:
ohair@632: ohair@632: ohair@13:
ohair@13:

Contents

ohair@13:
ohair@13: ohair@632:
ohair@632: ohair@13:
ohair@276: ohair@632: ohair@276:
ohair@276:

Use of Mercurial

ohair@276:
ohair@276: The OpenJDK sources are maintained with the revision control system ohair@276: Mercurial. ohair@276: If you are new to Mercurial, please see the ohair@632: ohair@632: Beginner Guides ohair@632: or refer to the ohair@632: Mercurial Book. ohair@276: The first few chapters of the book provide an excellent overview of ohair@276: Mercurial, what it is and how it works. ohair@276:
ohair@276: For using Mercurial with the OpenJDK refer to the ohair@320: ohair@320: Developer Guide: Installing and Configuring Mercurial ohair@276: section for more information. ohair@276: ohair@276:

Getting the Source

ohair@276:
ohair@276: To get the entire set of OpenJDK Mercurial repositories ohair@632: use the script get_source.sh located in the ohair@632: root repository: ohair@276:
ohair@632: ohair@632: hg clone http://hg.openjdk.java.net/jdk8/jdk8 ohair@632: YourOpenJDK ohair@632:
ohair@632: cd YourOpenJDK ohair@632:
ohair@632: bash ./get_source.sh ohair@632:
ohair@276:
ohair@632: Once you have all the repositories, keep in mind that each erikj@774: repository is its own independent repository. ohair@632: You can also re-run ./get_source.sh anytime to ohair@632: pull over all the latest changesets in all the repositories. ohair@632: This set of nested repositories has been given the term ohair@632: "forest" and there are various ways to apply the same ohair@632: hg command to each of the repositories. ohair@632: For example, the script make/scripts/hgforest.sh ohair@632: can be used to repeat the same hg ohair@632: command on every repository, e.g. ohair@276:
ohair@632: ohair@276: cd YourOpenJDK ohair@632:
ohair@632: bash ./make/scripts/hgforest.sh status ohair@632:
ohair@276:
ohair@276:
ohair@276: ohair@632:

Repositories

ohair@632:
ohair@632:

The set of repositories and what they contain:

ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: erikj@774: erikj@774: erikj@774: erikj@774: ohair@632: ohair@632:
RepositoryContains
ohair@632: . (root) ohair@632: ohair@632: common configure and makefile logic ohair@632:
ohair@632: hotspot ohair@632: ohair@632: source code and make files for building ohair@632: the OpenJDK Hotspot Virtual Machine ohair@632:
ohair@632: langtools ohair@632: ohair@632: source code for the OpenJDK javac and language tools ohair@632:
ohair@632: jdk ohair@632: ohair@632: source code and make files for building ohair@632: the OpenJDK runtime libraries and misc files ohair@632:
ohair@632: jaxp ohair@632: ohair@632: source code for the OpenJDK JAXP functionality ohair@632:
ohair@632: jaxws ohair@632: ohair@632: source code for the OpenJDK JAX-WS functionality ohair@632:
ohair@632: corba ohair@632: ohair@632: source code for the OpenJDK Corba functionality ohair@632:
erikj@774: nashorn erikj@774: erikj@774: source code for the OpenJDK JavaScript implementation erikj@774:
ohair@632:
ohair@632: ohair@632:

Repository Source Guidelines

ohair@632:
ohair@632: There are some very basic guidelines: ohair@632: ohair@632:
ohair@632: ohair@276:
ohair@276: ohair@632: ohair@13:
ohair@632:

Building

ohair@13:
ohair@632: The very first step in building the OpenJDK is making sure the ohair@632: system itself has everything it needs to do OpenJDK builds. ohair@632: Once a system is setup, it generally doesn't need to be done again. ohair@632:
ohair@632: Building the OpenJDK is now done with running a ohair@632: configure ohair@632: script which will try and find and verify you have everything ohair@632: you need, followed by running ohair@632: make, e.g. ohair@276:
ohair@632: ohair@632: ohair@632: bash ./configure
ohair@632: make all ohair@632:
ohair@632:
ohair@632:
ohair@632: Where possible the configure script will attempt to located the ohair@632: various components in the default locations or via component ohair@632: specific variable settings. ohair@632: When the normal defaults fail or components cannot be found, ohair@632: additional configure options may be necessary to help configure ohair@632: find the necessary tools for the build, or you may need to ohair@632: re-visit the setup of your system due to missing software ohair@632: packages. ohair@632:
ohair@632: NOTE: The configure script ohair@632: file does not have ohair@632: execute permissions and will need to be explicitly run with ohair@632: bash, ohair@632: see the source guidelines. robilad@132: ohair@632: ohair@632:
ohair@632:

System Setup

ohair@632:
ohair@632: Before even attempting to use a system to build the OpenJDK ohair@632: there are some very basic system setups needed. ohair@632: For all systems: ohair@632: ohair@632: And for specific systems: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632:
LinuxSolarisWindowsMac OS X
ohair@632: Install all the software development ohair@632: packages needed including ohair@632: alsa, ohair@632: freetype, ohair@632: cups, and ohair@632: xrender. ohair@632:
ohair@632: See ohair@632: specific system packages. ohair@632:
ohair@632: Install all the software development ohair@632: packages needed including ohair@632: Studio Compilers, ohair@632: freetype, ohair@632: cups, and ohair@632: xrender. ohair@632:
ohair@632: See ohair@632: specific system packages. ohair@632:
ohair@632: ohair@632: ohair@632: Install ohair@632: XCode 4.5.2 ohair@632: and also install the "Command line tools" found under the ohair@632: preferences pane "Downloads" ohair@632:
ohair@632: ohair@632:

Linux

ohair@632:
ohair@632: With Linux, try and favor the system packages over ohair@632: building your own ohair@632: or getting packages from other areas. ohair@632: Most Linux builds should be possible with the system's ohair@632: available packages. ohair@632:
ohair@632: Note that some Linux systems have a habit of pre-populating ohair@632: your environment variables for you, for example JAVA_HOME ohair@632: might get pre-defined for you to refer to the JDK installed on ohair@632: your Linux system. ohair@632: You will need to unset JAVA_HOME. ohair@632: It's a good idea to run env and verify the ohair@632: environment variables you are getting from the default system ohair@632: settings make sense for building the OpenJDK. ohair@632: ohair@632:
ohair@632: ohair@632:

Solaris

ohair@632:
ohair@632:
Studio Compilers
ohair@632:
ohair@632: At a minimum, the ohair@632: ohair@632: Studio 12 Update 1 Compilers ohair@632: (containing version 5.10 of the C and C++ compilers) is required, ohair@632: including specific patches. ohair@632:

ohair@632: The Solaris SPARC patch list is: ohair@632:

    ohair@632:
  • ohair@632: 118683-05: SunOS 5.10: Patch for profiling libraries and assembler ohair@632:
  • ohair@632:
  • ohair@632: 119963-21: SunOS 5.10: Shared library patch for C++ ohair@632:
  • ohair@632:
  • ohair@632: 120753-08: SunOS 5.10: Microtasking libraries (libmtsk) patch ohair@632:
  • ohair@632:
  • ohair@632: 128228-09: Sun Studio 12 Update 1: Patch for Sun C++ Compiler ohair@632:
  • ohair@632:
  • ohair@632: 141860-03: Sun Studio 12 Update 1: Patch for Compiler Common patch for Sun C C++ F77 F95 ohair@632:
  • ohair@632:
  • ohair@632: 141861-05: Sun Studio 12 Update 1: Patch for Sun C Compiler ohair@632:
  • ohair@632:
  • ohair@632: 142371-01: Sun Studio 12.1 Update 1: Patch for dbx ohair@632:
  • ohair@632:
  • ohair@632: 143384-02: Sun Studio 12 Update 1: Patch for debuginfo handling ohair@632:
  • ohair@632:
  • ohair@632: 143385-02: Sun Studio 12 Update 1: Patch for Compiler Common patch for Sun C C++ F77 F95 ohair@632:
  • ohair@632:
  • ohair@632: 142369-01: Sun Studio 12.1: Patch for Performance Analyzer Tools ohair@632:
  • ohair@632:
ohair@632:

ohair@632: The Solaris X86 patch list is: ohair@632:

    ohair@632:
  • ohair@632: 119961-07: SunOS 5.10_x86, x64, Patch for profiling libraries and assembler ohair@632:
  • ohair@632:
  • ohair@632: 119964-21: SunOS 5.10_x86: Shared library patch for C++_x86 ohair@632:
  • ohair@632:
  • ohair@632: 120754-08: SunOS 5.10_x86: Microtasking libraries (libmtsk) patch ohair@632:
  • ohair@632:
  • ohair@632: 141858-06: Sun Studio 12 Update 1_x86: Sun Compiler Common patch for x86 backend ohair@632:
  • ohair@632:
  • ohair@632: 128229-09: Sun Studio 12 Update 1_x86: Patch for C++ Compiler ohair@632:
  • ohair@632:
  • ohair@632: 142363-05: Sun Studio 12 Update 1_x86: Patch for C Compiler ohair@632:
  • ohair@632:
  • ohair@632: 142368-01: Sun Studio 12.1_x86: Patch for Performance Analyzer Tools ohair@632:
  • ohair@632:
ohair@632:

ohair@632: Place the bin directory in PATH. ohair@632:

ohair@632: The Oracle Solaris Studio Express compilers at: ohair@632: ohair@632: Oracle Solaris Studio Express Download site ohair@632: are also an option, although these compilers have not ohair@632: been extensively used yet. ohair@632:

ohair@632: ohair@632:
ohair@632: ohair@632:

Windows

ohair@632:
ohair@632: ohair@632:
Windows Unix Toolkit
ohair@632:
ohair@632: Building on Windows requires a Unix-like environment, notably a ohair@632: Unix-like shell. ohair@632: There are several such environments available of which ohair@632: Cygwin and ohair@632: MinGW/MSYS are ohair@632: currently supported for ohair@632: the OpenJDK build. One of the differences of these ohair@632: systems from standard Windows tools is the way ohair@632: they handle Windows path names, particularly path names which contain ohair@632: spaces, backslashes as path separators and possibly drive letters. ohair@632: Depending ohair@632: on the use case and the specifics of each environment these path ohair@632: problems can ohair@632: be solved by a combination of quoting whole paths, translating ohair@632: backslashes to ohair@632: forward slashes, escaping backslashes with additional backslashes and ohair@632: translating the path names to their ohair@632: ohair@632: "8.3" version. ohair@632: ohair@632:
CYGWIN
ohair@632:
ohair@632: CYGWIN is an open source, Linux-like environment which tries to emulate ohair@632: a complete POSIX layer on Windows. It tries to be smart about path names ohair@632: and can usually handle all kinds of paths if they are correctly quoted ohair@632: or escaped although internally it maps drive letters <drive>: ohair@632: to a virtual directory /cygdrive/<drive>. ohair@632:

ohair@632: You can always use the cygpath utility to map pathnames with spaces ohair@632: or the backslash character into the C:/ style of pathname ohair@632: (called 'mixed'), e.g. cygpath -s -m "path". ohair@632:

ohair@632:

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

ohair@632:

ohair@632: The OpenJDK build requires CYGWIN version 1.7.16 or newer. ohair@632: Information about CYGWIN can ohair@632: be obtained from the CYGWIN website at ohair@632: www.cygwin.com. ohair@632:

ohair@632:

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

ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632:
Binary NameCategoryPackageDescription
ar.exeDevelbinutils ohair@632: The GNU assembler, linker and binary utilities ohair@632:
make.exeDevelmake ohair@632: The GNU version of the 'make' utility built for CYGWIN ohair@632:
m4.exeInterpretersm4 ohair@632: GNU implementation of the traditional Unix macro ohair@632: processor ohair@632:
cpio.exeUtilscpio ohair@632: A program to manage archives of files ohair@632:
gawk.exeUtilsawk ohair@632: Pattern-directed scanning and processing language ohair@632:
file.exeUtilsfile ohair@632: Determines file type using 'magic' numbers ohair@632:
zip.exeArchivezip ohair@632: Package and compress (archive) files ohair@632:
unzip.exeArchiveunzip ohair@632: Extract compressed files in a ZIP archive ohair@632:
free.exeSystemprocps ohair@632: Display amount of free and used memory in the system ohair@632:
ohair@632:
ohair@632: Note that the CYGWIN software can conflict with other non-CYGWIN ohair@632: software on your Windows system. ohair@632: CYGWIN provides a ohair@632: FAQ for ohair@632: known issues and problems, of particular interest is the ohair@632: section on ohair@632: ohair@632: BLODA (applications that interfere with CYGWIN). ohair@632:
ohair@632: ohair@632:
MinGW/MSYS
ohair@632:
ohair@632: MinGW ("Minimalist GNU for Windows") is a collection of free Windows ohair@632: specific header files and import libraries combined with GNU toolsets that ohair@632: allow one to produce native Windows programs that do not rely on any ohair@632: 3rd-party C runtime DLLs. MSYS is a supplement to MinGW which allows building ohair@632: applications and programs which rely on traditional UNIX tools to ohair@632: be present. Among others this includes tools like bash ohair@632: and make. ohair@632: See MinGW/MSYS ohair@632: for more information. ohair@632:

ohair@632: Like Cygwin, MinGW/MSYS can handle different types of path formats. They ohair@632: are internally converted to paths with forward slashes and drive letters ohair@632: <drive>: replaced by a virtual ohair@632: directory /<drive>. Additionally, MSYS automatically ohair@632: detects binaries compiled for the MSYS environment and feeds them with the ohair@632: internal, Unix-style path names. If native Windows applications are called ohair@632: from within MSYS programs their path arguments are automatically converted ohair@632: back to Windows style path names with drive letters and backslashes as ohair@632: path separators. This may cause problems for Windows applications which ohair@632: use forward slashes as parameter separator (e.g. cl /nologo /I) ohair@632: because MSYS may wrongly ohair@632: replace such parameters by drive letters. ohair@632:

ohair@632:

ohair@632: In addition to the tools which will be installed ohair@632: by default, you have ohair@632: to manually install the ohair@632: msys-zip and ohair@632: msys-unzip packages. ohair@632: This can be easily done with the MinGW command line installer: ohair@632:

ohair@632: mingw-get.exe install msys-zip ohair@632:
ohair@632: mingw-get.exe install msys-unzip ohair@632:
ohair@632:
ohair@632: ohair@632:
ohair@632: ohair@632:
Visual Studio 2010 Compilers
ohair@632:
ohair@632:

ohair@632: The 32-bit and 64-bit OpenJDK Windows build requires ohair@632: Microsoft Visual Studio C++ 2010 (VS2010) Professional ohair@632: Edition or Express compiler. ohair@632: The compiler and other tools are expected to reside ohair@632: in the location defined by the variable ohair@632: VS100COMNTOOLS which ohair@632: is set by the Microsoft Visual Studio installer. ohair@632:

ohair@632:

ohair@632: Only the C++ part of VS2010 is needed. ohair@632: Try to let the installation go to the default ohair@632: install directory. ohair@632: Always reboot your system after installing VS2010. ohair@632: The system environment variable VS100COMNTOOLS ohair@632: should be ohair@632: set in your environment. ohair@632:

ohair@632:

ohair@632: Make sure that TMP and TEMP are also set ohair@632: in the environment ohair@632: and refer to Windows paths that exist, ohair@632: like C:\temp, ohair@632: not /tmp, not /cygdrive/c/temp, ohair@632: and not C:/temp. ohair@632: C:\temp is just an example, ohair@632: it is assumed that this area is ohair@632: private to the user, so by default ohair@632: after installs you should ohair@632: see a unique user path in these variables. ohair@632:

ohair@632:
ohair@632: ohair@632: ohair@632:
ohair@632: ohair@632:

Mac OS X

ohair@632:
ohair@632: Make sure you get the right XCode version. ohair@632:
ohair@632: ohair@41:
ohair@632: ohair@632: ohair@632:
ohair@632:

Configure

ohair@276:
ohair@632: The basic invocation of the configure script ohair@632: looks like: ohair@632:
ohair@632: bash ./configure [options] ohair@632:
ohair@632: This will create an output directory containing the ohair@632: "configuration" and setup an area for the build result. ohair@632: This directory typically looks like: ohair@632:
ohair@632: build/linux-x64-normal-server-release ohair@632:
ohair@632: configure will try to figure out what system you are running on ohair@632: and where all necessary build components are. ohair@632: If you have all prerequisites for building installed, ohair@632: it should find everything. ohair@632: If it fails to detect any component automatically, ohair@632: it will exit and inform you about the problem. ohair@632: When this happens, read more below in ohair@632: the configure options. ohair@632:

ohair@632: Some examples: ohair@632:

ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632:
DescriptionConfigure Command Line
Windows 32bit build with freetype specified ohair@632: bash ./configure --with-freetype=/cygdrive/c/freetype-i586 --with-target-bits=32 ohair@632:
Debug 64bit Build ohair@632: bash ./configure --enable-debug --with-target-bits=64 ohair@632:
robilad@132: ohair@632: ohair@632:

Configure Options

ohair@632:
ohair@632: Complete details on all the OpenJDK configure options can ohair@632: be seen with: ohair@632:
ohair@632: bash ./configure --help=short ohair@632:
ohair@632: Use -help to see all the configure options ohair@632: available. ohair@632: ohair@632: You can generate any number of different configurations, ohair@632: e.g. debug, release, 32, 64, etc. ohair@632: ohair@632: Some of the more commonly used configure options are: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632:
OpenJDK Configure OptionDescription
--enable-debug ohair@632: set the debug level to fastdebug (this is a shorthand for ohair@632: --with-debug-level=fastdebug) ohair@632:
--with-alsa=path ohair@632: select the location of the ohair@632: Advanced Linux Sound Architecture (ALSA) ohair@632:
ohair@632: Version 0.9.1 or newer of the ALSA files are ohair@632: required for building the OpenJDK on Linux. ohair@632: These Linux files are usually available from an "alsa" ohair@632: of "libasound" ohair@632: development package, ohair@632: and it's highly recommended that you try and use ohair@632: the package provided by the particular version of Linux that ohair@632: you are using. ohair@632:
--with-boot-jdk=path ohair@632: select the Bootstrap JDK ohair@632:
--with-boot-jdk-jvmargs="args" ohair@632: provide the JVM options to be used to run the ohair@632: Bootstrap JDK ohair@632:
--with-cacerts=path ohair@632: select the path to the cacerts file. ohair@632:
ohair@632: See ohair@632: http://en.wikipedia.org/wiki/Certificate_Authority ohair@632: for a better understanding of the Certificate Authority (CA). ohair@632: A certificates file named "cacerts" ohair@632: represents a system-wide keystore with CA certificates. ohair@632: In JDK and JRE ohair@632: binary bundles, the "cacerts" file contains root CA certificates from ohair@632: several public CAs (e.g., VeriSign, Thawte, and Baltimore). ohair@632: The source contain a cacerts file ohair@632: without CA root certificates. ohair@632: Formal JDK builders will need to secure ohair@632: permission from each public CA and include the certificates into their ohair@632: own custom cacerts file. ohair@632: Failure to provide a populated cacerts file ohair@632: will result in verification errors of a certificate chain during runtime. ohair@632: By default an empty cacerts file is provided and that should be ohair@632: fine for most JDK developers. ohair@632:
--with-cups=path ohair@632: select the CUPS install location ohair@632:
ohair@632: The ohair@632: Common UNIX Printing System (CUPS) Headers ohair@632: are required for building the ohair@632: OpenJDK on Solaris and Linux. ohair@632: The Solaris header files can be obtained by installing ohair@632: the package SFWcups from the Solaris Software ohair@632: Companion CD/DVD, these often will be installed into the ohair@632: directory /opt/sfw/cups. ohair@632:
ohair@632: The CUPS header files can always be downloaded from ohair@632: www.cups.org. ohair@632:
--with-cups-include=path ohair@632: select the CUPS include directory location ohair@632:
--with-debug-level=level ohair@632: select the debug information level of release, ohair@632: fastdebug, or slowdebug ohair@632:
--with-dev-kit=path ohair@632: select location of the compiler install or ohair@632: developer install location ohair@632:
--with-dxsdk=path ohair@632: select location of the Windows Direct X SDK install ohair@632:
ohair@632: The Microsoft DirectX 9.0 SDK ohair@632: header files and libraries ohair@632: from the Summer 2004 edition ohair@632: are required for building OpenJDK. ohair@632: This SDK can be downloaded from ohair@632: ohair@632: Microsoft DirectX 9.0 SDK (Summer 2004). ohair@632: If the link above becomes obsolete, the SDK can be found from ohair@632: the Microsoft Download Site ohair@632: (search with "DirectX 9.0 SDK Update Summer 2004"). ohair@632: Installation usually will set the environment variable ohair@632: DXSDK_DIR to it's install location. ohair@632:
--with-freetype=path ohair@632: select the freetype files to use. ohair@632:
ohair@632: Expecting the ohair@632: freetype libraries under ohair@632: lib/ and the ohair@632: headers under include/. ohair@632:
ohair@632: Version 2.3 or newer of FreeType is required. ohair@632: On Unix systems required files can be available as part of your ohair@632: distribution (while you still may need to upgrade them). ohair@632: Note that you need development version of package that ohair@632: includes both the FreeType library and header files. ohair@632:
ohair@632: You can always download latest FreeType version from the ohair@632: FreeType website. ohair@632:
ohair@632: Building the freetype 2 libraries from scratch is also possible, ohair@632: however on Windows refer to the ohair@632: ohair@632: Windows FreeType DLL build instructions. ohair@632:
ohair@632: Note that by default FreeType is built with byte code hinting ohair@632: support disabled due to licensing restrictions. ohair@632: In this case, text appearance and metrics are expected to ohair@632: differ from Sun's official JDK build. ohair@632: See ohair@632: ohair@632: the SourceForge FreeType2 Home Page ohair@632: ohair@632: for more information. ohair@632:
--with-import-hotspot=path ohair@632: select the location to find hotspot ohair@632: binaries from a previous build to avoid building ohair@632: hotspot ohair@632:
--with-target-bits=arg ohair@632: select 32 or 64 bit build ohair@632:
--with-jvm-variants=variants ohair@632: select the JVM variants to build from, comma ohair@632: separated list that can include: ohair@632: server, client, kernel, zero and zeroshark ohair@632:
--with-memory-size=size ohair@632: select the RAM size that GNU make will think ohair@632: this system has ohair@632:
--with-msvcr-dll=path ohair@632: select the msvcr100.dll ohair@632: file to include in the ohair@632: Windows builds (C/C++ runtime library for ohair@632: Visual Studio). ohair@632:
ohair@632: This is usually picked up automatically ohair@632: from the redist ohair@632: directories of Visual Studio 2010. ohair@632:
--with-num-cores=cores ohair@632: select the number of cores to use (processor ohair@632: count or CPU count) ohair@632:
--with-x=path ohair@632: select the location of the X11 and xrender files. ohair@632:
ohair@632: The ohair@632: XRender Extension Headers ohair@632: are required for building the ohair@632: OpenJDK on Solaris and Linux. ohair@632:
ohair@632: The Linux header files are usually available from a "Xrender" ohair@632: development package, it's recommended that you try and use ohair@632: the package provided by the particular distribution of Linux that ohair@632: you are using. ohair@632:
ohair@632: The Solaris XRender header files is ohair@632: included with the other X11 header files ohair@632: in the package SFWxwinc ohair@632: on new enough versions of ohair@632: Solaris and will be installed in ohair@632: /usr/X11/include/X11/extensions/Xrender.h or ohair@632: /usr/openwin/share/include/X11/extensions/Xrender.h ohair@632:
ohair@632:
ohair@632: robilad@132:
ohair@632: ohair@632: ohair@632:
ohair@632:

Make

ohair@276:
ohair@632: The basic invocation of the make utility ohair@632: looks like: ohair@632:
ohair@632: make all ohair@632:
ohair@632: This will start the build to the output directory containing the ohair@632: "configuration" that was created by the configure ohair@632: script. Run make help for more information on ohair@632: the available targets. ohair@632:
ohair@632: There are some of the make targets that ohair@632: are of general interest: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632:
Make TargetDescription
emptybuild everything but no images
allbuild everything including images
all-confbuild all configurations
imagescreate complete j2sdk and j2re images
installinstall the generated images locally, ohair@632: typically in /usr/local
cleanremove all files generated by make, ohair@632: but not those generated by configure
dist-cleanremove all files generated by both ohair@632: and configure (basically killing the configuration)
helpgive some help on using make, ohair@632: including some interesting make targets
ohair@276:
ohair@13:
ohair@632: ohair@632: ohair@632:
ohair@632:

Testing

ohair@13:
ohair@632: When the build is completed, you should see the generated ohair@632: binaries and associated files in the j2sdk-image ohair@632: directory in the output directory. ohair@632: In particular, the ohair@632: build/*/images/j2sdk-image/bin ohair@632: directory should contain executables for the ohair@632: OpenJDK tools and utilities for that configuration. ohair@632: The testing tool jtreg will be needed ohair@632: and can be found at: ohair@632: ohair@632: the jtreg site. ohair@632: The provided regression tests in the repositories ohair@632: can be run with the command: ohair@41:
ohair@632: cd test && make PRODUCT_HOME=`pwd`/../build/*/images/j2sdk-image all ohair@276:
robilad@132:
ohair@632: robilad@132: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632:
ohair@632:

Appendix A: Hints and Tips

robilad@132:
ohair@632: ohair@632:

FAQ

ohair@276:
ohair@320: ohair@320:

ohair@632: Q: The configure file looks horrible! ohair@632: How are you going to edit it? ohair@320:
ohair@632: A: The configure file is generated (think ohair@632: "compiled") by the autoconf tools. The source code is ohair@632: in configure.ac various .m4 files in common/autoconf, ohair@632: which are ohair@632: much more readable. ohair@320:

ohair@320: ohair@632:

ohair@632: Q: ohair@632: Why is the configure file checked in, ohair@632: if it is generated? ohair@632:
ohair@632: A: ohair@632: If it was not generated, every user would need to have the autoconf ohair@632: tools installed, and re-generate the configure file ohair@632: as the first step. ohair@632: Our goal is to minimize the work needed to be done by the user ohair@632: to start building OpenJDK, and to minimize ohair@632: the number of external dependencies required. ohair@632:

ohair@632: ohair@632:

ohair@632: Q: ohair@632: Do you require a specific version of autoconf for regenerating ohair@632: configure? ohair@632:
ohair@632: A: ohair@632: Currently, no, but this will likely be the case when things have ohair@632: settled down a bit more. (The reason for this is to avoid ohair@632: large spurious changes in configure ohair@632: in commits that made small changes to configure.ac). ohair@632:

ohair@632: ohair@632:

ohair@632: Q: ohair@632: What are the files in common/makefiles/support/* for? ohair@632: They look like gibberish. ohair@632:
ohair@632: A: ohair@632: They are a somewhat ugly hack to compensate for command line length ohair@632: limitations on certain platforms (Windows, Solaris). ohair@632: Due to a combination of limitations in make and the shell, ohair@632: command lines containing too many files will not work properly. ohair@632: These ohair@632: helper files are part of an elaborate hack that will compress the ohair@632: command line in the makefile and then uncompress it safely. ohair@632: We're ohair@632: not proud of it, but it does fix the problem. ohair@632: If you have any better suggestions, we're all ears! :-) ohair@632:

ohair@632: ohair@632:

ohair@632: Q: ohair@632: I want to see the output of the commands that make runs, ohair@632: like in the old build. How do I do that? ohair@632:
ohair@632: A: ohair@632: You specify the LOG variable to make. There are ohair@632: several log levels: ohair@632:

ohair@320:
ohair@632:
    ohair@320:
  • ohair@632: warn — Default and very quiet. ohair@320:
  • ohair@320:
  • ohair@632: info — Shows more progress information ohair@632: than warn. ohair@320:
  • ohair@320:
  • ohair@632: debug — Echos all command lines and ohair@632: prints all macro calls for compilation definitions. ohair@320:
  • ohair@320:
  • ohair@632: trace — Echos all $(shell) command ohair@632: lines as well. ohair@320:
  • ohair@632:
ohair@320:
ohair@320: ohair@632:

ohair@632: Q: ohair@632: When do I have to re-run configure? ohair@632:
ohair@632: A: ohair@632: Normally you will run configure only once for creating a ohair@632: configuration. ohair@632: You need to re-run configuration only if you want to change any ohair@632: configuration options, ohair@632: or if you pull down changes to the configure script. ohair@632:

ohair@632: ohair@632:

ohair@632: Q: ohair@632: I have added a new source file. Do I need to modify the makefiles? ohair@632:
ohair@632: A: ohair@632: Normally, no. If you want to create e.g. a new native ohair@632: library, ohair@632: you will need to modify the makefiles. But for normal file ohair@632: additions or removals, no changes are needed. There are certan ohair@632: exceptions for some native libraries where the source files are spread erikj@774: over many directories which also contain sources for other ohair@632: libraries. In these cases it was simply easier to create include lists erikj@774: rather than excludes. ohair@632:

ohair@632: ohair@632:

ohair@632: Q: ohair@632: When I run configure --help, I see many strange options, ohair@632: like --dvidir. What is this? ohair@632:
ohair@632: A: ohair@632: Configure provides a slew of options by default, to all projects ohair@632: that use autoconf. Most of them are not used in OpenJDK, ohair@632: so you can safely ignore them. To list only OpenJDK specific features, ohair@632: use configure --help=short instead. ohair@632:

ohair@632: ohair@632:

ohair@632: Q: ohair@632: configure provides OpenJDK-specific features such as erikj@774: --with-builddeps-server that are not erikj@774: described in this document. What about those? ohair@632:
ohair@632: A: ohair@632: Try them out if you like! But be aware that most of these are ohair@632: experimental features. ohair@632: Many of them don't do anything at all at the moment; the option erikj@774: is just a placeholder. Others depend on ohair@632: pieces of code or infrastructure that is currently ohair@632: not ready for prime time. ohair@632:

ohair@632: ohair@632:

ohair@632: Q: ohair@632: How will you make sure you don't break anything? ohair@632:
ohair@632: A: ohair@632: We have a script that compares the result of the new build system ohair@632: with the result of the old. For most part, we aim for (and achieve) ohair@632: byte-by-byte identical output. There are however technical issues ohair@632: with e.g. native binaries, which might differ in a byte-by-byte ohair@632: comparison, even ohair@632: when building twice with the old build system. ohair@632: For these, we compare relevant aspects ohair@632: (e.g. the symbol table and file size). ohair@632: Note that we still don't have 100% ohair@632: equivalence, but we're close. ohair@632:

ohair@632: ohair@632:

ohair@632: Q: ohair@632: I noticed this thing X in the build that looks very broken by design. ohair@632: Why don't you fix it? ohair@632:
ohair@632: A: ohair@632: Our goal is to produce a build output that is as close as ohair@632: technically possible to the old build output. ohair@632: If things were weird in the old build, ohair@632: they will be weird in the new build. ohair@632: Often, things were weird before due to obscurity, ohair@632: but in the new build system the weird stuff comes up to the surface. ohair@632: The plan is to attack these things at a later stage, ohair@632: after the new build system is established. ohair@632:

ohair@632: ohair@632:

ohair@632: Q: ohair@632: The code in the new build system is not that well-structured. ohair@632: Will you fix this? ohair@632:
ohair@632: A: ohair@632: Yes! The new build system has grown bit by bit as we converted ohair@632: the old system. When all of the old build system is converted, ohair@632: we can take a step back and clean up the structure of the new build ohair@632: system. Some of this we plan to do before replacing the old build ohair@632: system and some will need to wait until after. ohair@632:

ohair@632: ohair@632:

ohair@632: Q: ohair@632: Is anything able to use the results of the new build's default make target? ohair@632:
ohair@632: A: ohair@632: Yes, this is the minimal (or roughly minimal) ohair@632: set of compiled output needed for a developer to actually ohair@632: execute the newly built JDK. The idea is that in an incremental ohair@632: development fashion, when doing a normal make, ohair@632: you should only spend time recompiling what's changed ohair@632: (making it purely incremental) and only do the work that's ohair@632: needed to actually run and test your code. ohair@632: The packaging stuff that is part of the images ohair@632: target is not needed for a normal developer who wants to ohair@632: test his new code. Even if it's quite fast, it's still unnecessary. ohair@632: We're targeting sub-second incremental rebuilds! ;-) ohair@632: (Or, well, at least single-digit seconds...) ohair@632:

ohair@632: ohair@632:

ohair@632: Q: ohair@632: I usually set a specific environment variable when building, ohair@632: but I can't find the equivalent in the new build. ohair@632: What should I do? ohair@632:
ohair@632: A: erikj@774: It might very well be that we have neglected to add support for ohair@632: an option that was actually used from outside the build system. erikj@774: Email us and we will add support for it! ohair@632:

ohair@632: ohair@632:
ohair@632: ohair@632:

Build Performance Tips

ohair@632:
ohair@632: ohair@632:

Building OpenJDK requires a lot of horsepower. ohair@632: Some of the build tools can be adjusted to utilize more or less ohair@632: of resources such as ohair@632: parallel threads and memory. ohair@632: The configure script analyzes your system and selects reasonable ohair@632: values for such options based on your hardware. ohair@632: If you encounter resource problems, such as out of memory conditions, ohair@632: you can modify the detected values with:

ohair@632: ohair@632: ohair@632: ohair@632:

It might also be necessary to specify the JVM arguments passed ohair@632: to the Bootstrap JDK, using e.g. ohair@632: --with-boot-jdk-jvmargs="-Xmx8G -enableassertions". ohair@632: Doing this will override the default JVM arguments ohair@632: passed to the Bootstrap JDK.

ohair@632: ohair@632: ohair@632:

One of the top goals of the new build system is to improve the ohair@632: build performance and decrease the time needed to build. This will ohair@632: soon also apply to the java compilation when the Smart Javac wrapper ohair@632: is making its way into jdk8. It can be tried in the build-infra ohair@632: repository already. You are likely to find that the new build system ohair@632: is faster than the old one even without this feature.

ohair@632: ohair@632:

At the end of a successful execution of configure, ohair@632: you will get a performance summary, ohair@632: indicating how well the build will perform. Here you will ohair@632: also get performance hints. ohair@632: If you want to build fast, pay attention to those!

ohair@632: ohair@632:

Building with ccache

ohair@632: ohair@632:

A simple way to radically speed up compilation of native code ohair@632: (typically hotspot and native libraries in JDK) is to install ohair@632: ccache. This will cache and reuse prior compilation results, if the ohair@632: source code is unchanged. However, ccache versions prior to 3.1.4 ohair@632: does not work correctly with the precompiled headers used in ohair@632: OpenJDK. So if your platform supports ccache at 3.1.4 or later, we ohair@632: highly recommend installing it. This is currently only supported on ohair@632: linux.

ohair@632: ohair@632:

Building on local disk

ohair@632: ohair@632:

If you are using network shares, e.g. via NFS, for your source code, ohair@632: make sure the build directory is situated on local disk. ohair@632: The performance ohair@632: penalty is extremely high for building on a network share, ohair@632: close to unusable.

ohair@632: ohair@632:

Building only one JVM

ohair@632: ohair@632:

The old build builds multiple JVMs on 32-bit systems (client and ohair@632: server; and on Windows kernel as well). In the new build we have ohair@632: changed this default to only build server when it's available. This ohair@632: improves build times for those not interested in multiple JVMs. To ohair@632: mimic the old behavior on platforms that support it, ohair@632: use --with-jvm-variants=client,server.

ohair@632: ohair@632:

Selecting the number of cores to build on

ohair@632: ohair@632:

By default, configure will analyze your machine and run the make ohair@632: process in parallel with as many threads as you have cores. This ohair@632: behavior can be overridden, either "permanently" (on a configure ohair@632: basis) using --with-num-cores=N or for a single build ohair@632: only (on a make basis), using make JOBS=N.

ohair@632: ohair@632:

If you want to make a slower build just this time, to save some CPU ohair@632: power for other processes, you can run ohair@632: e.g. make JOBS=2. This will force the makefiles ohair@632: to only run 2 parallel processes, or even make JOBS=1 ohair@632: which will disable parallelism.

ohair@632: ohair@632:

If you want to have it the other way round, namely having slow ohair@632: builds default and override with fast if you're ohair@632: impatient, you should call configure with ohair@632: --with-num-cores=2, making 2 the default. ohair@632: If you want to run with more ohair@632: cores, run make JOBS=8

ohair@632: ohair@632:
ohair@632: ohair@632:

Troubleshooting

ohair@632:
ohair@632: ohair@632:

Solving build problems

ohair@632: ohair@320:
ohair@632: If the build fails (and it's not due to a compilation error in ohair@632: a source file you've changed), the first thing you should do ohair@632: is to re-run the build with more verbosity. ohair@632: Do this by adding LOG=debug to your make command line. ohair@632:
ohair@632: The build log (with both stdout and stderr intermingled, ohair@632: basically the same as you see on your console) can be found as ohair@632: build.log in your build directory. ohair@632:
ohair@632: You can ask for help on build problems with the new build system ohair@632: on either the ohair@632: ohair@632: build-dev ohair@632: or the ohair@632: ohair@632: build-infra-dev ohair@632: mailing lists. Please include the relevant parts ohair@632: of the build log. ohair@632:
ohair@632: A build can fail for any number of reasons. ohair@632: Most failures ohair@632: are a result of trying to build in an environment in which all the ohair@632: pre-build requirements have not been met. ohair@632: The first step in ohair@632: troubleshooting a build failure is to recheck that you have satisfied ohair@632: all the pre-build requirements for your platform. ohair@632: Scanning the configure log is a good first step, making ohair@632: sure that what it found makes sense for your system. ohair@632: Look for strange error messages or any difficulties that ohair@632: configure had in finding things. ohair@632:
ohair@632: Some of the more common problems with builds are briefly ohair@632: described ohair@632: below, with suggestions for remedies. ohair@632:
    ohair@632:
  • ohair@632: Corrupted Bundles on Windows: ohair@632:
    ohair@632: Some virus scanning software has been known to ohair@632: corrupt the ohair@632: downloading of zip bundles. ohair@632: It may be necessary to disable the 'on access' or ohair@632: 'real time' ohair@632: virus scanning features to prevent this corruption. ohair@632: This type of "real time" virus scanning can also ohair@632: slow down the ohair@632: build process significantly. ohair@632: Temporarily disabling the feature, or excluding the build ohair@632: output directory may be necessary to get correct and ohair@632: faster builds. ohair@632:
    ohair@632:
  • ohair@632:
  • ohair@632: Slow Builds: ohair@632:
    ohair@632: If your build machine seems to be overloaded from too many ohair@632: simultaneous C++ compiles, try setting the ohair@632: JOBS=1 on the make command line. ohair@632: Then try increasing the count slowly to an acceptable ohair@632: level for your system. Also: ohair@632:
    ohair@632: Creating the javadocs can be very slow, ohair@632: if you are running ohair@632: javadoc, consider skipping that step. ohair@632:
    ohair@632: Faster CPUs, more RAM, and a faster DISK usually helps. ohair@632: The VM build tends to be CPU intensive ohair@632: (many C++ compiles), ohair@632: and the rest of the JDK will often be disk intensive. ohair@632:
    ohair@632: Faster compiles are possible using a tool called ohair@632: ccache. ohair@632:
    ohair@632:
    ohair@632:
  • ohair@632:
  • ohair@632: File time issues: ohair@632:
    ohair@632: If you see warnings that refer to file time stamps, e.g. ohair@632:
    ohair@632: Warning message: ohair@632: File `xxx' has modification time in ohair@632: the future. ohair@632:
    ohair@632: Warning message: Clock skew detected. ohair@632: Your build may ohair@632: be incomplete. ohair@632:
    ohair@632: These warnings can occur when the clock on the build ohair@632: machine is out of ohair@632: sync with the timestamps on the source files. ohair@632: Other errors, apparently ohair@632: unrelated but in fact caused by the clock skew, ohair@632: can occur along with ohair@632: the clock skew warnings. ohair@632: These secondary errors may tend to obscure the ohair@632: fact that the true root cause of the problem ohair@632: is an out-of-sync clock. ohair@632:

    ohair@632: If you see these warnings, reset the clock on the ohair@632: build ohair@632: machine, run "gmake clobber" ohair@632: or delete the directory ohair@632: containing the build output, and restart the ohair@632: build from the beginning. ohair@632:

    ohair@632:
  • ohair@632:
  • ohair@632: Error message: ohair@632: Trouble writing out table to disk ohair@632:
    ohair@632: Increase the amount of swap space on your build machine. ohair@632: This could be caused by overloading the system and ohair@632: it may be necessary to use: ohair@632:
    ohair@632: make JOBS=1 ohair@632:
    ohair@632: to reduce the load on the system. ohair@632:
    ohair@632:
  • ohair@632:
  • ohair@632: Error Message: ohair@632: libstdc++ not found: ohair@632:
    ohair@632: This is caused by a missing libstdc++.a library. ohair@632: This is installed as part of a specific package ohair@632: (e.g. libstdc++.so.devel.386). ohair@632: By default some 64-bit Linux versions (e.g. Fedora) ohair@632: only install the 64-bit version of the libstdc++ package. ohair@632: Various parts of the JDK build require a static ohair@632: link of the C++ runtime libraries to allow for maximum ohair@632: portability of the built images. ohair@632:
    ohair@632:
  • ohair@632:
  • ohair@632: Linux Error Message: ohair@632: cannot restore segment prot after reloc ohair@632:
    ohair@632: This is probably an issue with SELinux (See ohair@632: ohair@632: http://en.wikipedia.org/wiki/SELinux). ohair@632: Parts of the VM is built without the -fPIC for ohair@632: performance reasons. ohair@632:

    ohair@632: To completely disable SELinux: ohair@632:

      ohair@632:
    1. $ su root
    2. ohair@632:
    3. # system-config-securitylevel
    4. ohair@632:
    5. In the window that appears, select the SELinux tab
    6. ohair@632:
    7. Disable SELinux
    8. ohair@632:
    ohair@632:

    ohair@632: Alternatively, instead of completely disabling it you could ohair@632: disable just this one check. ohair@632:

      ohair@632:
    1. Select System->Administration->SELinux Management
    2. ohair@632:
    3. In the SELinux Management Tool which appears, ohair@632: select "Boolean" from the menu on the left
    4. ohair@632:
    5. Expand the "Memory Protection" group
    6. ohair@632:
    7. Check the first item, labeled ohair@632: "Allow all unconfined executables to use ohair@632: libraries requiring text relocation ..."
    8. ohair@632:
    ohair@632:
    ohair@632:
  • ohair@632:
  • ohair@632: Windows Error Messages: ohair@632:
    ohair@632: *** fatal error - couldn't allocate heap, ... ohair@632:
    ohair@632: rm fails with "Directory not empty" ohair@632:
    ohair@632: unzip fails with "cannot create ... Permission denied" ohair@632:
    ohair@632: unzip fails with "cannot create ... Error 50" ohair@632:
    ohair@632:
    ohair@632: The CYGWIN software can conflict with other non-CYGWIN ohair@632: software. See the CYGWIN FAQ section on ohair@632: ohair@632: BLODA (applications that interfere with CYGWIN). ohair@632:
    ohair@632:
  • ohair@632:
  • ohair@632: Windows Error Message: spawn failed ohair@632:
    ohair@632: Try rebooting the system, or there could be some kind of ohair@632: issue with the disk or disk partition being used. ohair@632: Sometimes it comes with a "Permission Denied" message. ohair@632:
    ohair@632:
  • ohair@632:
ohair@320:
ohair@632: ohair@632:
ohair@632: ohair@632:
ohair@632: ohair@632: ohair@13:
ohair@632:

Appendix B: GNU make

ohair@13:
ohair@632: ohair@13: The Makefiles in the OpenJDK are only valid when used with the ohair@632: GNU version of the utility command make ohair@632: (usually called gmake on Solaris). ohair@13: A few notes about using GNU make: ohair@13: ohair@13:

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

ohair@632: ohair@632:

Building GNU make

ohair@320:
ohair@632: First step is to get the GNU make 3.81 or newer source from ohair@320: ohair@320: ftp.gnu.org/pub/gnu/make/. ohair@632: Building is a little different depending on the OS but is ohair@632: basically done with: ohair@13:
ohair@632: bash ./configure ohair@632:
ohair@632: make ewendeli@433:
ohair@13:
ohair@632: ohair@632:
ohair@632: ohair@632: ohair@632:
ohair@632:

Appendix C: Build Environments

ohair@632:
ohair@632: ohair@632:

Minimum Build Environments

ohair@13:
ohair@632: This file often describes specific requirements for what we ohair@632: call the ohair@632: "minimum build environments" (MBE) for this ohair@632: specific release of the JDK. ohair@632: What is listed below is what the Oracle Release ohair@632: Engineering Team will use to build the Oracle JDK product. ohair@632: Building with the MBE will hopefully generate the most compatible ohair@632: bits that install on, and run correctly on, the most variations ohair@632: of the same base OS and hardware architecture. ohair@632: In some cases, these represent what is often called the ohair@632: least common denominator, but each Operating System has different ohair@632: aspects to it. ohair@632:

ohair@632: In all cases, the Bootstrap JDK version minimum is critical, ohair@632: we cannot guarantee builds will work with older Bootstrap JDK's. ohair@632: Also in all cases, more RAM and more processors is better, ohair@632: the minimums listed below are simply recommendations. ohair@632:

ohair@632: With Solaris and Mac OS X, the version listed below is the ohair@632: oldest release we can guarantee builds and works, and the ohair@632: specific version of the compilers used could be critical. ohair@632:

ohair@632: With Windows the critical aspect is the Visual Studio compiler ohair@632: used, which due to it's runtime, generally dictates what Windows ohair@632: systems can do the builds and where the resulting bits can ohair@632: be used.
ohair@632: NOTE: We expect a change here off these older Windows OS releases ohair@632: and to a 'less older' one, probably Windows 2008R2 X64. ohair@632:

ohair@632: With Linux, it was just a matter of picking a ohair@632: stable distribution that is a good representative for Linux ohair@632: in general.
ohair@632: NOTE: We expect a change here from Fedora 9 to something else, ohair@632: but it has not been completely determined yet, possibly ohair@632: Ubuntu 12.04 X64, unbiased community feedback would be welcome on ohair@632: what a good choice would be here. ohair@632:

ohair@632: It is understood that most developers will NOT be using these ohair@632: specific versions, and in fact creating these specific versions ohair@632: may be difficult due to the age of some of this software. ohair@632: It is expected that developers are more often using the more ohair@632: recent releases and distributions of these operating systems. ohair@632:

ohair@632: Compilation problems with newer or different C/C++ compilers is a ohair@632: common problem. ohair@632: Similarly, compilation problems related to changes to the ohair@632: /usr/include or system header files is also a ohair@632: common problem with older, newer, or unreleased OS versions. ohair@632: Please report these types of problems as bugs so that they ohair@632: can be dealt with accordingly. ohair@632:

ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632:
Base OS and ArchitectureOSC/C++ CompilerBootstrap JDKProcessorsRAM MinimumDISK Needs
Linux X86 (32-bit) and X64 (64-bit)Fedora 9gcc 4.3 JDK 7u72 or more1 GB6 GB
Solaris SPARC (32-bit) and SPARCV9 (64-bit)Solaris 10 Update 6Studio 12 Update 1 + patchesJDK 7u74 or more4 GB8 GB
Solaris X86 (32-bit) and X64 (64-bit)Solaris 10 Update 6Studio 12 Update 1 + patchesJDK 7u74 or more4 GB8 GB
Windows X86 (32-bit)Windows XPMicrosoft Visual Studio C++ 2010 Professional EditionJDK 7u72 or more2 GB6 GB
Windows X64 (64-bit)Windows Server 2003 - Enterprise x64 EditionMicrosoft Visual Studio C++ 2010 Professional EditionJDK 7u72 or more2 GB6 GB
Mac OS X X64 (64-bit)Mac OS X 10.7 "Lion"XCode 4.5.2 or newerJDK 7u72 or more4 GB6 GB
ohair@13:
ohair@632: ohair@632: ohair@632:
ohair@632:

Specific Developer Build Environments

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

ohair@632: NOTE: The community can help out by updating ohair@632: this part of the document. ohair@632: ohair@632: ohair@632:

Fedora

ohair@632:
ohair@632: After installing the latest ohair@632: Fedora ohair@632: you need to install several build dependencies. ohair@632: The simplest way to do it is to execute the ohair@632: following commands as user root: ohair@632:
ohair@632: yum-builddep java-1.7.0-openjdk ohair@632:
ohair@632: yum install gcc gcc-c++ ohair@632:
ohair@632:

ohair@632: In addition, it's necessary to set a few environment ohair@632: variables for the build: ohair@632:

ohair@632: export LANG=C ohair@632:
ohair@632: export PATH="/usr/lib/jvm/java-openjdk/bin:${PATH}" ohair@632:
ohair@632:
ohair@632: ohair@632: ohair@632:

CentOS 5.5

ohair@632:
ohair@632: After installing ohair@632: CentOS 5.5 ohair@632: you need to make sure you have ohair@632: the following Development bundles installed: ohair@632:
ohair@632:
    ohair@632:
  • Development Libraries
  • ohair@632:
  • Development Tools
  • ohair@632:
  • Java Development
  • ohair@632:
  • X Software Development (Including XFree86-devel)
  • ohair@632:
ohair@632:
ohair@632:

ohair@632: Plus the following packages: ohair@632:

ohair@632:
    ohair@632:
  • cups devel: Cups Development Package
  • ohair@632:
  • alsa devel: Alsa Development Package
  • ohair@632:
  • Xi devel: libXi.so Development Package
  • ohair@632:
ohair@632:
ohair@632:

ohair@632: The freetype 2.3 packages don't seem to be available, ohair@632: but the freetype 2.3 sources can be downloaded, built, ohair@632: and installed easily enough from ohair@632: ohair@632: the freetype site. ohair@632: Build and install with something like: ohair@632:

ohair@632: bash ./configure ohair@632:
ohair@632: make ohair@632:
ohair@632: sudo -u root make install ohair@632:
ohair@632:

ohair@632: Mercurial packages could not be found easily, but a Google ohair@632: search should find ones, and they usually include Python if ohair@632: it's needed. ohair@632:

ohair@632: ohair@632:

Debian 5.0 (Lenny)

ohair@632:
ohair@632: After installing Debian 5 ohair@632: you need to install several build dependencies. ohair@632: The simplest way to install the build dependencies is to ohair@632: execute the following commands as user root: ohair@632:
ohair@632: aptitude build-dep openjdk-7 ohair@632:
ohair@632: aptitude install openjdk-7-jdk libmotif-dev ohair@632:
ohair@632:

ohair@632: In addition, it's necessary to set a few environment ohair@632: variables for the build: ohair@632:

ohair@632: export LANG=C ohair@632:
ohair@632: export PATH="/usr/lib/jvm/java-7-openjdk/bin:${PATH}" ohair@632:
ohair@632:
ohair@632: ohair@632:

Ubuntu 12.04

ohair@632:
ohair@632: After installing Ubuntu 12.04 ohair@632: you need to install several build dependencies. The simplest ohair@632: way to do it is to execute the following commands: ohair@632:
ohair@632: sudo aptitude build-dep openjdk-7 ohair@632:
ohair@632: sudo aptitude install openjdk-7-jdk ohair@632:
ohair@632:

ohair@632: In addition, it's necessary to set a few environment ohair@632: variables for the build: ohair@632:

ohair@632: export LANG=C ohair@632:
ohair@632: export PATH="/usr/lib/jvm/java-7-openjdk/bin:${PATH}" ohair@632:
ohair@632:
ohair@632: ohair@632:

OpenSUSE 11.1

ohair@632:
ohair@632: After installing OpenSUSE 11.1 ohair@632: you need to install several build dependencies. ohair@632: The simplest way to install the build dependencies is to ohair@632: execute the following commands: ohair@632:
ohair@632: sudo zypper source-install -d java-1_7_0-openjdk ohair@632:
ohair@632: sudo zypper install make ohair@632:
ohair@632:

ohair@632: In addition, it is necessary to set a few environment ohair@632: variables for the build: ohair@632:

ohair@632: export LANG=C ohair@632:
ohair@632: export PATH="/usr/lib/jvm/java-1.7.0-openjdk/bin:$[PATH}" ohair@632:
ohair@632:

ohair@632: Finally, you need to unset the JAVA_HOME ohair@632: environment variable: ohair@632:

ohair@632: export -n JAVA_HOME ohair@632:
ohair@632:
ohair@632: ohair@632:

Mandriva Linux One 2009 Spring

ohair@632:
ohair@632: After installing Mandriva ohair@632: Linux One 2009 Spring ohair@632: you need to install several build dependencies. ohair@632: The simplest way to install the build dependencies is to ohair@632: execute the following commands as user root: ohair@632:
ohair@632: urpmi java-1.7.0-openjdk-devel make gcc gcc-c++ ohair@632: freetype-devel zip unzip libcups2-devel libxrender1-devel ohair@632: libalsa2-devel libstc++-static-devel libxtst6-devel ohair@632: libxi-devel ohair@632:
ohair@632:

ohair@632: In addition, it is necessary to set a few environment ohair@632: variables for the build: ohair@632:

ohair@632: export LANG=C ohair@632:
ohair@632: export PATH="/usr/lib/jvm/java-1.7.0-openjdk/bin:${PATH}" ohair@632:
ohair@632:
ohair@632: ohair@632:

OpenSolaris 2009.06

ohair@632:
ohair@632: After installing OpenSolaris 2009.06 ohair@632: you need to install several build dependencies. ohair@632: The simplest way to install the build dependencies is to ohair@632: execute the following commands: ohair@632:
ohair@632: pfexec pkg install SUNWgmake SUNWj7dev ohair@632: sunstudioexpress SUNWcups SUNWzip SUNWunzip SUNWxwhl ohair@632: SUNWxorg-headers SUNWaudh SUNWfreetype2 ohair@632:
ohair@632:

ohair@632: In addition, it is necessary to set a few environment ohair@632: variables for the build: ohair@632:

ohair@632: export LANG=C ohair@632:
ohair@632: export PATH="/opt/SunStudioExpress/bin:${PATH}" ohair@632:
ohair@632:
ohair@632: ohair@13:
ohair@632: ohair@632:
ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@632: ohair@13:
ohair@632:

End of OpenJDK README-builds.html document.
Please come again! ohair@13:


ohair@632: ohair@13: ohair@13: