I've been building Swift using the instructions from swift/GettingStarted.md at main · apple/swift · GitHub. When I tried to execute the following (from the actual build section):
utils/build-script --skip-build-benchmarks \
--skip-ios --skip-watchos --skip-tvos --swift-darwin-supported-archs "$(uname -m)" \
--sccache --release-debuginfo --swift-disable-dead-stripping --test \
--xcode
The build fails, when I tried to rebuild, I got
The following build commands failed:
CompileC <path to swift-project>/build/Xcode-RelWithDebInfoAssert/swift-macosx-x86_64/unittests/Reflection/Swift.build/RelWithDebInfo/SwiftReflectionTests.build/Objects-normal/x86_64/TypeRef.o <path to swift-project>/swift/unittests/Reflection/TypeRef.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
ERROR: command terminated with a non-zero exit status 65, aborting
Full stderr
+ /usr/libexec/PlistBuddy -c 'Print :SupportedTargets:macosx:Archs' /Applications/Xcode12.3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/SDKSettings.plist
+ mkdir -p <path to swift-project>/build/Xcode-RelWithDebInfoAssert
+ /usr/local/bin/cmake --build <path to swift-project>/build/Xcode-RelWithDebInfoAssert/cmark-macosx-x86_64 --target ZERO_CHECK --config RelWithDebInfo
+ /usr/local/bin/cmake --build <path to swift-project>/build/Xcode-RelWithDebInfoAssert/cmark-macosx-x86_64 --target ZERO_CHECK --config RelWithDebInfo -- -parallelizeTargets -jobs 4 -target ALL_BUILD
+ ln -s -f /Applications/Xcode12.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../../usr/include/c++ <path to swift-project>/build/Xcode-RelWithDebInfoAssert/llvm-macosx-x86_64/include
+ /usr/local/bin/cmake --build <path to swift-project>/build/Xcode-RelWithDebInfoAssert/llvm-macosx-x86_64 --target ZERO_CHECK --config RelWithDebInfo
+ /usr/local/bin/cmake --build <path to swift-project>/build/Xcode-RelWithDebInfoAssert/llvm-macosx-x86_64 --target ZERO_CHECK --config RelWithDebInfo -- -parallelizeTargets -jobs 4 -target ALL_BUILD
+ /usr/local/bin/cmake --build <path to swift-project>/build/Xcode-RelWithDebInfoAssert/swift-macosx-x86_64 --target ZERO_CHECK --config RelWithDebInfo
+ /usr/local/bin/cmake --build <path to swift-project>/build/Xcode-RelWithDebInfoAssert/swift-macosx-x86_64 --target ZERO_CHECK --config RelWithDebInfo -- -parallelizeTargets -jobs 4 -target ALL_BUILD -target swift-test-stdlib-macosx-x86_64
+ /usr/local/bin/cmake --build <path to swift-project>/build/Xcode-RelWithDebInfoAssert/swift-macosx-x86_64 --target ZERO_CHECK --config RelWithDebInfo -- -parallelizeTargets -jobs 4 -target SwiftUnitTests
** BUILD FAILED **
The following build commands failed:
CompileC <path to swift-project>/build/Xcode-RelWithDebInfoAssert/swift-macosx-x86_64/unittests/Reflection/Swift.build/RelWithDebInfo/SwiftReflectionTests.build/Objects-normal/x86_64/TypeRef.o <path to swift-project>/swift/unittests/Reflection/TypeRef.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
ERROR: command terminated with a non-zero exit status 65, aborting
Does anyone have any idea how to troubleshoot this?
In case it helps, the env I've been using is
- macOS 11.2 (Big Sur)
- Xcode 12.3 (I also tried Xcode 12.4)
-
cmake
3.19.4 -
python3
3.9.1 -
ninja
1.10.2 -
sccache
0.2.15
PS
While I'm at it, has anyone been compiling with Xcode 12.4? Is there any issue?