[讨论] 哪位大大编译过openJDK6,请教些问题
michael9527
2012-04-10
我想对JDK里面的核心API进行一些修改,于是下了openjdk,全部编译一遍。
用的是centos(Red Hat 4.1.2-46) 我先试了编译openjdk7,不成功,然后又试了6,JDK7的一些环境我都装好,测试正确。 编译 openjdk6 (openjdk-6-src-b24-14_nov_2011.tar) 缺少一个Motif,readme上面提供了那个版本下载链接已经失效了,所以装了 openMotif-2.2.3,随便找的一个。 最后make的时候报错: make[2]: Entering directory `/root/soft/openMotif-2.2.3/config/util' gcc -DHAVE_CONFIG_H -I. -I. -I../../include -g -O2 -Wall -Wno-unused -Wno-comment -c makestrs.c makestrs.c:51:21: error: X11/Xos.h: No such file or directory makestrs.c: In function 'WriteHeaderProlog': makestrs.c:115: warning: implicit declaration of function 'strcmp' makestrs.c: In function 'CopyTmplProlog': makestrs.c:228: warning: implicit declaration of function 'strlen' makestrs.c:228: warning: incompatible implicit declaration of built-in function 'strlen' makestrs.c:231: warning: implicit declaration of function 'strncmp' makestrs.c: In function 'WriteHeader': makestrs.c:275: warning: incompatible implicit declaration of built-in function 'strlen' makestrs.c:279: warning: incompatible implicit declaration of built-in function 'strlen' makestrs.c: In function 'DoLine': makestrs.c:480: warning: incompatible implicit declaration of built-in function 'strlen' makestrs.c:510: warning: implicit declaration of function 'strcpy' makestrs.c:510: warning: incompatible implicit declaration of built-in function 'strcpy' makestrs.c:529: warning: incompatible implicit declaration of built-in function 'strcpy' makestrs.c:544: warning: incompatible implicit declaration of built-in function 'strcpy' makestrs.c:586: warning: implicit declaration of function 'index' makestrs.c:586: warning: incompatible implicit declaration of built-in function 'index' makestrs.c:592: warning: implicit declaration of function 'strcat' makestrs.c:592: warning: incompatible implicit declaration of built-in function 'strcat' makestrs.c: In function 'IntelABIIndexEntries': makestrs.c:628: warning: incompatible implicit declaration of built-in function 'strlen' makestrs.c: In function 'DefaultIndexEntries': makestrs.c:643: warning: incompatible implicit declaration of built-in function 'strlen' makestrs.c: In function 'DoComment': makestrs.c:673: warning: incompatible implicit declaration of built-in function 'index' makestrs.c:678: warning: implicit declaration of function 'strncpy' makestrs.c:678: warning: incompatible implicit declaration of built-in function 'strncpy' makestrs.c: In function 'main': makestrs.c:733: warning: incompatible implicit declaration of built-in function 'strlen' make[2]: *** [makestrs.o] Error 1 make[2]: Leaving directory `/root/soft/openMotif-2.2.3/config/util' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/root/soft/openMotif-2.2.3/config' make: *** [all-recursive] Error 1 后来直接用yum安装一个,虽然成功了,但是 make sanity 报错 ERROR: You do not have access to valid Motif 2.1 header files. Please check your access to (for example) /root/soft/openMotif-2.2.3/include/Xm/AtomMgr.h and/or check your value of ALT_MOTIF_DIR. 按照编译readme上说的,如果安装了openMotif,则会有 /usr/include/Xm 这个目录,但我装了没有。 编译openjdk7 (openjdk-7-fcs-src-b147-27_jun_2011) make sanity 正确,不过最后编译的时候报错了。 错误日志在这里: http://michael9527.iteye.com/blog/1481620 错误提示看的莫名其妙。 |
|
rockyfxl
2012-04-11
/usr/bin/ld: cannot find -lX11
找不到 X11 库啊 |
|
RednaxelaFX
2012-04-12
不知道这帖的笔记有没有帮助:http://rednaxelafx.iteye.com/blog/875957
|
|
Cwind
2012-09-10
rockyfxl 写道 /usr/bin/ld: cannot find -lX11
找不到 X11 库啊 yum install libXtst yum install libXtst-devel 即可 |