Running build-script terminates with error: "xcodebuild: error: 'LLVM.xcodeproj' does not exist."

Hello, I am following https://github.com/apple/swift/blob/main/docs/HowToGuides/GettingStarted.md#cloning-the-project, and reached the section "The actual build"

I'm running via xcode with utils/build-script --skip-build-benchmarks \ --skip-ios --skip-watchos --skip-tvos --swift-darwin-supported-archs "x86_64" \ --sccache --release-debuginfo --test \ --xcode

I get the following error:

    ** BUILD SUCCEEDED **

    symlinking the system headers (/Applications/Xcode-beta (12.2 v3).app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../../usr/include/c++) into the local clang build directory (/Users/ryanaveo/swift-project/build/Xcode-RelWithDebInfoAssert/llvm-macosx-x86_64/include).
    + ln -s -f '/Applications/Xcode-beta (12.2 v3).app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../../usr/include/c++' /Users/ryanaveo/swift-project/build/Xcode-RelWithDebInfoAssert/llvm-macosx-x86_64/include
    + /usr/local/bin/cmake --build /Users/ryanaveo/swift-project/build/Xcode-RelWithDebInfoAssert/llvm-macosx-x86_64 --target ZERO_CHECK --config RelWithDebInfo
    Command line invocation:
        "/Applications/Xcode-beta (12.2 v3).app/Contents/Developer/usr/bin/xcodebuild" -project LLVM.xcodeproj build -target ZERO_CHECK -configuration RelWithDebInfo -hideShellScriptEnvironment

    User defaults from command line:
        HideShellScriptEnvironment = YES

    Build settings from command line:
        TOOLCHAINS = default

    xcodebuild: error: 'LLVM.xcodeproj' does not exist.
    ERROR: command terminated with a non-zero exit status 66, aborting

I've run utils/update-checkout --clone-with-ssh. Any help is appreciated!

It looks like you've renamed your Xcode-beta.app, this is probably related to https://bugs.swift.org/browse/SR-13441 which is a known issue when there are spaces in the path to Xcode .

2 Likes

I removed the spaces and reran xcode-select but it looks like the build script is still checking for the old xcode path.

+ /usr/libexec/PlistBuddy -c 'Print :SupportedTargets:macosx:Archs' '/Applications/Xcode-beta(12.2v3).app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/SDKSettings.plist'
...
=== BUILD TARGET libcmark OF PROJECT cmark WITH CONFIGURATION RelWithDebInfo ===

Check dependencies
error: There is no SDK with the name or path '/Applications/Xcode-beta (12.2 v3).app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk'

=== BUILD TARGET libcmark_static OF PROJECT cmark WITH CONFIGURATION RelWithDebInfo ===
Check dependencies
error: There is no SDK with the name or path '/Applications/Xcode-beta (12.2 v3).app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk'

** BUILD FAILED **


The following build commands failed:
	Check dependencies
	Check dependencies
(2 failures)
ERROR: command terminated with a non-zero exit status 65, aborting

You could try adding --reconfigure to the end of your build-script invocation to get it to discover the new path, but I'm not certain that will work. If it doesn't, you might need to add --clean and start from scratch.

running with --clean worked! Thanks :smile:

Terms of Service

Privacy Policy

Cookie Policy