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