之前都是想看啥源碼就直接搜grepcode上面的看看。最近閑了,就在看tcp ip相關(guān),想著從user層一步步怎么走到kernel的。就想編譯一下openjdk玩玩,基本步驟如下,主要記錄一下遇到的坑:
系統(tǒng):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 解決