--- old/./README-builds.html 2012-03-08 18:26:47.098714752 +0100 +++ new/./README-builds.html 2012-03-08 18:26:47.028717979 +0100 @@ -95,7 +95,8 @@
  • Windows only:
  • @@ -159,7 +160,7 @@
    This file often describes specific requirements for what we call the "minimum build environments" (MBE) for this - specific release of the JDK, + specific release of the JDK, Building with the MBE will generate the most compatible bits that install on, and run correctly on, the most variations of the same base OS and hardware architecture. @@ -233,16 +234,16 @@

    - These same sources do indeed build on many more systems than the - above older generation systems, again the above is just a minimum. + These same sources do indeed build on many more systems than the + above older generation systems, again the above is just a minimum.

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


    @@ -258,15 +259,15 @@

    After installing Fedora 9 - you need to install several build dependencies. The simplest - way to do it is to execute the following commands as user + you need to install several build dependencies. The simplest + way to do it is to execute the following commands as user root:

    yum-builddep java-1.6.0-openjdk

    yum install gcc gcc-c++

    - In addition, it's necessary to set a few environment variables for the build: + In addition, it's necessary to set a few environment variables for the build:

    export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk @@ -275,15 +276,15 @@

    After installing Fedora 10 - you need to install several build dependencies. The simplest - way to do it is to execute the following commands as user + you need to install several build dependencies. The simplest + way to do it is to execute the following commands as user root:

    yum-builddep java-1.6.0-openjdk

    yum install gcc gcc-c++

    - In addition, it's necessary to set a few environment variables for the build: + In addition, it's necessary to set a few environment variables for the build:

    export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk @@ -292,15 +293,15 @@

    After installing Fedora 11 - you need to install several build dependencies. The simplest - way to do it is to execute the following commands as user + you need to install several build dependencies. The simplest + way to do it is to execute the following commands as user root:

    yum-builddep java-1.6.0-openjdk

    yum install gcc gcc-c++

    - In addition, it's necessary to set a few environment variables for the build: + In addition, it's necessary to set a few environment variables for the build:

    export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk @@ -352,16 +353,16 @@

    Debian 5.0 (Lenny)

    - After installing Debian 5 - you need to install several build dependencies. - The simplest way to install the build dependencies is to - execute the following commands as user root: + After installing Debian 5 + you need to install several build dependencies. + The simplest way to install the build dependencies is to + execute the following commands as user root:

    aptitude build-dep openjdk-6

    aptitude install openjdk-6-jdk libmotif-dev

    - In addition, it's necessary to set a few environment variables for the build: + In addition, it's necessary to set a few environment variables for the build:

    export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk

    @@ -372,52 +373,52 @@

    Ubuntu 8.04

    - After installing Ubuntu 8.04 - you need to install several build dependencies. + After installing Ubuntu 8.04 + you need to install several build dependencies.

    - First, you need to enable the universe repository in the - Software Sources application and reload the repository - information. The Software Sources application is available - under the System/Administration menu. + First, you need to enable the universe repository in the + Software Sources application and reload the repository + information. The Software Sources application is available + under the System/Administration menu.

    - The simplest way to install the build dependencies is to - execute the following commands: + The simplest way to install the build dependencies is to + execute the following commands:

    sudo aptitude build-dep openjdk-6

    sudo aptitude install openjdk-6-jdk

    - In addition, it's necessary to set a few environment variables for the build: + In addition, it's necessary to set a few environment variables for the build:

    export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk

    Ubuntu 8.10

    - After installing Ubuntu 8.10 - you need to install several build dependencies. The simplest - way to do it is to execute the following commands: + After installing Ubuntu 8.10 + you need to install several build dependencies. The simplest + way to do it is to execute the following commands:

    sudo aptitude build-dep openjdk-6

    sudo aptitude install openjdk-6-jdk

    - In addition, it's necessary to set a few environment variables for the build: + In addition, it's necessary to set a few environment variables for the build:

    export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk

    Ubuntu 9.04

    - After installing Ubuntu 9.04 - you need to install several build dependencies. The simplest - way to do it is to execute the following commands: + After installing Ubuntu 9.04 + you need to install several build dependencies. The simplest + way to do it is to execute the following commands:

    sudo aptitude build-dep openjdk-6

    sudo aptitude install openjdk-6-jdk

    - In addition, it's necessary to set a few environment variables for the build: + In addition, it's necessary to set a few environment variables for the build:

    export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk

    @@ -428,20 +429,20 @@

    OpenSUSE 11.1

    - After installing OpenSUSE 11.1 - you need to install several build dependencies. - The simplest way to install the build dependencies is to - execute the following commands: + After installing OpenSUSE 11.1 + you need to install several build dependencies. + The simplest way to install the build dependencies is to + execute the following commands:

    sudo zypper source-install -d java-1_6_0-openjdk

    sudo zypper install make

    - In addition, it is necessary to set a few environment variables for the build: + In addition, it is necessary to set a few environment variables for the build:

    export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-1.6.0-openjdk

    - Finally, you need to unset the JAVA_HOME environment variable: + Finally, you need to unset the JAVA_HOME environment variable:

    export -n JAVA_HOME

    @@ -452,14 +453,14 @@

    Mandriva Linux One 2009 Spring

    - After installing Mandriva Linux One 2009 Spring - you need to install several build dependencies. - The simplest way to install the build dependencies is to - execute the following commands as user root: + After installing Mandriva Linux One 2009 Spring + you need to install several build dependencies. + The simplest way to install the build dependencies is to + execute the following commands as user root:

    urpmi java-1.6.0-openjdk-devel ant make gcc gcc-c++ freetype-devel zip unzip libcups2-devel libxrender1-devel libalsa2-devel libstc++-static-devel libxtst6-devel libxi-devel

    - In addition, it is necessary to set a few environment variables for the build: + In addition, it is necessary to set a few environment variables for the build:

    export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-1.6.0-openjdk

    @@ -470,18 +471,18 @@

    OpenSolaris 2009.06

    - After installing OpenSolaris 2009.06 - you need to install several build dependencies. - The simplest way to install the build dependencies is to - execute the following commands: + After installing OpenSolaris 2009.06 + you need to install several build dependencies. + The simplest way to install the build dependencies is to + execute the following commands:

    pfexec pkg install SUNWgmake SUNWj6dev SUNWant sunstudioexpress SUNWcups SUNWzip SUNWunzip SUNWxwhl SUNWxorg-headers SUNWaudh SUNWfreetype2

    - In addition, it is necessary to set a few environment variables for the build: + In addition, it is necessary to set a few environment variables for the build:

    export LANG=C ALT_COMPILER_PATH=/opt/SunStudioExpress/bin/ ALT_CUPS_HEADERS_PATH=/usr/include/

    - Finally, you need to make sure that the build process can find the Sun Studio compilers: + Finally, you need to make sure that the build process can find the Sun Studio compilers:

    export PATH=$PATH:/opt/SunStudioExpress/bin/

    @@ -679,31 +680,22 @@
  • Windows: - Make sure you start your build inside a bash/sh/ksh shell - and are using a make.exe utility built for that - environment (a cygwin make.exe is not the same - as a make.exe built for something like - MKS). -
    - WARNING: Watch out on some make 3.81 versions, it may - not work due to a lack of support for MS-DOS drive letter paths - like C:/ or C:\. -
    - You may be able to use the information at the - - mozilla developer center - on this topic. -
    - It's hoped that when make 3.82 starts shipping in a future cygwin - release that this MS-DOS path issue will be fixed. -
    - It may be possible to download the version at - - www.cmake.org make.exe. -
    - It might be necessary for you to build your own GNU make 3.81, - see the "Building GNU make" section - in that case. + Make sure you start your build inside a bash/sh/ksh shell and are + using a make.exe utility built for that + environment.
    + MKS builds need + a native Windows version of GNU make + (see Building GNU make).
    + Cygwin builds need + a make version which was specially compiled for the Cygwin environment + (see Building GNU make). WARNING: + the OpenJDK build with the make utility provided by Cygwin will not + work because it does not support drive letters in paths. Make sure that + your version of make will be found before the Cygwins default make by + setting an appropriate PATH environment variable or by removing + Cygwin's make after you built your own make version.
    + MinGW/MSYS builds you can use the default make which + comes with the environment.
  • @@ -719,7 +711,7 @@

    Building GNU make

    - First step is to get the GNU make 3.81 source from + First step is to get the GNU make 3.81 (or newer) source from ftp.gnu.org/pub/gnu/make/. Building is a little different depending on the OS and unix toolset @@ -734,12 +726,24 @@ ./configure && gmake CC=gcc
  • - Windows for CYGWIN: - ./configure && make + Windows for CYGWIN:
    + ./configure
    + Add the line #define HAVE_CYGWIN_SHELL 1 to the end of config.h
    + make
    +
    + This should produce make.exe in the current directory.
  • - Windows for MKS: (CYGWIN is recommended) - ./configure && make -f Makefile.win32 + Windows for MKS:
    + Edit config.h.W32 and uncomment the line #define HAVE_MKS_SHELL 1
    + Set the environment for your native compiler (e.g. by calling:
    + "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /Release /xp /x64) + nmake -f NMakefile.win32 +
    + This should produce WinDebug/make.exe and WinRel/make.exe +
    + If you get the error: NMAKE : fatal error U1045: spawn failed : Permission denied + you have to set the Read & execute permission for the file subproc.bat.
  • @@ -886,23 +890,87 @@

    Windows Paths

    Windows: - Note that GNU make is a historic utility and is based very - heavily on shell scripting, so it does not tolerate the Windows habit + Note that GNU make, the shell and other Unix-tools required during the build + do not tolerate the Windows habit of having spaces in pathnames or the use of the \characters in pathnames. Luckily on most Windows systems, you can use /instead of \, and - there is always a 'short' pathname without spaces for any path that - contains spaces. - Unfortunately, this short pathname can be somewhat dynamic and the - formula is difficult to explain. - You can use cygpath utility to map pathnames with spaces - or the \character into the C:/ style of pathname - (called 'mixed'), e.g. - cygpath -s -m "path". + there is always a short + "8.3" pathname without spaces for any path that contains spaces. + Unfortunately, this short pathname is somewhat dynamic (i.e. dependant on the + other files and directories inside a given directory) and can not be + algorithmicly calculated by only looking at a specific path name.

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

    +

    + Special care has to be taken if native Windows applications + like nmake or cl are called with file arguments processed + by Unix-tools like make or sh! +

    +
    + +

    Windows build environments

    +
    + Building on Windows requires a Unix-like environment, notably a Unix-like shell. + There are several such environments available of which + MKS, + Cygwin and + MinGW/MSYS are currently supported for + the OpenJDK build. One of the differences of these three systems is the way + how they handle Windows path names, particularly path names which contain + spaces, backslashes as path separators and possibly drive letters. Depending + on the use case and the specifics of each environment these path problems can + be solved by a combination of quoting whole paths, translating backslashes to + forward slashes, escaping backslashes with additional backslashes and + translating the path names to their + "8.3" version. +

    + As of this writing (MKS ver. 9.4, Cygwin ver. 1.7.9, MinGW/MSYS 1.0.17), + MKS builds are known to be the fastes Windows builds while MingGW/MSYS + builds are slightly slower (about 10%) than MKS builds and Cygwin builds + require nearly twice the time (about 180%) of MKS builds (e.g. on a + DualCore i7 notebook with 8GB of RAM, HDD and 64-bit Windows 7 operating system + the complete OpenJDK 8 product build takes about 49min with MKS, 54min with + MinGW/MSYS and 88min with Cygwin). +

    +

    + Mixing tools from the different Unix emulation environments is no good + idea and will probably not work! +

    +

    + MKS: is a commercial product which includes + all the Unix utilities which are required to build the OpenJDK except GNU + make. In pre-OpenJDK times it was the only supported build environment on + Windows. The MKS tools support Windows paths with drive letters and + forward slashes as path separator. Paths in environment variables like for + example PATH are separated by semicolon ';'. +

    +

    + Recent versions of MKS provide the dosname utility to convert paths + with spaces to short (8.3) path names,e .g. + dosname -s "path". +

    +

    + If you are using the MKS environment, you need a native Windows version + of Gnu make which you can easily build yourself. +

    +

    + Cygwin: + is an open source, Linux-like environment which tries to emulate + a complete POSIX layer on Windows. It tries to be smart about path names + and can usually handle all kinds of paths if they are correctly quoted + or escaped altough internally it maps drive letters <drive>: + to a virtual directory /cygdrive/<drive>. +

    - Note that use of CYGWIN creates a unique problem with regards to + You can always use the cygpath utility to map pathnames with spaces + or the backslash character into the C:/ style of pathname + (called 'mixed'), e.g. + cygpath -s -m "path". +

    +

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

    +

    + If you are using the Cygwin environment, you need to + compile your own version + of GNU make because the default Cygwin make can not handle drive letters in paths. +

    +

    + MinGW/MSYS: + MinGW ("Minimalist GNU for Windows") is a collection of free Windows + specific header files and import libraries combined with GNU toolsets that + allow one to produce native Windows programs that do not rely on any + 3rd-party C runtime DLLs. MSYS is a supplement to MinGW which allows building + applications and programs which depend on traditional UNIX tools to + be present. Among others this includes tools like bash and make. +

    +

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

    +

    + If you are using the MinGW/MSYS system you can use the default make + version supplied by the environment. +

    Basic Windows Check List

    1. - Install the - CYGWIN product. + Install one of the + CYGWIN, MinGW/MSYS or + MKS environments.
    2. Install the @@ -1059,9 +1160,9 @@ Sun Studio 12 Update 1 Compilers (containing version 5.10 of the C and C++ compilers) is required, - including specific patches. + including specific patches.

      - The Solaris SPARC patch list is: + The Solaris SPARC patch list is:

      • 118683-05: SunOS 5.10: Patch for profiling libraries and assembler @@ -1244,7 +1345,8 @@ The XRender header file is included with the other X11 header files in the package SFWxwinc on new enough versions of Solaris and will be installed in - /usr/X11/include/X11/extensions/Xrender.h + /usr/X11/include/X11/extensions/Xrender.h or + /usr/openwin/share/include/X11/extensions/Xrender.h

        Linux: XRender header files are required for building the @@ -1414,7 +1516,9 @@ Devel make The GNU version of the 'make' utility built for CYGWIN.
        - NOTE: See the GNU make section + NOTE: the Cygwin make can not be used to build the + OpenJDK, you only need it to build your own version of make + (see the GNU make section) m4.exe @@ -1424,12 +1528,6 @@ processor - cpio.exe - Utils - cpio - A program to manage archives of files - - gawk.exe Utils awk @@ -1479,6 +1577,21 @@ So it's important that the Visual Studio paths in PATH preceed the CYGWIN path /usr/bin.

    + Minimalist GNU for Windows (MinGW/MSYS) +
    + Alternatively, the set of unix command tools for the OpenJDK build on + Windows can be supplied by + MinGW/MSYS. +

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

    +
    Microsoft DirectX 9.0 SDK header files and libraries
    Microsoft DirectX 9.0 SDK (Summer 2004) @@ -1739,10 +1852,10 @@
    ALT_OPENWIN_HOME
    - The top-level directory of the libraries and include files for the platform's - graphical programming environment. The default location is platform specific. - For example, on Linux it defaults to /usr/X11R6/. -
    + The top-level directory of the libraries and include files for the platform's + graphical programming environment. The default location is platform specific. + For example, on Linux it defaults to /usr/X11R6/. +
    Windows specific:
    @@ -1750,9 +1863,9 @@
    The location of the Microsoft Windows SDK where some tools will be - located. - The default is whatever WINDOWSSDKDIR is set to - (or WindowsSdkDir) or the path + located. + The default is whatever WINDOWSSDKDIR is set to + (or WindowsSdkDir) or the path
    c:\Program Files\Microsoft SDKs\Windows\v7.0a
    @@ -1781,17 +1894,17 @@ is that ALT_COMPILER_PATH is set to point to the cross-compiler and that any cross-compilation specific flags are passed using EXTRA_CFLAGS. - The ALT_OPENWIN_HOME variable should - also be set to point to the graphical header files (e.g. X11) provided with - the cross-compiler. + The ALT_OPENWIN_HOME variable should + also be set to point to the graphical header files (e.g. X11) provided with + the cross-compiler. When cross-compiling we skip execution of any demos etc that may be built, and also skip binary-file verification.
    EXTRA_CFLAGS
    - Used to pass cross-compilation options to the cross-compiler. + Used to pass cross-compilation options to the cross-compiler. These are added to the CFLAGS and CXXFLAGS variables. -
    +
    USE_ONLY_BOOTDIR_TOOLS
    Used primarily for cross-compilation builds (and always set in that case) @@ -1826,23 +1939,23 @@
    BUILD_HEADLESS_ONLY
    Used when the build environment has no graphical capabilities at all. This - excludes building anything that requires graphical libraries to be available. + excludes building anything that requires graphical libraries to be available.
    JAVASE_EMBEDDED
    - Used to indicate this is a build of the Oracle Java SE Embedded product. - This will enable the directives included in the SE-Embedded specific build - files. + Used to indicate this is a build of the Oracle Java SE Embedded product. + This will enable the directives included in the SE-Embedded specific build + files.
    LIBZIP_CAN_USE_MMAP
    - If set to false, disables the use of mmap by the zip utility. Otherwise, - mmap will be used. + If set to false, disables the use of mmap by the zip utility. Otherwise, + mmap will be used.
    COMPRESS_JARS
    - If set to true, causes certain jar files that would otherwise be built without - compression, to use compression. + If set to true, causes certain jar files that would otherwise be built without + compression, to use compression.