Build failed on swift master branch

The following build commands failed:

**Ld** /Users/gabeiglio/Desktop/Developer/swift-source/build/Xcode-RelWithDebInfoAssert+swift-DebugAssert/llvm-macosx-x86_64/RelWithDebInfo/lib/libclang-cpp.dylib normal x86_64

(1 failure)

ERROR: command terminated with a non-zero exit status 65, aborting

I followed exactly all the steps on the readme, I am in Xcode 12 beta 3 and Catalina 10.15.6. (I have also updated CMake)
At first I got an error complaining that cmark.xcodeproj did not exist and ran:

utils/build-script --release-debuginfo --debug-swift --xcode --extra-cmake-options="-DCMAKE_OSX_ARCHITECTURES=x86_64"

with this command I got to the build error previously described. I have been trying to build swift for several days now with no luck.

I usually run just ./utils/build-script -x -r --skip-build-benchmarks (this will create a RelWithDebInfoAssert Xcode build). If that is not working for you, you could try a Ninja build instead (just drop the -x).

Please file a bug, and include the exact ld command that fails from the log, as well as the error message generated. (You could also put this information here, and someone may have a quick fix, but it's useful to have a bug report to track such failures.)

Thanks, I am already running it without the --xcode, after this is done I will try the --skip-build-benchmarks

Thanks I will file the bug, also I cannot find additional error information since it just showed me this

If you search the log for libclang-cpp.dylib, you should be able to find the link command that failed. It will generally not be the last command in the build log, because the build happens in parallel. Sometimes searching for "error:" is also useful.

So I found in


at the end it showed this:

ld: warning: argument missing after -force_load
ld: file not found: -filelist
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Should I include all of the commands that happened in the build target? (Because it is a lot)


Filed the bug SR-13386

Please try the following:

  • Add --reconfigure (unless using --clean instead). This option is used by swift-ci (see utils/build-presets.ini) for incremental builds.

  • Remove --extra-cmake-options="-DCMAKE_OSX_ARCHITECTURES=x86_64". I think this workaround isn't needed with the latest CMake.

For testing, I use:

utils/build-script --reconfigure --release-debuginfo --test

For benchmarking, I use:

utils/build-script --reconfigure --release --no-assertions --benchmark

Thanks for the response!

I have tried both ways first doing a reconfigure and clean also but still no luck.

There was some people having issues build using Xcode 12 beta 3. You can check out this thread, maybe there is something there

Thanks for the response!, I tried the recommendations in that thread but unfortunately It did not solve the problem for me.