-
Notifications
You must be signed in to change notification settings - Fork 4
/
README-builds.html
2110 lines (2100 loc) · 108 KB
/
README-builds.html
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
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>OpenJDK Build README</title>
</head>
<body style="background-color:lightcyan">
<!-- ====================================================== -->
<table width="100%">
<tr>
<td align="center">
<img alt="OpenJDK"
src="http://openjdk.java.net/images/openjdk.png"
width=256 />
</td>
</tr>
<tr>
<td align=center>
<h1>OpenJDK Build README</h1>
</td>
</tr>
</table>
<!-- ------------------------------------------------------ -->
<hr>
<h2><a name="introduction">Introduction</a></h2>
<blockquote>
<p>
This README file contains build instructions for the
<a href="http://openjdk.java.net" target="_blank">OpenJDK</a>.
Building the source code for the
OpenJDK
requires
a certain degree of technical expertise.
</blockquote>
<!-- ------------------------------------------------------ -->
<hr>
<h2><a name="contents">Contents</a></h2>
<blockquote>
<ul>
<li><a href="#introduction">Introduction</a></li>
<li><a href="#hg">Use of Mercurial</a>
<ul>
<li><a href="#get_source">Getting the Source</a></li>
</ul>
</li>
<li><a href="#MBE">Minimum Build Environments</a></li>
<li><a href="#SDBE">Specific Developer Build Environments</a>
<ul>
<li><a href="#fedora">Fedora Linux</a> </li>
<li><a href="#centos">CentOS Linux</a> </li>
<li><a href="#debian">Debian GNU/Linux</a></li>
<li><a href="#ubuntu">Ubuntu Linux</a> </li>
<li><a href="#opensuse">OpenSUSE</a></li>
<li><a href="#mandriva">Mandriva</a></li>
<li><a href="#opensolaris">OpenSolaris</a></li>
</ul>
</li>
<li><a href="#directories">Source Directory Structure</a>
<ul>
<li><a href="#drops">Managing the Source Drops</a></li>
</ul>
</li>
<li><a href="#building">Build Information</a>
<ul>
<li><a href="#gmake">GNU Make (<tt><i>gmake</i></tt>)</a> </li>
<li><a href="#linux">Basic Linux System Setup</a> </li>
<li><a href="#solaris">Basic Solaris System Setup</a> </li>
<li><a href="#windows">Basic Windows System Setup</a> </li>
<li><a href="#dependencies">Build Dependencies</a>
<ul>
<li><a href="#bootjdk">Bootstrap JDK</a> </li>
<li><a href="#importjdk">Optional Import JDK</a> </li>
<li><a href="#ant">Ant 1.7.1</a> </li>
<li><a href="#cacerts">Certificate Authority File (cacert)</a> </li>
<li><a href="#compilers">Compilers</a>
<ul>
<li><a href="#msvc32">Microsoft Visual Studio Professional/Express for 32 bit</a> </li>
<li><a href="#msvc64">Microsoft Visual Studio Professional for 64 bit</a> </li>
<li><a href="#mssdk64">Microsoft Windows SDK for 64 bit</a> </li>
<li><a href="#gcc">Linux gcc/binutils</a> </li>
<li><a href="#studio">Sun Studio</a> </li>
</ul>
</li>
<li><a href="#zip">Zip and Unzip</a> </li>
<li><a href="#freetype">FreeType2 Fonts</a> </li>
<li>Linux and Solaris:
<ul>
<li><a href="#cups">CUPS Include files</a> </li>
<li><a href="#xrender">XRender Include files</a></li>
</ul>
</li>
<li>Linux only:
<ul>
<li><a href="#alsa">ALSA files</a> </li>
</ul>
</li>
<li>Windows only:
<ul>
<li>Unix Command Tools (<a href="#cygwin">CYGWIN</a>)</li>
<li><a href="#dxsdk">DirectX 9.0 SDK</a> </li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><a href="#creating">Creating the Build</a> </li>
<li><a href="#testing">Testing the Build</a> </li>
<li><a href="#variables">Environment/Make Variables</a></li>
<li><a href="#troubleshooting">Troubleshooting</a></li>
</ul>
</blockquote>
<!-- ------------------------------------------------------ -->
<hr>
<h2><a name="hg">Use of Mercurial</a></h2>
<blockquote>
The OpenJDK sources are maintained with the revision control system
<a href="http://mercurial.selenic.com/wiki/Mercurial">Mercurial</a>.
If you are new to Mercurial, please see the
<a href="http://mercurial.selenic.com/wiki/BeginnersGuides">Beginner Guides</a>
or refer to the <a href="http://hgbook.red-bean.com/">Mercurial Book</a>.
The first few chapters of the book provide an excellent overview of
Mercurial, what it is and how it works.
<br>
For using Mercurial with the OpenJDK refer to the
<a href="http://openjdk.java.net/guide/repositories.html#installConfig">
Developer Guide: Installing and Configuring Mercurial</a>
section for more information.
The Forest Extension is not part of the Mercurial install,
and is optional,
but can be obtained with the following commands:
<blockquote>
<tt>
hg clone https://bitbucket.org/pmezard/hgforest-crew/overview/ <i>YourHgForest</i>
</tt>
</blockquote>
Once you have the file <tt>forest.py</tt>, you need to add these
lines to your <tt>${HOME}/.hgrc</tt> file:
<blockquote>
<tt>
[extensions]
<br>forest = <i>YourHgForest</i>/forest.py
</tt>
</blockquote>
<!-- ------------------------------------------------------ -->
<h3><a name="get_source">Getting the Source</a></h3>
<blockquote>
To get the entire set of OpenJDK Mercurial repositories
using the Forest Extension:
<blockquote>
<tt>
hg fclone http://hg.openjdk.java.net/jdk7/jdk7 <i>YourOpenJDK</i>
</tt>
</blockquote>
To get the entire set of OpenJDK Mercurial repositories
without using the Forest Extension:
<blockquote>
<tt>
hg clone http://hg.openjdk.java.net/jdk7/jdk7 <i>YourOpenJDK</i>
<br>cd <i>YourOpenJDK</i>
<br>sh ./get_source.sh
</tt>
</blockquote>
Once you have all the repositories, the
script <tt>make/scripts/hgforest.sh</tt>
can be used to repeat the same <tt>hg</tt>
command on every repository in the forest, e.g.
<blockquote>
<tt>
cd <i>YourOpenJDK</i>
<br>sh ./make/scripts/hgforest.sh pull -u
</tt>
</blockquote>
You may find this script <tt>make/scripts/hgforest.sh</tt> faster
than the <tt>hg</tt> forest commands provided by the
Forest Extension.
</blockquote>
</blockquote>
<!-- ------------------------------------------------------ -->
<hr>
<h2><a name="MBE">Minimum Build Environments</a></h2>
<blockquote>
This file often describes specific requirements for what we call the
"minimum build environments" (MBE) for this
specific release of the JDK,
Building with the MBE will generate the most compatible
bits that install on, and run correctly on, the most variations
of the same base OS and hardware architecture.
These usually represent what is often called the
least common denominator platforms.
It is understood that most developers will NOT be using these
specific platforms, and in fact creating these specific platforms
may be difficult due to the age of some of this software.
<p>
The minimum OS and C/C++ compiler versions needed for building the
OpenJDK:
<p>
<table border="1">
<thead>
<tr>
<th>Base OS and Architecture</th>
<th>OS</th>
<th>C/C++ Compiler</th>
<th>BOOT JDK</th>
</tr>
</thead>
<tbody>
<tr>
<td>Linux X86 (32-bit)</td>
<td>Fedora 9</td>
<td>gcc 4.3 </td>
<td>JDK 6u18</td>
</tr>
<tr>
<td>Linux X64 (64-bit)</td>
<td>Fedora 9</td>
<td>gcc 4.3 </td>
<td>JDK 6u18</td>
</tr>
<tr>
<td>Solaris SPARC (32-bit)</td>
<td>Solaris 10 Update 6</td>
<td>Sun Studio 12 Update 1 + patches</td>
<td>JDK 6u18</td>
</tr>
<tr>
<td>Solaris SPARCV9 (64-bit)</td>
<td>Solaris 10 Update 6</td>
<td>Sun Studio 12 Update 1 + patches</td>
<td>JDK 6u18</td>
</tr>
<tr>
<td>Solaris X86 (32-bit)</td>
<td>Solaris 10 Update 6</td>
<td>Sun Studio 12 Update 1 + patches</td>
<td>JDK 6u18</td>
</tr>
<tr>
<td>Solaris X64 (64-bit)</td>
<td>Solaris 10 Update 6</td>
<td>Sun Studio 12 Update 1 + patches</td>
<td>JDK 6u18</td>
</tr>
<tr>
<td>Windows X86 (32-bit)</td>
<td>Windows XP</td>
<td>Microsoft Visual Studio C++ 2010 Professional Edition</td>
<td>JDK 6u18</td>
</tr>
<tr>
<td>Windows X64 (64-bit)</td>
<td>Windows Server 2003 - Enterprise x64 Edition</td>
<td>Microsoft Visual Studio C++ 2010 Professional Edition</td>
<td>JDK 6u18</td>
</tr>
</tbody>
</table>
<p>
These same sources do indeed build on many more systems than the
above older generation systems, again the above is just a minimum.
<p>
Compilation problems with newer or different C/C++ compilers is a
common problem.
Similarly, compilation problems related to changes to the
<tt>/usr/include</tt> or system header files is also a
common problem with newer or unreleased OS versions.
Please report these types of problems as bugs so that they
can be dealt with accordingly.
</blockquote>
<!-- ------------------------------------------------------ -->
<hr>
<h2><a name="SDBE">Specific Developer Build Environments</a></h2>
<blockquote>
We won't be listing all the possible environments, but
we will try to provide what information we have available to us.
</blockquote>
<!-- ------------------------------------------------------ -->
<h3><a name="fedora">Fedora</a></h3>
<blockquote>
<h4>Fedora 9</h4>
<p>
<blockquote>
After installing <a href="http://fedoraproject.org">Fedora</a> 9
you need to install several build dependencies. The simplest
way to do it is to execute the following commands as user
<tt>root</tt>:
<p/>
<code>yum-builddep java-1.6.0-openjdk</code>
<p/>
<code>yum install gcc gcc-c++</code>
<p/>
In addition, it's necessary to set a few environment variables for the build:
<p/>
<code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk</code>
</blockquote>
<h4>Fedora 10</h4>
<p>
<blockquote>
After installing <a href="http://fedoraproject.org">Fedora</a> 10
you need to install several build dependencies. The simplest
way to do it is to execute the following commands as user
<tt>root</tt>:
<p/>
<code>yum-builddep java-1.6.0-openjdk</code>
<p/>
<code>yum install gcc gcc-c++</code>
<p/>
In addition, it's necessary to set a few environment variables for the build:
<p/>
<code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk</code>
</blockquote>
<h4>Fedora 11</h4>
<p>
<blockquote>
After installing <a href="http://fedoraproject.org">Fedora</a> 11
you need to install several build dependencies. The simplest
way to do it is to execute the following commands as user
<tt>root</tt>:
<p/>
<code>yum-builddep java-1.6.0-openjdk</code>
<p/>
<code>yum install gcc gcc-c++</code>
<p/>
In addition, it's necessary to set a few environment variables for the build:
<p/>
<code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk</code>
</blockquote>
</blockquote>
<!-- ------------------------------------------------------ -->
<h3><a name="centos">CentOS 5.5</a></h3>
<blockquote>
After installing
<a href="http://www.centos.org/">CentOS 5.5</a>
you need to make sure you have
the following Development bundles installed:
<blockquote>
<ul>
<li>Development Libraries</li>
<li>Development Tools</li>
<li>Java Development</li>
<li>X Software Development (Including XFree86-devel)</li>
</ul>
</blockquote>
<p>
Plus the following packages:
<blockquote>
<ul>
<li>cups devel: Cups Development Package</li>
<li>alsa devel: Alsa Development Package</li>
<li>ant: Ant Package</li>
<li>Xi devel: libXi.so Development Package</li>
</ul>
</blockquote>
<p>
The freetype 2.3 packages don't seem to be available,
but the freetype 2.3 sources can be downloaded, built,
and installed easily enough from
<a href="http://downloads.sourceforge.net/freetype">
the freetype site</a>.
Build and install with something like:
<blockquote>
<tt>./configure && make && sudo -u root make install</tt>
</blockquote>
<p>
Mercurial packages could not be found easily, but a Google
search should find ones, and they usually include Python if
it's needed.
</blockquote>
<!-- ------------------------------------------------------ -->
<h3><a name="debian">Debian</a></h3>
<blockquote>
<h4>Debian 5.0 (Lenny)</h4>
<p>
<blockquote>
After installing <a href="http://debian.org">Debian</a> 5
you need to install several build dependencies.
The simplest way to install the build dependencies is to
execute the following commands as user <tt>root</tt>:
<p/>
<code>aptitude build-dep openjdk-6</code>
<p/>
<code>aptitude install openjdk-6-jdk libmotif-dev</code>
<p/>
In addition, it's necessary to set a few environment variables for the build:
<p/>
<code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code>
</blockquote>
</blockquote>
<!-- ====================================================== -->
<h3><a name="ubuntu">Ubuntu</a></h3>
<blockquote>
<h4>Ubuntu 8.04</h4>
<p>
<blockquote>
After installing <a href="http://ubuntu.org">Ubuntu</a> 8.04
you need to install several build dependencies.
<p/>
First, you need to enable the universe repository in the
Software Sources application and reload the repository
information. The Software Sources application is available
under the System/Administration menu.
<p/>
The simplest way to install the build dependencies is to
execute the following commands:
<p/>
<code>sudo aptitude build-dep openjdk-6</code>
<p/>
<code>sudo aptitude install openjdk-6-jdk</code>
<p/>
In addition, it's necessary to set a few environment variables for the build:
<p/>
<code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code>
</blockquote>
<h4>Ubuntu 8.10</h4>
<p>
<blockquote>
After installing <a href="http://ubuntu.org">Ubuntu</a> 8.10
you need to install several build dependencies. The simplest
way to do it is to execute the following commands:
<p/>
<code>sudo aptitude build-dep openjdk-6</code>
<p/>
<code>sudo aptitude install openjdk-6-jdk</code>
<p/>
In addition, it's necessary to set a few environment variables for the build:
<p/>
<code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code>
</blockquote>
<h4>Ubuntu 9.04</h4>
<p>
<blockquote>
After installing <a href="http://ubuntu.org">Ubuntu</a> 9.04
you need to install several build dependencies. The simplest
way to do it is to execute the following commands:
<p/>
<code>sudo aptitude build-dep openjdk-6</code>
<p/>
<code>sudo aptitude install openjdk-6-jdk</code>
<p/>
In addition, it's necessary to set a few environment variables for the build:
<p/>
<code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code>
</blockquote>
</blockquote>
<!-- ====================================================== -->
<h3><a name="opensuse">OpenSUSE</a></h3>
<blockquote>
<h4>OpenSUSE 11.1</h4>
<p>
<blockquote>
After installing <a href="http://opensuse.org">OpenSUSE</a> 11.1
you need to install several build dependencies.
The simplest way to install the build dependencies is to
execute the following commands:
<p/>
<code>sudo zypper source-install -d java-1_6_0-openjdk</code>
<p/>
<code>sudo zypper install make</code>
<p/>
In addition, it is necessary to set a few environment variables for the build:
<p/>
<code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-1.6.0-openjdk</code>
<p/>
Finally, you need to unset the <code>JAVA_HOME</code> environment variable:
<p/>
<code>export -n JAVA_HOME</code>
</blockquote>
</blockquote>
<!-- ====================================================== -->
<h3><a name="mandriva">Mandriva</a></h3>
<blockquote>
<h4>Mandriva Linux One 2009 Spring</h4>
<p>
<blockquote>
After installing <a href="http://mandriva.org">Mandriva</a> Linux One 2009 Spring
you need to install several build dependencies.
The simplest way to install the build dependencies is to
execute the following commands as user <tt>root</tt>:
<p/>
<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>
<p/>
In addition, it is necessary to set a few environment variables for the build:
<p/>
<code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-1.6.0-openjdk</code>
</blockquote>
</blockquote>
<!-- ====================================================== -->
<h3><a name="opensolaris">OpenSolaris</a></h3>
<blockquote>
<h4>OpenSolaris 2009.06</h4>
<p>
<blockquote>
After installing <a href="http://opensolaris.org">OpenSolaris</a> 2009.06
you need to install several build dependencies.
The simplest way to install the build dependencies is to
execute the following commands:
<p/>
<code>pfexec pkg install SUNWgmake SUNWj6dev SUNWant sunstudioexpress SUNWcups SUNWzip SUNWunzip SUNWxwhl SUNWxorg-headers SUNWaudh SUNWfreetype2</code>
<p/>
In addition, it is necessary to set a few environment variables for the build:
<p/>
<code>export LANG=C ALT_COMPILER_PATH=/opt/SunStudioExpress/bin/ ALT_CUPS_HEADERS_PATH=/usr/include/</code>
<p/>
Finally, you need to make sure that the build process can find the Sun Studio compilers:
<p/>
<code>export PATH=$PATH:/opt/SunStudioExpress/bin/</code>
</blockquote>
</blockquote>
<!-- ------------------------------------------------------ -->
<hr>
<h2><a name="directories">Source Directory Structure</a></h2>
<blockquote>
<p>
The source code for the OpenJDK is delivered in a set of
directories:
<tt>hotspot</tt>,
<tt>langtools</tt>,
<tt>corba</tt>,
<tt>jaxws</tt>,
<tt>jaxp</tt>,
and
<tt>jdk</tt>.
The <tt>hotspot</tt> directory contains the source code and make
files for building the OpenJDK Hotspot Virtual Machine.
The <tt>langtools</tt> directory contains the source code and make
files for building the OpenJDK javac and language tools.
The <tt>corba</tt> directory contains the source code and make
files for building the OpenJDK Corba files.
The <tt>jaxws</tt> directory contains the source code and make
files for building the OpenJDK JAXWS files.
The <tt>jaxp</tt> directory contains the source code and make
files for building the OpenJDK JAXP files.
The <tt>jdk</tt> directory contains the source code and make files for
building the OpenJDK runtime libraries and misc files.
The top level <tt>Makefile</tt>
is used to build the entire OpenJDK.
<h3><a name="drops">Managing the Source Drops</a></h3>
<blockquote>
<p>
The repositories <tt>jaxp</tt> and <tt>jaxws</tt> actually
do not contain the sources for JAXP or JAX-WS.
These products have their own open source procedures at their
<a href="http://jaxp.java.net/">JAXP</a> and
<a href="http://jax-ws.java.net/">JAX-WS</a> home pages.
The OpenJDK project does need access to these sources to build
a complete JDK image because JAXP and JAX-WS are part of the JDK.
The current process for delivery of the JAXP and JAX-WS sources
involves so called "source drop bundles" downloaded from a public
website.
There are many reasons for this current mechanism, and it is
understood that this is not ideal for the open source community.
It is possible this process could change in the future.
<br>
<b>NOTE:</b> The <a href="http://download.java.net/openjdk/jdk7/">
Complete OpenJDK Source Bundles</a> <u>will</u> contain the JAXP and
JAX-WS sources.
</p>
<h4><a name="dropcreation">Creation of New Source Drop Bundles</a></h4>
<blockquote>
<ol>
<li>
The JAXP or JAX-WS team prepares a new zip bundle,
places a copy in a public download area on java.net,
sends us a link and a list of CRs (Change Request Numbers).
The older download bundles should not be deleted.
It is the responsibility of the JAXP and JAX-WS team to
place the proper GPL legal notices on the sources
and do any filtering or java re-packaging for the
OpenJDK instances of these classes.
</li>
<li>
The OpenJDK team copies this new bundle into shared
area (e.g. <tt>/java/devtools/share/jdk7-drops</tt>).
Older bundles are never deleted so we retain the history.
</li>
<li>
The OpenJDK team edits the ant property file
<tt>jaxp/jaxp.properties</tt> or
<tt>jaxws/jaxws.properties</tt> to update the
base URL, the zip bundle name, and the MD5 checksum
of the zip bundle
(on Solaris: <tt>sum -c md5 <i>bundlename</i></tt>)
</li>
<li>
OpenJDK team reviews and commits those changes with the
given CRs.
</li>
</ol>
</blockquote>
<h4><a name="dropusage">Using Source Drop Bundles</a></h4>
<blockquote>
<p>
The ant scripts that build <tt>jaxp</tt> and <tt>jaxws</tt>
will attempt to locate these zip bundles from the directory
in the environment variable
<tt><a href="#ALT_DROPS_DIR">ALT_DROPS_DIR</a></tt>.
The checksums protect from getting the wrong, corrupted, or
improperly modified sources.
Once the sources are made available, the population will not
happen again unless a <tt>make clobber</tt> is requested
or the <tt>jaxp/drop/</tt> or <tt>jaxws/drop/</tt>
directory is explicitly deleted.
<br>
<b>NOTE:</b> The default Makefile and ant script behavior
is to NOT download these bundles from the public http site.
In general, doing downloads
during the build process is not advised, it creates too much
unpredictability in the build process.
However, you can use <tt>make ALLOW_DOWNLOADS=true</tt> to
tell the ant script that the download of the zip bundle is
acceptable.
</p>
<p>
The recommended procedure for keeping a cache of these
source bundles would be to download them once, place them
in a directory outside the repositories, and then set
<tt><a href="#ALT_DROPS_DIR">ALT_DROPS_DIR</a></tt> to refer
to that directory.
These drop bundles do change occasionally, so the newer
bundles may need to be added to this area from time to time.
</p>
</blockquote>
</blockquote>
</blockquote>
<!-- ------------------------------------------------------ -->
<hr>
<h2><a name="building">Build Information</a></h2>
<blockquote>
Building the OpenJDK
is done with a <a href="#gmake">GNU <tt>make</tt></a> command line
and various
environment or make variable settings that direct the makefile rules
to where various components have been installed.
Where possible the makefiles will attempt to located the various
components in the default locations or any component specific
variable settings.
When the normal defaults fail or components cannot be found,
the various
<tt>ALT_*</tt> variables (alternates)
can be used to help the makefiles locate components.
<p>
Refer to the bash/sh/ksh setup file
<tt>jdk/make/jdk_generic_profile.sh</tt>
if you need help in setting up your environment variables.
A build could be as simple as:
<blockquote>
<pre><tt>
bash
. jdk/make/jdk_generic_profile.sh
<a href="#gmake"><tt>make</tt></a> sanity && <a href="#gmake"><tt>make</tt></a>
</tt></pre>
</blockquote>
<p>
Of course ksh or sh would work too.
But some customization will probably be necessary.
The <tt>sanity</tt> rule will make some basic checks on build
dependencies and generate appropriate warning messages
regarding missing, out of date, or newer than expected components
found on your system.
</blockquote>
<!-- ------------------------------------------------------ -->
<hr>
<h3><a name="gmake">GNU make (<tt><i>gmake</i></tt>)</a></h3>
<blockquote>
The Makefiles in the OpenJDK are only valid when used with the
GNU version of the utility command <tt>make</tt>
(<tt><i>gmake</i></tt>).
A few notes about using GNU make:
<ul>
<li>
You need GNU make version 3.81 or newer.
</li>
<li>
Place the location of the GNU make binary in the <tt>PATH</tt>.
</li>
<li>
<strong>Linux:</strong>
The <tt>/usr/bin/make</tt> should be 3.81 or newer
and should work fine for you.
If this version is not 3.81 or newer,
see the <a href="#buildgmake">"Building GNU make"</a> section.
</li>
<li>
<strong>Solaris:</strong>
Do NOT use <tt>/usr/bin/make</tt> on Solaris.
If your Solaris system has the software
from the Solaris Companion CD installed,
you should try and use <tt>gmake</tt>
which will be located in either the <tt>/opt/sfw/bin</tt> or
<tt>/usr/sfw/bin</tt> directory.
In more recent versions of Solaris GNU make might be found
at <tt>/usr/bin/gmake</tt>.<br>
<b>NOTE:</b> It is very likely that this <tt>gmake</tt>
could be 3.80, you need 3.81, in which case,
see the <a href="#buildgmake">"Building GNU make"</a> section.
</li>
<li>
<strong>Windows:</strong>
Make sure you start your build inside a bash/sh/ksh shell
and are using a <tt>make.exe</tt> utility built for that
environment (a cygwin <tt>make.exe</tt> is not the same
as a <tt>make.exe</tt> built for something like
<a href="http://www.mkssoftware.com/">MKS</a>).
<br>
<b>WARNING:</b> Watch out on some make 3.81 versions, it may
not work due to a lack of support for MS-DOS drive letter paths
like <tt>C:/</tt> or <tt>C:\</tt>.
<br>
You may be able to use the information at the
<a href="http://developer.mozilla.org/en/docs/Windows_build_prerequisites_using_cygwin#make" target="_blank">
mozilla developer center</a>
on this topic.
<br>
It's hoped that when make 3.82 starts shipping in a future cygwin
release that this MS-DOS path issue will be fixed.
<br>
It may be possible to download the version at
<a href="http://www.cmake.org/files/cygwin/make.exe">
www.cmake.org make.exe</a>.
<br>
It might be necessary for you to build your own GNU make 3.81,
see the <a href="#buildgmake">"Building GNU make"</a> section
in that case.
</li>
</ul>
<p>
Information on GNU make, and access to ftp download sites, are
available on the
<a href="http://www.gnu.org/software/make/make.html" target="_blank">
GNU make web site
</a>.
The latest source to GNU make is available at
<a href="http://ftp.gnu.org/pub/gnu/make/" target="_blank">
ftp.gnu.org/pub/gnu/make/</a>.
</p>
<!-- ------------------------------------------------------ -->
<h4><a name="buildgmake">Building GNU make</a></h4>
<blockquote>
First step is to get the GNU make 3.81 source from
<a href="http://ftp.gnu.org/pub/gnu/make/" target="_blank">
ftp.gnu.org/pub/gnu/make/</a>.
Building is a little different depending on the OS and unix toolset
on Windows:
<ul>
<li>
<strong>Linux:</strong>
<tt>./configure && make</tt>
</li>
<li>
<strong>Solaris:</strong>
<tt>./configure && gmake CC=gcc</tt>
</li>
<li>
<strong>Windows for CYGWIN:</strong>
<tt>./configure && make</tt>
</li>
<li>
<strong>Windows for MKS: (CYGWIN is recommended)</strong>
<tt>./configure && make -f Makefile.win32</tt>
</li>
</ul>
</blockquote>
</blockquote>
<!-- ------------------------------------------------------ -->
<hr>
<h3><a name="linux">Basic Linux System Setup</a></h3>
<blockquote>
<strong>i586 only:</strong>
The minimum recommended hardware for building the Linux version
is a Pentium class processor or better, at least 256 MB of RAM, and
approximately 1.5 GB of free disk space.
<p>
<strong>X64 only:</strong>
The minimum recommended hardware for building the Linux
version is an AMD Opteron class processor, at least 512 MB of RAM, and
approximately 4 GB of free disk space.
<p>
The build will use the tools contained in
<tt>/bin</tt> and
<tt>/usr/bin</tt>
of a standard installation of the Linux operating environment.
You should ensure that these directories are in your
<tt>PATH</tt>.
<p>
Note that some Linux systems have a habit of pre-populating
your environment variables for you, for example <tt>JAVA_HOME</tt>
might get pre-defined for you to refer to the JDK installed on
your Linux system.
You will need to unset <tt>JAVA_HOME</tt>.
It's a good idea to run <tt>env</tt> and verify the
environment variables you are getting from the default system
settings make sense for building the
OpenJDK.
</blockquote>
<!-- ------------------------------------------------------ -->
<h4><a name="linux_checklist">Basic Linux Check List</a></h4>
<blockquote>
<ol>
<li>
Install the
<a href="#bootjdk">Bootstrap JDK</a>, set
<tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>.
</li>
<li>
<a href="#importjdk">Optional Import JDK</a>, set
<tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>.
</li>
<li>
Install or upgrade the <a href="#freetype">FreeType development
package</a>.
</li>
<li>
Install
<a href="#ant">Ant 1.7.1 or newer</a>,
make sure it is in your PATH.
</li>
</ol>
</blockquote>
<!-- ------------------------------------------------------ -->
<hr>
<h3><a name="solaris">Basic Solaris System Setup</a></h3>
<blockquote>
The minimum recommended hardware for building the
Solaris SPARC version is an UltraSPARC with 512 MB of RAM.
For building
the Solaris x86 version, a Pentium class processor or better and at
least 512 MB of RAM are recommended.
Approximately 1.4 GB of free disk
space is needed for a 32-bit build.
<p>
If you are building the 64-bit version, you should
run the command "isainfo -v" to verify that you have a
64-bit installation, it should say <tt>sparcv9</tt> or
<tt>amd64</tt>.
An additional 7 GB of free disk space is needed
for a 64-bit build.
<p>
The build uses the tools contained in <tt>/usr/ccs/bin</tt>
and <tt>/usr/bin</tt> of a standard developer or full installation of
the Solaris operating environment.
<p>
Solaris patches specific to the JDK can be downloaded from the
<a href="http://sunsolve.sun.com/show.do?target=patches/JavaSE" target="_blank">
SunSolve JDK Solaris patches download page</a>.
You should ensure that the latest patch cluster for
your version of the Solaris operating environment has also
been installed.
</blockquote>
<!-- ------------------------------------------------------ -->
<h4><a name="solaris_checklist">Basic Solaris Check List</a></h4>
<blockquote>
<ol>
<li>
Install the
<a href="#bootjdk">Bootstrap JDK</a>, set
<tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>.
</li>
<li>
<a href="#importjdk">Optional Import JDK</a>, set
<tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>.
</li>
<li>
Install the
<a href="#studio">Sun Studio Compilers</a>, set
<a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a>.
</li>
<li>
Install the
<a href="#cups">CUPS Include files</a>, set
<tt><a href="#ALT_CUPS_HEADERS_PATH">ALT_CUPS_HEADERS_PATH</a></tt>.
</li>
<li>
Install the <a href="#xrender">XRender Include files</a>.
</li>
<li>
Install
<a href="#ant">Ant 1.7.1 or newer</a>,
make sure it is in your PATH.
</li>
</ol>
</blockquote>
<!-- ------------------------------------------------------ -->
<hr>
<h3><a name="windows">Basic Windows System Setup</a></h3>
<blockquote>
<strong>i586 only:</strong>
The minimum recommended hardware for building the 32-bit or X86
Windows version is an Pentium class processor or better, at least
512 MB of RAM, and approximately 600 MB of free disk space.
<strong>
NOTE: The Windows build machines need to use the
file system NTFS.
Build machines formatted to FAT32 will not work
because FAT32 doesn't support case-sensitivity in file names.
</strong>
<p>
<strong>X64 only:</strong>
The minimum recommended hardware for building
the Windows X64 version is an AMD Opteron class processor, at least 1
GB of RAM, and approximately 10 GB of free disk space.
</blockquote>
<!-- ------------------------------------------------------ -->
<h4><a name="paths">Windows Paths</a></h4>
<blockquote>
<strong>Windows:</strong>
Note that GNU make is a historic utility and is based very
heavily on shell scripting, so it does not tolerate the Windows habit
of having spaces in pathnames or the use of the <tt>\</tt>characters in pathnames.
Luckily on most Windows systems, you can use <tt>/</tt>instead of \, and
there is always a 'short' pathname without spaces for any path that
contains spaces.
Unfortunately, this short pathname can be somewhat dynamic and the
formula is difficult to explain.
You can use <tt>cygpath</tt> utility to map pathnames with spaces
or the <tt>\</tt>character into the <tt>C:/</tt> style of pathname
(called 'mixed'), e.g.
<tt>cygpath -s -m "<i>path</i>"</tt>.
<p>
The makefiles will try to translate any pathnames supplied
to it into the <tt>C:/</tt> style automatically.
<p>
Note that use of CYGWIN creates a unique problem with regards to
setting <a href="#path"><tt>PATH</tt></a>. Normally on Windows
the <tt>PATH</tt> variable contains directories
separated with the ";" character (Solaris and Linux uses ":").
With CYGWIN, it uses ":", but that means that paths like "C:/path"
cannot be placed in the CYGWIN version of <tt>PATH</tt> and
instead CYGWIN uses something like <tt>/cygdrive/c/path</tt>
which CYGWIN understands, but only CYGWIN understands.
So be careful with paths on Windows.
</blockquote>
<!-- ------------------------------------------------------ -->
<h4><a name="windows_checklist">Basic Windows Check List</a></h4>
<blockquote>
<ol>
<li>
Install the
<a href="#cygwin">CYGWIN product</a>.
</li>
<li>
Install the
<a href="#bootjdk">Bootstrap JDK</a>, set
<tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>.
</li>
<li>
<a href="#importjdk">Optional Import JDK</a>, set
<tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>.
</li>
<li>
Install the
<a href="#msvc32">Microsoft Visual Studio Compilers</a>).
</li>
<li>
Setup all environment variables for compilers
(see <a href="#msvc32">compilers</a>).
</li>
<li>
Install
<a href="#dxsdk">Microsoft DirectX SDK</a>.
</li>
<li>
Install
<a href="#ant">Ant 1.7.1 or newer</a>,
make sure it is in your PATH and set
<tt><a href="#ANT_HOME">ANT_HOME</a></tt>.
</li>
</ol>
</blockquote>
<!-- ------------------------------------------------------ -->
<hr>
<h3><a name="dependencies">Build Dependencies</a></h3>
<blockquote>
Depending on the platform, the OpenJDK build process has some basic
dependencies on components not part of the OpenJDK sources.
Some of these are specific to a platform, some even specific to
an architecture.
Each dependency will have a set of ALT variables that can be set
to tell the makefiles where to locate the component.
In most cases setting these ALT variables may not be necessary
and the makefiles will find defaults on the system in standard
install locations or through component specific variables.
<!-- ------------------------------------------------------ -->
<h4><a name="bootjdk">Bootstrap JDK</a></h4>
<blockquote>
All OpenJDK builds require access to the previously released
JDK 6, this is often called a bootstrap JDK.
The JDK 6 binaries can be downloaded from Sun's
<a href="http://java.sun.com/javase/downloads/index.jsp"
target="_blank">JDK 6 download site</a>.
For build performance reasons
is very important that this bootstrap JDK be made available on the