编译openjdk总是出现这个问题, 怎么解决呢
rm -f libjvm.so.1; ln -s libjvm.so libjvm.so.1; [ -f libjvm.so ] || { ln -s libjvm.so libjvm.so; ln -s libjvm.so.1 libjvm.so.1; }; if [ "" = "" ] ; then if [ -x /usr/sbin/selinuxenabled ] ; then /usr/sbin/selinuxenabled; if [ $? = 0 ] ; then /usr/bin/chcon -t textrel_shlib_t libjvm.so; if [ $? != 0 ]; then echo "ERROR: Cannot chcon libjvm.so"; fi fi fi fi
}
Linking vm...
/usr/bin/objcopy --only-keep-debug libjvm.so libjvm.debuginfo
/usr/bin/objcopy --add-gnu-debuglink=libjvm.debuginfo libjvm.so
strip -g libjvm.so
[ -f libjvm.debuginfo ] || ln -s libjvm.debuginfo libjvm.debuginfo
zip -q -y libjvm.diz libjvm.debuginfo libjvm.debuginfo
rm -f libjvm.debuginfo libjvm.debuginfo
[ -f libjvm.diz ] || { ln -s libjvm.diz libjvm.diz; }
echo Linking launcher...
Linking launcher...
gcc -m64 -Xlinker -O1 -Wl,--hash-style=both -Xlinker -z -Xlinker noexecstack -m64 -Xlinker -export-dynamic -Lpwd -o gamma launcher/java_md.o launcher/java.o launcher/jli_util.o launcher/wildcard.o -ljvm -lm -ldl -lpthread
make[6]: Leaving directory '/home/qu/openjdk/builddir/hotspot/outputdir/linux_amd64_compiler2/product'
All done.
make[5]: Leaving directory '/home/qu/openjdk/builddir/hotspot/outputdir/linux_amd64_compiler2/product'
cd linux_amd64_compiler2/product && ./test_gamma
Using java runtime at: /usr/lib/jvm/jdk1.7.0_79/jre
./gamma: relocation error: /usr/lib/jvm/jdk1.7.0_79/jre/lib/amd64/libjava.so: symbol JVM_FindClassFromCaller, version SUNWprivate_1.1 not defined in file libjvm.so with link time reference
/home/qu/openjdk/hotspot/make/linux/Makefile:290: recipe for target 'product' failed
make[4]: *** [product] Error 127
make[4]: Leaving directory '/home/qu/openjdk/builddir/hotspot/outputdir'
Makefile:191: recipe for target 'generic_build2' failed
make[3]: *** [generic_build2] Error 2
make[3]: Leaving directory '/home/qu/openjdk/hotspot/make'
Makefile:151: recipe for target 'product' failed
make[2]: *** [product] Error 2
make[2]: Leaving directory '/home/qu/openjdk/hotspot/make'
make/hotspot-rules.gmk:111: recipe for target 'hotspot-build' failed
make[1]: *** [hotspot-build] Error 2
make[1]: Leaving directory '/home/qu/openjdk'
Makefile:251: recipe for target 'build_product_image' failed
make: *** [build_product_image] Error 2
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Download and install Oracle JDK 1.6.0_45 and set it to "ALT_BOOTDIR" and "ALT_JDK_IMPORT_PATH", please do not use OpenJDK1.6