< prev index next >

doc/building.md

Print this page

        

*** 5,21 **** If you are eager to try out building OpenJDK, these simple steps works most of the time. They assume that you have installed Mercurial (and Cygwin if running on Windows) and cloned the top-level OpenJDK repository that you want to build. 1. [Get the complete source code](#getting-the-source-code): \ ! `hg clone http://hg.openjdk.java.net/jdk10/master` 2. [Run configure](#running-configure): \ `bash configure` If `configure` fails due to missing dependencies (to either the ! [toolchain](#native-compiler-toolchain-requirements), [external libraries]( #external-library-requirements) or the [boot JDK](#boot-jdk-requirements)), most of the time it prints a suggestion on how to resolve the situation on your platform. Follow the instructions, and try running `bash configure` again. --- 5,22 ---- If you are eager to try out building OpenJDK, these simple steps works most of the time. They assume that you have installed Mercurial (and Cygwin if running on Windows) and cloned the top-level OpenJDK repository that you want to build. 1. [Get the complete source code](#getting-the-source-code): \ ! `hg clone http://hg.openjdk.java.net/jdk/jdk` 2. [Run configure](#running-configure): \ `bash configure` If `configure` fails due to missing dependencies (to either the ! [toolchain](#native-compiler-toolchain-requirements), [build tools]( ! #build-tools-requirements), [external libraries]( #external-library-requirements) or the [boot JDK](#boot-jdk-requirements)), most of the time it prints a suggestion on how to resolve the situation on your platform. Follow the instructions, and try running `bash configure` again.
*** 193,209 **** 4.0. Apart from the basic Cygwin installation, the following packages must also be installed: * `make` * `zip` * `unzip` Often, you can install these packages using the following command line: ``` ! <path to Cygwin setup>/setup-x86_64 -q -P make -P unzip -P zip ``` Unfortunately, Cygwin can be unreliable in certain circumstances. If you experience build tool crashes or strange issues when building on Windows, please check the Cygwin FAQ on the ["BLODA" list]( --- 194,211 ---- 4.0. Apart from the basic Cygwin installation, the following packages must also be installed: + * `autoconf` * `make` * `zip` * `unzip` Often, you can install these packages using the following command line: ``` ! <path to Cygwin setup>/setup-x86_64 -q -P autoconf -P make -P unzip -P zip ``` Unfortunately, Cygwin can be unreliable in certain circumstances. If you experience build tool crashes or strange issues when building on Windows, please check the Cygwin FAQ on the ["BLODA" list](
*** 550,560 **** libffi-devel`. Use `--with-libffi=<path>` if `configure` does not properly locate your libffi files. ! ## Other Tooling Requirements ### GNU Make OpenJDK requires [GNU Make](http://www.gnu.org/software/make). No other flavors of make are supported. --- 552,582 ---- libffi-devel`. Use `--with-libffi=<path>` if `configure` does not properly locate your libffi files. ! ## Build Tools Requirements ! ! ### Autoconf ! ! OpenJDK requires [Autoconf](http://www.gnu.org/software/autoconf) on all ! platforms. At least version 2.69 is required. ! ! * To install on an apt-based Linux, try running `sudo apt-get install ! autoconf`. ! * To install on an rpm-based Linux, try running `sudo yum install ! autoconf`. ! * To install on macOS, try running `brew install autoconf`. ! * To install on Windows, try running `<path to Cygwin setup>/setup-x86_64 -q ! -P autoconf`. ! ! If `configure` has problems locating your installation of autoconf, you can ! specify it using the `AUTOCONF` environment variable, like this: ! ! ``` ! AUTOCONF=<path to autoconf> configure ... ! ``` ### GNU Make OpenJDK requires [GNU Make](http://www.gnu.org/software/make). No other flavors of make are supported.
*** 583,605 **** OpenJDK requires [GNU Bash](http://www.gnu.org/software/bash). No other shells are supported. At least version 3.2 of GNU Bash must be used. - ### Autoconf - - If you want to modify the build system itself, you need to install [Autoconf]( - http://www.gnu.org/software/autoconf). - - However, if you only need to build OpenJDK or if you only edit the actual - OpenJDK source files, there is no dependency on autoconf, since the source - distribution includes a pre-generated `configure` shell script. - - See the section on [Autoconf Details](#autoconf-details) for details on how - OpenJDK uses autoconf. This is especially important if you plan to contribute - changes to OpenJDK that modifies the build system. - ## Running Configure To build OpenJDK, you need a "configuration", which consists of a directory where to store the build output, coupled with information about the platform, the specific build machine, and choices that affect how OpenJDK is built. --- 605,614 ----
*** 1658,1693 **** The `configure` script is based on the autoconf framework, but in some details deviate from a normal autoconf `configure` script. The `configure` script in the top level directory of OpenJDK is just a thin ! wrapper that calls `make/autoconf/configure`. This in turn provides ! functionality that is not easily expressed in the normal Autoconf framework, ! and then calls into the core of the `configure` script, which is the ! `make/autoconf/generated-configure.sh` file. ! ! As the name implies, this file is generated by Autoconf. It is checked in after ! regeneration, to alleviate the common user to have to install Autoconf. The build system will detect if the Autoconf source files have changed, and ! will trigger a regeneration of `make/autoconf/generated-configure.sh` if ! needed. You can also manually request such an update by `bash ! make/autoconf/autogen.sh`. ! ! If you make changes to the build system that requires a re-generation, note the ! following: ! ! * You must use *exactly* version 2.69 of autoconf for your patch to be ! accepted. This is to avoid spurious changes in the generated file. Note ! that Ubuntu 16.04 ships a patched version of autoconf which claims to be ! 2.69, but is not. ! ! * You do not need to include the generated file in reviews. ! ! * If the generated file needs updating, the Oracle JDK closed counter-part ! will also need to be updated. It is very much appreciated if you ask for an ! Oracle engineer to sponsor your push so this can be made in tandem. ### Developing the Build System Itself This section contains a few remarks about how to develop for the build system itself. It is not relevant if you are only making changes in the product source --- 1667,1689 ---- The `configure` script is based on the autoconf framework, but in some details deviate from a normal autoconf `configure` script. The `configure` script in the top level directory of OpenJDK is just a thin ! wrapper that calls `make/autoconf/configure`. This in turn will run `autoconf` ! to create the runnable (generated) configure script, as ! `.build/generated-configure.sh`. Apart from being responsible for the ! generation of the runnable script, the `configure` script also provides ! functionality that is not easily expressed in the normal Autoconf framework. As ! part of this functionality, the generated script is called. The build system will detect if the Autoconf source files have changed, and ! will trigger a regeneration of the generated script if needed. You can also ! manually request such an update by `bash configure autogen`. ! ! In previous versions of the OpenJDK, the generated script was checked in at ! `make/autoconf/generated-configure.sh`. This is no longer the case. ### Developing the Build System Itself This section contains a few remarks about how to develop for the build system itself. It is not relevant if you are only making changes in the product source
*** 1734,1745 **** To analyze build performance, run with `LOG=trace` and check `$BUILD/build-trace-time.log`. Use `JOBS=1` to avoid parallelism. Please check that you adhere to the [Code Conventions for the Build System]( http://openjdk.java.net/groups/build/doc/code-conventions.html) before ! submitting patches. Also see the section in [Autoconf Details]( ! #autoconf-details) about the generated configure script. ## Contributing to OpenJDK So, now you've build your OpenJDK, and made your first patch, and want to contribute it back to the OpenJDK community. --- 1730,1740 ---- To analyze build performance, run with `LOG=trace` and check `$BUILD/build-trace-time.log`. Use `JOBS=1` to avoid parallelism. Please check that you adhere to the [Code Conventions for the Build System]( http://openjdk.java.net/groups/build/doc/code-conventions.html) before ! submitting patches. ## Contributing to OpenJDK So, now you've build your OpenJDK, and made your first patch, and want to contribute it back to the OpenJDK community.
< prev index next >