File: INSTALL

package info (click to toggle)
openjdk-6 6b27-1.12.6-1~deb6u1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze-proposed-updates
  • size: 133,540 kB
  • ctags: 37,146
  • sloc: java: 173,188; cpp: 13,710; asm: 6,470; ansic: 4,827; sh: 4,156; makefile: 4,149; perl: 1,005; python: 310
file content (369 lines) | stat: -rw-r--r-- 16,357 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
Building IcedTea6
=================

For convenience we've provided make targets that automatically
download, extract and patch the source code from openjdk.java.net, in
a default location.

The build requirements are as follows:

A bootstrap JDK, either:
  - GNU libgcj >= 4.3.0 (or equivalent class library based on GNU Classpath >= 0.95) (the default)
  - IcedTea6
Eclipse Java Compiler (ecj)
CUPS
libX11 (libXp, libXtst, libXi, libXt)
Freetype2
patch
sed
tar
md5sum
sha256sum (from coreutils)
wget
alsa
xalan
xerces
glib2-devel 
gtk2-devel
ant >= 1.6.5 with the regexp task from ant-nodeps
libXinerama-devel
giflib-devel
libpng-devel
libjpeg-devel >= 6b
zlib-devel
rhino (can be disabled using --without-rhino)
libffi (for --enable-zero or on archs other than x86/x86_64/sparc)
pulseaudio-libs-devel >= 0.9.11 (for --enable-pulse-java)
LLVM 2.5 or later (for --enable-shark)
systemtap-sdl-devel >= 0.9.5 (for --enable-systemtap, Java method tracing requires systemtap >= 0.9.9)

See ./configure --help if you need to override the defaults.

To perform a full bootstrap of IcedTea:
./autogen.sh
./configure 
make

The following locations are checked for a JDK:
    * /usr/lib/jvm/java-gcj
    * /usr/lib/jvm/gcj-jdk
    * /usr/lib/jvm/cacao
    * /usr/lib/jvm/java-openjdk
    * /usr/lib/jvm/icedtea6
    * /usr/lib/jvm/java-6-openjdk
    * /usr/lib/jvm/openjdk
    * /usr/lib/jvm/java-icedtea
in that order.

A quick build can be performed by passing --disable-bootstrap.
This requires a recent version of IcedTea6 as the boot JDK.
The following locations are checked for IcedTea6:
    * /usr/lib/jvm/java-openjdk
    * /usr/lib/jvm/icedtea6
    * /usr/lib/jvm/java-6-openjdk
    * /usr/lib/jvm/openjdk
    * /usr/lib/jvm/java-icedtea


Note that IcedTea7 can not be used to build IcedTea6.

There is currently no install target.  IcedTea ends up in
openjdk.build when the build completes.

Most targets in IcedTea create stamp files in the stamps directory to
determine what and when dependencies were compiled.  Each target has a
corresponding clean-x target which removes the output and the stamp
file, allowing it to be rebuilt.  For example, stamps/rt.stamp (alias
rt) builds the bootstrap classes needed in the bootstrap build and
clean-rt removes the classes and the stamp file.

Build Modification Options
==========================

The build process may be modified by passing the following options
to configure:

* --disable-docs: Don't build the Javadoc documentation.
* --with-openjdk-src-dir: Copy the specified OpenJDK tree, rather than
  downloading and extracting a tarball.
* --disable-optimizations: Build with -O0.
* --enable-hg: Checkout the OpenJDK tree from Mercurial, rather than
  downloading and extracting a tarball.
* --with-gcj: Compile ecj to native code with gcj prior to building.
* --disable-bootstrap: Perform a quick build using an installed
  copy of IcedTea6.  If a directory is not specified, a check against
  the list presented above is performed.
* --with-parallel-jobs: Run the specified number of parallel jobs when
  building HotSpot and the JDK.  If this option is passed without an
  argument, the number of online processors plus one is used.
* --with-ant-home: The location of Ant, defaults to /usr/share/ant.
* --with-pkgversion=PKG: Include the specified distro package information in
  the output of java -version.
* --with-jdk-home: The location of a JDK to build with.  If a directory is not
  specified, a check against the list presented above is performed.
