编译jdk(mac)

之前都是想看啥源码就直接搜grepcode上面的看看。最近闲了,就在看tcp ip相关,想着从user层一步步怎么走到kernel的。就想编译一下openjdk玩玩,基本步骤如下,主要记录一下遇到的坑:
系统:mac osx 10.10 版本:jdk8

1、brew install mercurial
2、hg clone http://hg.openjdk.java.net/jdk8/jdk8 openjdk8
3、cd openjdk8 && sh ./get_source.sh
4、sh configure
5、make

1、xquartz软件未安装

configure: error: Could not find freetype!
configure exiting with result code 1

解决:

Download https://sourceforge.net/projects/freetype/files/freetype2/2.6.2/freetype-2.6.2.tar.gz/download this archive
Extract it
cd into the folder and run
./configure
make
sudo make install

2、The tested number of bits in the target (0) differs from the number of bits expected to be found in the target (64) errors

export MACOSX_DEPLOYMENT_TARGET=10.8 解决

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容