简体   繁体   English

无法在CentOS6.5上编译openjdk7源代码

[英]Cannot compile openjdk7 source code on CentOS6.5

I was trying to compile openjdk source code on CentOS6.5, and I got the following error message while running make. 我试图在CentOS6.5上编译openjdk源代码,并且在运行make时收到以下错误消息。 if anybody can help? 是否有人可以帮助? thanks in advance. 提前致谢。

software version: JDK: openjdk-7u40-fcs-src-b43-26_aug_2013 OS: Linux 2.6.32-431.el6.x86_64 软件版本:JDK:openjdk-7u40-fcs-src-b43-26_aug_2013操作系统:Linux 2.6.32-431.el6.x86_64

make[6]: Leaving directory /usr/local/openjdk/build/linux-amd64-debug/hotspot/outputdir/linux_amd64_compiler2/jvmg' cd linux_amd64_compiler2/jvmg && ./test_gamma Using java runtime at: /usr/lib/jvm/java-1.6.0-openjdk.x86_64/jre ./gamma: relocation error: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.33.x86_64/jre/lib/amd64/libjava.so: symbol JVM_FindClassFromCaller, version SUNWprivate_1.1 not defined in file libjvm.so with link time reference make[5]: *** [jvmg] Error 127 make[5]: Leaving directory /usr/local/openjdk/build/linux-amd64-debug/hotspot/outputdir' make[4]: * [generic_build2] Error 2 make[4]: Leaving directory /usr/local/openjdk/hotspot/make' make[3]: *** [jvmg] Error 2 make[3]: Leaving directory /usr/local/openjdk/hotspot/make' make[2]: * [hotspot-build] Error 2 make[2]: Leaving directory /usr/local/openjdk' make[1]: *** [generic_debug_build] Error 2 make[1]: Leaving directory /usr/local/openjdk' make [6]:离开目录/usr/local/openjdk/build/linux-amd64-debug/hotspot/outputdir/linux_amd64_compiler2/jvmg' cd linux_amd64_compiler2/jvmg && ./test_gamma Using java runtime at: /usr/lib/jvm/java-1.6.0-openjdk.x86_64/jre ./gamma: relocation error: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.33.x86_64/jre/lib/amd64/libjava.so: symbol JVM_FindClassFromCaller, version SUNWprivate_1.1 not defined in file libjvm.so with link time reference make[5]: *** [jvmg] Error 127 make[5]: Leaving directory / usr / local / openjdk / build / linux-amd64- debug / hotspot / outputdir'make [4]: * [generic_build2]错误2 make [4]:离开目录/usr/local/openjdk/hotspot/make' make[3]: *** [jvmg] Error 2 make[3]: Leaving directory / usr / local / openjdk / hotspot / make'make [2]:* [hotspot-build]错误2 make [2]:离开目录/usr/local/openjdk' make[1]: *** [generic_debug_build] Error 2 make[1]: Leaving directory / usr / local / openjdk'

Editor file hotspot/make/linux/Makefile,and delete all the test_gamma in Makefile. 编辑器文件hotspot / make / linux / Makefile,并删除Makefile中的所有test_gamma
It past! 过去了!

I meet the same error when build my openjdk7 on ubuntu14.04 and I suggest you check the file /usr/local/openjdk/build/linux-amd64-debug/hotspot/outputdir/linux_amd64_compiler2/jvmg/test_gamma , this error happens at the end of this shell script, remove those lines from the file and try it again. 在ubuntu14.04上构建openjdk7时遇到相同的错误,建议您检查/ usr / local / openjdk / build / linux-amd64-debug / hotspot / outputdir / linux_amd64_compiler2 / jvmg / test_gamma文件 ,该错误发生在在该Shell脚本的末尾,从文件中删除这些行,然后重试。 hope this would help 希望这会有所帮助

下载并安装Oracle JDK 1.6.0_45,并将其设置为“ ALT_BOOTDIR”和“ ALT_JDK_IMPORT_PATH”,请不要使用OpenJDK1.6

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM