之前都是想看啥源码就直接搜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 解决