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