Hi,
I'm new to compiler programming. I have cloned the code freshly and tried to build by following the document from Getting Started
I keep getting the following error when I tried to build for Xcode,
The following build commands failed:
PhaseScriptExecution CMake\ PostBuild\ Rules /Volumes/SSD/Documents/projects/github/swift-project/build/Xcode-RelWithDebInfoAssert/cmark-macosx-arm64/cmark.build/RelWithDebInfo/RUN_TESTS.build/Script-003C8D08B0008F35F218E126.sh \
(in target 'RUN_TESTS' from project 'cmark')
(1 failure)
ERROR: command terminated with a non-zero exit status 65, aborting
This is the command I am using,
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 \
--xcode --test
Can some please help me with this?
cal
(Cal Stephens)
2
I also usually have trouble getting --xcode to work properly. Here's the command that I'm currently using successfully (although my current checkout is from Dec 18):
utils/build-script --skip-build-benchmarks \
--skip-ios --skip-watchos --skip-tvos --swift-darwin-supported-archs "$(uname -m)" \
--sccache --debug --swift-disable-dead-stripping --test \
--xcode --skip-test-cmark --libswift=off
In this case I think you need the --skip-test-cmark flag. You may also need --libswift=off (can't remember why).
If you run into this issue, I've been able to fix it by commenting out this block in stdlib/public/Concurrency/CMakeLists.txt.
sjavora
(Šimon Javora)
3
I found this while trying to figure out why --libswift=off wasn't working anymore:
The option was later renamed to bootstrapping so if you try this later, I found that --bootstrapping=off worked for me.
3 Likes
Thanks for the response,
I tried with --skip-test-cmark and --bootstrapping=off,
utils/build-script --skip-build-benchmarks \
--skip-ios --skip-watchos --skip-tvos --swift-darwin-supported-archs "$(uname -m)" \
--sccache --debug --swift-disable-dead-stripping --test \
--xcode --skip-test-cmark --bootstrapping=off
I get the following error now,
The following build commands failed:
CodeSign /Volumes/SSD/Documents/projects/github/swift-project/build/Xcode-DebugAssert/swift-macosx-arm64/Debug/lib/sourcekitd.framework/Versions/A/XPCServices/SourceKitService.xpc/Contents/MacOS/SourceKitService (in target 'SourceKitService' from project 'Swift')
(1 failure)
ERROR: command terminated with a non-zero exit status 65, aborting
Also, I am using Xcode 13.2.1 in macOS Monterey in M1, if that makes any difference.