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. 使用AutoMapper实现Dto和Model的自由转换(下)

    书接上文.在上一篇文章中我们讨论了使用AutoMapper实现类型间1-1映射的两种方式——Convention和Configuration,知道了如何进行简单的OO Mapping.在这个系列的最后 ...

  2. hdwiki 参考资料改成可点击跳转的(默认不能点)

    (1)首先在view这个文件夹找到viewdoc.htm文件.(2)在viewdoc.htm源码中搜索“<dd> <span>[{eval echo ($i+1)}]”找到下面 ...

  3. SQLServer过期的解决方案

    看图吧,不喜欢说话,图里面我都打备注了 0SQLService异常 1找到安装中心 2升级版本 3监测ing 4输入升级key 5同意并下一步 6下一步 7下一步 8下一步 9收工 10可以打开了

  4. 【POJ3250】Bad Hair Day 单调栈

    题目大意:给定一个由 N 个数组成的序列,求以每个序列为基准,向右最大有多少个数字都比它小. 单调栈 单调栈中维护的是数组的下标. 单调栈在每个元素出栈时统计该出栈元素的答案贡献或对应的值. 单调栈主 ...

  5. Java 使用 Enum 实现单例模式

    在这篇文章中介绍了单例模式有五种写法:懒汉.饿汉.双重检验锁.静态内部类.枚举.如果涉及到反序列化创建对象时推荐使用枚举的方式来实现单例,因为Enum能防止反序列化时重新创建新的对象.本文介绍 Enu ...

  6. 虚拟机中liunx安装教程

    目标:在Linux服务器上部署Java开发的网站  工具 VirtualBox-4.3.8:下载后安装. linux系统镜像: Centos国内镜像文件下载地址: http://centos.ustc ...

  7. VBA:Excel使用SQL进行查询

    Sub Query() Dim Conn As Object, Rst As Object Dim strConn As String, strSQL As String Dim i As Integ ...

  8. null和System.DBNull.Value的区别

    我记得之前在写一个程序的时候用到了这个知识点,当时判断的时候,有时候null可以,有时候必须是System.DBNull.Value 由于不清楚这两个的区别所以纠结了很久.查了一下,二者的区别如下: ...

  9. Google-403-Forbidden

    Author:KillerLegend Date:2014.8.14 From:http://www.cnblogs.com/killerlegend/p/3913554.html www.googl ...

  10. OpenResty 高阶实战之————Redis授权登录使用短连接(5000)和长连接(500W) 使用连接池AB压力测试结果

    一.短连接开始测试 ab -n 5000 -c 100 -k 127.0.0.1/test_redis_short #demo1 Concurrency Level: Time taken for t ...