README-builds.md
author mchung
Mon, 19 Dec 2016 14:52:19 -0800
changeset 42773 f32797dd8806
parent 41040 7b919a4497ff
permissions -rw-r--r--
8171478: tools/launcher/modules/patch/systemmodules/PatchSystemModules.java fails due to JDK-8171400 Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
33030
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
     1
![OpenJDK](http://openjdk.java.net/images/openjdk.png)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
     2
# OpenJDK Build README
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
     3
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
     4
*****
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
     5
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
     6
<a name="introduction"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
     7
## Introduction
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
     8
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
     9
This README file contains build instructions for the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    10
[OpenJDK](http://openjdk.java.net). Building the source code for the OpenJDK
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    11
requires a certain degree of technical expertise.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    12
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    13
### !!!!!!!!!!!!!!! THIS IS A MAJOR RE-WRITE of this document. !!!!!!!!!!!!!
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    14
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    15
Some Headlines:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    16
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    17
 * The build is now a "`configure && make`" style build
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    18
 * Any GNU make 3.81 or newer should work, except on Windows where 4.0 or newer
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    19
   is recommended.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    20
 * The build should scale, i.e. more processors should cause the build to be
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    21
   done in less wall-clock time
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    22
 * Nested or recursive make invocations have been significantly reduced,
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    23
   as has the total fork/exec or spawning of sub processes during the build
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    24
 * Windows MKS usage is no longer supported
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    25
 * Windows Visual Studio `vsvars*.bat` and `vcvars*.bat` files are run
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    26
   automatically
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    27
 * Ant is no longer used when building the OpenJDK
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    28
 * Use of ALT_* environment variables for configuring the build is no longer
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    29
   supported
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    30
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    31
*****
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    32
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    33
## Contents
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    34
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    35
  * [Introduction](#introduction)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    36
  * [Use of Mercurial](#hg)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    37
    * [Getting the Source](#get_source)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    38
    * [Repositories](#repositories)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    39
  * [Building](#building)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    40
    * [System Setup](#setup)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    41
      * [Linux](#linux)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    42
      * [Solaris](#solaris)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    43
      * [Mac OS X](#macosx)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    44
      * [Windows](#windows)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    45
    * [Configure](#configure)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    46
    * [Make](#make)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    47
  * [Testing](#testing)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    48
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    49
*****
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    50
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    51
  * [Appendix A: Hints and Tips](#hints)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    52
    * [FAQ](#faq)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    53
    * [Build Performance Tips](#performance)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    54
    * [Troubleshooting](#troubleshooting)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    55
  * [Appendix B: GNU Make Information](#gmake)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    56
  * [Appendix C: Build Environments](#buildenvironments)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    57
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    58
*****
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    59
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    60
<a name="hg"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    61
## Use of Mercurial
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    62
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    63
The OpenJDK sources are maintained with the revision control system
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    64
[Mercurial](http://mercurial.selenic.com/wiki/Mercurial). If you are new to
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    65
Mercurial, please see the [Beginner Guides](http://mercurial.selenic.com/wiki/
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    66
BeginnersGuides) or refer to the [Mercurial Book](http://hgbook.red-bean.com/).
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    67
The first few chapters of the book provide an excellent overview of Mercurial,
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    68
what it is and how it works.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    69
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    70
For using Mercurial with the OpenJDK refer to the [Developer Guide: Installing
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    71
and Configuring Mercurial](http://openjdk.java.net/guide/
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    72
repositories.html#installConfig) section for more information.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    73
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    74
<a name="get_source"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    75
### Getting the Source
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    76
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    77
To get the entire set of OpenJDK Mercurial repositories use the script
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    78
`get_source.sh` located in the root repository:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    79
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    80
      hg clone http://hg.openjdk.java.net/jdk9/jdk9 YourOpenJDK
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    81
      cd YourOpenJDK
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    82
      bash ./get_source.sh
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    83
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    84
Once you have all the repositories, keep in mind that each repository is its
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    85
own independent repository. You can also re-run `./get_source.sh` anytime to
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    86
pull over all the latest changesets in all the repositories. This set of
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    87
nested repositories has been given the term "forest" and there are various
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    88
ways to apply the same `hg` command to each of the repositories. For
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    89
example, the script `make/scripts/hgforest.sh` can be used to repeat the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    90
same `hg` command on every repository, e.g.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    91
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    92
      cd YourOpenJDK
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    93
      bash ./make/scripts/hgforest.sh status
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    94
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    95
<a name="repositories"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    96
### Repositories
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    97
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    98
The set of repositories and what they contain:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
    99
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   100
 * **. (root)** contains common configure and makefile logic
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   101
 * **hotspot** contains source code and make files for building the OpenJDK
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   102
   Hotspot Virtual Machine
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   103
 * **langtools** contains source code for the OpenJDK javac and language tools
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   104
 * **jdk** contains source code and make files for building the OpenJDK runtime
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   105
   libraries and misc files
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   106
 * **jaxp** contains source code for the OpenJDK JAXP functionality
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   107
 * **jaxws** contains source code for the OpenJDK JAX-WS functionality
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   108
 * **corba** contains source code for the OpenJDK Corba functionality
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   109
 * **nashorn** contains source code for the OpenJDK JavaScript implementation
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   110
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   111
### Repository Source Guidelines
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   112
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   113
There are some very basic guidelines:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   114
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   115
 * Use of whitespace in source files (.java, .c, .h, .cpp, and .hpp files) is
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   116
   restricted. No TABs, no trailing whitespace on lines, and files should not
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   117
   terminate in more than one blank line.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   118
 * Files with execute permissions should not be added to the source
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   119
   repositories.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   120
 * All generated files need to be kept isolated from the files maintained or
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   121
   managed by the source control system. The standard area for generated files
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   122
   is the top level `build/` directory.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   123
 * The default build process should be to build the product and nothing else,
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   124
   in one form, e.g. a product (optimized), debug (non-optimized, -g plus
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   125
   assert logic), or fastdebug (optimized, -g plus assert logic).
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   126
 * The `.hgignore` file in each repository must exist and should include
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   127
   `^build/`, `^dist/` and optionally any `nbproject/private` directories. **It
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   128
   should NEVER** include anything in the `src/` or `test/` or any managed
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   129
   directory area of a repository.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   130
 * Directory names and file names should never contain blanks or non-printing
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   131
   characters.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   132
 * Generated source or binary files should NEVER be added to the repository
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   133
   (that includes `javah` output). There are some exceptions to this rule, in
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   134
   particular with some of the generated configure scripts.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   135
 * Files not needed for typical building or testing of the repository should
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   136
   not be added to the repository.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   137
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   138
*****
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   139
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   140
<a name="building"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   141
## Building
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   142
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   143
The very first step in building the OpenJDK is making sure the system itself
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   144
has everything it needs to do OpenJDK builds. Once a system is setup, it
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   145
generally doesn't need to be done again.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   146
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   147
Building the OpenJDK is now done with running a `configure` script which will
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   148
try and find and verify you have everything you need, followed by running
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   149
`make`, e.g.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   150
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   151
>  **`bash ./configure`**  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   152
>  **`make all`**
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   153
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   154
Where possible the `configure` script will attempt to located the various
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   155
components in the default locations or via component specific variable
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   156
settings. When the normal defaults fail or components cannot be found,
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   157
additional `configure` options may be necessary to help `configure` find the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   158
necessary tools for the build, or you may need to re-visit the setup of your
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   159
system due to missing software packages.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   160
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   161
**NOTE:** The `configure` script file does not have execute permissions and
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   162
will need to be explicitly run with `bash`, see the source guidelines.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   163
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   164
*****
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   165
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   166
<a name="setup"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   167
### System Setup
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   168
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   169
Before even attempting to use a system to build the OpenJDK there are some very
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   170
basic system setups needed. For all systems:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   171
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   172
 * Be sure the GNU make utility is version 3.81 (4.0 on windows) or newer, e.g.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   173
   run "`make -version`"
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   174
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   175
   <a name="bootjdk"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   176
 * Install a Bootstrap JDK. All OpenJDK builds require access to a previously
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   177
   released JDK called the _bootstrap JDK_ or _boot JDK._ The general rule is
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   178
   that the bootstrap JDK must be an instance of the previous major release of
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   179
   the JDK. In addition, there may be a requirement to use a release at or
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   180
   beyond a particular update level.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   181
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   182
   **_Building JDK 9 requires JDK 8. JDK 9 developers should not use JDK 9 as
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   183
   the boot JDK, to ensure that JDK 9 dependencies are not introduced into the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   184
   parts of the system that are built with JDK 8._**
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   185
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   186
   The JDK 8 binaries can be downloaded from Oracle's [JDK 8 download
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   187
   site](http://www.oracle.com/technetwork/java/javase/downloads/index.html).
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   188
   For build performance reasons it is very important that this bootstrap JDK
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   189
   be made available on the local disk of the machine doing the build. You
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   190
   should add its `bin` directory to the `PATH` environment variable. If
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   191
   `configure` has any issues finding this JDK, you may need to use the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   192
   `configure` option `--with-boot-jdk`.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   193
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   194
 * Ensure that GNU make, the Bootstrap JDK, and the compilers are all in your
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   195
   PATH environment variable.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   196
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   197
And for specific systems:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   198
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   199
 * **Linux**
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   200
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   201
   Install all the software development packages needed including
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   202
   [alsa](#alsa), [freetype](#freetype), [cups](#cups), and
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   203
   [xrender](#xrender). See [specific system packages](#SDBE).
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   204
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   205
 * **Solaris**
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   206
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   207
   Install all the software development packages needed including [Studio
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   208
   Compilers](#studio), [freetype](#freetype), [cups](#cups), and
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   209
   [xrender](#xrender). See [specific system packages](#SDBE).
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   210
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   211
 * **Windows**
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   212
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   213
   * Install one of [CYGWIN](#cygwin) or [MinGW/MSYS](#msys)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   214
   * Install [Visual Studio 2013](#vs2013)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   215
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   216
 * **Mac OS X**
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   217
34595
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   218
   Install [XCode 6.3](https://developer.apple.com/xcode/)
33030
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   219
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   220
<a name="linux"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   221
#### Linux
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   222
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   223
With Linux, try and favor the system packages over building your own or getting
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   224
packages from other areas. Most Linux builds should be possible with the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   225
system's available packages.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   226
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   227
Note that some Linux systems have a habit of pre-populating your environment
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   228
variables for you, for example `JAVA_HOME` might get pre-defined for you to
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   229
refer to the JDK installed on your Linux system. You will need to unset
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   230
`JAVA_HOME`. It's a good idea to run `env` and verify the environment variables
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   231
you are getting from the default system settings make sense for building the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   232
OpenJDK.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   233
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   234
<a name="solaris"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   235
#### Solaris
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   236
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   237
<a name="studio"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   238
##### Studio Compilers
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   239
34595
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   240
At a minimum, the [Studio 12 Update 4 Compilers](http://www.oracle.com/
33030
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   241
technetwork/server-storage/solarisstudio/downloads/index.htm) (containing
34595
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   242
version 5.13 of the C and C++ compilers) is required, including specific
33030
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   243
patches.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   244
34595
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   245
The Solaris Studio installation should contain at least these packages:
33030
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   246
34595
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   247
>  <table border="1">
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   248
     <thead>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   249
       <tr>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   250
         <td>**Package**</td>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   251
         <td>**Version**</td>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   252
       </tr>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   253
     </thead>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   254
     <tbody>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   255
       <tr>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   256
         <td>developer/solarisstudio-124/backend</td>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   257
         <td>12.4-1.0.6.0</td>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   258
       </tr>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   259
       <tr>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   260
         <td>developer/solarisstudio-124/c++</td>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   261
         <td>12.4-1.0.10.0</td>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   262
       </tr>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   263
       <tr>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   264
         <td>developer/solarisstudio-124/cc</td>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   265
         <td>12.4-1.0.4.0</td>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   266
       </tr>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   267
       <tr>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   268
         <td>developer/solarisstudio-124/library/c++-libs</td>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   269
         <td>12.4-1.0.10.0</td>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   270
       </tr>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   271
       <tr>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   272
         <td>developer/solarisstudio-124/library/math-libs</td>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   273
         <td>12.4-1.0.0.1</td>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   274
       </tr>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   275
       <tr>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   276
         <td>developer/solarisstudio-124/library/studio-gccrt</td>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   277
         <td>12.4-1.0.0.1</td>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   278
       </tr>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   279
       <tr>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   280
         <td>developer/solarisstudio-124/studio-common</td>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   281
         <td>12.4-1.0.0.1</td>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   282
       </tr>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   283
       <tr>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   284
         <td>developer/solarisstudio-124/studio-ja</td>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   285
         <td>12.4-1.0.0.1</td>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   286
       </tr>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   287
       <tr>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   288
         <td>developer/solarisstudio-124/studio-legal</td>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   289
         <td>12.4-1.0.0.1</td>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   290
       </tr>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   291
       <tr>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   292
         <td>developer/solarisstudio-124/studio-zhCN</td>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   293
         <td>12.4-1.0.0.1</td>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   294
       </tr>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   295
     </tbody>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   296
   </table>
33030
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   297
34595
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   298
In particular backend 12.4-1.0.6.0 contains a critical patch for the sparc
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
   299
version.
33030
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   300
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   301
Place the `bin` directory in `PATH`.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   302
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   303
The Oracle Solaris Studio Express compilers at: [Oracle Solaris Studio Express
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   304
Download site](http://www.oracle.com/technetwork/server-storage/solarisstudio/
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   305
downloads/index-jsp-142582.html) are also an option, although these compilers
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   306
have not been extensively used yet.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   307
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   308
<a name="windows"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   309
#### Windows
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   310
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   311
##### Windows Unix Toolkit
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   312
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   313
Building on Windows requires a Unix-like environment, notably a Unix-like
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   314
shell. There are several such environments available of which
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   315
[Cygwin](http://www.cygwin.com/) and
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   316
[MinGW/MSYS](http://www.mingw.org/wiki/MSYS) are currently supported for the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   317
OpenJDK build. One of the differences of these systems from standard Windows
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   318
tools is the way they handle Windows path names, particularly path names which
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   319
contain spaces, backslashes as path separators and possibly drive letters.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   320
Depending on the use case and the specifics of each environment these path
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   321
problems can be solved by a combination of quoting whole paths, translating
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   322
backslashes to forward slashes, escaping backslashes with additional
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   323
backslashes and translating the path names to their ["8.3"
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   324
version](http://en.wikipedia.org/wiki/8.3_filename).
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   325
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   326
<a name="cygwin"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   327
###### CYGWIN
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   328
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   329
CYGWIN is an open source, Linux-like environment which tries to emulate a
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   330
complete POSIX layer on Windows. It tries to be smart about path names and can
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   331
usually handle all kinds of paths if they are correctly quoted or escaped
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   332
although internally it maps drive letters `<drive>:` to a virtual directory
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   333
`/cygdrive/<drive>`.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   334
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   335
You can always use the `cygpath` utility to map pathnames with spaces or the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   336
backslash character into the `C:/` style of pathname (called 'mixed'), e.g.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   337
`cygpath -s -m "<path>"`.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   338
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   339
Note that the use of CYGWIN creates a unique problem with regards to setting
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   340
[`PATH`](#path). Normally on Windows the `PATH` variable contains directories
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   341
separated with the ";" character (Solaris and Linux use ":"). With CYGWIN, it
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   342
uses ":", but that means that paths like "C:/path" cannot be placed in the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   343
CYGWIN version of `PATH` and instead CYGWIN uses something like
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   344
`/cygdrive/c/path` which CYGWIN understands, but only CYGWIN understands.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   345
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   346
The OpenJDK build requires CYGWIN version 1.7.16 or newer. Information about
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   347
CYGWIN can be obtained from the CYGWIN website at
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   348
[www.cygwin.com](http://www.cygwin.com).
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   349
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   350
By default CYGWIN doesn't install all the tools required for building the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   351
OpenJDK. Along with the default installation, you need to install the following
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   352
tools.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   353
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   354
>  <table border="1">
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   355
     <thead>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   356
       <tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   357
         <td>Binary Name</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   358
         <td>Category</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   359
         <td>Package</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   360
         <td>Description</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   361
      </tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   362
     </thead>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   363
     <tbody>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   364
       <tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   365
         <td>ar.exe</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   366
         <td>Devel</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   367
         <td>binutils</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   368
         <td>The GNU assembler, linker and binary utilities</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   369
       </tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   370
       <tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   371
         <td>make.exe</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   372
         <td>Devel</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   373
         <td>make</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   374
         <td>The GNU version of the 'make' utility built for CYGWIN</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   375
       </tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   376
       <tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   377
         <td>m4.exe</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   378
         <td>Interpreters</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   379
         <td>m4</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   380
         <td>GNU implementation of the traditional Unix macro processor</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   381
       </tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   382
       <tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   383
         <td>cpio.exe</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   384
         <td>Utils</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   385
         <td>cpio</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   386
         <td>A program to manage archives of files</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   387
       </tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   388
       <tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   389
         <td>gawk.exe</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   390
         <td>Utils</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   391
         <td>awk</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   392
         <td>Pattern-directed scanning and processing language</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   393
       </tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   394
       <tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   395
         <td>file.exe</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   396
         <td>Utils</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   397
         <td>file</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   398
         <td>Determines file type using 'magic' numbers</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   399
       </tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   400
       <tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   401
         <td>zip.exe</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   402
         <td>Archive</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   403
         <td>zip</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   404
         <td>Package and compress (archive) files</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   405
       </tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   406
       <tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   407
         <td>unzip.exe</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   408
         <td>Archive</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   409
         <td>unzip</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   410
         <td>Extract compressed files in a ZIP archive</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   411
       </tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   412
       <tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   413
         <td>free.exe</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   414
         <td>System</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   415
         <td>procps</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   416
         <td>Display amount of free and used memory in the system</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   417
       </tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   418
     </tbody>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   419
   </table>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   420
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   421
Note that the CYGWIN software can conflict with other non-CYGWIN software on
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   422
your Windows system. CYGWIN provides a [FAQ](http://cygwin.com/faq/
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   423
faq.using.html) for known issues and problems, of particular interest is the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   424
section on [BLODA (applications that interfere with
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   425
CYGWIN)](http://cygwin.com/faq/faq.using.html#faq.using.bloda).
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   426
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   427
<a name="msys"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   428
###### MinGW/MSYS
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   429
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   430
MinGW ("Minimalist GNU for Windows") is a collection of free Windows specific
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   431
header files and import libraries combined with GNU toolsets that allow one to
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   432
produce native Windows programs that do not rely on any 3rd-party C runtime
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   433
DLLs. MSYS is a supplement to MinGW which allows building applications and
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   434
programs which rely on traditional UNIX tools to be present. Among others this
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   435
includes tools like `bash` and `make`. See [MinGW/MSYS](http://www.mingw.org/
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   436
wiki/MSYS) for more information.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   437
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   438
Like Cygwin, MinGW/MSYS can handle different types of path formats. They are
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   439
internally converted to paths with forward slashes and drive letters
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   440
`<drive>:` replaced by a virtual directory `/<drive>`. Additionally, MSYS
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   441
automatically detects binaries compiled for the MSYS environment and feeds them
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   442
with the internal, Unix-style path names. If native Windows applications are
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   443
called from within MSYS programs their path arguments are automatically
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   444
converted back to Windows style path names with drive letters and backslashes
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   445
as path separators. This may cause problems for Windows applications which use
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   446
forward slashes as parameter separator (e.g. `cl /nologo /I`) because MSYS may
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   447
wrongly [replace such parameters by drive letters](http://mingw.org/wiki/
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   448
Posix_path_conversion).
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   449
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   450
In addition to the tools which will be installed by default, you have to
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   451
manually install the `msys-zip` and `msys-unzip` packages. This can be easily
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   452
done with the MinGW command line installer:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   453
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   454
      mingw-get.exe install msys-zip
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   455
      mingw-get.exe install msys-unzip
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   456
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   457
<a name="vs2013"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   458
##### Visual Studio 2013 Compilers
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   459
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   460
The 32-bit and 64-bit OpenJDK Windows build requires Microsoft Visual Studio
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   461
C++ 2013 (VS2013) Professional Edition or Express compiler. The compiler and
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   462
other tools are expected to reside in the location defined by the variable
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   463
`VS120COMNTOOLS` which is set by the Microsoft Visual Studio installer.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   464
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   465
Only the C++ part of VS2013 is needed. Try to let the installation go to the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   466
default install directory. Always reboot your system after installing VS2013.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   467
The system environment variable VS120COMNTOOLS should be set in your
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   468
environment.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   469
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   470
Make sure that TMP and TEMP are also set in the environment and refer to
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   471
Windows paths that exist, like `C:\temp`, not `/tmp`, not `/cygdrive/c/temp`,
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   472
and not `C:/temp`. `C:\temp` is just an example, it is assumed that this area
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   473
is private to the user, so by default after installs you should see a unique
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   474
user path in these variables.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   475
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   476
<a name="macosx"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   477
#### Mac OS X
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   478
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   479
Make sure you get the right XCode version.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   480
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   481
*****
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   482
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   483
<a name="configure"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   484
### Configure
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   485
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   486
The basic invocation of the `configure` script looks like:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   487
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   488
>  **`bash ./configure [options]`**
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   489
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   490
This will create an output directory containing the "configuration" and setup
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   491
an area for the build result. This directory typically looks like:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   492
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   493
>  **`build/linux-x64-normal-server-release`**
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   494
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   495
`configure` will try to figure out what system you are running on and where all
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   496
necessary build components are. If you have all prerequisites for building
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   497
installed, it should find everything. If it fails to detect any component
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   498
automatically, it will exit and inform you about the problem. When this
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   499
happens, read more below in [the `configure` options](#configureoptions).
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   500
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   501
Some examples:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   502
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   503
>  **Windows 32bit build with freetype specified:**  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   504
>  `bash ./configure --with-freetype=/cygdrive/c/freetype-i586 --with-target-
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   505
bits=32`
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   506
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   507
>  **Debug 64bit Build:**  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   508
>  `bash ./configure --enable-debug --with-target-bits=64`
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   509
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   510
<a name="configureoptions"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   511
#### Configure Options
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   512
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   513
Complete details on all the OpenJDK `configure` options can be seen with:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   514
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   515
>  **`bash ./configure --help=short`**
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   516
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   517
Use `-help` to see all the `configure` options available. You can generate any
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   518
number of different configurations, e.g. debug, release, 32, 64, etc.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   519
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   520
Some of the more commonly used `configure` options are:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   521
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   522
>  **`--enable-debug`**  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   523
>  set the debug level to fastdebug (this is a shorthand for `--with-debug-
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   524
   level=fastdebug`)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   525
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   526
<a name="alsa"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   527
>  **`--with-alsa=`**_path_  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   528
>  select the location of the Advanced Linux Sound Architecture (ALSA)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   529
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   530
>  Version 0.9.1 or newer of the ALSA files are required for building the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   531
   OpenJDK on Linux. These Linux files are usually available from an "alsa" of
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   532
   "libasound" development package, and it's highly recommended that you try
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   533
   and use the package provided by the particular version of Linux that you are
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   534
   using.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   535
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   536
>  **`--with-boot-jdk=`**_path_  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   537
>  select the [Bootstrap JDK](#bootjdk)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   538
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   539
>  **`--with-boot-jdk-jvmargs=`**"_args_"  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   540
>  provide the JVM options to be used to run the [Bootstrap JDK](#bootjdk)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   541
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   542
>  **`--with-cacerts=`**_path_  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   543
>  select the path to the cacerts file.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   544
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   545
>  See [Certificate Authority on Wikipedia](http://en.wikipedia.org/wiki/
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   546
   Certificate_Authority) for a better understanding of the Certificate
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   547
   Authority (CA). A certificates file named "cacerts" represents a system-wide
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   548
   keystore with CA certificates. In JDK and JRE binary bundles, the "cacerts"
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   549
   file contains root CA certificates from several public CAs (e.g., VeriSign,
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   550
   Thawte, and Baltimore). The source contain a cacerts file without CA root
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   551
   certificates. Formal JDK builders will need to secure permission from each
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   552
   public CA and include the certificates into their own custom cacerts file.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   553
   Failure to provide a populated cacerts file will result in verification
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   554
   errors of a certificate chain during runtime. By default an empty cacerts
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   555
   file is provided and that should be fine for most JDK developers.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   556
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   557
<a name="cups"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   558
>  **`--with-cups=`**_path_  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   559
>  select the CUPS install location
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   560
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   561
>  The Common UNIX Printing System (CUPS) Headers are required for building the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   562
   OpenJDK on Solaris and Linux. The Solaris header files can be obtained by
41039
54596b00162b 8165163: Solaris11 and onwards provide CUPS by default, references to csw and sfw versions should be removed
alanbur
parents: 34595
diff changeset
   563
   installing the package **print/cups**.
33030
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   564
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   565
>  The CUPS header files can always be downloaded from
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   566
   [www.cups.org](http://www.cups.org).
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   567
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   568
>  **`--with-cups-include=`**_path_  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   569
>  select the CUPS include directory location
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   570
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   571
>  **`--with-debug-level=`**_level_  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   572
>  select the debug information level of release, fastdebug, or slowdebug
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   573
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   574
>  **`--with-dev-kit=`**_path_  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   575
>  select location of the compiler install or developer install location
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   576
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   577
<a name="freetype"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   578
>  **`--with-freetype=`**_path_  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   579
>  select the freetype files to use.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   580
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   581
>  Expecting the freetype libraries under `lib/` and the headers under
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   582
   `include/`.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   583
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   584
>  Version 2.3 or newer of FreeType is required. On Unix systems required files
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   585
   can be available as part of your distribution (while you still may need to
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   586
   upgrade them). Note that you need development version of package that
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   587
   includes both the FreeType library and header files.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   588
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   589
>  You can always download latest FreeType version from the [FreeType
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   590
   website](http://www.freetype.org). Building the freetype 2 libraries from
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   591
   scratch is also possible, however on Windows refer to the [Windows FreeType
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   592
   DLL build instructions](http://freetype.freedesktop.org/wiki/FreeType_DLL).
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   593
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   594
>  Note that by default FreeType is built with byte code hinting support
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   595
   disabled due to licensing restrictions. In this case, text appearance and
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   596
   metrics are expected to differ from Sun's official JDK build. See the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   597
   [SourceForge FreeType2 Home Page](http://freetype.sourceforge.net/freetype2)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   598
   for more information.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   599
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   600
>  **`--with-import-hotspot=`**_path_  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   601
>  select the location to find hotspot binaries from a previous build to avoid
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   602
   building hotspot
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   603
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   604
>  **`--with-target-bits=`**_arg_  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   605
>  select 32 or 64 bit build
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   606
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   607
>  **`--with-jvm-variants=`**_variants_  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   608
>  select the JVM variants to build from, comma separated list that can
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   609
   include: server, client, kernel, zero and zeroshark
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   610
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   611
>  **`--with-memory-size=`**_size_  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   612
>  select the RAM size that GNU make will think this system has
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   613
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   614
>  **`--with-msvcr-dll=`**_path_  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   615
>  select the `msvcr100.dll` file to include in the Windows builds (C/C++
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   616
   runtime library for Visual Studio).
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   617
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   618
>  This is usually picked up automatically from the redist directories of
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   619
   Visual Studio 2013.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   620
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   621
>  **`--with-num-cores=`**_cores_  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   622
>  select the number of cores to use (processor count or CPU count)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   623
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   624
<a name="xrender"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   625
>  **`--with-x=`**_path_  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   626
>  select the location of the X11 and xrender files.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   627
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   628
>  The XRender Extension Headers are required for building the OpenJDK on
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   629
   Solaris and Linux. The Linux header files are usually available from a
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   630
   "Xrender" development package, it's recommended that you try and use the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   631
   package provided by the particular distribution of Linux that you are using.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   632
   The Solaris XRender header files is included with the other X11 header files
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   633
   in the package **SFWxwinc** on new enough versions of Solaris and will be
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   634
   installed in `/usr/X11/include/X11/extensions/Xrender.h` or
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   635
   `/usr/openwin/share/include/X11/extensions/Xrender.h`
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   636
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   637
*****
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   638
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   639
<a name="make"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   640
### Make
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   641
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   642
The basic invocation of the `make` utility looks like:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   643
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   644
>  **`make all`**
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   645
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   646
This will start the build to the output directory containing the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   647
"configuration" that was created by the `configure` script. Run `make help` for
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   648
more information on the available targets.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   649
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   650
There are some of the make targets that are of general interest:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   651
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   652
>  _empty_  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   653
>  build everything but no images
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   654
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   655
>  **`all`**  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   656
>  build everything including images
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   657
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   658
>  **`all-conf`**  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   659
>  build all configurations
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   660
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   661
>  **`images`**  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   662
>  create complete j2sdk and j2re images
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   663
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   664
>  **`install`**  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   665
>  install the generated images locally, typically in `/usr/local`
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   666
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   667
>  **`clean`**  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   668
>  remove all files generated by make, but not those generated by `configure`
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   669
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   670
>  **`dist-clean`**  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   671
>  remove all files generated by both and `configure` (basically killing the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   672
   configuration)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   673
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   674
>  **`help`**  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   675
>  give some help on using `make`, including some interesting make targets
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   676
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   677
*****
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   678
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   679
<a name="testing"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   680
## Testing
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   681
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   682
When the build is completed, you should see the generated binaries and
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   683
associated files in the `j2sdk-image` directory in the output directory. In
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   684
particular, the `build/*/images/j2sdk-image/bin` directory should contain
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   685
executables for the OpenJDK tools and utilities for that configuration. The
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   686
testing tool `jtreg` will be needed and can be found at: [the jtreg
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   687
site](http://openjdk.java.net/jtreg/). The provided regression tests in the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   688
repositories can be run with the command:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   689
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   690
>  **``cd test && make PRODUCT_HOME=`pwd`/../build/*/images/j2sdk-image all``**
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   691
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   692
*****
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   693
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   694
<a name="hints"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   695
## Appendix A: Hints and Tips
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   696
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   697
<a name="faq"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   698
### FAQ
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   699
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   700
**Q:** The `generated-configure.sh` file looks horrible! How are you going to
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   701
edit it?  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   702
**A:** The `generated-configure.sh` file is generated (think "compiled") by the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   703
autoconf tools. The source code is in `configure.ac` and various .m4 files in
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   704
common/autoconf, which are much more readable.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   705
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   706
**Q:** Why is the `generated-configure.sh` file checked in, if it is 
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   707
generated?  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   708
**A:** If it was not generated, every user would need to have the autoconf
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   709
tools installed, and re-generate the `configure` file as the first step. Our
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   710
goal is to minimize the work needed to be done by the user to start building
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   711
OpenJDK, and to minimize the number of external dependencies required.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   712
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   713
**Q:** Do you require a specific version of autoconf for regenerating
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   714
`generated-configure.sh`?  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   715
**A:** Yes, version 2.69 is required and should be easy enough to aquire on all
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   716
supported operating systems. The reason for this is to avoid large spurious
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   717
changes in `generated-configure.sh`.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   718
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   719
**Q:** How do you regenerate `generated-configure.sh` after making changes to
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   720
the input files?  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   721
**A:** Regnerating `generated-configure.sh` should always be done using the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   722
script `common/autoconf/autogen.sh` to ensure that the correct files get
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   723
updated. This script should also be run after mercurial tries to merge
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   724
`generated-configure.sh` as a merge of the generated file is not guaranteed to
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   725
be correct.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   726
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   727
**Q:** What are the files in `common/makefiles/support/*` for? They look like
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   728
gibberish.  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   729
**A:** They are a somewhat ugly hack to compensate for command line length
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   730
limitations on certain platforms (Windows, Solaris). Due to a combination of
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   731
limitations in make and the shell, command lines containing too many files will
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   732
not work properly. These helper files are part of an elaborate hack that will
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   733
compress the command line in the makefile and then uncompress it safely. We're
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   734
not proud of it, but it does fix the problem. If you have any better
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   735
suggestions, we're all ears! :-)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   736
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   737
**Q:** I want to see the output of the commands that make runs, like in the old
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   738
build. How do I do that?  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   739
**A:** You specify the `LOG` variable to make. There are several log levels:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   740
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   741
 * **`warn`** -- Default and very quiet.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   742
 * **`info`** -- Shows more progress information than warn.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   743
 * **`debug`** -- Echos all command lines and prints all macro calls for
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   744
   compilation definitions.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   745
 * **`trace`** -- Echos all $(shell) command lines as well.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   746
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   747
**Q:** When do I have to re-run `configure`?  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   748
**A:** Normally you will run `configure` only once for creating a
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   749
configuration. You need to re-run configuration only if you want to change any
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   750
configuration options, or if you pull down changes to the `configure` script.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   751
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   752
**Q:** I have added a new source file. Do I need to modify the makefiles?  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   753
**A:** Normally, no. If you want to create e.g. a new native library, you will
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   754
need to modify the makefiles. But for normal file additions or removals, no
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   755
changes are needed. There are certan exceptions for some native libraries where
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   756
the source files are spread over many directories which also contain sources
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   757
for other libraries. In these cases it was simply easier to create include
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   758
lists rather than excludes.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   759
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   760
**Q:** When I run `configure --help`, I see many strange options, like
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   761
`--dvidir`. What is this?  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   762
**A:** Configure provides a slew of options by default, to all projects that
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   763
use autoconf. Most of them are not used in OpenJDK, so you can safely ignore
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   764
them. To list only OpenJDK specific features, use `configure --help=short`
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   765
instead.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   766
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   767
**Q:** `configure` provides OpenJDK-specific features such as `--with-
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   768
builddeps-server` that are not described in this document. What about those?  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   769
**A:** Try them out if you like! But be aware that most of these are
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   770
experimental features. Many of them don't do anything at all at the moment; the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   771
option is just a placeholder. Others depend on pieces of code or infrastructure
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   772
that is currently not ready for prime time.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   773
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   774
**Q:** How will you make sure you don't break anything?  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   775
**A:** We have a script that compares the result of the new build system with
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   776
the result of the old. For most part, we aim for (and achieve) byte-by-byte
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   777
identical output. There are however technical issues with e.g. native binaries,
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   778
which might differ in a byte-by-byte comparison, even when building twice with
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   779
the old build system. For these, we compare relevant aspects (e.g. the symbol
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   780
table and file size). Note that we still don't have 100% equivalence, but we're
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   781
close.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   782
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   783
**Q:** I noticed this thing X in the build that looks very broken by design.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   784
Why don't you fix it?  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   785
**A:** Our goal is to produce a build output that is as close as technically
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   786
possible to the old build output. If things were weird in the old build, they
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   787
will be weird in the new build. Often, things were weird before due to
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   788
obscurity, but in the new build system the weird stuff comes up to the surface.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   789
The plan is to attack these things at a later stage, after the new build system
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   790
is established.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   791
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   792
**Q:** The code in the new build system is not that well-structured. Will you
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   793
fix this?  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   794
**A:** Yes! The new build system has grown bit by bit as we converted the old
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   795
system. When all of the old build system is converted, we can take a step back
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   796
and clean up the structure of the new build system. Some of this we plan to do
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   797
before replacing the old build system and some will need to wait until after.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   798
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   799
**Q:** Is anything able to use the results of the new build's default make
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   800
target?  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   801
**A:** Yes, this is the minimal (or roughly minimal) set of compiled output
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   802
needed for a developer to actually execute the newly built JDK. The idea is
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   803
that in an incremental development fashion, when doing a normal make, you
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   804
should only spend time recompiling what's changed (making it purely
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   805
incremental) and only do the work that's needed to actually run and test your
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   806
code. The packaging stuff that is part of the `images` target is not needed for
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   807
a normal developer who wants to test his new code. Even if it's quite fast,
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   808
it's still unnecessary. We're targeting sub-second incremental rebuilds! ;-)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   809
(Or, well, at least single-digit seconds...)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   810
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   811
**Q:** I usually set a specific environment variable when building, but I can't
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   812
find the equivalent in the new build. What should I do?  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   813
**A:** It might very well be that we have neglected to add support for an
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   814
option that was actually used from outside the build system. Email us and we
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   815
will add support for it!
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   816
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   817
<a name="performance"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   818
### Build Performance Tips
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   819
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   820
Building OpenJDK requires a lot of horsepower. Some of the build tools can be
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   821
adjusted to utilize more or less of resources such as parallel threads and
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   822
memory. The `configure` script analyzes your system and selects reasonable
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   823
values for such options based on your hardware. If you encounter resource
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   824
problems, such as out of memory conditions, you can modify the detected values
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   825
with:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   826
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   827
 * **`--with-num-cores`** -- number of cores in the build system, e.g.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   828
   `--with-num-cores=8`
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   829
 * **`--with-memory-size`** -- memory (in MB) available in the build system,
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   830
    e.g. `--with-memory-size=1024`
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   831
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   832
It might also be necessary to specify the JVM arguments passed to the Bootstrap
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   833
JDK, using e.g. `--with-boot-jdk-jvmargs="-Xmx8G -enableassertions"`. Doing
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   834
this will override the default JVM arguments passed to the Bootstrap JDK.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   835
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   836
One of the top goals of the new build system is to improve the build
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   837
performance and decrease the time needed to build. This will soon also apply to
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   838
the java compilation when the Smart Javac wrapper is fully supported.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   839
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   840
At the end of a successful execution of `configure`, you will get a performance
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   841
summary, indicating how well the build will perform. Here you will also get
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   842
performance hints. If you want to build fast, pay attention to those!
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   843
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   844
#### Building with ccache
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   845
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   846
The OpenJDK build supports building with ccache when using gcc or clang. Using
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   847
ccache can radically speed up compilation of native code if you often rebuild
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   848
the same sources. Your milage may vary however so we recommend evaluating it
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   849
for yourself. To enable it, make sure it's on the path and configure with
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   850
`--enable-ccache`.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   851
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   852
#### Building on local disk
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   853
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   854
If you are using network shares, e.g. via NFS, for your source code, make sure
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   855
the build directory is situated on local disk. The performance penalty is
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   856
extremely high for building on a network share, close to unusable.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   857
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   858
#### Building only one JVM
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   859
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   860
The old build builds multiple JVMs on 32-bit systems (client and server; and on
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   861
Windows kernel as well). In the new build we have changed this default to only
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   862
build server when it's available. This improves build times for those not
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   863
interested in multiple JVMs. To mimic the old behavior on platforms that
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   864
support it, use `--with-jvm-variants=client,server`.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   865
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   866
#### Selecting the number of cores to build on
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   867
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   868
By default, `configure` will analyze your machine and run the make process in
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   869
parallel with as many threads as you have cores. This behavior can be
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   870
overridden, either "permanently" (on a `configure` basis) using
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   871
`--with-num-cores=N` or for a single build only (on a make basis), using
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   872
`make JOBS=N`.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   873
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   874
If you want to make a slower build just this time, to save some CPU power for
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   875
other processes, you can run e.g. `make JOBS=2`. This will force the makefiles
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   876
to only run 2 parallel processes, or even `make JOBS=1` which will disable
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   877
parallelism.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   878
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   879
If you want to have it the other way round, namely having slow builds default
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   880
and override with fast if you're impatient, you should call `configure` with
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   881
`--with-num-cores=2`, making 2 the default. If you want to run with more cores,
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   882
run `make JOBS=8`
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   883
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   884
<a name="troubleshooting"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   885
### Troubleshooting
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   886
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   887
#### Solving build problems
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   888
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   889
If the build fails (and it's not due to a compilation error in a source file
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   890
you've changed), the first thing you should do is to re-run the build with more
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   891
verbosity. Do this by adding `LOG=debug` to your make command line.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   892
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   893
The build log (with both stdout and stderr intermingled, basically the same as
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   894
you see on your console) can be found as `build.log` in your build directory.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   895
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   896
You can ask for help on build problems with the new build system on either the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   897
[build-dev](http://mail.openjdk.java.net/mailman/listinfo/build-dev) or the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   898
[build-infra-dev](http://mail.openjdk.java.net/mailman/listinfo/build-infra-dev)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   899
mailing lists. Please include the relevant parts of the build log.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   900
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   901
A build can fail for any number of reasons. Most failures are a result of
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   902
trying to build in an environment in which all the pre-build requirements have
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   903
not been met. The first step in troubleshooting a build failure is to recheck
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   904
that you have satisfied all the pre-build requirements for your platform.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   905
Scanning the `configure` log is a good first step, making sure that what it
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   906
found makes sense for your system. Look for strange error messages or any
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   907
difficulties that `configure` had in finding things.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   908
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   909
Some of the more common problems with builds are briefly described below, with
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   910
suggestions for remedies.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   911
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   912
 * **Corrupted Bundles on Windows:**  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   913
   Some virus scanning software has been known to corrupt the downloading of
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   914
   zip bundles. It may be necessary to disable the 'on access' or 'real time'
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   915
   virus scanning features to prevent this corruption. This type of 'real time'
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   916
   virus scanning can also slow down the build process significantly.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   917
   Temporarily disabling the feature, or excluding the build output directory
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   918
   may be necessary to get correct and faster builds.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   919
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   920
 * **Slow Builds:**  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   921
   If your build machine seems to be overloaded from too many simultaneous C++
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   922
   compiles, try setting the `JOBS=1` on the `make` command line. Then try
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   923
   increasing the count slowly to an acceptable level for your system. Also:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   924
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   925
   Creating the javadocs can be very slow, if you are running javadoc, consider
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   926
   skipping that step.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   927
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   928
   Faster CPUs, more RAM, and a faster DISK usually helps. The VM build tends
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   929
   to be CPU intensive (many C++ compiles), and the rest of the JDK will often
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   930
   be disk intensive.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   931
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   932
   Faster compiles are possible using a tool called
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   933
   [ccache](http://ccache.samba.org/).
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   934
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   935
 * **File time issues:**  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   936
   If you see warnings that refer to file time stamps, e.g.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   937
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   938
   > _Warning message:_ ` File 'xxx' has modification time in the future.`  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   939
   > _Warning message:_ ` Clock skew detected. Your build may be incomplete.`
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   940
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   941
   These warnings can occur when the clock on the build machine is out of sync
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   942
   with the timestamps on the source files. Other errors, apparently unrelated
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   943
   but in fact caused by the clock skew, can occur along with the clock skew
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   944
   warnings. These secondary errors may tend to obscure the fact that the true
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   945
   root cause of the problem is an out-of-sync clock.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   946
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   947
   If you see these warnings, reset the clock on the build machine, run
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   948
   "`gmake clobber`" or delete the directory containing the build output, and
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   949
   restart the build from the beginning.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   950
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   951
 * **Error message: `Trouble writing out table to disk`**  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   952
   Increase the amount of swap space on your build machine. This could be
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   953
   caused by overloading the system and it may be necessary to use:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   954
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   955
   > `make JOBS=1`
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   956
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   957
   to reduce the load on the system.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   958
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   959
 * **Error Message: `libstdc++ not found`:**  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   960
   This is caused by a missing libstdc++.a library. This is installed as part
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   961
   of a specific package (e.g. libstdc++.so.devel.386). By default some 64-bit
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   962
   Linux versions (e.g. Fedora) only install the 64-bit version of the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   963
   libstdc++ package. Various parts of the JDK build require a static link of
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   964
   the C++ runtime libraries to allow for maximum portability of the built
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   965
   images.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   966
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   967
 * **Linux Error Message: `cannot restore segment prot after reloc`**  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   968
   This is probably an issue with SELinux (See [SELinux on
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   969
   Wikipedia](http://en.wikipedia.org/wiki/SELinux)). Parts of the VM is built
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   970
   without the `-fPIC` for performance reasons.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   971
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   972
   To completely disable SELinux:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   973
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   974
   1. `$ su root`
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   975
   2. `# system-config-securitylevel`
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   976
   3. `In the window that appears, select the SELinux tab`
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   977
   4. `Disable SELinux`
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   978
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   979
   Alternatively, instead of completely disabling it you could disable just
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   980
   this one check.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   981
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   982
   1. Select System->Administration->SELinux Management
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   983
   2. In the SELinux Management Tool which appears, select "Boolean" from the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   984
      menu on the left
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   985
   3. Expand the "Memory Protection" group
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   986
   4. Check the first item, labeled "Allow all unconfined executables to use
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   987
      libraries requiring text relocation ..."
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   988
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   989
 * **Windows Error Messages:**  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   990
   `*** fatal error - couldn't allocate heap, ... `  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   991
   `rm fails with "Directory not empty"`  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   992
   `unzip fails with "cannot create ... Permission denied"`  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   993
   `unzip fails with "cannot create ... Error 50"`
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   994
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   995
   The CYGWIN software can conflict with other non-CYGWIN software. See the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   996
   CYGWIN FAQ section on [BLODA (applications that interfere with
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   997
   CYGWIN)](http://cygwin.com/faq/faq.using.html#faq.using.bloda).
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   998
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
   999
 * **Windows Error Message: `spawn failed`**  
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1000
   Try rebooting the system, or there could be some kind of issue with the disk
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1001
   or disk partition being used. Sometimes it comes with a "Permission Denied"
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1002
   message.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1003
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1004
*****
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1005
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1006
<a name="gmake"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1007
## Appendix B: GNU make
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1008
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1009
The Makefiles in the OpenJDK are only valid when used with the GNU version of
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1010
the utility command `make` (usually called `gmake` on Solaris). A few notes
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1011
about using GNU make:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1012
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1013
 * You need GNU make version 3.81 or newer. On Windows 4.0 or newer is
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1014
   recommended. If the GNU make utility on your systems is not of a suitable
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1015
   version, see "[Building GNU make](#buildgmake)".
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1016
 * Place the location of the GNU make binary in the `PATH`.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1017
 * **Solaris:** Do NOT use `/usr/bin/make` on Solaris. If your Solaris system
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1018
   has the software from the Solaris Developer Companion CD installed, you
41040
7b919a4497ff 8165161: Solaris: /usr/ccs /opt/sfw and /opt/csw are dead, references should be expunged
alanbur
parents: 41039
diff changeset
  1019
   should try and use `/usr/bin/gmake` or `/usr/gnu/bin/make`.
33030
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1020
 * **Windows:** Make sure you start your build inside a bash shell.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1021
 * **Mac OS X:** The XCode "command line tools" must be installed on your Mac.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1022
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1023
Information on GNU make, and access to ftp download sites, are available on the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1024
[GNU make web site ](http://www.gnu.org/software/make/make.html). The latest
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1025
source to GNU make is available at
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1026
[ftp.gnu.org/pub/gnu/make/](http://ftp.gnu.org/pub/gnu/make/).
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1027
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1028
<a name="buildgmake"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1029
### Building GNU make
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1030
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1031
First step is to get the GNU make 3.81 or newer source from
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1032
[ftp.gnu.org/pub/gnu/make/](http://ftp.gnu.org/pub/gnu/make/). Building is a
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1033
little different depending on the OS but is basically done with:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1034
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1035
      bash ./configure
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1036
      make
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1037
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1038
*****
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1039
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1040
<a name="buildenvironments"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1041
## Appendix C: Build Environments
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1042
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1043
### Minimum Build Environments
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1044
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1045
This file often describes specific requirements for what we call the "minimum
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1046
build environments" (MBE) for this specific release of the JDK. What is listed
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1047
below is what the Oracle Release Engineering Team will use to build the Oracle
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1048
JDK product. Building with the MBE will hopefully generate the most compatible
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1049
bits that install on, and run correctly on, the most variations of the same
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1050
base OS and hardware architecture. In some cases, these represent what is often
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1051
called the least common denominator, but each Operating System has different
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1052
aspects to it.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1053
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1054
In all cases, the Bootstrap JDK version minimum is critical, we cannot
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1055
guarantee builds will work with older Bootstrap JDK's. Also in all cases, more
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1056
RAM and more processors is better, the minimums listed below are simply
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1057
recommendations.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1058
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1059
With Solaris and Mac OS X, the version listed below is the oldest release we
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1060
can guarantee builds and works, and the specific version of the compilers used
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1061
could be critical.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1062
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1063
With Windows the critical aspect is the Visual Studio compiler used, which due
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1064
to it's runtime, generally dictates what Windows systems can do the builds and
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1065
where the resulting bits can be used.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1066
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1067
**NOTE: We expect a change here off these older Windows OS releases and to a
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1068
'less older' one, probably Windows 2008R2 X64.**
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1069
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1070
With Linux, it was just a matter of picking a stable distribution that is a
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1071
good representative for Linux in general.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1072
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1073
It is understood that most developers will NOT be using these specific
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1074
versions, and in fact creating these specific versions may be difficult due to
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1075
the age of some of this software. It is expected that developers are more often
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1076
using the more recent releases and distributions of these operating systems.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1077
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1078
Compilation problems with newer or different C/C++ compilers is a common
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1079
problem. Similarly, compilation problems related to changes to the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1080
`/usr/include` or system header files is also a common problem with older,
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1081
newer, or unreleased OS versions. Please report these types of problems as bugs
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1082
so that they can be dealt with accordingly.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1083
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1084
>  <table border="1">
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1085
     <thead>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1086
       <tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1087
         <th>Base OS and Architecture</th>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1088
         <th>OS</th>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1089
         <th>C/C++ Compiler</th>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1090
         <th>Bootstrap JDK</th>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1091
         <th>Processors</th>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1092
         <th>RAM Minimum</th>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1093
         <th>DISK Needs</th>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1094
       </tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1095
     </thead>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1096
     <tbody>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1097
       <tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1098
         <td>Linux X86 (32-bit) and X64 (64-bit)</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1099
         <td>Oracle Enterprise Linux 6.4</td>
34595
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
  1100
         <td>gcc 4.9.2 </td>
33030
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1101
         <td>JDK 8</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1102
         <td>2 or more</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1103
         <td>1 GB</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1104
         <td>6 GB</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1105
       </tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1106
       <tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1107
         <td>Solaris SPARCV9 (64-bit)</td>
34595
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
  1108
         <td>Solaris 11 Update 1</td>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
  1109
         <td>Studio 12 Update 4 + patches</td>
33030
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1110
         <td>JDK 8</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1111
         <td>4 or more</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1112
         <td>4 GB</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1113
         <td>8 GB</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1114
       </tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1115
       <tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1116
         <td>Solaris X64 (64-bit)</td>
34595
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
  1117
         <td>Solaris 11 Update 1</td>
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
  1118
         <td>Studio 12 Update 4 + patches</td>
33030
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1119
         <td>JDK 8</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1120
         <td>4 or more</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1121
         <td>4 GB</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1122
         <td>8 GB</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1123
       </tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1124
       <tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1125
         <td>Windows X86 (32-bit)</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1126
         <td>Windows Server 2012 R2 x64</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1127
         <td>Microsoft Visual Studio C++ 2013 Professional Edition</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1128
         <td>JDK 8</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1129
         <td>2 or more</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1130
         <td>2 GB</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1131
         <td>6 GB</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1132
       </tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1133
       <tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1134
         <td>Windows X64 (64-bit)</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1135
         <td>Windows Server 2012 R2 x64</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1136
         <td>Microsoft Visual Studio C++ 2013 Professional Edition</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1137
         <td>JDK 8</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1138
         <td>2 or more</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1139
         <td>2 GB</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1140
         <td>6 GB</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1141
       </tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1142
       <tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1143
         <td>Mac OS X X64 (64-bit)</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1144
         <td>Mac OS X 10.9 "Mavericks"</td>
34595
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 33030
diff changeset
  1145
         <td>Xcode 6.3 or newer</td>
33030
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1146
         <td>JDK 8</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1147
         <td>2 or more</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1148
         <td>4 GB</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1149
         <td>6 GB</td>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1150
       </tr>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1151
     </tbody>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1152
   </table>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1153
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1154
*****
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1155
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1156
<a name="SDBE"></a>
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1157
### Specific Developer Build Environments
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1158
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1159
We won't be listing all the possible environments, but we will try to provide
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1160
what information we have available to us.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1161
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1162
**NOTE: The community can help out by updating this part of the document.**
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1163
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1164
#### Fedora
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1165
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1166
After installing the latest [Fedora](http://fedoraproject.org) you need to
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1167
install several build dependencies. The simplest way to do it is to execute the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1168
following commands as user `root`:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1169
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1170
      yum-builddep java-1.7.0-openjdk
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1171
      yum install gcc gcc-c++
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1172
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1173
In addition, it's necessary to set a few environment variables for the build:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1174
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1175
      export LANG=C
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1176
      export PATH="/usr/lib/jvm/java-openjdk/bin:${PATH}"
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1177
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1178
#### CentOS 5.5
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1179
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1180
After installing [CentOS 5.5](http://www.centos.org/) you need to make sure you
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1181
have the following Development bundles installed:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1182
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1183
 * Development Libraries
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1184
 * Development Tools
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1185
 * Java Development
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1186
 * X Software Development (Including XFree86-devel)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1187
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1188
Plus the following packages:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1189
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1190
 * cups devel: Cups Development Package
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1191
 * alsa devel: Alsa Development Package
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1192
 * Xi devel: libXi.so Development Package
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1193
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1194
The freetype 2.3 packages don't seem to be available, but the freetype 2.3
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1195
sources can be downloaded, built, and installed easily enough from [the
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1196
freetype site](http://downloads.sourceforge.net/freetype). Build and install
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1197
with something like:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1198
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1199
      bash ./configure
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1200
      make
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1201
      sudo -u root make install
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1202
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1203
Mercurial packages could not be found easily, but a Google search should find
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1204
ones, and they usually include Python if it's needed.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1205
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1206
#### Debian 5.0 (Lenny)
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1207
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1208
After installing [Debian](http://debian.org) 5 you need to install several
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1209
build dependencies. The simplest way to install the build dependencies is to
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1210
execute the following commands as user `root`:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1211
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1212
      aptitude build-dep openjdk-7
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1213
      aptitude install openjdk-7-jdk libmotif-dev
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1214
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1215
In addition, it's necessary to set a few environment variables for the build:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1216
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1217
      export LANG=C
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1218
      export PATH="/usr/lib/jvm/java-7-openjdk/bin:${PATH}"
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1219
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1220
#### Ubuntu 12.04
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1221
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1222
After installing [Ubuntu](http://ubuntu.org) 12.04 you need to install several
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1223
build dependencies. The simplest way to do it is to execute the following
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1224
commands:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1225
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1226
      sudo aptitude build-dep openjdk-7
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1227
      sudo aptitude install openjdk-7-jdk
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1228
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1229
In addition, it's necessary to set a few environment variables for the build:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1230
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1231
      export LANG=C
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1232
      export PATH="/usr/lib/jvm/java-7-openjdk/bin:${PATH}"
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1233
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1234
#### OpenSUSE 11.1
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1235
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1236
After installing [OpenSUSE](http://opensuse.org) 11.1 you need to install
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1237
several build dependencies. The simplest way to install the build dependencies
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1238
is to execute the following commands:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1239
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1240
      sudo zypper source-install -d java-1_7_0-openjdk
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1241
      sudo zypper install make
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1242
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1243
In addition, it is necessary to set a few environment variables for the build:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1244
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1245
      export LANG=C
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1246
      export PATH="/usr/lib/jvm/java-1.7.0-openjdk/bin:$[PATH}"
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1247
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1248
Finally, you need to unset the `JAVA_HOME` environment variable:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1249
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1250
      export -n JAVA_HOME`
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1251
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1252
#### Mandriva Linux One 2009 Spring
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1253
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1254
After installing [Mandriva](http://mandriva.org) Linux One 2009 Spring you need
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1255
to install several build dependencies. The simplest way to install the build
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1256
dependencies is to execute the following commands as user `root`:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1257
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1258
      urpmi java-1.7.0-openjdk-devel make gcc gcc-c++ freetype-devel zip unzip
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1259
        libcups2-devel libxrender1-devel libalsa2-devel libstc++-static-devel
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1260
        libxtst6-devel libxi-devel
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1261
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1262
In addition, it is necessary to set a few environment variables for the build:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1263
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1264
      export LANG=C
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1265
      export PATH="/usr/lib/jvm/java-1.7.0-openjdk/bin:${PATH}"
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1266
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1267
#### OpenSolaris 2009.06
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1268
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1269
After installing [OpenSolaris](http://opensolaris.org) 2009.06 you need to
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1270
install several build dependencies. The simplest way to install the build
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1271
dependencies is to execute the following commands:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1272
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1273
      pfexec pkg install SUNWgmake SUNWj7dev sunstudioexpress SUNWcups SUNWzip
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1274
        SUNWunzip SUNWxwhl SUNWxorg-headers SUNWaudh SUNWfreetype2
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1275
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1276
In addition, it is necessary to set a few environment variables for the build:
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1277
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1278
      export LANG=C
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1279
      export PATH="/opt/SunStudioExpress/bin:${PATH}"
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1280
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1281
*****
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1282
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1283
End of the OpenJDK build README document.
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1284
de12d9a875ed 8139668: Generate README-build.html from markdown
ihse
parents:
diff changeset
  1285
Please come again!