編譯jdk(mac)

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

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內(nèi)容