3
3
## TL;DR (Instructions for the Impatient)
4
4
5
5
If you are eager to try out building the JDK, these simple steps works most of
6
- the time. They assume that you have installed Mercurial (and Cygwin if running
6
+ the time. They assume that you have installed Git (and Cygwin if running
7
7
on Windows) and cloned the top-level JDK repository that you want to build.
8
8
9
9
1 . [ Get the complete source code] ( #getting-the-source-code ) : \
10
- ` hg clone http ://hg .openjdk.java.net/jdk/jdk `
10
+ ` git clone https ://git .openjdk.java.net/jdk/`
11
11
12
12
2 . [ Run configure] ( #running-configure ) : \
13
13
` bash configure `
47
47
48
48
Make sure you are getting the correct version. As of JDK 10, the source is no
49
49
longer split into separate repositories so you only need to clone one single
50
- repository. At the [ OpenJDK Mercurial server ] ( http ://hg .openjdk.java.net/) you
50
+ repository. At the [ OpenJDK Git site ] ( https ://git .openjdk.java.net/) you
51
51
can see a list of all available repositories. If you want to build an older version,
52
- e.g. JDK 8 , it is recommended that you get the ` jdk8u ` forest , which contains
53
- incremental updates, instead of the ` jdk8 ` forest , which was frozen at JDK 8 GA.
52
+ e.g. JDK 11 , it is recommended that you get the ` jdk11u ` repo , which contains
53
+ incremental updates, instead of the ` jdk11 ` repo , which was frozen at JDK 11 GA.
54
54
55
- If you are new to Mercurial , a good place to start is the [ Mercurial Beginner's
56
- Guide ] ( http ://www.mercurial -scm.org/guide ) . The rest of this document assumes a
57
- working knowledge of Mercurial .
55
+ If you are new to Git , a good place to start is the book [ Pro
56
+ Git ] ( https ://git -scm.com/book/en/v2 ) . The rest of this document
57
+ assumes a working knowledge of Git .
58
58
59
59
### Special Considerations
60
60
@@ -89,9 +89,21 @@ on where and how to check out the source code.
89
89
directory. This is especially important if your user name contains
90
90
spaces and/or mixed upper and lower case letters.
91
91
92
- * Clone the JDK repository using the Cygwin command line ` hg ` client
93
- as instructed in this document. That is, do * not* use another Mercurial
94
- client such as TortoiseHg.
92
+ * You need to install a git client. You have two choices, Cygwin git or
93
+ Git for Windows. Unfortunately there are pros and cons with each choice.
94
+
95
+ * The Cygwin ` git ` client has no line ending issues and understands
96
+ Cygwin paths (which are used throughout the JDK build system).
97
+ However, it does not currently work well with the Skara CLI tooling.
98
+ Please see the [ Skara wiki on Git clients] (
99
+ https://wiki.openjdk.java.net/display/SKARA/Skara#Skara-Git ) for
100
+ up-to-date information about the Skara git client support.
101
+
102
+ * The [ Git for Windows] ( https://gitforwindows.org ) client has issues
103
+ with line endings, and do not understand Cygwin paths. It does work
104
+ well with the Skara CLI tooling, however. To alleviate the line ending
105
+ problems, make sure you set ` core.autocrlf ` to ` false ` (this is asked
106
+ during installation).
95
107
96
108
Failure to follow this procedure might result in hard-to-debug build
97
109
problems.
@@ -173,7 +185,7 @@ likely be possible to support in a future version but that would require effort
173
185
to implement.)
174
186
175
187
Internally in the build system, all paths are represented as Unix-style paths,
176
- e.g. ` /cygdrive/c/hg/jdk9 /Makefile ` rather than ` C:\hg\jdk9 \Makefile ` . This
188
+ e.g. ` /cygdrive/c/git/jdk /Makefile ` rather than ` C:\git\jdk \Makefile ` . This
177
189
rule also applies to input to the build system, e.g. in arguments to
178
190
` configure ` . So, use ` --with-msvcr-dll=/cygdrive/c/msvcr100.dll ` rather than
179
191
` --with-msvcr-dll=c:\msvcr100.dll ` . For details on this conversion, see the section
@@ -1286,14 +1298,14 @@ ERROR: Build failed for target 'hotspot' in configuration 'linux-x64' (exit code
1286
1298
1287
1299
=== Output from failing command(s) repeated here ===
1288
1300
* For target hotspot_variant-server_libjvm_objs_psMemoryPool.o:
1289
- /localhome/hg/jdk9 -sandbox/hotspot/src/share/vm/services/psMemoryPool.cpp:1:1: error: 'failhere' does not name a type
1301
+ /localhome/git/jdk -sandbox/hotspot/src/share/vm/services/psMemoryPool.cpp:1:1: error: 'failhere' does not name a type
1290
1302
... (rest of output omitted)
1291
1303
1292
- * All command lines available in /localhome/hg/jdk9 -sandbox/build/linux-x64/make-support/failure-logs.
1304
+ * All command lines available in /localhome/git/jdk -sandbox/build/linux-x64/make-support/failure-logs.
1293
1305
=== End of repeated output ===
1294
1306
1295
1307
=== Make failed targets repeated here ===
1296
- lib/CompileJvm.gmk:207: recipe for target '/localhome/hg/jdk9 -sandbox/build/linux-x64/hotspot/variant-server/libjvm/objs/psMemoryPool.o' failed
1308
+ lib/CompileJvm.gmk:207: recipe for target '/localhome/git/jdk -sandbox/build/linux-x64/hotspot/variant-server/libjvm/objs/psMemoryPool.o' failed
1297
1309
make/Main.gmk:263: recipe for target 'hotspot-server-libs' failed
1298
1310
=== End of repeated output ===
1299
1311
@@ -1391,7 +1403,7 @@ order. Most issues will be solved at step 1 or 2.
1391
1403
1392
1404
1. Make sure your repository is up-to-date
1393
1405
1394
- Run `hg pull -u ` to make sure you have the latest changes.
1406
+ Run `git pull origin master ` to make sure you have the latest changes.
1395
1407
1396
1408
2. Clean build results
1397
1409
@@ -1416,13 +1428,13 @@ order. Most issues will be solved at step 1 or 2.
1416
1428
make
1417
1429
```
1418
1430
1419
- 4. Re-clone the Mercurial repository
1431
+ 4. Re-clone the Git repository
1420
1432
1421
- Sometimes the Mercurial repository gets in a state that causes the product
1433
+ Sometimes the Git repository gets in a state that causes the product
1422
1434
to be un-buildable. In such a case, the simplest solution is often the
1423
1435
"sledgehammer approach": delete the entire repository, and re-clone it.
1424
1436
If you have local changes, save them first to a different location using
1425
- `hg export `.
1437
+ `git format-patch `.
1426
1438
1427
1439
### Specific Build Issues
1428
1440
@@ -1467,33 +1479,6 @@ contact the Adoption Group. See the section on [Contributing to OpenJDK](
1467
1479
1468
1480
## Hints and Suggestions for Advanced Users
1469
1481
1470
- ### Setting Up a Repository for Pushing Changes (defpath)
1471
-
1472
- To help you prepare a proper push path for a Mercurial repository, there exists
1473
- a useful tool known as [defpath](
1474
- http://openjdk.java.net/projects/code-tools/defpath). It will help you setup a
1475
- proper push path for pushing changes to the JDK.
1476
-
1477
- Install the extension by cloning
1478
- `http://hg.openjdk.java.net/code-tools/defpath` and updating your `.hgrc` file.
1479
- Here's one way to do this:
1480
-
1481
- ```
1482
- cd ~
1483
- mkdir hg-ext
1484
- cd hg-ext
1485
- hg clone http://hg.openjdk.java.net/code-tools/defpath
1486
- cat << EOT >> ~ /.hgrc
1487
- [ extensions]
1488
- defpath=~ /hg-ext/defpath/defpath.py
1489
- EOT
1490
- ```
1491
-
1492
- You can now setup a proper push path using:
1493
- ```
1494
- hg defpath -d -u <your OpenJDK username >
1495
- ```
1496
-
1497
1482
### Bash Completion
1498
1483
1499
1484
The `configure` and `make` commands tries to play nice with bash command-line
@@ -1634,16 +1619,6 @@ instance, `make java.base JDK_FILTER=javax/crypto` (or, to combine methods,
1634
1619
`make java.base-java-only JDK_FILTER=javax/crypto`) will limit the compilation
1635
1620
to files in the `javax.crypto` package.
1636
1621
1637
- ### Learn About Mercurial
1638
-
1639
- To become an efficient JDK developer, it is recommended that you invest in
1640
- learning Mercurial properly. Here are some links that can get you started:
1641
-
1642
- * [Mercurial for git users](http://www.mercurial-scm.org/wiki/GitConcepts)
1643
- * [The official Mercurial tutorial](http://www.mercurial-scm.org/wiki/Tutorial)
1644
- * [hg init](http://hginit.com/)
1645
- * [Mercurial: The Definitive Guide](http://hgbook.red-bean.com/read/)
1646
-
1647
1622
## Understanding the Build System
1648
1623
1649
1624
This section will give you a more technical description on the details of the
0 commit comments