Build failing on macOS 10.14.5, Xcode 10.2.1

I'm having trouble with local build of Swift for the last week or so... I started getting crashes during compilations, so I tried clean builds to no avail. It now dies building swift (llvm builds fine) with error: Swift does not support the SDK 'MacOSX10.14.sdk'

[962/1764][ 54%][5231.445s] Compiling /Users/mondo/Developer/swift-source/build/Ninja-Release/swift-macosx-x86_64/stdlib/public/core/OSX/x86_64/Swift.o
FAILED: stdlib/public/core/OSX/x86_64/Swift.o 
cd /Users/mondo/Developer/swift-source/build/Ninja-Release/swift-macosx-x86_64/stdlib/public/core && /usr/bin/python /Users/mondo/Developer/swift-source/swift/utils/line-directive @/Users/mondo/Developer/swift-source/build/Ninja-Release/swift-macosx-x86_64/stdlib/public/core/9MDEg.txt -- /Users/mondo/Developer/swift-source/build/Ninja-Release/swift-macosx-x86_64/./bin/swiftc -c -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -target x86_64-apple-macosx10.14 -resource-dir /Users/mondo/Developer/swift-source/build/Ninja-Release/swift-macosx-x86_64/./lib/swift -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/../../../Developer/Library/Frameworks -O -I /Users/mondo/Developer/swift-source/build/Ninja-Release/swift-macosx-x86_64/./lib/swift/macosx -module-cache-path /Users/mondo/Developer/swift-source/build/Ninja-Release/swift-macosx-x86_64/./module-cache -no-link-objc-runtime -enable-library-evolution -Xfrontend -enforce-exclusivity=unchecked -nostdimport -parse-stdlib -module-name Swift -Xfrontend -group-info-path -Xfrontend /Users/mondo/Developer/swift-source/swift/stdlib/public/core/GroupInfo.json -swift-version 5 -runtime-compatibility-version none -warn-swift3-objc-inference-complete -Xfrontend -verify-syntax-tree -Xllvm -sil-inline-generics -Xllvm -sil-partial-specialization -Xcc -DswiftCore_EXPORTS -warn-implicit-overrides -module-link-name swiftCore -force-single-frontend-invocation -parse-as-library -o /Users/mondo/Developer/swift-source/build/Ninja-Release/swift-macosx-x86_64/stdlib/public/core/OSX/x86_64/Swift.o @/Users/mondo/Developer/swift-source/build/Ninja-Release/swift-macosx-x86_64/stdlib/public/core/9MDEg.txt
<unknown>:0: error: Swift does not support the SDK 'MacOSX10.14.sdk'
[963/1764][ 54%][5241.268s] Building CXX object tools/sil-opt/CMakeFiles/sil-opt.dir/SILOpt.cpp.o
ninja: build stopped: subcommand failed.
./swift/utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting

Did the master start to require Xcode 11, Catalina Beta or is this some other issue?

Edit: I'm building with following parameters: ./swift/utils/build-script -R -T --no-assertions --darwin-deployment-version-osx 10.14

Yes, master requires Xcode 11 now. (You'd get a build failure in the Dispatch overlay anyway.)

1 Like

Are these changes announced somewhere that I overlooked?

They happen every release. It's currently a non-goal for the compiler, standard library, and overlays to support anything but a very recent Xcode. From the README:

To build for macOS, you need Xcode 11 beta. The required version of Xcode changes frequently, and is often a beta release. Check this document or the host information on https://ci.swift.org for the current required version.

Thanks for the explanation!

But not Catalina, right? Any ideas on why the following may be happening with Xcode's latest beta (I did xcode-select the right thing)?
Swift does not support the SDK 'MacOSX10.14.sdk'

The SDK choice sticks across rebuilds unless you --reconfigure. If that doesn't work, blow away the CMakeCache.txt in your Swift build directory and try again. (Then file a Jira that it should work.)

Never mind, I was building incrementally and forgot to reconfigure, you're right. Thanks for the advice.

Terms of Service

Privacy Policy

Cookie Policy