编译jdk

编译jdk

2021-07-16

问题

Gcc版本过高

问题描述:

gcc 版本 11.1.0 (GCC) ,而提示gcc版本低于4.8.

问题原因:

Not Support compilers with multi-digit major version numbers

解决方案:

编译jdk

jdk13修改提交-8233880: Support compilers with multi-digit major version numbers

Make-没有规则可制作目标

问题描述:

Building target 'images' in configuration 'linux-x86_64-server-fastdebug'
make[3]: *** 没有规则可制作目标“/jdk12/build/linux-x86_64-server-fastdebug/buildtools/langtools_tools_classes/_the.BUILD_TOOLS_LANGTOOLS.vardeps”,由“/jdk12/build/linux-x86_64-server-fastdebug/buildtools/langtools_tools_classes/_the.BUILD_TOOLS_LANGTOOLS_batch” 需求。 停止。
make[3]: *** 正在等待未完成的任务....
make[2]: *** [make/Main.gmk:73:buildtools-langtools] 错误 2

ERROR: Build failed for target 'images' in configuration 'linux-x86_64-server-fastdebug' (exit code 2) 

No indication of failed target found.
Hint: Try searching the build log for '] Error'.
Hint: See doc/building.html#troubleshooting for assistance.

问题原因:

make 4.3 breaks build

解决方案:

编译jdk

jdk15修改提交-8237879: make 4.3 breaks build

重定义parentPathv

问题描述:

* For target support_native_java.base_libjava_BUILD_LIBJAVA_link:
/usr/bin/ld: jdk12/build/linux-x86_64-server-fastdebug/support/native/java.base/libjava/childproc.o:/jdk12/src/java.base/unix/native/libjava/childproc.h:121: multiple definition of `parentPathv'; /jdk12/build/linux-x86_64-server-fastdebug/support/native/java.base/libjava/ProcessImpl_md.o:/jdk12/src/java.base/unix/native/libjava/childproc.h:121: first defined here

问题原因:

A recent GCC patch (will be in GCC 10) exposes a couple of "multiple definition" link errors when building the jdk tip.

解决方案:

Moving forward, building jdk with latest versions of GCC will trigger this error. Specifying "--with-extra-cflags='-fcommon'" can make it work, but it just got things hidden again.

(2021-07-16)未彻底解决-GCC default -fno-common exposes “multiple definition” link errors

初步成功

openjdk 12-internal 2019-03-19
OpenJDK Runtime Environment (fastdebug build 12-internal+0-adhoc.haoge.jdk12)
OpenJDK 64-Bit Server VM (fastdebug build 12-internal+0-adhoc.haoge.jdk12, mixed mode)
上一篇:SwiftUI - Preview


下一篇:vscode Markdown预览美化(补充)