1. Get the source code:

hg clone http://hg.openjdk.java.net/jdk9/jdk9 jdk9
cd jdk9
sh get_source.sh

 

It may fail due to GFW. One alternative solution is fetching the code on an abroad VPS.

2. Build OpenJDK9

The gcc command has been used by macOS clang。

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/c++/4.2.1
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

  

The configure command:

./configure --with-freetype=/usr/local/Cellar/freetype/2.8 --enable-debug --with-target-bits=64 --disable-warnings-as-errors
--with-freetype=/usr/local/Cellar/freetype/2.8

Though freetype is installed via  

brew intall freetype

But script configure cannot find it by default. The freetype prefix has to be specified explicitly.

--disable-warnings-as-errors

To skip compiling error in [1]:

instantiation of variable 'TreeChunk<Metachunk, FreeList<Metachunk> >::_min_tree_chunk_size' required here, but no definition is available [-Wundefined-var-template]
return _min_tree_chunk_size;
^

  

It's kind of exciting to see the following messages after so much struggling.

clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
Compiling 4 files for BUILD_JIGSAW_TOOLS
Stopping sjavac server
Finished building target 'default (exploded-image)' in configuration 'macosx-x86_64-normal-server-fastdebug'

 

The version info of new build java:

$ bin/java --version
openjdk 9-internal
OpenJDK Runtime Environment (fastdebug build 9-internal+0-adhoc.Hu.jdk9)
OpenJDK 64-Bit Server VM (fastdebug build 9-internal+0-adhoc.Hu.jdk9, mixed mode)

Reference:

[1] http://mail.openjdk.java.net/pipermail/build-dev/2017-May.txt

Build OpenJDK9 on macOS Sierra的更多相关文章

  1. 【Ruby】【环境搭建】macOS Sierra 10.12.6 + Xcode 8 + gpg 2.2.8 + rvm 1.29.3 + Ruby 2.4.0 + RubyMine 2018.1.4

      按出场顺序: macOS Sierra 10.12.6  +  Xcode 8 + gpg 2.2.8 + rvm 1.29.3 +  Ruby 2.4.0 + RubyMine 2018.1.4 ...

  2. 在macOS Sierra 10.12搭建PHP开发环境

    macOS Sierra 11.12 已经帮我们预装了 Ruby.PHP(5.6).Perl.Python 等常用的脚本语言,以及 Apache HTTP 服务器.由于 nginx 既能作为 HTTP ...

  3. 升级到macos sierra xcode8 requires additional components to support runing and debugging choose Install to add required components

    升级到macos sierra xcode8 报提示:requires additional components to support runing and debugging choose Ins ...

  4. 制作 macOS Sierra 正式版U盘USB启动安装盘方法教程 (全新安装 Mac 系统)

    使用命令行创建制作 macOS Sierra 正式版 USB 安装盘 1.准备一个 8GB 或更大容量的 U盘,并备份好里面的所有资料. 2.下载好 macOS Sierra 正式版的安装程序(app ...

  5. macOS Sierra安装Apache2.4+PHP7.0+MySQL5.7.16

    Mac系统上虽然自带PHP和Apache,但是有时不是我们想要的版本呢.今天我们就在macOS Sierra(10.12.1)上安装比较新的版本的PHP版本,也就是PHP7.0+了.本篇博客我们安装的 ...

  6. 黑苹果macOS Sierra 10.12 安装教程(venue11 pro测试)

    黑苹果macOS Sierra 10.12 安装教程(venue11 pro测试) 2017-03-12 03:46:24 by SemiconductorKING PS:刚刚装好黑苹果,来记录一篇折 ...

  7. macOS Sierra 10.12.6 安装u盘制作

    一.准备工作: 准备一个 8GB 或以上容量的 U 盘,确保里面的数据已经妥善备份好(该过程会抹掉 U 盘全部数据) 从这里下载苹果官方 OS X Yosemite 正式版的安装程序 (可选 AppS ...

  8. How to install macOS Sierra on Skylake

    create usb installer sudo /Applications/Install\ macOS\ Sierra.app/contents/resources/createinstallm ...

  9. KVM环境安装macOS Sierra

    一.在macOS系统中生成ISO文件:1.在App Store中搜索.下载macOS Sierra系统. App Store --> macos --> macOS Sierra --&g ...

随机推荐

  1. 奔小康赚大钱 HDU - 2255(最大权值匹配 KM板题)

    奔小康赚大钱 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Subm ...

  2. BZOJ1492 货币兑换 CDQ分治优化DP

    1492: [NOI2007]货币兑换Cash Time Limit: 5 Sec  Memory Limit: 64 MB Description 小Y最近在一家金券交易所工作.该金券交易所只发行交 ...

  3. Gym - 101522H Hit!

    H. Hit! time limit per test 1.0 s memory limit per test 256 MB input standard input output standard ...

  4. HGOI 20181103 题解

    problem:把一个可重集分成两个互异的不为空集合,两个集合里面的数相乘的gcd为1(将集合中所有元素的质因数没有交集) solution:显然本题并不是那么容易啊!考场上想了好久.. 其实转化为上 ...

  5. HGOI NOIP模拟4 题解

    NOIP国庆模拟赛Day5 题解 T1 马里奥 题目描述 马里奥将要参加 NOIP 了,他现在在一片大陆上,这个大陆上有着许多浮空岛,并且其中一座浮空岛上有一个传送门,马里奥想要到达传送门从而前往 N ...

  6. 【转】如何解决使用keil下载或者调试程序是提示的“Invalid ROM Table”信息!

    在将Discovery的工程移植到Mini-STM32F4x9BI开发板时,使用ULINK2下载程序可能会出现如下图所示的“Invalid ROM Table”这个错误. 可能原因是使用Mini-ST ...

  7. 内置函数sorted()

    这里顺便说一下sorted()和sort()的异同. sort 是 list 中的方法,只能对列表排序:sorted 可以对所有可迭代对象进行排序. list 的 sort 方法是对原列表进行操作,而 ...

  8. os.path.splitext()用法--分离文件名与扩展名

    用法: os.path.splitext(“文件路径”)    分离文件名与扩展名:默认返回(fname,fextension)元组,可做分片操作 例子: import os path_01='E:\ ...

  9. spring cloud微服务架构 服务提供者和服务消费者

    服务提供者和服务消费者 下面这张表格,简单描述了服务提供者/消费者是什么:   | 名词 | 概念 | | ----- | ----------------------- | | 服务提供者 | 服务 ...

  10. uva 10625 Board Wrapping

    https://vjudge.net/problem/UVA-10652 给出n个长方形,用一个面积尽量小的凸多边形把他们围起来 求木板占包装面积的百分比 输入给出长方形的中心坐标,长,宽,以及长方形 ...