[讨论] 有人在Centos5 下build jdk1.6 成功吗?
rockyfxl
2011-08-15
有人在Centos5 下build jdk1.6 成功吗?
这几天试着make, 总是有一些错,应该都是环境或者lib dependence 问题。 想问问有没有同学搞定过?有的话借鉴一下! 谢谢。 ERROR: You do not have a valid DEVTOOLS_PATH setting. Please check your access to /java/devtools/linux/bin/ and/or check your value of ALT_DEVTOOLS_PATH. ERROR: You do not have a valid GCC29_COMPILER_PATH setting. Please check your access to /java/devtools/linux/gcc29/usr/ and/or check your value of ALT_GCC29_COMPILER_PATH. This will affect you if you build the plugin target. |
|
RednaxelaFX
2011-08-15
呃,具体是CentOS 5的什么版本?
我在RHEL 5.4上单独build出HotSpot VM的时候完全没问题。想来CentOS上应该也是类似的。 但要把完整的JDK build出来的话就麻烦一些。我懒而且对我来说没有build出HotSpot以外的部分的需求…所以没在RHEL 5.4上试过。 还有,既然出现了GCC 2.9的依赖,你多半在尝试对JRL许可证的Sun JDK 6源码来build?OpenJDK build起来应该会方便很多,如果它能满足你的需求的话。 这个依赖主要是在构造浏览器的Java plugin的时候要用的。不build那部分就没事了。 |
|
rockyfxl
2011-08-16
谢谢RednaxelaFX 回复,我是用Sun JDK 6源码来build的。
OS 是Centos5.6 Linux version 2.6.18-238.el5 (mockbuild@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) 主要是由于公司用的还是sun jdk1.6, 不是很确定与open jdk 的区别。 我再试试。 |
|
RednaxelaFX
2011-08-16
关于DEVTOOLS_PATH,不知道这帖里的经验对你是否适用:http://rednaxelafx.iteye.com/blog/875957
虽然系统不一样但有些环境变量的基本设置方式还是共通的…吧 |
|
rockyfxl
2011-08-16
谢谢,经过一阵折腾,总算build 起来了,经验总结如下:
1. 虽然jdk1.6 README-builds.html 里说要jdk1.5作为Bootstrap, 其实是要求1.6, 所以要先下载安装sun jdk-6u26-linux-x64.bin 注意这里用opensdk 是不行的,没有javap 2. 环境变量设置如下: ALT_BOOTDIR=/tmp/jdk1.6.0_26 ALT_DEVTOOLS_PATH=/usr/bin DEVTOOLS_PATH=/usr/bin LANG=C 3. 安装cups, 下载并build cups-1.5.0-source.tar.bz2 4. 不知道为什么,下载的jdk1.6源码中少了字体文件,ERROR: Missing ./../src/share/lib/fonts/LucidaTypewriterRegular.ttf. Verify you have downloaded and overlayed on the source area all the binary files. 不管它了,从现有的jre 里拷过来。 5. make dev-sanity 有一些warning, 先不管。 6. 执行make dev-sanity BUILD_DEPLOY=false SKIP_COMPARE_IMAGES=true ALT_BOOTDIR=/tmp/jdk1.6.0_26 ALT_DEVTOOLS_PATH=/usr/bin HOTSPOT_BUILD_JOBS=2 等着......明天来看结果 |
|
rockyfxl
2011-08-16
偶的新机器真快,20分钟不到就结束了,
和这里一样报错,看来还得来一次:http://rednaxelafx.iteye.com/blog/875957 make[3]: Entering directory `/mnt/hgfs/workplace/jdk6_src/motif/lib/Xm/util' make[3]: *** No rule to make target `/usr/X11R6/lib/X11/config/Imake.tmpl', needed by `xmkmf'. Stop. make[3]: Leaving directory `/mnt/hgfs/workplace/jdk6_src/motif/lib/Xm/util' make[2]: *** [util/mkcatdefs] Error 2 make[2]: Leaving directory `/mnt/hgfs/workplace/jdk6_src/motif/lib/Xm' make[2]: Entering directory `/mnt/hgfs/workplace/jdk6_src/motif/lib/Xm' (cd util; make) make[3]: Entering directory `/mnt/hgfs/workplace/jdk6_src/motif/lib/Xm/util' make[3]: *** No rule to make target `/usr/X11R6/lib/X11/config/Imake.tmpl', needed by `xmkmf'. Stop. make[3]: Leaving directory `/mnt/hgfs/workplace/jdk6_src/motif/lib/Xm/util' make[2]: *** [util/mkcatdefs] Error 2 make[2]: Leaving directory `/mnt/hgfs/workplace/jdk6_src/motif/lib/Xm' make[1]: *** [motif-build] Error 2 make[1]: Leaving directory `/mnt/hgfs/workplace/jdk6_src/control/make' make: *** [dev-build] Error 2 |
|
rockyfxl
2011-08-16
现场直播, 报错了
make[3]: Entering directory `/mnt/hgfs/workplace/jdk6_src/motif/lib/Xm/util' make[3]: *** No rule to make target `/usr/X11R6/lib/X11/config/Imake.tmpl', needed by `xmkmf'. Stop. make[3]: Leaving directory `/mnt/hgfs/workplace/jdk6_src/motif/lib/Xm/util' make[2]: *** [util/mkcatdefs] Error 2 make[2]: Leaving directory `/mnt/hgfs/workplace/jdk6_src/motif/lib/Xm' make[2]: Entering directory `/mnt/hgfs/workplace/jdk6_src/motif/lib/Xm' (cd util; make) make[3]: Entering directory `/mnt/hgfs/workplace/jdk6_src/motif/lib/Xm/util' make[3]: *** No rule to make target `/usr/X11R6/lib/X11/config/Imake.tmpl', needed by `xmkmf'. Stop. make[3]: Leaving directory `/mnt/hgfs/workplace/jdk6_src/motif/lib/Xm/util' make[2]: *** [util/mkcatdefs] Error 2 make[2]: Leaving directory `/mnt/hgfs/workplace/jdk6_src/motif/lib/Xm' make[1]: *** [motif-build] Error 2 make[1]: Leaving directory `/mnt/hgfs/workplace/jdk6_src/control/make' make: *** [dev-build] Error 2 估计是x11库的问题,检查jdk6_src\motif\lib\Xm\util\Makefile,用到了/usr/X11R6/lib 我的本机是没有这个目录的,从/usr/share 下找到了X11, 拷到/usr/X11R6/lib这里。 再build,还有错: gcc -I/usr/X11R6/include -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -DFUNCPROTO=15 -DNARROWPROTO -c -o mkcatdefs.o mkcatdefs.c mkcatdefs.c: In function 'mkcatdefs': mkcatdefs.c:350: warning: cast to pointer from integer of different size mkcatdefs.c:402: warning: cast to pointer from integer of different size rm -f mkcatdefs gcc -o mkcatdefs mkcatdefs.o gcc -I/usr/X11R6/include -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -DFUNCPROTO=15 -DNARROWPROTO -c -o lndir.o lndir.c lndir.c: In function 'quit': lndir.c:104: warning: incompatible implicit declaration of built-in function 'exit' lndir.c: In function 'quiterr': lndir.c:112: warning: incompatible implicit declaration of built-in function 'exit' lndir.c: In function 'main': lndir.c:353: warning: incompatible implicit declaration of built-in function 'exit' rm -f lndir gcc -o lndir lndir.o make[3]: Leaving directory `/mnt/hgfs/workplace/jdk6_src/motif/lib/Xm/util' rm -f XmMsgI.h XmMsgCatI.h Xm.cat ./util/mkmsgcat -Xm ./Messages.c mv -f Xm.msg Xm1.msg ./util/mkcatdefs XmMsgCatI.h Xm1.msg > Xm.msg mkcatdefs: XmMsgCatI.h created rm -f Xm1.msg rm -f Xm.cat gencat Xm.cat ./Xm.msg ./Xm.msg:2: unknown directive `': line ignored ./Xm.msg:16: unknown directive `': line ignored make[2]: *** [Xm.cat] Error 1 make[2]: Leaving directory `/mnt/hgfs/workplace/jdk6_src/motif/lib/Xm' make[2]: Entering directory `/mnt/hgfs/workplace/jdk6_src/motif/lib/Xm' mkdir unshared ln -s ../bindings/unshared unshared/bindings ln: creating symbolic link `unshared/bindings' to `../bindings/unshared': Operation not supported ln -s ../util/unshared unshared/util ln: creating symbolic link `unshared/util' to `../util/unshared': Operation not supported make[2]: *** [includes] Error 1 make[2]: Leaving directory `/mnt/hgfs/workplace/jdk6_src/motif/lib/Xm' make[1]: *** [motif-build] Error 2 make[1]: Leaving directory `/mnt/hgfs/workplace/jdk6_src/control/make' make: *** [dev-build] Error 2 估计还是X11问题,都怪俺装Centos时以为不会做X11 开发,安装省了许多相关库 明天再看,下班去接老婆了。 |
|
huxi
2011-08-17
早先在ubuntu11.04下都build都不成功,换成10.10就非常顺利。
|
|
rockyfxl
2011-08-19
经过多次折腾,今天张全部搞定了。
不知道什么原因,下载的src 包里总是少了各样的gif, wav等资源文件。 (需要的同学可以联系我,我都在网上找全的) 另外在amd64位下要改下\jdk6_src\j2se\make\sun\jdbc\Makefile 里$(TEMPDIR)/libodbcinst.so: dummyodbc.c $(TEMPDIR) $(CC) -shared -fPIC -o $@ $< $(TEMPDIR)/libodbc.so: dummyodbc.c $(TEMPDIR) $(CC) -shared -fPIC -o $@ $< 加个-fPIC |
相关讨论
相关资源推荐
- centos java jdk 升级,如何在Linux或CentOS上将JDK 1.6升级到1.7
- CentOS下yum安装jdk
- centos 安装oracle jdk1.7,我在CentOS上有Open JDK 1.7;我安装了Oracle的Java rpm; Oracle Java似乎不存在...
- centos6.8安装JDK1.8教程
- Centos6.3下jdk+tomcat安装部署
- Linux下java web服务器搭建(JDK1.6、MySQL5.1、Apache2.2+2...
- Linux系统CentOS Ubuntu安装JDK的4种方法
- centos7.4下搭建JDK+Tomcat+Nginx+Mysql+redis+Mongodb+maven+Git+Jenkins
- 搭建Linux、CentOS系统下的服务器
- centos gcc卸载_Linux Centos下软件的安装与卸载方法