diff --git a/doc/building.html b/doc/building.html index 84d2aa3ace2..ef2ad2260ce 100644 --- a/doc/building.html +++ b/doc/building.html @@ -41,18 +41,18 @@
The OpenJDK sources are maintained with the revision control system Mercurial. If you are new to Mercurial, please see the Beginner Guides or refer to the Mercurial Book. The first few chapters of the book provide an excellent overview of Mercurial, what it is and how it works.
-For using Mercurial with the OpenJDK refer to the Developer Guide: Installing and Configuring Mercurial section for more information.
+The OpenJDK sources are maintained with the revision control system Git.
To get the entire set of OpenJDK Mercurial repositories use the script get_source.sh
located in the root repository:
hg clone http://hg.openjdk.java.net/jdk8/jdk8 YourOpenJDK
- cd YourOpenJDK
- bash ./get_source.sh
-Once you have all the repositories, keep in mind that each repository is its own independent repository. You can also re-run ./get_source.sh
anytime to pull over all the latest changesets in all the repositories. This set of nested repositories has been given the term “forest” and there are various ways to apply the same hg
command to each of the repositories. For example, the script make/scripts/hgforest.sh
can be used to repeat the same hg
command on every repository, e.g.
cd YourOpenJDK
- bash ./make/scripts/hgforest.sh status
-The set of repositories and what they contain:
+ git clone https://github.com/openjdk/jdk8u.git
+The set of directories and what they contain:
build/
directory..hgignore
file in each repository must exist and should include ^build/
, ^dist/
and optionally any nbproject/private
directories. It should NEVER include anything in the src/
or test/
or any managed directory area of a repository..gitignore
file must exist and should include /build/
, /dist/
and optionally any nbproject/private
directories. It should NEVER include anything in the src/
or test/
or any managed directory area of a repository.javah
output). There are some exceptions to this rule, in particular with some of the generated configure scripts.The very first step in building the OpenJDK is making sure the system itself has everything it needs to do OpenJDK builds. Once a system is setup, it generally doesn’t need to be done again.
Building the OpenJDK is now done with running a configure
script which will try and find and verify you have everything you need, followed by running make
, e.g.
-+-
bash ./configure
-make all
bash ./configure
+make all
Where possible the configure
script will attempt to located the various components in the default locations or via component specific variable settings. When the normal defaults fail or components cannot be found, additional configure
options may be necessary to help configure
find the necessary tools for the build, or you may need to re-visit the setup of your system due to missing software packages.
NOTE: The configure
script file does not have execute permissions and will need to be explicitly run with bash
, see the source guidelines.
And for specific systems:
Linux
-Install all the software development packages needed including alsa, freetype, cups, and xrender. See specific system packages.
Install all the software development packages needed including alsa, freetype, cups, and xrender. See specific system packages.
Solaris
-Install all the software development packages needed including Studio Compilers, freetype, cups, and xrender. See specific system packages.
Install all the software development packages needed including Studio Compilers, freetype, cups, and xrender. See specific system packages.
Windows
Mac OS X
Install XCode 4.5.2 and also install the “Command line tools” found under the preferences pane “Downloads”
The Oracle Solaris Studio Express compilers at: Oracle Solaris Studio Express Download site are also an option, although these compilers have not been extensively used yet.
Building on Windows requires a Unix-like environment, notably a Unix-like shell. There are several such environments available of which Cygwin and MinGW/MSYS are currently supported for the OpenJDK build. One of the differences of these systems from standard Windows tools is the way 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.
+Building on Windows requires a Unix-like environment, notably a Unix-like shell. There are several such environments available of which Cygwin and MinGW/MSYS are currently supported for the OpenJDK build. One of the differences of these systems from standard Windows tools is the way 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.
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 although internally it maps drive letters <drive>:
to a virtual directory /cygdrive/<drive>
.
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 use “:”). With CYGWIN, it uses “:”, but that means that paths like “C:/path” 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.
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 use “:”). With CYGWIN, it uses “:”, but that means that paths like “C:/path” 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.
The OpenJDK build requires CYGWIN version 1.7.16 or newer. Information about CYGWIN can be obtained from the CYGWIN website at www.cygwin.com.
By default CYGWIN doesn’t install all the tools required for building the OpenJDK. Along with the default installation, you need to install the following tools.
Binary Name | -Category | -Package | -Description | +Binary Name | +Category | +Package | +Description |
---|---|---|---|---|---|---|---|
ar.exe | -Devel | -binutils | -The GNU assembler, linker and binary utilities | +ar.exe | +Devel | +binutils | +The GNU assembler, linker and binary utilities |
make.exe | -Devel | -make | -The GNU version of the ‘make’ utility built for CYGWIN | +make.exe | +Devel | +make | +The GNU version of the ‘make’ utility built for CYGWIN |
m4.exe | -Interpreters | -m4 | -GNU implementation of the traditional Unix macro processor | +m4.exe | +Interpreters | +m4 | +GNU implementation of the traditional Unix macro processor |
cpio.exe | -Utils | -cpio | -A program to manage archives of files | +cpio.exe | +Utils | +cpio | +A program to manage archives of files |
gawk.exe | -Utils | -awk | -Pattern-directed scanning and processing language | +gawk.exe | +Utils | +awk | +Pattern-directed scanning and processing language |
file.exe | -Utils | -file | -Determines file type using ‘magic’ numbers | +file.exe | +Utils | +file | +Determines file type using ‘magic’ numbers |
zip.exe | -Archive | -zip | -Package and compress (archive) files | +zip.exe | +Archive | +zip | +Package and compress (archive) files |
unzip.exe | -Archive | -unzip | -Extract compressed files in a ZIP archive | +unzip.exe | +Archive | +unzip | +Extract compressed files in a ZIP archive |
free.exe | -System | -procps | -Display amount of free and used memory in the system | +free.exe | +System | +procps | +Display amount of free and used memory in the system |
Note that the CYGWIN software can conflict with other non-CYGWIN software on your Windows system. CYGWIN provides a FAQ for known issues and problems, of particular interest is the section on BLODA (applications that interfere with CYGWIN).
+Note that the CYGWIN software can conflict with other non-CYGWIN software on your Windows system. CYGWIN provides a FAQ for known issues and problems, of particular interest is the section on BLODA (applications that interfere with CYGWIN).
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 rely on traditional UNIX tools to be present. Among others this includes tools like bash
and make
. See MinGW/MSYS for more information.
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 /nologo /I
) because MSYS may wrongly replace such parameters by drive letters.
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 rely on traditional UNIX tools to be present. Among others this includes tools like bash
and make
. See MinGW/MSYS for more information.
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 /nologo /I
) because MSYS may wrongly replace such parameters by drive letters.
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
@@ -264,178 +261,107 @@ The basic invocation of the configure
script looks like:
-+-
bash ./configure [options]
bash ./configure [options]
This will create an output directory containing the “configuration” and setup an area for the build result. This directory typically looks like:
----
build/linux-x64-normal-server-release
configure
will try to figure out what system you are running on and where all necessary build components are. If you have all prerequisites for building installed, it should find everything. If it fails to detect any component automatically, it will exit and inform you about the problem. When this happens, read more below in the configure
options.
build/linux-x64-normal-server-release
+configure
will try to figure out what system you are running on and where all necessary build components are. If you have all prerequisites for building installed, it should find everything. If it fails to detect any component automatically, it will exit and inform you about the problem. When this happens, read more below in the configure
options.
Some examples:
---Windows 32bit build with freetype specified:
-
-bash ./configure --with-freetype=/cygdrive/c/freetype-i586 --with-target-bits=32
-+Debug 64bit Build:
-
-bash ./configure --enable-debug --with-target-bits=64
Windows 32bit build with freetype specified:
+bash ./configure --with-freetype=/cygdrive/c/freetype-i586 --with-target-bits=32
Debug 64bit Build:
+bash ./configure --enable-debug --with-target-bits=64
Complete details on all the OpenJDK configure
options can be seen with:
-+-
bash ./configure --help=short
bash ./configure --help=short
Use -help
to see all the configure
options available. You can generate any number of different configurations, e.g. debug, release, 32, 64, etc.
Some of the more commonly used configure
options are:
-+-
--enable-debug
-set the debug level to fastdebug (this is a shorthand for--with-debug-level=fastdebug
)
--enable-debug
--with-debug-level=fastdebug
)--
--with-alsa=
_path_
++
-
--with-alsa=<path>
select the location of the Advanced Linux Sound Architecture (ALSA)
--Version 0.9.1 or newer of the ALSA files are required for building the OpenJDK on Linux. These Linux files are usually available from an “alsa” of “libasound” development package, and it’s highly recommended that you try and use the package provided by the particular version of Linux that you are using.
-
---
--with-boot-jdk=
_path_
-select the Bootstrap JDK
---
--with-boot-jdk-jvmargs=
“args”
-provide the JVM options to be used to run the Bootstrap JDK
--
--with-cacerts=
_path_
+Version 0.9.1 or newer of the ALSA files are required for building the OpenJDK on Linux. These Linux files are usually available from an “alsa” of “libasound” development package, and it’s highly recommended that you try and use the package provided by the particular version of Linux that you are using.
++
--with-boot-jdk=<path>
+select the Bootstrap JDK+
--with-boot-jdk-jvmargs=<args>
+provide the JVM options to be used to run the Bootstrap JDK-
--with-cacerts=<path>
select the path to the cacerts file.
-+See Certificate Authority on Wikipedia for a better understanding of the Certificate Authority (CA). A certificates file named “cacerts” represents a system-wide keystore with CA certificates. In JDK and JRE binary bundles, the “cacerts” file contains root CA certificates from several public CAs (e.g., VeriSign, Thawte, and Baltimore). The source contain a cacerts file without CA root certificates. Formal JDK builders will need to secure permission from each public CA and include the certificates into their own custom cacerts file. Failure to provide a populated cacerts file will result in verification errors of a certificate chain during runtime. By default an empty cacerts file is provided and that should be fine for most JDK developers.
-
See Certificate Authority on Wikipedia for a better understanding of the Certificate Authority (CA). A certificates file named “cacerts” represents a system-wide keystore with CA certificates. In JDK and JRE binary bundles, the “cacerts” file contains root CA certificates from several public CAs (e.g., VeriSign, Thawte, and Baltimore). The source contain a cacerts file without CA root certificates. Formal JDK builders will need to secure permission from each public CA and include the certificates into their own custom cacerts file. Failure to provide a populated cacerts file will result in verification errors of a certificate chain during runtime. By default an empty cacerts file is provided and that should be fine for most JDK developers.
+ ---
--with-cups=
_path_
++
-
--with-cups=<path>
select the CUPS install location
--The Common UNIX Printing System (CUPS) Headers are required for building the OpenJDK on Solaris and Linux. The Solaris header files can be obtained by installing the package SFWcups from the Solaris Software Companion CD/DVD, these often will be installed into the directory
-/opt/sfw/cups
.
--The CUPS header files can always be downloaded from www.cups.org.
-
---
--with-cups-include=
_path_
-select the CUPS include directory location
---
--with-debug-level=
_level_
-select the debug information level of release, fastdebug, or slowdebug
-+-
--with-dev-kit=
_path_
-select location of the compiler install or developer install location
The Common UNIX Printing System (CUPS) Headers are required for building the OpenJDK on Solaris and Linux. The Solaris header files can be obtained by installing the package SFWcups from the Solaris Software Companion CD/DVD, these often will be installed into the directory /opt/sfw/cups
. The CUPS header files can always be downloaded from www.cups.org.
--with-cups-include=<path>
+select the CUPS include directory location
--with-debug-level=<level>
+select the debug information level of release, fastdebug, or slowdebug
--with-dev-kit=<path>
+select location of the compiler install or developer install location
--
--with-freetype=
_path_
++
-
--with-freetype=<path>
select the freetype files to use.
-Expecting the freetype libraries under
-lib/
and the headers underinclude/
.
-Version 2.3 or newer of FreeType is required. On Unix systems required files can be available as part of your distribution (while you still may need to upgrade them). Note that you need development version of package that includes both the FreeType library and header files.
-
-You can always download latest FreeType version from the FreeType website. Building the freetype 2 libraries from scratch is also possible, however on Windows refer to the Windows FreeType DLL build instructions.
-
--Note that by default FreeType is built with byte code hinting support disabled due to licensing restrictions. In this case, text appearance and metrics are expected to differ from Sun’s official JDK build. See the SourceForge FreeType2 Home Page for more information.
-
---
--with-import-hotspot=
_path_
-select the location to find hotspot binaries from a previous build to avoid building hotspot
---
--with-target-bits=
_arg_
-select 32 or 64 bit build
---
--with-jvm-variants=
_variants_
-select the JVM variants to build from, comma separated list that can include: server, client, kernel, zero and zeroshark
---
--with-memory-size=
_size_
-select the RAM size that GNU make will think this system has
--
--with-msvcr-dll=
_path_
+Note that by default FreeType is built with byte code hinting support disabled due to licensing restrictions. In this case, text appearance and metrics are expected to differ from Sun’s official JDK build. See the SourceForge FreeType2 Home Page for more information.
++
--with-import-hotspot=<path>
+select the location to find hotspot binaries from a previous build to avoid building hotspot+
--with-target-bits=<bits>
+select 32 or 64 bit build+
--with-jvm-variants=<variants>
+select the JVM variants to build from, comma separated list that can include: server, client, kernel, zero and zeroshark+
--with-memory-size=<size>
+select the RAM size that GNU make will think this system has-
--with-msvcr-dll=<path>
select themsvcr100.dll
file to include in the Windows builds (C/C++ runtime library for Visual Studio).
--This is usually picked up automatically from the redist directories of Visual Studio 2010.
-
-+-
--with-num-cores=
_cores_
-select the number of cores to use (processor count or CPU count)
This is usually picked up automatically from the redist directories of Visual Studio 2010.
+--with-num-cores=<cores>
+select the number of cores to use (processor count or CPU count)
--
--with-x=
_path_
++
-
--with-x=<path>
select the location of the X11 and xrender files.
-+The XRender Extension Headers are required for building the OpenJDK on Solaris and Linux. The Linux header files are usually available from a “Xrender” development package, it’s recommended that you try and use the package provided by the particular distribution of Linux that you are using. The Solaris XRender header files 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
or/usr/openwin/share/include/X11/extensions/Xrender.h
The XRender Extension Headers are required for building the OpenJDK on Solaris and Linux. The Linux header files are usually available from a “Xrender” development package, it’s recommended that you try and use the package provided by the particular distribution of Linux that you are using. The Solaris XRender header files 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
or /usr/openwin/share/include/X11/extensions/Xrender.h
The basic invocation of the make
utility looks like:
-+-
make all
make all
This will start the build to the output directory containing the “configuration” that was created by the configure
script. Run make help
for more information on the available targets.
There are some of the make targets that are of general interest:
---empty
-
-build everything but no images
---
all
-build everything including images
---
all-conf
-build all configurations
---
images
-create complete j2sdk and j2re images
---
install
-install the generated images locally, typically in/usr/local
---
clean
-remove all files generated by make, but not those generated byconfigure
---
dist-clean
-remove all files generated by both andconfigure
(basically killing the configuration)
-+-
help
-give some help on usingmake
, including some interesting make targets
empty
+build everything but no images
all
+build everything including images
all-conf
+build all configurations
images
+create complete j2sdk and j2re images
install
+install the generated images locally, typically in /usr/local
clean
+remove all files generated by make, but not those generated by configure
dist-clean
+remove all files generated by both and configure
(basically killing the configuration)
help
+give some help on using make
, including some interesting make targets
When the build is completed, you should see the generated binaries and associated files in the j2sdk-image
directory in the output directory. In particular, the build/*/images/j2sdk-image/bin
directory should contain executables for the OpenJDK tools and utilities for that configuration. The testing tool jtreg
will be needed and can be found at: the jtreg site. The provided regression tests in the repositories can be run with the command:
-+-
cd test && make PRODUCT_HOME=`pwd`/../build/*/images/j2sdk-image all
cd test && make PRODUCT_HOME=`pwd`/../build/*/images/j2sdk-image all
Q: Do you require a specific version of autoconf for regenerating generated-configure.sh
?
A: Yes, version 2.69 is required and should be easy enough to aquire on all supported operating systems. The reason for this is to avoid large spurious changes in generated-configure.sh
.
Q: How do you regenerate generated-configure.sh
after making changes to the input files?
-A: Regnerating generated-configure.sh
should always be done using the script common/autoconf/autogen.sh
to ensure that the correct files get updated. This script should also be run after mercurial tries to merge generated-configure.sh
as a merge of the generated file is not guaranteed to be correct.
generated-configure.sh
should always be done using the script common/autoconf/autogen.sh
to ensure that the correct files get updated. This script should also be run after git tries to merge generated-configure.sh
as a merge of the generated file is not guaranteed to be correct.
Q: What are the files in common/makefiles/support/*
for? They look like gibberish.
A: They are a somewhat ugly hack to compensate for command line length limitations on certain platforms (Windows, Solaris). Due to a combination of limitations in make and the shell, command lines containing too many files will not work properly. These helper files are part of an elaborate hack that will compress the command line in the makefile and then uncompress it safely. We’re not proud of it, but it does fix the problem. If you have any better suggestions, we’re all ears! :-)
Q: I want to see the output of the commands that make runs, like in the old build. How do I do that?
@@ -511,17 +437,15 @@
Faster compiles are possible using a tool called ccache.
File time issues:
If you see warnings that refer to file time stamps, e.g.
-+Warning message:
-File 'xxx' has modification time in the future.
-Warning message:Clock skew detected. Your build may be incomplete.
File 'xxx' has modification time in the future.
Clock skew detected. Your build may be incomplete.
These warnings can occur when the clock on the build machine is out of sync with the timestamps on the source files. Other errors, apparently unrelated but in fact caused by the clock skew, can occur along with the clock skew warnings. These secondary errors may tend to obscure the fact that the true root cause of the problem is an out-of-sync clock.
If you see these warnings, reset the clock on the build machine, run “gmake clobber
” or delete the directory containing the build output, and restart the build from the beginning.
Error message: Trouble writing out table to disk
Increase the amount of swap space on your build machine. This could be caused by overloading the system and it may be necessary to use:
-+-
make JOBS=1
make JOBS=1
to reduce the load on the system.
Error Message: libstdc++ not found
:
This is caused by a missing libstdc++.a library. This is installed as part of a specific package (e.g. libstdc++.so.devel.386). By default some 64-bit Linux versions (e.g. Fedora) only install the 64-bit version of the libstdc++ package. Various parts of the JDK build require a static link of the C++ runtime libraries to allow for maximum portability of the built images.
rm fails with "Directory not empty"
unzip fails with "cannot create ... Permission denied"
unzip fails with "cannot create ... Error 50"
-The CYGWIN software can conflict with other non-CYGWIN software. See the CYGWIN FAQ section on BLODA (applications that interfere with CYGWIN).
+The CYGWIN software can conflict with other non-CYGWIN software. See the CYGWIN FAQ section on BLODA (applications that interfere with CYGWIN).
Windows Error Message: spawn failed
Try rebooting the system, or there could be some kind of issue with the disk or disk partition being used. Sometimes it comes with a “Permission Denied” message.
The Makefiles in the OpenJDK are only valid when used with the GNU version of the utility command make
(usually called gmake
on Solaris). A few notes about using GNU make:
PATH
./usr/bin/make
on Solaris. If your Solaris system has the software from the Solaris Developer Companion CD installed, you should try and use gmake
which will be located in either the /usr/bin
, /opt/sfw/bin
or /usr/sfw/bin
directory.It is understood that most developers will NOT be using these specific versions, and in fact creating these specific versions may be difficult due to the age of some of this software. It is expected that developers are more often using the more recent releases and distributions of these operating systems.
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 older, newer, or unreleased OS versions. Please report these types of problems as bugs so that they can be dealt with accordingly.
Bootstrap JDK: JDK 7u7
-Base OS and Architecture | -OS | -C/C++ Compiler | -Processors | -RAM Minimum | -DISK Needs | +Base OS and Architecture | +OS | +C/C++ Compiler | +Processors | +RAM Minimum | +DISK Needs |
---|---|---|---|---|---|---|---|---|---|---|---|
Linux X86 (32-bit) and X64 (64-bit) | -Fedora 9 | -gcc 4.3 | -2 or more | -1 GB | -6 GB | +Linux X86 (32-bit) and X64 (64-bit) | +Fedora 9 | +gcc 4.3 | +2 or more | +1 GB | +6 GB |
Solaris SPARC (32-bit) and SPARCV9 (64-bit) | -Solaris 10 Update 6 | -Studio 12 Update 1 + patches | -4 or more | -4 GB | -8 GB | +Solaris SPARC (32-bit) and SPARCV9 (64-bit) | +Solaris 10 Update 6 | +Studio 12 Update 1 + patches | +4 or more | +4 GB | +8 GB |
Solaris X86 (32-bit) and X64 (64-bit) | -Solaris 10 Update 6 | -Studio 12 Update 1 + patches | -4 or more | -4 GB | -8 GB | +Solaris X86 (32-bit) and X64 (64-bit) | +Solaris 10 Update 6 | +Studio 12 Update 1 + patches | +4 or more | +4 GB | +8 GB |
Windows X86 (32-bit) | -Windows XP | -Microsoft Visual Studio C++ 2010 Professional Edition | -2 or more | -2 GB | -6 GB | +Windows X86 (32-bit) | +Windows XP | +Microsoft Visual Studio C++ 2010 Professional Edition | +2 or more | +2 GB | +6 GB |
Windows X64 (64-bit) | -Windows Server 2003 - Enterprise x64 Edition | -Microsoft Visual Studio C++ 2010 Professional Edition | -2 or more | -2 GB | -6 GB | +Windows X64 (64-bit) | +Windows Server 2003 - Enterprise x64 Edition | +Microsoft Visual Studio C++ 2010 Professional Edition | +2 or more | +2 GB | +6 GB |
Mac OS X X64 (64-bit) | -Mac OS X 10.7 “Lion” | -XCode 4.5.2 or newer | -2 or more | -4 GB | -6 GB | +Mac OS X X64 (64-bit) | +Mac OS X 10.7 “Lion” | +XCode 4.5.2 or newer | +2 or more | +4 GB | +6 GB |
export LANG=C
export PATH="/usr/lib/jvm/java-7-openjdk/bin:${PATH}"
After installing Ubuntu 12.04 you need to install several build dependencies. The simplest way to do it is to execute the following commands:
+After installing Ubuntu 12.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-7
sudo aptitude install openjdk-7-jdk
In addition, it’s necessary to set a few environment variables for the build:
@@ -694,7 +626,7 @@Finally, you need to unset the JAVA_HOME
environment variable:
export -n JAVA_HOME`
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.7.0-openjdk-devel make gcc gcc-c++ freetype-devel zip unzip
libcups2-devel libxrender1-devel libalsa2-devel libstc++-static-devel
libxtst6-devel libxi-devel
@@ -702,7 +634,7 @@ export LANG=C
export PATH="/usr/lib/jvm/java-1.7.0-openjdk/bin:${PATH}"
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 SUNWj7dev sunstudioexpress SUNWcups SUNWzip
SUNWunzip SUNWxwhl SUNWxorg-headers SUNWaudh SUNWfreetype2
In addition, it is necessary to set a few environment variables for the build:
diff --git a/doc/building.md b/doc/building.md index 460e4d12668..566130ca3bb 100644 --- a/doc/building.md +++ b/doc/building.md @@ -32,14 +32,14 @@ Some Headlines: ## Contents * [Introduction](#introduction) - * [Use of Mercurial](#hg) - * [Getting the Source](#get_source) - * [Repositories](#repositories) + * [Source code](#source-code) + * [Getting the Source](#getting-the-source) + * [Directories](#directories) * [Building](#building) - * [System Setup](#setup) + * [System Setup](#system-setup) * [Linux](#linux) * [Solaris](#solaris) - * [Mac OS X](#macosx) + * [Mac OS X](#mac-os-x) * [Windows](#windows) * [Configure](#configure) * [Make](#make) @@ -47,52 +47,27 @@ Some Headlines: ------------------------------------------------------------------------------- - * [Appendix A: Hints and Tips](#hints) + * [Appendix A: Hints and Tips](#appendix-a-hints-and-tips) * [FAQ](#faq) - * [Build Performance Tips](#performance) + * [Build Performance Tips](#build-performance-tips) * [Troubleshooting](#troubleshooting) - * [Appendix B: GNU Make Information](#gmake) - * [Appendix C: Build Environments](#buildenvironments) + * [Appendix B: GNU Make Information](#appendix-b-gnu-make) + * [Appendix C: Build Environments](#appendix-c-build-environments) ------------------------------------------------------------------------------- -## Use of Mercurial +## Source code The OpenJDK sources are maintained with the revision control system -[Mercurial](http://mercurial.selenic.com/wiki/Mercurial). If you are new to -Mercurial, please see the [Beginner -Guides](http://mercurial.selenic.com/wiki/BeginnersGuides) or refer to the -[Mercurial Book](http://hgbook.red-bean.com/). The first few chapters of the -book provide an excellent overview of Mercurial, what it is and how it works. - -For using Mercurial with the OpenJDK refer to the [Developer Guide: Installing -and Configuring -Mercurial](http://openjdk.java.net/guide/repositories.html#installConfig) -section for more information. +[Git](https://git-scm.com/). ### Getting the Source -To get the entire set of OpenJDK Mercurial repositories use the script -`get_source.sh` located in the root repository: - - hg clone http://hg.openjdk.java.net/jdk8/jdk8 YourOpenJDK - cd YourOpenJDK - bash ./get_source.sh - -Once you have all the repositories, keep in mind that each repository is its -own independent repository. You can also re-run `./get_source.sh` anytime to -pull over all the latest changesets in all the repositories. This set of nested -repositories has been given the term "forest" and there are various ways to -apply the same `hg` command to each of the repositories. For example, the -script `make/scripts/hgforest.sh` can be used to repeat the same `hg` command -on every repository, e.g. + git clone https://github.com/openjdk/jdk8u.git - cd YourOpenJDK - bash ./make/scripts/hgforest.sh status +### Directories -### Repositories - -The set of repositories and what they contain: +The set of directories and what they contain: * **. (root)** contains common configure and makefile logic * **hotspot** contains source code and make files for building the OpenJDK @@ -120,8 +95,8 @@ There are some very basic guidelines: * The default build process should be to build the product and nothing else, in one form, e.g. a product (optimized), debug (non-optimized, -g plus assert logic), or fastdebug (optimized, -g plus assert logic). - * The `.hgignore` file in each repository must exist and should include - `^build/`, `^dist/` and optionally any `nbproject/private` directories. **It + * The `.gitignore` file must exist and should include + `/build/`, `/dist/` and optionally any `nbproject/private` directories. **It should NEVER** include anything in the `src/` or `test/` or any managed directory area of a repository. * Directory names and file names should never contain blanks or non-printing @@ -144,8 +119,10 @@ Building the OpenJDK is now done with running a `configure` script which will try and find and verify you have everything you need, followed by running `make`, e.g. -> **`bash ./configure`** \ -> **`make all`** +``` +bash ./configure +make all +``` Where possible the `configure` script will attempt to located the various components in the default locations or via component specific variable @@ -196,18 +173,18 @@ And for specific systems: Install all the software development packages needed including [alsa](#alsa), [freetype](#freetype), [cups](#cups), and - [xrender](#xrender). See [specific system packages](#SDBE). + [xrender](#xrender). See [specific system packages](#specific-developer-build-environments). * **Solaris** Install all the software development packages needed including [Studio - Compilers](#studio), [freetype](#freetype), [cups](#cups), and - [xrender](#xrender). See [specific system packages](#SDBE). + Compilers](#studio-compilers), [freetype](#freetype), [cups](#cups), and + [xrender](#xrender). See [specific system packages](#specific-developer-build-environments). * **Windows** - * Install one of [CYGWIN](#cygwin) or [MinGW/MSYS](#msys) - * Install [Visual Studio 2010](#vs2010) + * Install one of [CYGWIN](#cygwin) or [MinGW/MSYS](#mingwmsys) + * Install [Visual Studio 2010](#visual-studio-2010-compilers) * **Mac OS X** @@ -278,7 +255,8 @@ yet. Building on Windows requires a Unix-like environment, notably a Unix-like shell. There are several such environments available of which [Cygwin](http://www.cygwin.com/) and -[MinGW/MSYS](http://www.mingw.org/wiki/MSYS) are currently supported for the +[MinGW/MSYS](https://web.archive.org/web/20201127230203/http://www.mingw.org/wiki/MSYS) +are currently supported for the OpenJDK build. One of the differences of these systems from standard Windows tools is the way they handle Windows path names, particularly path names which contain spaces, backslashes as path separators and possibly drive letters. @@ -301,7 +279,7 @@ backslash character into the `C:/` style of pathname (called 'mixed'), e.g. `cygpath -s -m "