编译openjdk

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


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 6
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值