* --with-java: Specify the location of a 'java' binary.  By default,
  ${SYSTEM_JDK_DIR}/bin/java is used.  If this is absent, then the path is
  checked for 'gij' and 'java'.
* --with-ecj: Specify the location of a 'ecj' binary.  By default, the path
  is checked for ecj, ecj-3.1, ecj-3.2 and ecj-3.3.
* --with-javac: Specify the location of a 'javac' binary.  By default,
  ${SYSTEM_JDK_DIR}/bin/javac is used.  If this is absent, then the path
  is checked for 'javac'.
* --with-jar: Specify the location of a 'jar' binary.  By default,
  ${SYSTEM_JDK_DIR}/bin/jar is used.  If this is absent, then the path
  is checked for gjar and jar.
* --with-javah: Specify the location of a 'javah' binary.  By default,
  ${SYSTEM_JDK_DIR}/bin/javah is used.  If this is absent, then the path
  is checked for gjavah and javah.
* --with-rmic: Specify the location of a 'rmic' binary.  By default,
  ${SYSTEM_JDK_DIR}/bin/rmic is used.  If this is absent, then the path
  is checked for grmic and rmic.
* --with-native2ascii:  Specify the location of a 'native2ascii' binary.  By default,
  ${SYSTEM_JDK_DIR}/bin/native2ascii is used.  If this is absent, then the path
  is checked for native2ascii and gnative2ascii.
* --with-ecj-jar: Specify the location of an ecj JAR file.  By default, the
  following paths are checked:
    - /usr/share/java/eclipse-ecj.jar
    - /usr/share/java/ecj.jar
    - /usr/share/eclipse-ecj-3.{2,3,4,5}/lib/ecj.jar
* --with-xalan2-jar: Specify the location of a xalan2 JAR file.  By default, the
  following paths are checked:
    - /usr/share/java/xalan-j2.jar
    - /usr/share/java/xalan2.jar
    - /usr/share/xalan/lib/xalan.jar
* --with-xalan2-serializer-jar: Specify the location of a xalan2 serializer JAR file.
  By default, the following paths are checked:
    - /usr/share/java/xalan-j2-serializer.jar
    - /usr/share/xalan-serializer/lib/serializer.jar
    - /usr/share/java/serializer.jar
* --with-xerces2-jar: Specify the location of a xerces2 JAR file.  By default, the
  following paths are checked:
    - /usr/share/java/xerces-j2.jar
    - /usr/share/java/xerces2.jar
    - /usr/share/xerces-2/lib/xercesImpl.jar
    - /usr/share/java/xercesImpl.jar
* --with-openjdk-src-zip: Specify the location of the OpenJDK tarball to avoid downloading.
* --with-hotspot-src-zip: Specify the location of the HotSpot tarball to avoid downloading.
* --with-alt-jar: Use the specified jar binary in the second stage rather than the one just built.
* --with-cacao-home: Specify the location of an installed CACAO to use rather than downloading
  and building one.
* --with-cacao-src-zip: Specify the location of a CACAO tarball to avoid downloading.
* --with-cacao-src-dir: Specify the location of a CACAO source tree to avoid downloading.
* --with-jamvm-src-zip: Specify the location of a JamVM tarball to avoid downloading.
* --with-hg-revision: Specify a hg revision to use (as opposed to tip) with the --enable-hg option.
* --with-tzdata-dir: Specify the location of Java timezone data, defaulting to /usr/share/javazi.
* --with-abs-install-dir: The final install location of the j2sdk-image, for use in the SystemTap tapset.
* --with-llvm-config: Specify the location of the llvm-config binary.

Other options may be supplied which enable or disable new features.
These are documented fully in the relevant section below.

* --enable-pulse-java: Build the PulseAudio sound provider.
* --disable-xrender: Don't include the XRender pipeline.
* --enable-nio2: Include the NIO2 backport.
* --enable-systemtap: Include support for tracing using systemtap.
* --enable-nss: Enable the NSS security provider.
* --enable-cacao: Replace HotSpot with the CACAO VM.
* --enable-jamvm: Replace HotSpot with JamVM.
* --enable-shark: Build the Shark LLVM-based JIT.
* --enable-zero: Build the zero assembler port on x86/x86_64/sparc platforms.
* --with-hotspot-build: The HotSpot to use, defaulting to 'original'.
* --with-rhino: Include Javascript support using Rhino.
* --with-additional-vms=vm-list: Additional VMs to build using the system described
  below.

