Giter Site home page Giter Site logo

编译openjdk10的过程 about project HOT 6 OPEN

zyllt avatar zyllt commented on August 11, 2024
编译openjdk10的过程

from project.

Comments (6)

zyllt avatar zyllt commented on August 11, 2024

1、clone源码
因为我电脑已经预装了Mercurial Distributed SCM,所以直接使用hg即可以,这个过程比较长,我大约执行了40分种
hg clone http://hg.openjdk.java.net/jdk10/master openjdk10

from project.

zyllt avatar zyllt commented on August 11, 2024

大约的目录结构,./doc/building.html有很详细的build说明,和需要安装的环境,有问题可以看一下

-rw-r--r--   1   staff   1522 Jan 25 13:57 ASSEMBLY_EXCEPTION
-rw-r--r--   1   staff  19274 Jan 25 13:57 LICENSE
-rw-r--r--   1   staff   2785 Jan 25 13:57 Makefile
-rw-r--r--   1   staff    307 Jan 25 13:57 README
drwxr-xr-x   9  staff    288 Jan 25 13:57 bin
drwxr-xr-x   3  staff     96 Jan 25 14:40 build
-rw-r--r--   1  staff   1649 Jan 25 13:57 configure
drwxr-xr-x   7  staff    224 Jan 25 13:57 doc
drwxr-xr-x  67  staff   2144 Jan 25 13:57 make
drwxr-xr-x  86  staff   2752 Jan 25 13:57 src
drwxr-xr-x  17  staff    544 Jan 25 13:57 test

from project.

zyllt avatar zyllt commented on August 11, 2024

2、configure

bash configure --with-debug-level=slowdebug --enable-dtrace --with-jvm-variants=server --with-target-bits=64 --enable-ccache --with-num-cores=8 --with-memory-size=8000  --disable-warnings-as-errors

执行这个的时候碰到个问题,因为我电脑是安装了jdk8和jdk11,boot jdk就提示我需要jdk9或者jdk10,然后我就先安装了jdk10,发现在boot jdk还是验证错误提示我missing javah,具体错误忘记截图了。
然后我google了一下在openjdk官网找到了答案
http://mail.openjdk.java.net/pipermail/build-dev/2018-January/020556.html
然后我更改了一下configure的文件,把javah的校验干掉了,然后重新autoconfigure一下,这个错误就过了。或者可以更换为jdk9作为boot jdk也是可以的。

from project.

zyllt avatar zyllt commented on August 11, 2024

然后还遇到了一个错误是找不到freetype,可是我brew list发现freetype是已经安装了的,这个比较简单,直接加上--with-freetype=/usr/local/Cellar/freetype/2.9.1就可以了

from project.

zyllt avatar zyllt commented on August 11, 2024

3、make
make命令可以带不同参数,我这里是make image,一切顺利make完成

Common Make Targets
Apart from the default target, here are some common make targets:

hotspot - Build all of hotspot (but only hotspot)
hotspot-<variant> - Build just the specified jvm variant
images or product-images - Build the JRE and JDK images
docs or docs-image - Build the documentation image
test-image - Build the test image
all or all-images - Build all images (product, docs and test)
bootcycle-images - Build images twice, second time with newly built JDK (good for testing)
clean - Remove all files generated by make, but not those generated by configure
dist-clean - Remove all files, including configuration

from project.

zyllt avatar zyllt commented on August 11, 2024

验证

➜  openjdk10 ./build/macosx-x86_64-normal-server-slowdebug/jdk/bin/java -version
openjdk version "10-internal"
OpenJDK Runtime Environment (slowdebug build 10-internal+0-adhoc.zengyuan.openjdk10)
OpenJDK 64-Bit Server VM (slowdebug build 10-internal+0-adhoc.zengyuan.openjdk10, mixed mode)

from project.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.