source: trunk/openjdk/README-builds.html@ 66

Last change on this file since 66 was 2, checked in by dmik, 15 years ago

Imported OpenJDK 6 b19 sources from Oracle.

File size: 88.1 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3 <head>
4 <!-- OpenJDK 6 Specific -->
5 <title>OpenJDK 6 Build README</title>
6 </head>
7 <body style="background-color:lightcyan">
8 <!-- ====================================================== -->
9 <table width="100%" style="background-color:white">
10 <tr>
11 <td align="center">
12 <a href="http://openjdk.java.net" border="0">
13 <img alt="OpenJDK"
14 src="http://openjdk.java.net/images/openjdk.png"
15 width=256
16 style="border-style: none"/>
17 </a>
18 </td>
19 </tr>
20 <tr>
21 <td align=center>
22 <!-- OpenJDK 6 Specific -->
23 <h1>OpenJDK 6 Build README</h1>
24 </td>
25 </tr>
26 </table>
27 <!-- ------------------------------------------------------ -->
28 <hr>
29 <h2><a name="introduction">Introduction</a></h2>
30 <blockquote>
31 <p>
32 This README file contains build instructions for the
33 <a href="http://openjdk.java.net" target="_blank">OpenJDK</a>.
34 Building the source code for the
35 OpenJDK
36 requires
37 a certain degree of technical expertise.
38 <!-- OpenJDK 6 Specific -->
39 <blockquote style="background-color:white">
40 This document is specific to OpenJDK 6, which has some
41 very minor differences in the build requirements over
42 the OpenJDK 7 sources,
43 e.g. OpenJDK 6 requires access to Motif files.
44 Where there are differences they should stand out,
45 like this block of text does.
46 </blockquote>
47 </blockquote>
48 <!-- ------------------------------------------------------ -->
49 <hr>
50 <h2><a name="contents">Contents</a></h2>
51 <blockquote>
52 <ul>
53 <li><a href="#introduction">Introduction</a></li>
54 <li><a href="#MBE">Minimum Build Environments</a></li>
55 <li><a href="#SDBE">Specific Developer Build Environments</a>
56 <ul>
57 <li><a href="#fedora">Fedora</a></li>
58 <li><a href="#debian">Debian</a></li>
59 <li><a href="#ubuntu">Ubuntu</a></li>
60 <li><a href="#opensuse">OpenSUSE</a></li>
61 <li><a href="#mandriva">Mandriva</a></li>
62 <li><a href="#opensolaris">OpenSolaris</a></li>
63 </ul>
64 </li>
65 <li><a href="#directories">Source Directory Structure</a> </li>
66 <li><a href="#building">Build Information</a>
67 <ul>
68 <li><a href="#gmake">GNU Make (<tt><i>gmake</i></tt>)</a> </li>
69 <li><a href="#linux">Basic Linux System Setup</a> </li>
70 <li><a href="#solaris">Basic Solaris System Setup</a> </li>
71 <li><a href="#windows">Basic Windows System Setup</a> </li>
72 <li><a href="#dependencies">Build Dependencies</a> </li>
73 <ul>
74 <li><a href="#bootjdk">Bootstrap JDK</a> </li>
75 <li><a href="#binaryplugs">Binary Plugs</a> </li>
76 <li><a href="#importjdk">Optional Import JDK</a> </li>
77 <li><a href="#ant">Ant</a> </li>
78 <li><a href="#cacerts">Certificate Authority File (cacert)</a> </li>
79 <li><a href="#compilers">Compilers</a>
80 <ul>
81 <li><a href="#msvc">Microsoft Visual Studio</a> </li>
82 <li><a href="#mssdk">Microsoft Platform SDK</a> </li>
83 <li><a href="#gcc">Linux gcc/binutils</a> </li>
84 <li><a href="#studio">Sun Studio</a> </li>
85 </ul>
86 </li>
87 <li><a href="#zip">Zip and Unzip</a> </li>
88 <li><a href="#freetype">FreeType2 Fonts</a> </li>
89 <li>Linux and Solaris:
90 <ul>
91 <!-- OpenJDK 6 Specific -->
92 <li style="background-color:white"><a href="#motif">Motif</a> </li>
93 <li><a href="#cups">CUPS Include files</a> </li>
94 </ul>
95 </li>
96 <li>Linux only:
97 <ul>
98 <li><a href="#alsa">ALSA files</a> </li>
99 </ul>
100 </li>
101 <li>Windows only:
102 <ul>
103 <li>Unix Command Tools (<a href="#cygwin">CYGWIN</a>)</li>
104 <li><a href="#dxsdk">DirectX 9.0 SDK</a> </li>
105 </ul>
106 </li>
107 </ul>
108 </ul>
109 </li>
110 <li><a href="#creating">Creating the Build</a> </li>
111 <li><a href="#testing">Testing the Build</a> </li>
112 <li><a href="#variables">Environment/Make Variables</a></li>
113 <li><a href="#troubleshooting">Troubleshooting</a></li>
114 </ul>
115 </blockquote>
116 <!-- ------------------------------------------------------ -->
117 <hr>
118 <h2><a name="MBE">Minimum Build Environments</a></h2>
119 <blockquote>
120 This file often describes specific requirements for what we call the
121 "minimum build environments" (MBE) for this
122 specific release of the JDK,
123 Building with the MBE will generate the most compatible
124 bits that install on, and run correctly on, the most variations
125 of the same base OS and hardware architecture.
126 These usually represent what is often called the
127 least common denominator platforms.
128 It is understood that most developers will NOT be using these
129 specific platforms, and in fact creating these specific platforms
130 may be difficult due to the age of some of this software.
131 <p>
132 The minimum OS and C/C++ compiler versions needed for building the
133 OpenJDK:
134 <p>
135 <table border="1">
136 <thead>
137 <tr>
138 <th>Base OS and Architecture</th>
139 <th>OS</th>
140 <th>C/C++ Compiler</th>
141 </tr>
142 </thead>
143 <tbody>
144 <tr>
145 <td>Linux X86 (32bit)</td>
146 <td>Fedora 9</td>
147 <td>gcc 4 </td>
148 </tr>
149 <tr>
150 <td>Linux X64 (64bit)</td>
151 <td>Fedora 9</td>
152 <td>gcc 4 </td>
153 </tr>
154 <tr>
155 <td>Solaris SPARC (32bit)</td>
156 <!-- OpenJDK 6 Specific -->
157 <td>Solaris 8 + patches
158 <br>
159 See <a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/JavaSE" target="_blank">
160 SunSolve</a> for patch downloads.
161 </td>
162 <td>Sun Studio 11 </td>
163 </tr>
164 <tr>
165 <td>Solaris SPARCV9 (64bit)</td>
166 <!-- OpenJDK 6 Specific -->
167 <td>Solaris 8 + patches
168 <br>
169 See <a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/JavaSE" target="_blank">
170 SunSolve</a> for patch downloads.
171 </td>
172 <td>Sun Studio 11</td>
173 </tr>
174 <tr>
175 <td>Solaris X86 (32bit)</td>
176 <!-- OpenJDK 6 Specific -->
177 <td>Solaris 8 + patches
178 <br>
179 See <a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/JavaSE" target="_blank">
180 SunSolve</a> for patch downloads.
181 </td>
182 <td>Sun Studio 11</td>
183 </tr>
184 <tr>
185 <td>Solaris X64 (64bit)</td>
186 <td>Solaris 10 + patches
187 <br>
188 See <a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/JavaSE" target="_blank">
189 SunSolve</a> for patch downloads.
190 </td>
191 <td>Sun Studio 11</td>
192 </tr>
193 <tr>
194 <td>Windows X86 (32bit)</td>
195 <!-- OpenJDK 6 Specific -->
196 <td>Windows 2000</td>
197 <td>Microsoft Visual Studio .NET 2003 Professional</td>
198 </tr>
199 <tr>
200 <td>Windows X64 (64bit)</td>
201 <td>Windows Server 2003 - Enterprise x64 Edition</td>
202 <td>Microsoft Platform SDK - April 2005</td>
203 </tr>
204 </tbody>
205 </table>
206 <p>
207 These same sources do indeed build on many more systems than the
208 above older generation systems, again the above is just a minimum.
209 <p>
210 Compilation problems with newer or different C/C++ compilers is a
211 common problem.
212 Similarly, compilation problems related to changes to the
213 <tt>/usr/include</tt> or system header files is also a
214 common problem with newer or unreleased OS versions.
215 Please report these types of problems as bugs so that they
216 can be dealt with accordingly.
217 </blockquote>
218 <!-- ------------------------------------------------------ -->
219 <hr>
220 <h2><a name="SDBE">Specific Developer Build Environments</a></h2>
221 <blockquote>
222 We won't be listing all the possible environments, but
223 we will try to provide what information we have available to us.
224 </blockquote>
225 <!-- ====================================================== -->
226 <h3><a name="fedora">Fedora</a></h3>
227 <blockquote>
228 <h4>Fedora 9</h4>
229 <p>
230 <blockquote>
231 After installing <a href="http://fedoraproject.org">Fedora</a> 9
232 you need to install several build dependencies. The simplest
233 way to do it is to execute the following commands as user
234 <tt>root</tt>:
235 <p/>
236 <code>yum-builddep java-1.6.0-openjdk</code>
237 <p/>
238 <code>yum install gcc gcc-c++</code>
239 <p/>
240 In addition, it's necessary to set a few environment variables for the build:
241
242 <p/>
243 <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk</code>
244 </blockquote>
245 <h4>Fedora 10</h4>
246 <p>
247 <blockquote>
248 After installing <a href="http://fedoraproject.org">Fedora</a> 10
249 you need to install several build dependencies. The simplest
250 way to do it is to execute the following commands as user
251 <tt>root</tt>:
252 <p/>
253 <code>yum-builddep java-1.6.0-openjdk</code>
254 <p/>
255 <code>yum install gcc gcc-c++</code>
256 <p/>
257 In addition, it's necessary to set a few environment variables for the build:
258
259 <p/>
260 <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk</code>
261 </blockquote>
262 <h4>Fedora 11</h4>
263 <p>
264 <blockquote>
265 After installing <a href="http://fedoraproject.org">Fedora</a> 11
266 you need to install several build dependencies. The simplest
267 way to do it is to execute the following commands as user
268 <tt>root</tt>:
269 <p/>
270 <code>yum-builddep java-1.6.0-openjdk</code>
271 <p/>
272 <code>yum install gcc gcc-c++</code>
273 <p/>
274 In addition, it's necessary to set a few environment variables for the build:
275
276 <p/>
277 <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk</code>
278 </blockquote>
279 </blockquote>
280 <!-- ====================================================== -->
281 <h3><a name="debian">Debian</a></h3>
282 <blockquote>
283 <h4>Debian 5.0 (Lenny)</h4>
284 <p>
285 <blockquote>
286 After installing <a href="http://debian.org">Debian</a> 5
287 you need to install several build dependencies.
288 The simplest way to install the build dependencies is to
289 execute the following commands as user <tt>root</tt>:
290 <p/>
291 <code>aptitude build-dep openjdk-6</code>
292 <p/>
293 <code>aptitude install openjdk-6-jdk</code>
294 <p/>
295 <!-- OpenJDK 6 Specific -->
296 <code style="background-color:white">aptitude install libmotif-dev</code>
297 <p/>
298 In addition, it's necessary to set a few environment variables for the build:
299 <p/>
300 <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code>
301 </blockquote>
302 </blockquote>
303 <!-- ====================================================== -->
304 <h3><a name="ubuntu">Ubuntu</a></h3>
305 <blockquote>
306 <h4>Ubuntu 8.04</h4>
307 <p>
308 <blockquote>
309 After installing <a href="http://ubuntu.org">Ubuntu</a> 8.04
310 you need to install several build dependencies.
311 <p/>
312 First, you need to enable the universe repository in the
313 Software Sources application and reload the repository
314 information. The Software Sources application is available
315 under the System/Administration menu.
316 <p/>
317 The simplest way to install the build dependencies is to
318 execute the following commands:
319 <p/>
320 <code>sudo aptitude build-dep openjdk-6</code>
321 <p/>
322 <code>sudo aptitude install openjdk-6-jdk</code>
323 <p/>
324 <!-- OpenJDK 6 Specific -->
325 <code style="background-color:white">sudo aptitude install libmotif-dev</code>
326 <p/>
327 In addition, it's necessary to set a few environment variables for the build:
328 <p/>
329 <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code>
330 </blockquote>
331 <h4>Ubuntu 8.10</h4>
332 <p>
333 <blockquote>
334 After installing <a href="http://ubuntu.org">Ubuntu</a> 8.10
335 you need to install several build dependencies. The simplest
336 way to do it is to execute the following commands:
337 <p/>
338 <code>sudo aptitude build-dep openjdk-6</code>
339 <p/>
340 <code>sudo aptitude install openjdk-6-jdk gcc-4.2 g++-4.2</code>
341 <p/>
342 <!-- OpenJDK 6 Specific -->
343 <code style="background-color:white">sudo aptitude install libmotif-dev</code>
344 <p/>
345 In addition, it's necessary to set a few environment variables for the build:
346 <p/>
347 <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code>
348 <p/>
349 Then, calling <tt>make</tt> in the top level OpenJDK source
350 code directory with the following parameters results in a
351 working build:
352 <p/>
353 <code>make all CC=gcc-4.2 CPP=g++-4.2</code>
354 </blockquote>
355 <h4>Ubuntu 9.04</h4>
356 <p>
357 <blockquote>
358 After installing <a href="http://ubuntu.org">Ubuntu</a> 9.04
359 you need to install several build dependencies. The simplest
360 way to do it is to execute the following commands:
361 <p/>
362 <code>sudo aptitude build-dep openjdk-6</code>
363 <p/>
364 <code>sudo aptitude install openjdk-6-jdk gcc-4.2 g++-4.2</code>
365 <p/>
366 <!-- OpenJDK 6 Specific -->
367 <code style="background-color:white">sudo aptitude install libmotif-dev</code>
368 <p/>
369 In addition, it's necessary to set a few environment variables for the build:
370 <p/>
371 <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code>
372 <p/>
373 Then, calling <tt>make</tt> in the top level OpenJDK source
374 code directory with the following parameters results in a
375 working build:
376 <p/>
377 <code>make all CC=gcc-4.2 CPP=g++-4.2</code>
378 </blockquote>
379 </blockquote>
380 <!-- ====================================================== -->
381 <h3><a name="opensuse">OpenSUSE</a></h3>
382 <blockquote>
383 <h4>OpenSUSE 11.1</h4>
384 <p>
385 <blockquote>
386 After installing <a href="http://opensuse.org">OpenSUSE</a> 11.1
387 you need to install several build dependencies.
388 The simplest way to install the build dependencies is to
389 execute the following commands:
390 <p/>
391 <code>sudo zypper source-install -d java-1_6_0-openjdk</code>
392 <p/>
393 <code>sudo zypper install make</code>
394 <p/>
395 In addition, it is necessary to set a few environment variables for the build:
396 <p/>
397 <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-1.6.0-openjdk</code>
398 <p/>
399 Finally, you need to unset the <code>JAVA_HOME</code> environment variable:
400 <p/>
401 <code>export -n JAVA_HOME</code>
402 </blockquote>
403 </blockquote>
404 <!-- ====================================================== -->
405 <h3><a name="mandriva">Mandriva</a></h3>
406 <blockquote>
407 <h4>Mandriva Linux One 2009 Spring</h4>
408 <p>
409 <blockquote>
410 After installing <a href="http://mandriva.org">Mandriva</a> Linux One 2009 Spring
411 you need to install several build dependencies.
412 The simplest way to install the build dependencies is to
413 execute the following commands as user <tt>root</tt>:
414 <p/>
415 <code>urpmi java-1.6.0-openjdk-devel ant make gcc gcc-c++ freetype-devel zip unzip libcups2-devel libxrender1-devel libalsa2-devel libstc++-static-devel libxtst6-devel libxi-devel</code>
416 <p/>
417 <!-- OpenJDK 6 Specific -->
418 <code style="background-color:white">urpmi libopenmotif-devel</code>
419 <p/>
420 In addition, it is necessary to set a few environment variables for the build:
421 <p/>
422 <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-1.6.0-openjdk</code>
423 </blockquote>
424 </blockquote>
425 <!-- ====================================================== -->
426 <h3><a name="opensolaris">OpenSolaris</a></h3>
427 <blockquote>
428 <h4>OpenSolaris 2009.06</h4>
429 <p>
430 <blockquote>
431 After installing <a href="http://opensolaris.org">OpenSolaris</a> 2009.06
432 you need to install several build dependencies.
433 The simplest way to install the build dependencies is to
434 execute the following commands:
435 <p/>
436 <code>pfexec pkg install SUNWgmake SUNWj6dev SUNWant sunstudioexpress SUNWcups SUNWzip SUNWunzip SUNWxwhl SUNWxorg-headers SUNWaudh SUNWfreetype2</code>
437 <p/>
438 <!-- OpenJDK 6 Specific -->
439 <code style="background-color:white">pfexec pkg install SUNWmfrun</code>
440 <p/>
441 In addition, it is necessary to set a few environment variables for the build:
442 <p/>
443 <code>export LANG=C ALT_COMPILER_PATH=/opt/SunStudioExpress/bin/ ALT_CUPS_HEADERS_PATH=/usr/include/</code>
444 <p/>
445 Finally, you need to make sure that the build process can find the Sun Studio compilers:
446 <p/>
447 <code>export PATH=$PATH:/opt/SunStudioExpress/bin/</code>
448 </blockquote>
449 </blockquote>
450 <!-- ------------------------------------------------------ -->
451 <hr>
452 <h2><a name="directories">Source Directory Structure</a></h2>
453 <blockquote>
454 <p>
455 The source code for the OpenJDK is delivered in a set of
456 directories:
457 <tt>hotspot</tt>,
458 <tt>langtools</tt>,
459 <tt>corba</tt>,
460 <tt>jaxws</tt>,
461 <tt>jaxp</tt>,
462 and
463 <tt>jdk</tt>.
464 The <tt>hotspot</tt> directory contains the source code and make
465 files for building the OpenJDK Hotspot Virtual Machine.
466 The <tt>langtools</tt> directory contains the source code and make
467 files for building the OpenJDK javac and language tools.
468 The <tt>corba</tt> directory contains the source code and make
469 files for building the OpenJDK Corba files.
470 The <tt>jaxws</tt> directory contains the source code and make
471 files for building the OpenJDK JAXWS files.
472 The <tt>jaxp</tt> directory contains the source code and make
473 files for building the OpenJDK JAXP files.
474 The <tt>jdk</tt> directory contains the source code and make files for
475 building the OpenJDK runtime libraries and misc files.
476 The top level <tt>Makefile</tt>
477 is used to build the entire OpenJDK.
478 </blockquote>
479 <!-- ------------------------------------------------------ -->
480 <hr>
481 <h2><a name="building">Build Information</a></h2>
482 <blockquote>
483 Building the OpenJDK
484 is done with a <tt><i>gmake</i></tt>
485 command line and various
486 environment or make variable settings that direct the make rules
487 to where various components have been installed.
488 Where possible the makefiles will attempt to located the various
489 components in the default locations or any component specific
490 variable settings.
491 When the normal defaults fail or components cannot be found,
492 the various
493 <tt>ALT_*</tt> variables (alternates)
494 can be used to help the makefiles locate components.
495 <p>
496 Refer to the bash/sh/ksh setup file
497 <tt>jdk/make/jdk_generic_profile.sh</tt>
498 if you need help in setting up your environment variables.
499 A build could be as simple as:
500 <blockquote>
501 <pre><tt>
502 bash
503 . jdk/make/jdk_generic_profile.sh
504 <i>gmake</i> sanity &amp;&amp; <i>gmake</i>
505 </tt></pre>
506 </blockquote>
507 <p>
508 Of course ksh or sh would work too.
509 But some customization will probably be necessary.
510 The <tt>sanity</tt> rule will make some basic checks on build
511 dependencies and generate appropriate warning messages
512 regarding missing, out of date, or newer than expected components
513 found on your system.
514 </blockquote>
515 <!-- ------------------------------------------------------ -->
516 <hr>
517 <h3><a name="gmake">GNU make (<tt><i>gmake</i></tt>)</a></h3>
518 <blockquote>
519 The Makefiles in the OpenJDK are only valid when used with the
520 GNU version of the utility command <tt>make</tt>
521 (<tt><i>gmake</i></tt>).
522 A few notes about using GNU make:
523 <ul>
524 <li>
525 In general, you need GNU make version 3.78.1 or newer.
526 </li>
527 <li>
528 Place the location of the GNU make binary in the <tt>PATH</tt>.
529 </li>
530 <li>
531 <strong>Linux:</strong>
532 The <tt>/usr/bin/make</tt> command should work fine for you.
533 </li>
534 <li>
535 <strong>Solaris:</strong>
536 Do NOT use <tt>/usr/bin/make</tt> on Solaris.
537 If your Solaris system has the software
538 from the Solaris Companion CD installed,
539 you should use <tt>gmake</tt>
540 which will be located in either the <tt>/opt/sfw/bin</tt> or
541 <tt>/usr/sfw/bin</tt> directory.
542 </li>
543 <li>
544 <strong>Windows:</strong>
545 Make sure you start your build inside a bash/sh/ksh shell
546 and are using a <tt>make.exe</tt> utility built for that
547 environment (a cygwin <tt>make.exe</tt> is not the same
548 as a <tt>make.exe</tt> built for something like
549 <a href="http://www.mkssoftware.com/">MKS</a>).
550 <br>
551 <b>WARNING:</b> Watch out for make version 3.81, it may
552 not work due to a lack of support for drive letter paths
553 like <tt>C:/</tt>. See
554 <a href="#gmake">section on gmake</a>.
555 Use a 3.80 version, or find a newer
556 version that has this problem fixed.
557 The older 3.80 version of make.exe can be downloaded with this
558 <a href="http://cygwin.paracoda.com/release/make/make-3.80-1.tar.bz2" target="_blank">
559 link</a>.
560 Also see the
561 <a href="http://developer.mozilla.org/en/docs/Windows_build_prerequisites_using_cygwin#make" target="_blank">
562 mozilla developer center</a>
563 on this topic.
564 </li>
565 </ul>
566 <p>
567 Information on GNU make, and access to ftp download sites, are
568 available on the
569 <a href="http://www.gnu.org/software/make/make.html" target="_blank">
570 GNU make web site
571 </a>.
572 The latest source to GNU make is available at
573 <a href="http://ftp.gnu.org/pub/gnu/make/" target="_blank">
574 ftp.gnu.org/pub/gnu/make/</a>.
575 </blockquote>
576 <!-- ------------------------------------------------------ -->
577 <hr>
578 <h3><a name="linux">Basic Linux System Setup</a></h3>
579 <blockquote>
580 <strong>i586 only:</strong>
581 The minimum recommended hardware for building the Linux version
582 is a Pentium class processor or better, at least 256 MB of RAM, and
583 approximately 1.5 GB of free disk space.
584 <p>
585 <strong>X64 only:</strong>
586 The minimum recommended hardware for building the Linux
587 version is an AMD Opteron class processor, at least 512 MB of RAM, and
588 approximately 4 GB of free disk space.
589 <p>
590 The build will use the tools contained in
591 <tt>/bin</tt> and
592 <tt>/usr/bin</tt>
593 of a standard installation of the Linux operating environment.
594 You should ensure that these directories are in your
595 <tt>PATH</tt>.
596 <p>
597 Note that some Linux systems have a habit of pre-populating
598 your environment variables for you, for example <tt>JAVA_HOME</tt>
599 might get pre-defined for you to refer to the JDK installed on
600 your Linux system.
601 You will need to unset <tt>JAVA_HOME</tt>.
602 It's a good idea to run <tt>env</tt> and verify the
603 environment variables you are getting from the default system
604 settings make sense for building the
605 OpenJDK.
606 </blockquote>
607 <!-- ------------------------------------------------------ -->
608 <h4><a name="linux_checklist">Basic Linux Check List</a></h4>
609 <blockquote>
610 <ol>
611 <li>
612 Install the
613 <a href="#bootjdk">Bootstrap JDK</a>, set
614 <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>.
615 </li>
616 <li>
617 Optionally install the
618 <a href="#binaryplugs">Binary Plugs</a>, set
619 <tt><a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</a></tt>.
620 </li>
621 <li>
622 <a href="#importjdk">Optional Import JDK</a>, set
623 <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>.
624 </li>
625 <li>
626 Install or upgrade the <a href="#freetype">FreeType development
627 package</a>.
628 </li>
629 <li>
630 Install
631 <a href="#ant">Ant</a>,
632 make sure it is in your PATH.
633 </li>
634 <li style="background-color:white">
635 <!-- OpenJDK 6 Specific -->
636 Install the
637 <a href="#motif">Motif header files</a>, set
638 <tt><a href="#ALT_MOTIF_DIR">ALT_MOTIF_DIR</a></tt>.
639 </li>
640 </ol>
641 </blockquote>
642 <!-- ------------------------------------------------------ -->
643 <hr>
644 <h3><a name="solaris">Basic Solaris System Setup</a></h3>
645 <blockquote>
646 The minimum recommended hardware for building the
647 Solaris SPARC version is an UltraSPARC with 512 MB of RAM.
648 For building
649 the Solaris x86 version, a Pentium class processor or better and at
650 least 512 MB of RAM are recommended.
651 Approximately 1.4 GB of free disk
652 space is needed for a 32-bit build.
653 <p>
654 If you are building the 64bit version, you should
655 run the command "isainfo -v" to verify that you have a
656 64-bit installation, it should say <tt>sparcv9</tt> or
657 <tt>amd64</tt>.
658 An additional 7 GB of free disk space is needed
659 for a 64-bit build.
660 <p>
661 The build uses the tools contained in <tt>/usr/ccs/bin</tt>
662 and <tt>/usr/bin</tt> of a standard developer or full installation of
663 the Solaris operating environment.
664 <p>
665 Solaris patches specific to the JDK can be downloaded from the
666 <a href="http://sunsolve.sun.com/show.do?target=patches/JavaSE" target="_blank">
667 SunSolve JDK Solaris patches download page</a>.
668 You should ensure that the latest patch cluster for
669 your version of the Solaris operating environment has also
670 been installed.
671 </blockquote>
672 <!-- ------------------------------------------------------ -->
673 <h4><a name="solaris_checklist">Basic Solaris Check List</a></h4>
674 <blockquote>
675 <ol>
676 <li>
677 Install the
678 <a href="#bootjdk">Bootstrap JDK</a>, set
679 <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>.
680 </li>
681 <li>
682 Install the
683 <a href="#binaryplugs">Binary Plugs</a>, set
684 <tt><a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</a></tt>.
685 </li>
686 <li>
687 <a href="#importjdk">Optional Import JDK</a>, set
688 <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>.
689 </li>
690 <li>
691 Install the
692 <a href="#studio">Sun Studio Compilers</a>, set
693 <a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a>.
694 </li>
695 <li>
696 Install the
697 <a href="#cups">CUPS Include files</a>, set
698 <tt><a href="#ALT_CUPS_HEADERS_PATH">ALT_CUPS_HEADERS_PATH</a></tt>.
699 </li>
700 <li>
701 Install
702 <a href="#ant">Ant</a>,
703 make sure it is in your PATH.
704 </li>
705 </ol>
706 </blockquote>
707 <!-- ------------------------------------------------------ -->
708 <hr>
709 <h3><a name="windows">Basic Windows System Setup</a></h3>
710 <blockquote>
711 <strong>i586 only:</strong>
712 The minimum recommended hardware for building the 32bit or X86
713 Windows version is an Pentium class processor or better, at least
714 512 MB of RAM, and approximately 600 MB of free disk space.
715 <strong>
716 NOTE: The Windows 2000 build machines need to use the
717 file system NTFS.
718 Build machines formatted to FAT32 will not work
719 because FAT32 doesn't support case-sensitivity in file names.
720 </strong>
721 <p>
722 <strong>X64 only:</strong>
723 The minimum recommended hardware for building
724 the Windows X64 version is an AMD Opteron class processor, at least 1
725 GB of RAM, and approximately 10 GB of free disk space.
726 </blockquote>
727 <!-- ------------------------------------------------------ -->
728 <h4><a name="paths">Windows Paths</a></h4>
729 <blockquote>
730 <strong>Windows:</strong>
731 Note that GNU make is a historic utility and is based very
732 heavily on shell scripting, so it does not tolerate the Windows habit
733 of having spaces in pathnames or the use of the <tt>\</tt>characters in pathnames.
734 Luckily on most Windows systems, you can use <tt>/</tt>instead of \, and
735 there is always a 'short' pathname without spaces for any path that
736 contains spaces.
737 Unfortunately, this short pathname can be somewhat dynamic and the
738 formula is difficult to explain.
739 You can use <tt>cygpath</tt> utility to map pathnames with spaces
740 or the <tt>\</tt>character into the <tt>C:/</tt> style of pathname
741 (called 'mixed'), e.g.
742 <tt>cygpath -s -m "<i>path</i>"</tt>.
743 <p>
744 The makefiles will try to translate any pathnames supplied
745 to it into the <tt>C:/</tt> style automatically.
746 <p>
747 Note that use of CYGWIN creates a unique problem with regards to
748 setting <a href="#path"><tt>PATH</tt></a>. Normally on Windows
749 the <tt>PATH</tt> variable contains directories
750 separated with the ";" character (Solaris and Linux uses ":").
751 With CYGWIN, it uses ":", but that means that paths like "C:/path"
752 cannot be placed in the CYGWIN version of <tt>PATH</tt> and
753 instead CYGWIN uses something like <tt>/cygdrive/c/path</tt>
754 which CYGWIN understands, but only CYGWIN understands.
755 So be careful with paths on Windows.
756 </blockquote>
757 <!-- ------------------------------------------------------ -->
758 <h4><a name="windows_checklist">Basic Windows Check List</a></h4>
759 <blockquote>
760 <ol>
761 <li>
762 Install the
763 <a href="#cygwin">CYGWIN product</a>.
764 </li>
765 <li>
766 Install the
767 <a href="#bootjdk">Bootstrap JDK</a>, set
768 <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>.
769 </li>
770 <li>
771 Install the
772 <a href="#binaryplugs">Binary Plugs</a>, set
773 <tt><a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</a></tt>..
774 </li>
775 <li>
776 <a href="#importjdk">Optional Import JDK</a>, set
777 <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>.
778 </li>
779 <li>
780 Install the
781 <a href="#msvc">Microsoft Visual Studio .NET 2003 Professional</a> or the
782 <a href="#mssdk">Microsoft Platform SDK</a>.
783 </li>
784 <li>
785 Setup all environment variables for compilers
786 (see <a href="#msvc">compilers</a>).
787 </li>
788 <li>
789 Install
790 <a href="#dxsdk">Microsoft DirectX SDK</a>.
791 </li>
792 <li>
793 Install
794 <a href="#ant">Ant</a>,
795 make sure it is in your PATH and set
796 <tt><a href="#ANT_HOME">ANT_HOME</a></tt>.
797 </li>
798 </ol>
799 </blockquote>
800 <!-- ------------------------------------------------------ -->
801 <hr>
802 <h3><a name="dependencies">Build Dependencies</a></h3>
803 <blockquote>
804 Depending on the platform, the OpenJDK build process has some basic
805 dependencies on components not part of the OpenJDK sources.
806 Some of these are specific to a platform, some even specific to
807 an architecture.
808 Each dependency will have a set of ALT variables that can be set
809 to tell the makefiles where to locate the component.
810 In most cases setting these ALT variables may not be necessary
811 and the makefiles will find defaults on the system in standard
812 install locations or through component specific variables.
813 <!-- ------------------------------------------------------ -->
814 <h4><a name="bootjdk">Bootstrap JDK</a></h4>
815 <blockquote>
816 All OpenJDK builds require access to the previously released
817 JDK 6, this is often called a bootstrap JDK.
818 <blockquote style="background-color:white">
819 <!-- OpenJDK 6 Specific -->
820 Normally the "boot" JDK is the previously released version
821 of the JDK, so it's unusual for a JDK 6 build like this to
822 require a JDK 6 "boot".
823 Unfortunately, it is currently required due to some JDK 6
824 dependencies in some of the sources.
825 </blockquote>
826 The JDK 6 binaries can be downloaded from Sun's
827 <a href="http://java.sun.com/javase/1.6.0/download.html" target="_blank">JDK 6 download site</a>.
828 For build performance reasons
829 is very important that this bootstrap JDK be made available on the
830 local disk of the machine doing the build.
831 You should always set
832 <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>
833 to point to the location of
834 the bootstrap JDK installation, this is the directory pathname
835 that contains a <tt>bin, lib, and include</tt>
836 It's also a good idea to also place its <tt>bin</tt> directory
837 in the <tt>PATH</tt> environment variable, although it's
838 not required.
839 <p>
840 <strong>Solaris:</strong>
841 Some pre-installed JDK images may be available to you in the
842 directory <tt>/usr/jdk/instances</tt>.
843 If you don't set
844 <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>
845 The makefiles will look in that location for a JDK it can use.
846 <p>
847 <strong>Linux:</strong>
848 Many GNU/Linux distributions already include OpenJDK 6. OpenJDK 6
849 can be used to bootstrap itself, so installing the corresponding
850 distribution package is sufficient. You'll still need to set
851 <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>, though.
852 </blockquote>
853 <!-- ------------------------------------------------------ -->
854 <h4><a name="binaryplugs">Binary Plugs</a></h4>
855 <blockquote>
856 Not all of the source code that makes up the JDK is available
857 under an open-source license.
858 This is a temporary situation and most of these binary plugs have
859 been replaced with fully open source replacements, except for SNMP.
860 You don't to download and use binary plugs in order to build a
861 complete OpenJDK image, and you don't need them to create a JDK 6
862 implementation. If you insist on using the binary plugs,
863 you must first download and install the appropriate
864 binary plug bundles for the OpenJDK, go to the
865 <a href="http://openjdk.java.net" target="_blank">OpenJDK</a> site and select
866 the
867 <!-- OpenJDK 6 Specific -->
868 <b style="background-color:white">
869 "Bundles(6)"
870 </b>
871 link and download the binaryplugs for
872 your particular platform.
873 The file downloaded is a jar file that must be extracted by running
874 the jar file with:
875 <blockquote style="background-color:white">
876 <!-- OpenJDK 6 Specific -->
877 <pre>
878 <tt>java -jar jdk-6-ea-plug-b<i>nn</i>-<i>os</i>-<i>arch</i>-<i>dd</i>_<i>month</i>_<i>year</i>.jar</tt>
879 </pre>
880 </blockquote>
881 A prompt will be issued for acceptance of these binary plug files.
882 During the OpenJDK build process these "binary plugs"
883 for the encumbered components will be copied into your
884 resulting OpenJDK binary build image.
885 These binary plug files are only for the purpose of
886 building an OpenJDK binary.
887 Make sure you set
888 <tt><a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</a></tt>
889 to the root of this installation.
890 </blockquote>
891 <!-- ------------------------------------------------------ -->
892 <h4><a name="importjdk">Optional Import JDK</a></h4>
893 <blockquote>
894 The <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>
895 setting is only needed if you are not building the entire
896 JDK. For example, if you have built the entire JDK once, and
897 wanted to avoid repeatedly building the Hotspot VM, you could
898 set this to the location of the previous JDK install image
899 and the build will copy the needed files from this import area.
900 </blockquote>
901 <!-- ------------------------------------------------------ -->
902 <h4><a name="ant">Ant</a></h4>
903 <blockquote>
904 All OpenJDK builds require access to least Ant 1.6.5.
905 The Ant tool is available from the
906 <a href="http://ant.apache.org" target="_blank">
907 Ant download site</a>.
908 You should always make sure <tt>ant</tt> is in your PATH, and
909 on Windows you may also need to set
910 <tt><a href="#ANT_HOME">ANT_HOME</a></tt>
911 to point to the location of
912 the Ant installation, this is the directory pathname
913 that contains a <tt>bin and lib</tt>.
914 </blockquote>
915 <!-- ------------------------------------------------------ -->
916 <h4><a name="cacerts">Certificate Authority File (cacert)</a></h4>
917 <blockquote>
918 See <a href="http://en.wikipedia.org/wiki/Certificate_Authority" target="_blank">
919 http://en.wikipedia.org/wiki/Certificate_Authority</a>
920 for a better understanding of the Certificate Authority (CA).
921 A certificates file named "cacerts"
922 represents a system-wide keystore with CA certificates.
923 In JDK and JRE
924 binary bundles, the "cacerts" file contains root CA certificates from
925 several public CAs (e.g., VeriSign, Thawte, and Baltimore).
926 The source contain a cacerts file
927 without CA root certificates.
928 Formal JDK builders will need to secure
929 permission from each public CA and include the certificates into their
930 own custom cacerts file.
931 Failure to provide a populated cacerts file
932 will result in verification errors of a certificate chain during runtime.
933 The variable
934 <tt><a href="#ALT_CACERTS_FILE">ALT_CACERTS_FILE</a></tt>
935 can be used to override the default location of the
936 cacerts file that will get placed in your build.
937 By default an empty cacerts file is provided and that should be
938 fine for most JDK developers.
939 </blockquote>
940 <!-- ------------------------------------------------------ -->
941 <h4><a name="compilers">Compilers</a></h4>
942 <blockquote>
943 <strong><a name="gcc">Linux gcc/binutils</a></strong>
944 <blockquote>
945 The GNU gcc compiler version should be 4 or newer.
946 The compiler used should be the default compiler installed
947 in <tt>/usr/bin</tt>.
948 </blockquote>
949 <strong><a name="studio">Solaris: Sun Studio</a></strong>
950 <blockquote>
951 At a minimum, the
952 <a href="http://developers.sun.com/sunstudio/index.jsp" target="_blank">
953 Sun Studio 11 Compilers</a>
954 (containing version 5.8 of the C and C++ compilers) is required,
955 with patches from the
956 <a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/patch-access" target="_blank">
957 SunSolve web site</a>.
958 <p>
959 Set
960 <a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a>
961 to point to the location of
962 the compiler binaries, and place this location in the <tt>PATH</tt>.
963 <p>
964 The Sun Studio Express compilers at:
965 <a href="http://developers.sun.com/sunstudio/downloads/express.jsp" target="_blank">
966 Sun Studio Express Download site</a>
967 are also an option, although these compilers have not
968 been extensively used yet.
969 </blockquote>
970 <strong><a name="msvc">Windows i586: Microsoft Visual Studio .NET 2003 Professional</a></strong>
971 <blockquote>
972 The 32-bit OpenJDK Windows build
973 requires Microsoft Visual Studio .NET 2003 (VS2003) Professional
974 Edition compiler.
975 The compiler and other tools are expected to reside
976 in the location defined by the variable <tt>VS71COMNTOOLS</tt> which
977 is set by the Microsoft Visual Studio .NET installer.
978 <p>
979 Once the compiler is installed,
980 it is recommended that you run <tt>VCVARS32.BAT</tt>
981 to set the compiler environment variables
982 <tt>MSVCDIR</tt>,
983 <tt>INCLUDE</tt>,
984 <tt>LIB</tt>, and
985 <tt>PATH</tt>
986 prior to building the
987 OpenJDK.
988 The above environment variables <b>MUST</b> be set.
989 <p>
990 The Microsoft Visual Studio .NET 2005 (VS2005) compiler
991 will not work at this time due to the new runtime dll
992 and the manifest requirements.
993 </blockquote>
994 <strong><a name="mssdk">Windows X64: Microsoft Platform SDK April 2005</a></strong>
995 <blockquote>
996 On <b>X64</b>, the Microsoft Platform Software
997 Development Kit (SDK), April 2005 Edition compiler,
998 is required for building the OpenJDK
999 because it contains the C/C++ compiler.
1000 You will need to minimally install the Core SDK and
1001 the MDAC SDK features of this compiler.
1002 <p>
1003 Once the Platform SDK is installed,
1004 it is recommended that you run <tt>SetEnv.Cmd /X64</tt>
1005 to set the compiler environment variables
1006 <tt>MSSDK</tt>,
1007 <tt>MSTOOLS</tt>,
1008 <tt>INCLUDE</tt>,
1009 <tt>LIB</tt>, and
1010 <tt>PATH</tt>
1011 prior to building the
1012 OpenJDK.
1013 The above environment variables <b>MUST</b> be set.
1014 <p>
1015 Note that this compiler may say it's version is a
1016 Microsoft Visual Studio .NET 2005 (VS2005), but be careful,
1017 it will not match the official VS2005 product.
1018 This Platform SDK compiler is only used on X64 builds.
1019 </blockquote>
1020 </blockquote>
1021 <!-- ------------------------------------------------------ -->
1022 <h4><a name="zip">Zip and Unzip</a></h4>
1023 <blockquote>
1024 Version 2.2 (November 3rd 1997) or newer of the zip utility
1025 and version 5.12 or newer of the unzip utility is needed
1026 to build the JDK.
1027 With Solaris, Linux, and Windows CYGWIN, the zip and unzip
1028 utilities installed on the system should be fine.
1029 Information and the source code for
1030 ZIP.EXE and UNZIP.EXE is available on the
1031 <a href="http://www.info-zip.org"
1032 target="_blank">info-zip web site</a>.
1033 </blockquote>
1034 <!-- ------------------------------------------------------ -->
1035 <h4><a name="cups">Common UNIX Printing System (CUPS) Headers (Solaris &amp; Linux)</a></h4>
1036 <blockquote>
1037 <strong>Solaris:</strong>
1038 CUPS header files are required for building the
1039 OpenJDK on Solaris.
1040 The Solaris header files can be obtained by installing
1041 the package <strong>SFWcups</strong> from the Solaris Software
1042 Companion CD/DVD, these often will be installed into
1043 <tt>/opt/sfw/cups</tt>.
1044 <p>
1045 <strong>Linux:</strong>
1046 CUPS header files are required for building the
1047 OpenJDK on Linux.
1048 The Linux header files are usually available from a "cups"
1049 development package, it's recommended that you try and use
1050 the package provided by the particular version of Linux that
1051 you are using.
1052 <p>
1053 The CUPS header files can always be downloaded from
1054 <a href="http://www.cups.org" target="_blank">www.cups.org</a>.
1055 The variable
1056 <tt><a href="#ALT_CUPS_HEADERS_PATH">ALT_CUPS_HEADERS_PATH</a></tt>
1057 can be used to override the default location of the
1058 CUPS Header files.
1059 </blockquote>
1060 <!-- ------------------------------------------------------ -->
1061 <h4><a name="motif">Motif Headers (Solaris &amp; Linux)</a></h4>
1062 <blockquote style="background-color:white">
1063 <!-- OpenJDK 6 Specific -->
1064 Motif headers (not libraries) are required for building the
1065 OpenJDK 6.
1066 <p>
1067 <strong>Solaris:</strong>
1068 Normally these files can be found on Solaris systems
1069 at /usr/include/Xm, so on Solaris systems no further downloads
1070 should be needed.
1071 <p>
1072 <strong>Linux:</strong>
1073 On Linux, your particular Linux distribution may provide a
1074 "motif" development package you can install. If this package
1075 installs the files into /usr/include/Xm, no further action should
1076 be needed.
1077 An acceptable version of these Motif header files are
1078 available in the source bundle
1079 <a href="http://www.openbsd.org/3.9_packages/hppa/openmotif-2.1.30.5p1.tgz-long.html">
1080 openmotif-2.1.30.5p1.tgz</a>
1081 from
1082 <a href="http://www.openbsd.org/">www.openbsd.org</a>.
1083 You would need to install the package and set the environment variable
1084 <tt><a href="#ALT_MOTIF_DIR">ALT_MOTIF_DIR</a></tt>
1085 to refer to the top of this installation.
1086 </blockquote>
1087 <!-- ------------------------------------------------------ -->
1088 <h4><a name="freetype">FreeType 2</a></h4>
1089 <blockquote>
1090 Version 2.3 or newer of FreeType is required for building the OpenJDK.
1091 On Unix systems required files can be available as part of your
1092 distribution (while you still may need to upgrade them).
1093 Note that you need development version of package that
1094 includes both FreeType library and header files.
1095 <p>
1096 You can always download latest FreeType version from the
1097 <a href="http://www.freetype.org" target="_blank">FreeType website</a>.
1098 <p>
1099 Makefiles will try to pick FreeType from /usr/lib and /usr/include.
1100 In case it is installed elsewhere you will need to set environment
1101 variables
1102 <tt><a href="#ALT_FREETYPE_LIB_PATH">ALT_FREETYPE_LIB_PATH</a></tt>
1103 and
1104 <tt><a href="#ALT_FREETYPE_HEADERS_PATH">ALT_FREETYPE_HEADERS_PATH</a></tt>
1105 to refer to place where library and header files are installed.
1106 </blockquote>
1107 <!-- ------------------------------------------------------ -->
1108 <h4><a name="alsa">Advanced Linux Sound Architecture (ALSA) (Linux only)</a></h4>
1109 <blockquote>
1110 <strong>Linux only:</strong>
1111 Version 0.9.1 or newer of the ALSA files are
1112 required for building the OpenJDK on Linux.
1113 These Linux files are usually available from an "alsa"
1114 of "libasound"
1115 development package, it's highly recommended that you try and use
1116 the package provided by the particular version of Linux that
1117 you are using.
1118 The makefiles will check this emit a sanity error if it is
1119 missing or the wrong version.
1120 <p>
1121 In particular, older Linux systems will likely not have the
1122 right version of ALSA installed, for example
1123 Redhat AS 2.1 U2 and SuSE 8.1 do not include a sufficiently
1124 recent ALSA distribution.
1125 On rpm-based systems, you can see if ALSA is installed by
1126 running this command:
1127 <pre>
1128 <tt>rpm -qa | grep alsa</tt>
1129 </pre>
1130 Both <tt>alsa</tt> and <tt>alsa-devel</tt> packages are needed.
1131 <p>
1132 If your distribution does not come with ALSA, and you can't
1133 find ALSA packages built for your particular system,
1134 you can try to install the pre-built ALSA rpm packages from
1135 <a href="http://www.freshrpms.net/" target="_blank">
1136 <tt>www.freshrpms.net</tt></a>.
1137 Note that installing a newer ALSA could
1138 break sound output if an older version of ALSA was previously
1139 installed on the system, but it will enable JDK compilation.
1140 <blockquote>
1141 Installation: execute as root<br>
1142 [i586]: <code>rpm -Uv --force alsa-lib-devel-0.9.1-rh61.i386.rpm</code><br>
1143 [x64]: <code>rpm -Uv --force alsa-lib-devel-0.9.8-amd64.x86_64.rpm</code><br>
1144 Uninstallation:<br>
1145 [i586]: <code>rpm -ev alsa-lib-devel-0.9.1-rh61</code><br>
1146 [x64]:<code>rpm -ev alsa-lib-devel-0.9.8-amd64</code><br>
1147 Make sure that you do not link to the static library
1148 (<tt>libasound.a</tt>),
1149 by verifying that the dynamic library (<tt>libasound.so</tt>) is
1150 correctly installed in <tt>/usr/lib</tt>.
1151 </blockquote>
1152 As a last resort you can go to the
1153 <a href="http://www.alsa-project.org" target="_blank">
1154 Advanced Linux Sound Architecture Site</a> and build it from
1155 source.
1156 <blockquote>
1157 Download driver and library
1158 source tarballs from
1159 <a href="http://www.alsa-project.org" target="_blank">ALSA's homepage</a>.
1160 As root, execute the following
1161 commands (you may need to adapt the version number):
1162 <pre>
1163 <tt>
1164 $ tar xjf alsa-driver-0.9.1.tar.bz2
1165 $ cd alsa-driver-0.9.1
1166 $ ./configure
1167 $ make install
1168 $ cd ..
1169 $ tar xjf alsa-lib-0.9.1.tar.bz2
1170 $ cd alsa-lib-0.9.1
1171 $ ./configure
1172 $ make install
1173 </tt>
1174 </pre>
1175 Should one of the above steps fail, refer to the documentation on
1176 ALSA's home page.
1177 </blockquote>
1178 Note that this is a minimum install that enables
1179 building the JDK platform. To actually use ALSA sound drivers, more
1180 steps are necessary as outlined in the documentation on ALSA's homepage.
1181 <p>
1182 ALSA can be uninstalled by executing <tt>make uninstall</tt> first in
1183 the <tt>alsa-lib-0.9.1</tt> directory and then in
1184 <tt>alsa-driver-0.9.1</tt>.
1185 </blockquote>
1186 There are no ALT* variables to change the assumed locations of ALSA,
1187 the makefiles will expect to find the ALSA include files and library at:
1188 <tt>/usr/include/alsa</tt> and <tt>/usr/lib/libasound.so</tt>.
1189 </blockquote>
1190 <!-- ------------------------------------------------------ -->
1191 <h4>Windows Specific Dependencies</h4>
1192 <blockquote>
1193 <strong>Unix Command Tools (<a name="cygwin">CYGWIN</a>)</strong>
1194 <blockquote>
1195 The OpenJDK requires access to a set of unix command tools
1196 on Windows which can be supplied by
1197 <a href="http://www.cygwin.com" target="_blank">CYGWIN</a>.
1198 <p>
1199 The OpenJDK build requires CYGWIN version 1.5.12 or newer.
1200 Information about CYGWIN can
1201 be obtained from the CYGWIN website at
1202 <a href="http://www.cygwin.com" target="_blank">www.cygwin.com</a>.
1203 <p>
1204 By default CYGWIN doesn't install all the tools required for building
1205 the OpenJDK.
1206 Along with the default installation, you need to install
1207 the following tools.
1208 <blockquote>
1209 <table border="1">
1210 <thead>
1211 <tr>
1212 <td>Binary Name</td>
1213 <td>Package</td>
1214 <td>Description</td>
1215 </tr>
1216 </thead>
1217 <tbody>
1218 <tr>
1219 <td>ar.exe</td>
1220 <td>Devel</td>
1221 <td>binutils: The GNU assembler, linker and binary
1222 utilities</td>
1223 </tr>
1224 <tr>
1225 <td>make.exe</td>
1226 <td>Devel</td>
1227 <td>make: The GNU version of the 'make' utility</td>
1228 </tr>
1229 <tr>
1230 <td>m4.exe</td>
1231 <td>Interpreters</td>
1232 <td>m4: GNU implementation of the traditional Unix macro
1233 processor</td>
1234 </tr>
1235 <tr>
1236 <td>cpio.exe</td>
1237 <td>Utils</td>
1238 <td>cpio: A program to manage archives of files</td>
1239 </tr>
1240 <tr>
1241 <td>awk.exe</td>
1242 <td>Utils</td>
1243 <td>awk: Pattern-directed scanning and processing language</td>
1244 </tr>
1245 <tr>
1246 <td>file.exe</td>
1247 <td>Utils</td>
1248 <td>file: Determines file type using 'magic' numbers</td>
1249 </tr>
1250 <tr>
1251 <td>zip.exe</td>
1252 <td>Utils</td>
1253 <td>zip: Package and compress (archive) files</td>
1254 </tr>
1255 <tr>
1256 <td>unzip.exe</td>
1257 <td>Utils</td>
1258 <td>unzip: Extract compressed files in a ZIP archive</td>
1259 </tr>
1260 <tr>
1261 <td>free.exe</td>
1262 <td>Utils</td>
1263 <td>free: Display amount of free and used memory in the system</td>
1264 </tr>
1265 </tbody>
1266 </table>
1267 </blockquote>
1268 <p>
1269 Note that the CYGWIN software can conflict with other non-CYGWIN
1270 software on your Windows system.
1271 CYGWIN provides a
1272 <a href="http://cygwin.com/faq/faq.using.html" target="_blank">FAQ</a> for
1273 known issues and problems, of particular interest is the
1274 section on
1275 <a href="http://cygwin.com/faq/faq.using.html#faq.using.bloda" target="_blank">
1276 BLODA (applications that interfere with CYGWIN)</a>.
1277 </blockquote>
1278 <strong><a name="dxsdk">Microsoft DirectX 9.0 SDK header files and libraries</a></strong>
1279 <blockquote>
1280 Microsoft DirectX 9.0 SDK (Summer 2004)
1281 headers are required for building
1282 OpenJDK.
1283 This SDK can be downloaded from
1284 <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=FD044A42-9912-42A3-9A9E-D857199F888E&amp;displaylang=en" target="_blank">
1285 Microsoft DirectX 9.0 SDK (Summer 2004)</a>.
1286 If the link above becomes obsolete, the SDK can be found from
1287 <a href="http://download.microsoft.com" target="_blank">the Microsoft Download Site</a>
1288 (search with "DirectX 9.0 SDK Update Summer 2004").
1289 The location of this SDK can be set with
1290 <tt><a href="#ALT_DXSDK_PATH">ALT_DXSDK_PATH</a></tt>
1291 but it's normally found via the DirectX environment variable
1292 <tt>DXSDK_DIR</tt>.
1293 </blockquote>
1294 <strong><a name="msvcrt"><tt>MSVCRT.DLL</tt></a></strong>
1295 <blockquote>
1296 <strong>i586 only:</strong>
1297 The OpenJDK 32bit build requires access to
1298 <tt>MSVCRT.DLL</tt> version 6.00.8337.0 or newer.
1299 If the <tt>MSVCRT.DLL</tt> is not installed in
1300 the system32 directory set the
1301 <a href="#ALT_MSVCRT_DLL_PATH"><tt>ALT_MSVCRT_DLL_PATH</tt></a>
1302 variable to the location.
1303 <p>
1304 <strong>X64 only:</strong>
1305 The OpenJDK 64bit build requires access to
1306 <tt>MSVCRT.DLL</tt> version 7.0.3790.0 or newer, which is
1307 usually supplied by the
1308 <a href="#mssdk">Platform SDK</a>.
1309 If it is not available from the Platform SDK,
1310 set the
1311 <a href="#ALT_MSVCRT_DLL_PATH"><tt>ALT_MSVCRT_DLL_PATH</tt></a>
1312 variable to the location.
1313 </blockquote>
1314 <strong><tt><a name="msvcr71">MSVCR71.DLL</a></tt></strong>
1315 <blockquote>
1316 <strong>i586 only:</strong>
1317 The
1318 OpenJDK
1319 build requires access to
1320 MSVCR71.DLL version 7.10.3052.4 or newer which should be
1321 supplied by the
1322 <a href="#msvc">Visual Studio product</a>
1323 If the <tt>MSVCR71.DLL</tt> is not available from the
1324 Visual Studio product
1325 set the
1326 <a href="#ALT_MSVCR71_DLL_PATH"><tt>ALT_MSVCR71_DLL_PATH</tt></a>
1327 variable to the location.
1328 </blockquote>
1329 </blockquote>
1330 <!-- ------------------------------------------------------ -->
1331 <hr>
1332 <h2><a name="creating">Creating the Build</a></h2>
1333 <blockquote>
1334 Once a machine is setup to build the OpenJDK,
1335 the steps to create the build are fairly simple.
1336 The various ALT settings can either be made into variables
1337 or can be supplied on the
1338 <a href="#gmake"><tt><i>gmake</i></tt></a>
1339 command.
1340 <ol>
1341 <li>Use the sanity rule to double check all the ALT settings:
1342 <blockquote>
1343 <tt>
1344 <i>gmake</i>
1345 sanity
1346 [ARCH_DATA_MODEL=<i>32 or 64</i>]
1347 [other "ALT_" overrides]
1348 </tt>
1349 </blockquote>
1350 </li>
1351 <li>Start the build with the command:
1352 <blockquote>
1353 <tt>
1354 <i>gmake</i>
1355 [ARCH_DATA_MODEL=<i>32 or 64</i>]
1356 [ALT_OUTPUTDIR=<i>output_directory</i>]
1357 [other "ALT_" overrides]
1358 </tt>
1359 </blockquote>
1360 </li>
1361 </ol>
1362 <p>
1363 <strong>Solaris:</strong>
1364 Note that ARCH_DATA_MODEL is really only needed on Solaris to
1365 indicate you want to built the 64-bit version.
1366 And before the Solaris 64-bit binaries can be used, they
1367 must be merged with the binaries from a separate 32-bit build.
1368 The merged binaries may then be used in either 32-bit or 64-bit mode, with
1369 the selection occurring at runtime
1370 with the <tt>-d32</tt> or <tt>-d64</tt> options.
1371 </blockquote>
1372 <!-- ------------------------------------------------------ -->
1373 <hr>
1374 <h2><a name="testing">Testing the Build</a></h2>
1375 <blockquote>
1376 When the build is completed, you should see the generated
1377 binaries and associated files in the <tt>j2sdk-image</tt>
1378 directory in the output directory.
1379 The default output directory is
1380 <tt>build/<i>platform</i></tt>,
1381 where <tt><i>platform</i></tt> is one of
1382 <tt><ul>
1383 <li>solaris-sparc</li>
1384 <li>solaris-sparcv9</li>
1385 <li>solaris-i586</li>
1386 <li>solaris-amd64</li>
1387 <li>linux-i586</li>
1388 <li>linux-amd64</li>
1389 <li>windows-i586</li>
1390 <li>windows-amd64</li>
1391 </ul></tt>
1392 In particular, the
1393 <tt>build/<i>platform</i>/j2sdk-image/bin</tt>
1394 directory should contain executables for the
1395 OpenJDK tools and utilities.
1396 <p>
1397 You can test that the build completed properly by using the build
1398 to run the various demos that you will find in the
1399 <tt>build/<i>platform</i>/j2sdk-image/demo</tt>
1400 directory.
1401 <p>
1402 The provided regression tests can be run with the <tt>jtreg</tt>
1403 utility from
1404 <a href="http://openjdk.java.net/jtreg/" target="_blank">the jtreg site</a>.
1405 </blockquote>
1406 <!-- ------------------------------------------------------ -->
1407 <hr>
1408 <h2><a name="variables">Environment/Make Variables</a></h2>
1409 <p>
1410 Some of the
1411 environment or make variables (just called <b>variables</b> in this
1412 document) that can impact the build are:
1413 <blockquote>
1414 <dl>
1415 <dt><a name="path"><tt>PATH</tt></a> </dt>
1416 <dd>Typically you want to set the <tt>PATH</tt> to include:
1417 <ul>
1418 <li>The location of the GNU make binary</li>
1419 <li>The location of the Bootstrap JDK <tt>java</tt>
1420 (see <a href="#bootjdk">Bootstrap JDK</a>)</li>
1421 <li>The location of the C/C++ compilers
1422 (see <a href="#compilers"><tt>compilers</tt></a>)</li>
1423 <li>The location or locations for the Unix command utilities
1424 (e.g. <tt>/usr/bin</tt>)</li>
1425 </ul>
1426 </dd>
1427 <dt><tt>MILESTONE</tt> </dt>
1428 <dd>
1429 The milestone name for the build (<i>e.g.</i>"beta").
1430 The default value is "internal".
1431 </dd>
1432 <dt><tt>BUILD_NUMBER</tt> </dt>
1433 <dd>
1434 The build number for the build (<i>e.g.</i> "b27").
1435 The default value is "b00".
1436 </dd>
1437 <dt><a name="arch_data_model"><tt>ARCH_DATA_MODEL</tt></a></dt>
1438 <dd>The <tt>ARCH_DATA_MODEL</tt> variable
1439 is used to specify whether the build is to generate 32-bit or 64-bit
1440 binaries.
1441 The Solaris build supports either 32-bit or 64-bit builds, but
1442 Windows and Linux will support only one, depending on the specific
1443 OS being used.
1444 Normally, setting this variable is only necessary on Solaris.
1445 Set <tt>ARCH_DATA_MODEL</tt> to <tt>32</tt> for generating 32-bit binaries,
1446 or to <tt>64</tt> for generating 64-bit binaries.
1447 </dd>
1448 <dt><a name="ALT_BOOTDIR"><tt>ALT_BOOTDIR</tt></a></dt>
1449 <dd>
1450 The location of the bootstrap JDK installation.
1451 See <a href="#bootjdk">Bootstrap JDK</a> for more information.
1452 You should always install your own local Bootstrap JDK and
1453 always set <tt>ALT_BOOTDIR</tt> explicitly.
1454 </dd>
1455 <dt><a name="ALT_BINARY_PLUGS_PATH"><tt>ALT_BINARY_PLUGS_PATH</tt></a></dt>
1456 <dd>
1457 The location of the binary plugs installation.
1458 See <a href="#binaryplugs">Binary Plugs</a> for more information.
1459 You should always have a local copy of a
1460 recent Binary Plugs install image
1461 and set this variable to that location.
1462 </dd>
1463 <dt><a name="ALT_JDK_IMPORT_PATH"><tt>ALT_JDK_IMPORT_PATH</tt></a></dt>
1464 <dd>
1465 The location of a previously built JDK installation.
1466 See <a href="#importjdk">Optional Import JDK</a> for more information.
1467 </dd>
1468 <dt><a name="ALT_OUTPUTDIR"><tt>ALT_OUTPUTDIR</tt></a> </dt>
1469 <dd>
1470 An override for specifying the (absolute) path of where the
1471 build output is to go.
1472 The default output directory will be build/<i>platform</i>.
1473 </dd>
1474 <dt><a name="ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a> </dt>
1475 <dd>
1476 The location of the C/C++ compiler.
1477 The default varies depending on the platform.
1478 </dd>
1479 <dt><tt><a name="ALT_CACERTS_FILE">ALT_CACERTS_FILE</a></tt></dt>
1480 <dd>
1481 The location of the <a href="#cacerts">cacerts</a> file.
1482 The default will refer to
1483 <tt>jdk/src/share/lib/security/cacerts</tt>.
1484 </dd>
1485 <dt><a name="ALT_CUPS_HEADERS_PATH"><tt>ALT_CUPS_HEADERS_PATH</tt></a> </dt>
1486 <dd>
1487 The location of the CUPS header files.
1488 See <a href="#cups">CUPS information</a> for more information.
1489 If this path does not exist the fallback path is
1490 <tt>/usr/include</tt>.
1491 </dd>
1492 <!-- OpenJDK 6 Specific -->
1493 <dt style="background-color:white"><a name="ALT_MOTIF_DIR"><tt>ALT_MOTIF_DIR</tt></a></dt>
1494 <dd style="background-color:white">
1495 The location of the Motif 2.1 headers and libraries.
1496 See <a href="#motif">Motif</a> for details.
1497 </dd>
1498 <dt><a name="ALT_FREETYPE_LIB_PATH"><tt>ALT_FREETYPE_LIB_PATH</tt></a></dt>
1499 <dd>
1500 The location of the FreeType shared library.
1501 See <a href="#freetype">FreeType information</a> for details.
1502 </dd>
1503 <dt><a name="ALT_FREETYPE_HEADERS_PATH"><tt>ALT_FREETYPE_HEADERS_PATH</tt></a></dt>
1504 <dd>
1505 The location of the FreeType header files.
1506 See <a href="#freetype">FreeType information</a> for details.
1507 </dd>
1508 <dt><a name="ALT_JDK_DEVTOOLS_PATH"><tt>ALT_JDK_DEVTOOLS_PATH</tt></a></dt>
1509 <dd>
1510 The default root location of the devtools.
1511 The default value is
1512 <tt>$(ALT_SLASH_JAVA)/devtools</tt>.
1513 </dd>
1514 <dt><tt><a name="ALT_DEVTOOLS_PATH">ALT_DEVTOOLS_PATH</a></tt> </dt>
1515 <dd>
1516 The location of tools like the
1517 <a href="#zip"><tt>zip</tt> and <tt>unzip</tt></a>
1518 binaries, but might also contain the GNU make utility
1519 (<tt><i>gmake</i></tt>).
1520 So this area is a bit of a grab bag, especially on Windows.
1521 The default value depends on the platform and
1522 Unix Commands being used.
1523 On Linux the default will be
1524 <tt>$(ALT_JDK_DEVTOOLS_PATH)/linux/bin</tt>,
1525 on Solaris
1526 <tt>$(ALT_JDK_DEVTOOLS_PATH)/<i>{sparc,i386}</i>/bin</tt>,
1527 on Windows with MKS
1528 <tt>%SYSTEMDRIVE%/UTILS</tt>,
1529 and on Windows with CYGWIN
1530 <tt>/usr/bin</tt>.
1531 </dd>
1532 <dt><a name="ALT_UNIXCOMMAND_PATH"><tt>ALT_UNIXCOMMAND_PATH</tt></a> </dt>
1533 <dd>
1534 An override for specifying where the
1535 Unix command set are located.
1536 The default location varies depending on the platform,
1537 <tt>"%SYSTEMDRIVE%/MKSNT"</tt> or
1538 <tt>$(ROOTDIR)</tt> on Windows with MKS, otherwise it's
1539 <tt>"/bin"</tt> or <tt>/usr/bin</tt>.
1540 </dd>
1541 <dt><a name="ALT_UNIXCCS_PATH"><tt>ALT_UNIXCCS_PATH</tt></a></dt>
1542 <dd>
1543 <strong>Solaris only:</strong>
1544 An override for specifying where the Unix CCS
1545 command set are located.
1546 The default location is <tt>/usr/ccs/bin</tt>
1547 </dd>
1548 <dt><a name="ALT_USRBIN_PATH"><tt>ALT_USRBIN_PATH</tt></a></dt>
1549 <dd>
1550 An override for specifying where the
1551 Unix <tt>/usr/bin</tt> commands are located. You usually do not need
1552 to set this variable: the default location is <tt>/usr/bin</tt>)
1553 </dd>
1554 <dt><a name="ALT_SLASH_JAVA"><tt>ALT_SLASH_JAVA</tt></a></dt>
1555 <dd>
1556 The default root location for many of the ALT path locations
1557 of the following ALT variables.
1558 The default value is
1559 <tt>"/java"</tt> on Solaris and Linux,
1560 <tt>"J:"</tt> on Windows.
1561 </dd>
1562 <dt><a name="ALT_BUILD_JDK_IMPORT_PATH"><tt>ALT_BUILD_JDK_IMPORT_PATH</tt></a></dt>
1563 <dd>
1564 These are useful in managing builds on multiple platforms.
1565 The default network location for all of the import JDK images
1566 for all platforms.
1567 If <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>
1568 is not set, this directory will be used and should contain
1569 the following directories:
1570 <tt>solaris-sparc</tt>,
1571 <tt>solaris-i586</tt>,
1572 <tt>solaris-sparcv9</tt>,
1573 <tt>solaris-amd64</tt>,
1574 <tt>linux-i586</tt>,
1575 <tt>linux-amd64</tt>,
1576 <tt>windows-i586</tt>,
1577 and
1578 <tt>windows-amd64</tt>.
1579 Where each of these directories contain the import JDK image
1580 for that platform.
1581 </dd>
1582 <dt><a name="ALT_BUILD_BINARY_PLUGS_PATH"><tt>ALT_BUILD_BINARY_PLUGS_PATH</tt></a></dt>
1583 <dd>
1584 These are useful in managing builds on multiple platforms.
1585 The default network location for all of the binary plug images
1586 for all platforms.
1587 If <tt><a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</a></tt>
1588 is not set, this directory will be used and should contain
1589 the following directories:
1590 <tt>solaris-sparc</tt>,
1591 <tt>solaris-i586</tt>,
1592 <tt>solaris-sparcv9</tt>,
1593 <tt>solaris-amd64</tt>,
1594 <tt>linux-i586</tt>,
1595 <tt>linux-amd64</tt>,
1596 <tt>windows-i586</tt>,
1597 and
1598 <tt>windows-amd64</tt>.
1599 Where each of these directories contain the binary plugs image
1600 for that platform.
1601 </dd>
1602 <dt><a name="OPENJDK"><tt>OPENJDK</tt></a></dt>
1603 <dd>
1604 Flag used to decide whether the build is a pure OpenJDK
1605 build (when set to <code>true</code>). You usually do not
1606 need to set this variable.
1607 </dd>
1608 <dt><strong>Windows specific:</strong></dt>
1609 <dd>
1610 <dl>
1611 <dt><a name="ALT_MSDEVTOOLS_PATH"><tt>ALT_MSDEVTOOLS_PATH</tt></a> </dt>
1612 <dd>
1613 The location of the Microsoft Visual Studio .NET 2003
1614 tools 'bin' directory.
1615 The default is usually derived from
1616 <a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a>.
1617 </dd>
1618 <dt><tt><a name="ALT_DXSDK_PATH">ALT_DXSDK_PATH</a></tt> </dt>
1619 <dd>
1620 The location of the
1621 <a href="#dxsdk">Microsoft DirectX 9 SDK</a>.
1622 The default will be to try and use the DirectX environment
1623 variable <tt>DXSDK_DIR</tt>,
1624 failing that, look in <tt>C:/DXSDK</tt>.
1625 </dd>
1626 <dt><tt><a name="ALT_MSVCRT_DLL_PATH">ALT_MSVCRT_DLL_PATH</a></tt> </dt>
1627 <dd>
1628 The location of the
1629 <a href="#msvcrt"><tt>MSVCRT.DLL</tt></a>.
1630 </dd>
1631 <dt><tt><a name="ALT_MSVCR71_DLL_PATH">ALT_MSVCR71_DLL_PATH</a></tt> </dt>
1632 <dd>
1633 <strong>i586 only:</strong>
1634 The location of the
1635 <a href="#msvcr71"><tt>MSVCR71.DLL</tt></a>.
1636 </dd>
1637 </dl>
1638 </dd>
1639 </dl>
1640 </blockquote>
1641 <!-- ------------------------------------------------------ -->
1642 <hr>
1643 <h2><a name="troubleshooting">Troubleshooting</a></h2>
1644 <blockquote>
1645 A build can fail for any number of reasons.
1646 Most failures
1647 are a result of trying to build in an environment in which all the
1648 pre-build requirements have not been met.
1649 The first step in
1650 troubleshooting a build failure is to recheck that you have satisfied
1651 all the pre-build requirements for your platform.
1652 Look for the check list of the platform you are building on in the
1653 <a href="#contents">Table of Contents</a>.
1654 <p>
1655 You can validate your build environment by using the <tt>sanity</tt>
1656 target.
1657 Any errors listed
1658 will stop the build from starting, and any warnings may result in
1659 a flawed product build.
1660 We strongly encourage you to evaluate every
1661 sanity check warning and fix it if required, before you proceed
1662 further with your build.
1663 <p>
1664 Some of the more common problems with builds are briefly described
1665 below, with suggestions for remedies.
1666 <ul>
1667 <li>
1668 <b>Slow Builds:</b>
1669 <blockquote>
1670 If your build machine seems to be overloaded from too many
1671 simultaneous C++ compiles, try setting the <tt>HOTSPOT_BUILD_JOBS</tt>
1672 variable to <tt>1</tt> (if you're using a multiple CPU
1673 machine, setting it to more than the the number of CPUs is probably
1674 not a good idea).
1675 <p>
1676 Creating the javadocs can be very slow, if you are running
1677 javadoc, consider skipping that step.
1678 <p>
1679 Faster hardware and more RAM always helps too.
1680 The VM build tends to be CPU intensive (many C++ compiles),
1681 and the rest of the JDK will often be disk intensive.
1682 <p>
1683 Faster compiles are possible using a tool called
1684 <a href="http://ccache.samba.org/" target="_blank">ccache</a>.
1685 </blockquote>
1686 </li>
1687 <li>
1688 <b>File time issues:</b>
1689 <blockquote>
1690 If you see warnings that refer to file time stamps, e.g.
1691 <blockquote>
1692 <i>Warning message:</i><tt> File `xxx' has modification time in
1693 the future.</tt>
1694 <br>
1695 <i>Warning message:</i> <tt> Clock skew detected. Your build may
1696 be incomplete.</tt>
1697 </blockquote>
1698 These warnings can occur when the clock on the build machine is out of
1699 sync with the timestamps on the source files. Other errors, apparently
1700 unrelated but in fact caused by the clock skew, can occur along with
1701 the clock skew warnings. These secondary errors may tend to obscure the
1702 fact that the true root cause of the problem is an out-of-sync clock.
1703 For example, an out-of-sync clock has been known to cause an old
1704 version of javac to be used to compile some files, resulting in errors
1705 when the pre-1.4 compiler ran across the new <tt>assert</tt> keyword
1706 in the 1.4 source code.
1707 <p>
1708 If you see these warnings, reset the clock on the build
1709 machine, run "<tt><i>gmake</i> clobber</tt>" or delete the directory
1710 containing the build output, and restart the build from the beginning.
1711 </blockquote>
1712 </li>
1713 <li>
1714 <b>Error message: <tt>Trouble writing out table to disk</tt></b>
1715 <blockquote>
1716 Increase the amount of swap space on your build machine.
1717 </blockquote>
1718 </li>
1719 <li>
1720 <b>Error Message: <tt>libstdc++ not found:</tt></b>
1721 <blockquote>
1722 This is caused by a missing libstdc++.a library.
1723 This is installed as part of a specific package
1724 (e.g. libstdc++.so.devel.386).
1725 By default some 64bit Linux versions (e.g. Fedora)
1726 only install the 64bit version of the libstdc++ package.
1727 Various parts of the JDK build require a static
1728 link of the C++ runtime libraries to allow for maximum
1729 portability of the built images.
1730 </blockquote>
1731 </li>
1732 <li>
1733 <b>Error Message: <tt>cannot restore segment prot after reloc</tt></b>
1734 <blockquote>
1735 This is probably an issue with SELinux (See
1736 <a href="http://en.wikipedia.org/wiki/SELinux" target="_blank">
1737 http://en.wikipedia.org/wiki/SELinux</a>).
1738 Parts of the VM is built without the <tt>-fPIC</tt> for
1739 performance reasons.
1740 <p>
1741 To completely disable SELinux:
1742 <tt>
1743 <ol>
1744 <li>$ su root</li>
1745 <li># system-config-securitylevel</li>
1746 <li>In the window that appears, select the SELinux tab</li>
1747 <li>Disable SELinux</li>
1748 </ol>
1749 </tt>
1750 <p>
1751 Alternatively, instead of completely disabling it you could
1752 disable just this one check.
1753 <tt>
1754 <ol>
1755 <li>Select System->Administration->SELinux Management</li>
1756 <li>In the SELinux Management Tool which appears,
1757 select "Boolean" from the menu on the left</li>
1758 <li>Expand the "Memory Protection" group</li>
1759 <li>Check the first item, labeled
1760 "Allow all unconfined executables to use libraries requiring text relocation ..."</li>
1761 </ol>
1762 </tt>
1763 </blockquote>
1764 </li>
1765 <li>
1766 <b>Windows Error Message: <tt>*** fatal error - couldn't allocate heap, ... </tt></b>
1767 <blockquote>
1768 The CYGWIN software can conflict with other non-CYGWIN
1769 software. See the CYGWIN FAQ section on
1770 <a href="http://cygwin.com/faq/faq.using.html#faq.using.bloda" target="_blank">
1771 BLODA (applications that interfere with CYGWIN)</a>.
1772 </blockquote>
1773 </li>
1774 <li>
1775 <b>Windows Error Message: <tt>*** multiple target patterns. Stop.</tt></b>
1776 <blockquote>
1777 The CYGWIN make version 3.81 may not like the Windows <tt>C:/</tt>
1778 style paths, it may not like the ':' character in the path
1779 when used in a makefile target definition.
1780 See the <a href="#gmake"><tt><i>gmake</i></tt></a> section.
1781 </blockquote>
1782 </li>
1783 </ul>
1784 </blockquote>
1785 <hr>
1786 </body>
1787</html>
Note: See TracBrowser for help on using the repository browser.