当我在Mac OS Mojave中使用此命令编译OpenJDK 10时:
bash configure --with-debug-level=slowdebug --with-jvm-variants=server --with-target-bits=64 --enable-ccache --with-num-cores=1 --with-memory-size=8000 --with-freetype=/usr/local/Cellar/freetype/2.10.0 --with-boot-jdk=/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/
它配置成功。当我编译源代码时:
make all
引发此错误:
fatal error: file '/Users/dolphin/source/dabai/jdk10/hotspot/make/../src/share/vm/gc/shared/plab.hpp' has been modified since the precompiled header '/Users/dolphin/source/dabai/jdk10/build/macosx-x86_64-normal-server-slowdebug/hotspot/variant-server/libjvm/objs/precompiled/precompiled.hpp.pch' was built
note: please rebuild precompiled header '/Users/dolphin/source/dabai/jdk10/build/macosx-x86_64-normal-server-slowdebug/hotspot/variant-server/libjvm/objs/precompiled/precompiled.hpp.pch'
1 error generated.
lib/CompileJvm.gmk:208: recipe for target '/Users/dolphin/source/dabai/jdk10/build/macosx-x86_64-normal-server-slowdebug/hotspot/variant-server/libjvm/objs/arguments.o' failed
make[3]: *** [/Users/dolphin/source/dabai/jdk10/build/macosx-x86_64-normal-server-slowdebug/hotspot/variant-server/libjvm/objs/arguments.o] Error 1
make/Main.gmk:263: recipe for target 'hotspot-server-libs' failed
make[2]: *** [hotspot-server-libs] Error 2
出了什么问题?这是我的环境:
====================================================
The existing configuration has been successfully updated in
/Users/dolphin/source/dabai/jdk10/build/macosx-x86_64-normal-server-slowdebug
using configure arguments '--with-debug-level=slowdebug --with-jvm-variants=server --with-target-bits=64 --enable-ccache --with-num-cores=1 --with-memory-size=8000 --with-freetype=/usr/local/Cellar/freetype/2.10.0'.
Configuration summary:
* Debug level: slowdebug
* HS debug level: debug
* JDK variant: normal
* JVM variants: server
* OpenJDK target: OS: macosx, CPU architecture: x86, address length: 64
* Version string: 10-internal+0-adhoc.dolphin.jdk10 (10-internal)
Tools summary:
* Boot JDK: java version "1.8.0_152-ea" Java(TM) SE Runtime Environment (build 1.8.0_152-ea-b05) Java HotSpot(TM) 64-Bit Server VM (build 25.152-b05, mixed mode) (at /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home)
* Toolchain: clang (clang/LLVM from Xcode 9.4)
* C Compiler: Version 9.1.0 (at /usr/bin/gcc)
* C++ Compiler: Version 9.1.0 (at /usr/bin/g++)
Build performance summary:
* Cores to use: 1
* Memory limit: 8000 MB
* ccache status: Active (3.6)