Testing
=======

IcedTea6 includes support for running the test suite included with
OpenJDK, using the in-tree copy of JTReg.  Invoking 'make check' will
cause the HotSpot, JDK and langtools test suites to be run.  It will
exit with an error code if a regression test fails, so use 'make check
-k' if you want to run all three test suites, regardless of if
failures occur in one.  The individual test suites may be run using
the check-hotspot, check-jdk and check-langtools targets respectively,
or by setting jtreg_checks e.g. jtreg_checks="langtools hotspot".

The PulseAudio provider
=======================

IcedTea6 includes an implementation of the javax.sound.* APIs using
PulseAudio which can be enabled using --enable-pulse-java.   The resulting
provider is org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider.

Xrender Support
===============

IcedTea6 includes support for an Xrender-based rendering pipeline
developed by Clemens Eisserer (http://linuxhippy.blogspot.com/).  This
is compiled by default, and can be disabled using --disable-xrender.
To actually use the pipeline, the sun.java2d.xrender property needs to
be set to true, e.g.  by passing the -Dsun.java2d.xrender=True option
to java.

NIO2 Backport
=============

IcedTea6 includes a backport of NIO2 from OpenJDK7; see
http://openjdk.java.net/projects/nio/.  This provides support for
asynchronous I/O and an improved file system API, providing access to
POSIX file permissions, timestamps, extended attributes and ACLs and
allowing directories to be watched.  This is enabled using the
--enable-nio2 option.

As new classes can not be added to the java.* and javax.* namespace of
the 1.6 API, the new java.nio classes are contained in
org.classpath.icedtea.java.nio, so code will needed to be adjusted to
work with the backport.

SystemTap
=========

IcedTea6 includes work to allow the existing DTrace probes included in
OpenJDK to be used with SystemTap.  This is enabled using the
--enable-systemtap option, and requires version 0.9.5 or later (0.9.9
or later if you want Java method tracing).  The tapset needs to know
the final install location of the JDK, so the --with-abs-install-dir
should also be used to specify this.  If not set, it defaults to the
in-tree location of openjdk/build/<os>-<arch>/j2sdk-image and requires
manual changes to tapset/hotspot.stp to work from elsewhere. For
example, if you plan to install the resulting build in
/usr/lib/jvm/java-1.6.0-openjdk, then you should specify
--enable-systemtap
--with-abs-install-dir=/usr/lib/jvm/java-1.6.0-openjdk.

NSS Security Provider
=====================

OpenJDK includes an NSS-based security provider in the form of
sun.security.pkcs11.SunPKCS11.  However, as this needs to know the
location of the NSS installation it should use, it is not enabled
in normal OpenJDK builds.  As IcedTea can detect NSS using configure,
it can simplify the process of enabling this provider by generating
a configuration file for the NSS provider.  If --enable-nss is specified,
this configuration will be turned on in lib/security/java.security.
This can also be done manually at a later date.

CACAO
=====

IcedTea6 can use CACAO as the virtual machine, as opposed to HotSpot.
One advantage of this is that CACAO has a JIT implementation for
more platforms than HotSpot, including ppc, ppc64, arm and mips.
When --enable-cacao is specified, CACAO will be downloaded and built,
followed by the JDK portion of OpenJDK resulting in a CACAO+OpenJDK
image in openjdk/build/<os>-<arch>/j2sdk-image.  The --with-cacao-home
option can be used to specify the use of an existing CACAO install
instead, and --with-cacao-src-zip/dir options exist to allow the use
of a pre-downloaded zip or source tree respectively.

JamVM
=====

IcedTea6 can use JamVM as the virtual machine, as opposed to HotSpot.
When --enable-jamvm is specified, JamVM will be downloaded and built,
followed by the JDK portion of OpenJDK resulting in a JamVM+OpenJDK
image in openjdk/build/<os>-<arch>/j2sdk-image.  The
--with-jamvm-src-zip option exists to allow the use of a pre-downloaded zip.

Zero & Shark
============

IcedTea6 includes a zero assembler port of HotSpot, which avoids
architecture-specific code as much as possible, allowing an
interpreter to be built and run on most platforms (albeit very
slowly).  As HotSpot only includes JITs for x86, x86_64 and SPARC, the
zero assembler port is automatically enabled on all other
architectures.  On x86, x86_64 and SPARC, it may be built using
--enable-zero.

To overcome the performance issues inherent in zero, a LLVM-based JIT
called Shark has been developed.  This performs Just-In-Time compilation
on any architecture supported by LLVM.  To enable it, pass the option
--enable-shark to configure.  Please note that Shark is still in
development and builds are still likely to fail at present.

Support for Different Versions of HotSpot
=========================================

IcedTea allows the version of HotSpot provided with the upstream build
drop to be replaced with another.  Support for this is provided by the
--with-hotspot-build option which causes IcedTea to probe the
hotspot.map file for an entry with the given build name.  The
hotspot.map file maps the name to a changeset from a given repository
URL.  During the build, it downloads HotSpot from
${URL}/archive/${CHANGESET}.tar.gz and the resulting file is verified
using the MD5 sum stored in hotspot.map.

New build selections may be provided by providing further mappings in
the hotspot.map file.  The name can be anything
e.g. 'shiny_new_hotspot'.  This is simply used to map the argument to
--with-hotspot-build to the values in the file and to apply
appropriate patches (see patches/hotspot, $HSBUILD is available in
Makefile.am for obtaining the build name).  The special value
'original' is used for patches/hotspot/original to denote those for
the upstream HotSpot; this value does not appear in hotspot.map.  

The changeset and URL should refer to a valid HotSpot tree when used
as above.  The required values can be obtained from a local checkout
or by using the web interface.  The simplest way to calculate the MD5
sum is to download the tarball and then run the 'md5sum' application
on it.  The resulting value should be added to hotspot.map.

As with the OpenJDK build tarballs, the location of an alternate zip
can be specified using --with-hotspot-src-zip.  This skips the
download stage and just verifies that the zip's MD5 sum matches that
of the requested build.

At present, IcedTea6 supports the 'original' HotSpot 20 provided as
part of the upstream tarball.  Note that the norm. is for up to one
alternate (non-default) build to be supported and just passing
--with-hotspot-build (equivalent to --with-hotspot-build=yes) will
always provide the alternate build.  Conversely, passing
--without-hotspot-build (equivalent to --with-hotspot-build=no)
provides the original build from the OpenJDK tarball.

Javascript Support
==================

IcedTea6 adds Javascript support via the javax.script API by using
an existing installation of Rhino.  Support is enabled by default,
with the following locations being searched for a Rhino JAR file:

* /usr/share/java/rhino.jar
* /usr/share/java/js.jar
* /usr/share/rhino-1.6/lib/js.jar

A JAR file can instead be specified using the --with-rhino option,
or support may be disabled by specifying --without-rhino.

Note that the final installed JAR file is a modified version with the
namespace prefixed by 'sun.' as in the proprietary Oracle JDK.  This
avoids conflicts between the JDK's copy of Rhino and any used by other
applications.

Building Additional Virtual Machines
====================================

Although IcedTea can be built multiple times to use a different virtual
machine, additional VMs can be built without building the other components
multiple times.

On architectures where hotspot is available, use
   --with-additional-vms=cacao,zero  (or shark instead of zero)
on architectures where only zero (or shark) is available, use
   --with-additional-vms=cacao
to build the additional VMs.  It's not possible to build cacao as the
default VM, and zero as additional VM.
To build zero as the default VM and shark as an additional VM, use
   --enable-zero --with-additional-vms=shark

The additional VMs are available by calling the java with the option
`-cacao', `-zero' or `-shark', or by calling the java tools with
`-J-<vm name>'. If the build was configured with '--enable-shark',
use `-Xint' to just use the zero VM.

Please note that using this feature does not do as extensive testing
of the VM as would enabling it in the default full bootstrap mode,
which compiles IcedTea and then recompiles it using the just-built
image.