OpenJDK1.8 HotSpot编译报错

报错信息:

/usr/bin/make: invalid option -- '8'
/usr/bin/make: invalid option -- '/'
/usr/bin/make: invalid option -- 'a'
/usr/bin/make: invalid option -- '/'
/usr/bin/make: invalid option -- 'c'
Usage: make [options] [target] ...
...省略部分信息...
This program built for x86_64-pc-linux-gnu
Report bugs to <[email protected]>
/home/john/openjdk-8-build/jdk8/hotspot/make/linux/makefiles/top.make:91: recipe for target 'ad_stuff' failed
make[5]: *** [ad_stuff] Error 2
/home/john/openjdk-8-build/jdk8/hotspot/make/linux/Makefile:289: recipe for target 'debug' failed
make[4]: *** [debug] Error 2
Makefile:216: recipe for target 'generic_build2' failed
make[3]: *** [generic_build2] Error 2
Makefile:167: recipe for target 'debug' failed
make[2]: *** [debug] Error 2
HotspotWrapper.gmk:44: recipe for target '/home/john/openjdk-8-build/jdk8/build/linux-x86_64-normal-server-slowdebug/hotspot/_hotspot.timestamp' failed
make[1]: *** [/home/john/openjdk-8-build/jdk8/build/linux-x86_64-normal-server-slowdebug/hotspot/_hotspot.timestamp] Error 2
/home/john/openjdk-8-build/jdk8//make/Main.gmk:108: recipe for target 'hotspot-only' failed
make: *** [hotspot-only] Error 2

解决办法:

方法一:更换make为4.0版本以下(未测试)
方法二:修改hotspot/make/linux/makefiles/adjust-mflags.sh
约第67行增加一个I,修改


问题原因:

make版本的问题,4.0以后make-I和-j选项混乱,具体看参考资料


参考资料:
https://stackoverflow.com/questions/21246042/scrambled-arguments-when-building-openjdk
https://www.mail-archive.com/[email protected]/msg10780.html
发布了5 篇原创文章 · 获赞 1 · 访问量 1184

猜你喜欢

转载自blog.csdn.net/m0_37325106/article/details/79990293
今日推荐