==================================================== A new configuration has been successfully created in /Users/joyven/Documents/workspace/jdk8u/build/macosx-x86_64-normal-server-slowdebug using configure arguments '--with-debug-level=slowdebug --with-freetype-include=/usr/local/include/freetype2 --with-freetype-lib=/usr/local/lib --with-boot-jdk=/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home --with-native-debug-symbols=internal'.
Configuration summary: * Debug level: slowdebug * JDK variant: normal * JVM variants: server * OpenJDK target: OS: macosx, CPU architecture: x86, address length: 64
Tools summary: * Boot JDK: java version "1.8.0_221" Java(TM) SE Runtime Environment (build 1.8.0_221-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode) (at /Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home) * Toolchain: gcc (GNU Compiler Collection) * C Compiler: Version Apple clang version 11.0.0 (clang-1100.0.33.12) Target: x86_64-apple-darwin19.0.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin (at /usr/bin/clang) * C++ Compiler: Version Apple clang version 11.0.0 (clang-1100.0.33.12) Target: x86_64-apple-darwin19.0.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin (at /usr/bin/clang++)
WARNING: You have old-style ALT_ environment variables set. These are not respected, and will be ignored. It is recommended that you clean your environment. The following variables are set: ALT_PARALLEL_COMPILE_JOBS=2
WARNING: The result of this configuration has overridden an older configuration. You *should* run 'make clean' to make sure you get a proper build. Failure to do so might result in strange build problems.
make all
1
make all
make如果不出错,则会在10分钟左右输出下面信息:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
----- Build times ------- Start 2019-11-19 10:30:24 End 2019-11-19 10:51:10 00:00:34 corba 00:01:25 demos 00:03:02 docs 00:04:18 hotspot 00:02:39 images 00:00:36 jaxp 00:00:54 jaxws 00:06:05 jdk 00:00:58 langtools 00:00:15 nashorn 00:20:46 TOTAL ------------------------- Finished building OpenJDK for target 'all'
openjdk version "1.8.0-internal-debug" OpenJDK Runtime Environment (build 1.8.0-internal-debug-joyven_2019_11_19_11_50-b00) OpenJDK 64-Bit Server VM (build 25.71-b00-debug, mixed mode)
configure阶段遇到的错误
问题1:Cannot locate autoconf, unable to correct situation
错误信息
1 2 3 4 5
Configure source code has been updated, checking time stamps Warning: The configure source files is newer than the generated files. Cannot locate autoconf, unable to correct situation. Please install autoconf and run 'bash autogen.sh' to update the generated files. Error: Cannot continue
解决方法
1
brew install autoconf
问题2:Xcode 4 is required to build JDK 8, the version found was 11.1
错误信息
1 2 3
checking for xcodebuild... /usr/bin/xcodebuild configure: error: Xcode 4 is required to build JDK 8, the version found was 11.1. Use --with-xcode-path to specify the location of Xcode 4 or make Xcode 4 active by using xcode-select. configure exiting with result code 1
# Fail-fast: verify we're building on Xcode 4, we cannot build with Xcode 5 or later XCODE_VERSION=`$XCODEBUILD -version | grep '^Xcode ' | sed 's/Xcode //'` XC_VERSION_PARTS=( ${XCODE_VERSION//./ } ) iftest ! "${XC_VERSION_PARTS[0]}" = "4"; then as_fn_error $? "Xcode 4 is required to build JDK 8, the version found was $XCODE_VERSION. Use --with-xcode-path to specify the location of Xcode 4 or make Xcode 4 active by using xcode-select.""$LINENO" 5 fi
问题3:A gcc compiler is required. Try setting --with-tools-dir
错误信息
1 2 3 4 5 6 7 8 9
checking for xcodebuild... /usr/bin/xcodebuild checking Determining Xcode SDK path... /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk configure: Will use user supplied compiler CC=clang checking for clang... /usr/bin/clang checking resolved symbolic links for CC... no symlink configure: The C compiler (located as /usr/bin/clang) does not seem to be the required gcc compiler. configure: The result from running with --version was: "" configure: error: A gcc compiler is required. Try setting --with-tools-dir. configure exiting with result code 1
iftest $? -ne 0; then ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1` { $as_echo"$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5 $as_echo"$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;} { $as_echo"$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5 $as_echo"$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;} { $as_echo"$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5 $as_echo"$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;} as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir.""$LINENO" 5 fi
Compiling /Users/joyven/Documents/workspace/jdk8u/hotspot/src/share/vm/adlc/adlparse.cpp warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found] Compiling /Users/joyven/Documents/workspace/jdk8u/hotspot/src/share/vm/adlc/archDesc.cpp In file included from /Users/joyven/Documents/workspace/jdk8u/hotspot/src/share/vm/adlc/adlparse.cpp:27: /Users/joyven/Documents/workspace/jdk8u/hotspot/src/share/vm/adlc/adlc.hpp:35:10: fatal error: 'iostream' file not found #include <iostream> ^~~~~~~~~~ warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found] In file included from /Users/joyven/Documents/workspace/jdk8u/hotspot/src/share/vm/adlc/archDesc.cpp:27: /Users/joyven/Documents/workspace/jdk8u/hotspot/src/share/vm/adlc/adlc.hpp:35:10: fatal error: 'iostream' file not found #include <iostream> ^~~~~~~~~~ 1 warning and 1 error generated. 1 warning and 1 error generated. make[6]: *** [../generated/adfiles/adlparse.o] Error 1 make[6]: *** Waiting for unfinished jobs.... make[6]: *** [../generated/adfiles/archDesc.o] Error 1 make[5]: *** [ad_stuff] Error 2 make[4]: *** [debug] Error 2 make[3]: *** [generic_build2] Error 2 make[2]: *** [debug] Error 2 make[1]: *** [/Users/joyven/Documents/workspace/jdk8u/build/macosx-x86_64-normal-server-slowdebug/hotspot/_hotspot.timestamp] Error 2 make: *** [hotspot-only] Error 2
问题6:configure: error: C compiler cannot create executables
See `config.log’ for more details
1 2 3 4 5 6 7 8 9 10 11 12 13
configure: Using default toolchain gcc (GNU Compiler Collection) checking Determining if we need to set DEVELOPER_DIR... no checking for xcodebuild... /usr/bin/xcodebuild checking Determining Xcode SDK path... /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk configure: Will use user supplied compiler CC=clang checking for clang... /usr/bin/clang checking resolved symbolic links for CC... no symlink configure: Using gcc C compiler version Apple clang version 11.0.0 (clang-1100.0.33.8) Target: x86_64-apple-darwin19.0.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin [Apple clang version 11.0.0 (clang-1100.0.33.8) Target: x86_64-apple-darwin19.0.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin] checking whether the C compiler works... no configure: error: in `/Users/joyven/Documents/workspace/jdk8u': configure: error: C compiler cannot create executables See `config.log'for more details configure exiting with result code 77
openjdk version "1.8.0-internal-debug" OpenJDK Runtime Environment (build 1.8.0-internal-debug-joyven_2019_11_19_10_28-b00) OpenJDK 64-Bit Server VM (build 25.71-b00-debug, mixed mode) # # A fatal error has been detected by the Java Runtime Environment: # # SIGILL (0x4) at pc=0x0000000110c3ae38, pid=84856, tid=0x0000000000002803 # # JRE version: OpenJDK Runtime Environment (8.0) (build 1.8.0-internal-debug-joyven_2019_11_19_10_28-b00) # Java VM: OpenJDK 64-Bit Server VM (25.71-b00-debug mixed mode bsd-amd64 compressed oops) # Problematic frame: # V [libjvm.dylib+0xa3ae38] PerfData::~PerfData()+0x8 # # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again # # An error report file with more information is saved as: # /Users/joyven/Documents/workspace/jdk8u/hs_err_pid84856.log # # If you would like to submit a bug report, please visit: # http://bugreport.java.com/bugreport/crash.jsp #