此次依然在装有yum可用环境下编译JDK,代码是从github下载而来,理论来讲和OpenJDK Mercurial Repositories一样。
编译的gcc为7.3.0
现有环境需要安装的依赖
yum install libXtst-devel libXt-devel libXrender-devel libXi-devel -y
yum install cups-devel -y
yum install alsa-lib-devel -y
jdk9-b94一堆问题
#./configure --with-debug-level=slowdebug --disable-warnings-as-errors --with-num-cores=14 --with-jobs=14 后面两个参数不能混用
./configure --with-debug-level=slowdebug --disable-warnings-as-errors --with-jobs=14
问题
make[1]: Warning: File '/home/openjdk/jdk/make/common/JavaCompilation.gmk' has modification time 479419 s in the future
百度修改系统时间
如果不按98编译,就会出现如下错误
https://bugs.openjdk.org/browse/JDK-8160353
- error: left operand of shift expression ‘(-1 << 1)’ is negative [-fpermissive]
所以在build目录搜g++ ,在其前面加 -std=gnu++98
编出来链接lib/amd64/jli/libjli.so 程序都会crash
jdk-9+181正常可用
不过debug信息单独生成一个debuginfo文件