编译openjdk总是出现这个问题, 怎么解决呢

发布于 2021-12-03 23:29:42 字数 2868 浏览 829 评论 1

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

高跟鞋的旋律 2021-12-04 13:41:03

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文