export LANG=C
export ALT_BOOTDIR=/home/zlh/java/jdk1.6.0_45/
export ALT_DROPS_DIR=/home/zlh/software/patch/
export ALLOW_DOWNLOADS=true
export USE_PRECOMPILED_HEADER=true
export SKIP_DEBUG_BUILD=false
export SKIP_FASTDEBUG_BUILD=false
export DEBUG_NAME=debug
unset CLASSPATH
unset JAVA_HOME
1. ERROR: The version of ant being used is older than the required version of '1.7.1'. The version of ant found was ''.
sudo apt-get install ant
2. ERROR: You seem to not have installed ALSA 0.9.1 or higher.
sudo apt-get install libasound2-dev
3. ERROR: FreeType version 2.3.0 or higher is required.
sudo apt-get install libfreetype6-dev
4. ERROR: You do not have access to valid Cups header files.
sudo apt-get install libcups2-dev
5. /bin/sh: 1: /usr/bin/gawk: not found
sudo apt-get install gawk
6. "*** This OS is not supported:" `uname -a`; exit 1;
注释掉hotspot/make/linux/Makefile里面的checkOS
check_os_version:
#ifeq ($(DISABLE_HOTSPOT_OS_VERSION_CHECK)$(EMPTY_IF_NOT_SUPPORTED),)
# $(QUIETLY) >&2 echo "*** This OS is not supported:" `uname -a`; exit 1;
#endif
7. g++: Command not found
sudo apt-get install g++
8. error: "__LEAF" redefined [-Werror]
patch(http://hg.openjdk.java.net/hsx/hsx25/hotspot/rev/a6eef545f1a2)
9. error: converting 'false' to pointer type 'methodOop' [-Werror=conversion-null]
对应的文件改成return NULL;
http://hg.openjdk.java.net/hsx/hsx25/hotspot/rev/f457154eee8b
10. error: unrecognized command line option '-mimpure-text'
注释掉./jdk/make/common/shared/Compiler-gcc.gmk +70
11. time is more than 10 years from present
jdk/src/share/classes/java/util/CurrencyData.properties改成10年内
12. *** [/home/zlh/openjdk/build/linux-amd64/../linux-amd64-fastdebug/lib/amd64/libjsoundalsa.so] Error 1
jdk/make/javax/sound/jsoundalsa/Makefile
LDFLAGS += -lasound 改成 OTHER_LDLIBS += -lasound
13. /usr/bin/ld: cannot find -lX11
sudo apt-get install libxtst-dev
14. fatal error: X11/Intrinsic.h: No such file or directory
sudo apt-get install xorg-dev
半小时后终于编译成功了
JAXP和JAX-WS
在http://download.java.net/jaxp/1.4.5
下载jaxp-1_4_5-unittests.zip和jaxp145_01.zip,
在http://download.java.net/glassfish/components/jax-ws/openjdk/jdk7
下载jdk7-jaxws2_2_4-b03-2011_05_27.zip
在https://java.net/downloads/jax-ws/JDK7/ 下载jdk7-jaf-2010_08_19.zip
将这4个压缩包放到D:/BuildOpenJDK/jdk7-drops目录下,设置set ALT_DROPS_DIR=该目录,构建jaxp和jaxws的ANT脚本会尝试从该目录查找这些zip。