RFR: JDK-8210723 Better information in configure for invalid Xcode

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Thu Sep 13 19:42:19 UTC 2018


When running e.g. Xcode 9.4 on macosx 10.12, the configure scripts fails 
with: "Failed to determine Xcode version" This is not very helpful.

Adding the output of the failed xcodebuild call (typically something 
like "Executable requires at least macOS 10.13, but is being run on 
macOS 10.12.6, and so is exiting") will help the user diagnose the error.

Bug: https://bugs.openjdk.java.net/browse/JDK-8210723
Patch inline:
diff --git a/make/autoconf/toolchain.m4 b/make/autoconf/toolchain.m4
--- a/make/autoconf/toolchain.m4
+++ b/make/autoconf/toolchain.m4
@@ -232,6 +232,7 @@
        XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
        $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
        if test $? -ne 0; then
+        AC_MSG_NOTICE([xcodebuild output: $XCODE_VERSION_OUTPUT])
          AC_MSG_ERROR([Failed to determine Xcode version.])
        fi
        XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \

/Magnus




More information about the build-dev mailing list