post-TrySwiftSJ continued installation/build issues with macOS 10.15 and Xcode 11

Many thanks to the two Roberts and Mike for assisting me at WWDC last week ... I am now trying to create a clean build on a better sized MacBook Pro ... and I am having continued installation and validation issues.

This is the latest ... any suggestions for what is wrong in my environment ? TIA Ed

xcrun: error: unable to lookup item 'Path' in SDK 'iphoneos'
CMake Error at cmake/modules/SwiftConfigureSDK.cmake:122 (message):
iOS SDK not found at .
Call Stack (most recent call first):
cmake/modules/DarwinSDKs.cmake:34 (configure_sdk_darwin)
CMakeLists.txt:761 (include)

Just done the beta #2 upgrade and the Xcode tools too ... I hope that makes a difference!

Thanks for that great PR improving the docs = ).

That being said, can you post here:

  1. What build-script line are you using?
  2. xcode-select -sdk -version?

That should give me all of the information I think.

Thanks Michael for the :+1: --- I figured every little bit helps, and I wanted to start slowly and surely :slight_smile:

To answer your questions

  1. What build-script line are you using?

swift/utils/build-script --release-debuginfo
swift/utils/build-script: note: Using toolchain default

  • mkdir -p /Users/edgreenaway/Development/swift-source/build/Ninja-RelWithDebInfoAssert
    Building the standard library for: swift-test-stdlib-macosx-x86_64
  1. xcode-select -sdk -version?

-sdk was not recognised !
-version/-v yields:

Eds-MacBook-Pro:build edgreenaway$ xcode-select -v
xcode-select version 2364.

And as I suspect I have pathing issues ...

Eds-MacBook-Pro:build edgreenaway$ xcode-select -p

which is not where I have the Xcode-beta.App, which is my Development directory:


Thank you again

Can you try doing:

xcode-select -s $PATH_TO/

I tried :frowning:
This is what I get ... it's my belief I have missed an installation step ... or yesterday's automatic Xcode Command Line Tools update has made the environment worse (I am now getting SwiftUI canvas errors; see the 2nd block below)

Last login: Wed Jun 19 13:28:41 on ttys000

The default interactive shell is now zsh.
To update your account to use zsh, please run chsh -s /bin/zsh.
For more details, please visit
Eds-MacBook-Pro:Development edgreenaway$ pwd
Eds-MacBook-Pro:Development edgreenaway$ xcode-select -s /Users/edgreenaway/Development
xcode-select: error: invalid developer directory '/Users/edgreenaway/Development'
Eds-MacBook-Pro:Development edgreenaway$ ls -la
total 24
drwxr-xr-x 8 edgreenaway staff 256 19 Jun 10:16 .
drwxr-xr-x+ 18 edgreenaway staff 576 19 Jun 09:15 ..
-rw-r--r--@ 1 edgreenaway staff 10244 19 Jun 13:10 .DS_Store
drwxr-xr-x 3 edgreenaway staff 96 3 Jun 04:36
drwxr-xr-x 6 edgreenaway staff 192 19 Jun 10:15 documentation aids
drwxr-xr-x 5 edgreenaway staff 160 19 Jun 12:49 git-for-mpanda
drwxr-xr-x 24 edgreenaway staff 768 17 Jun 14:31 swift-source
drwxr-xr-x 4 edgreenaway staff 128 19 Jun 10:17 trouble shooting evidence
Eds-MacBook-Pro:Development edgreenaway$

Here's the SwiftUI canvas error ...

invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

failedToCodeSign: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

You have to select the actual Xcode directory. Ex:

xcode-select -s /Users/edgreenaway/Development/

with SUDO that appears to have worked ... running tests now

However encountered a new range of errors ... I will rebuild the system tomorrow !

The good news is that I have built my first SwiftUI App (I followed the WWDC video) which is exciting ! even tho' because (perhaps) of yesterday's beta-2 upgrades the canvas has stopped working ... another reason why I want to do a rebuild of the system.

Nice! A few thoughts:

  1. What type of errors are you hitting?
  2. Did you read the Is there anything we could add that would have been helpful/made clearer?

Hi Michael, not sure if this is a DM or a post, however I'll try to break my answer to your Q2 into 4 parts.

I. Instructions
My source instructions are (1) Natasha's trySwift email on how to prep; (2) Robert P's Wednesday presentation at AltConf with the warning about not to forget toolchains; (3) the other Robert's Thursday workshop at AltConf on participating in the trySwift community; and (4) the GitHub

With preparation assistance of the two Roberts and hands on guidance by Mike on the Friday I got through the day (but even then had build/validation tests that evening).

So once I was home I decided to rebuild the system.

II. Storage
I have partitioned my 256GB MacBook Pro into two 126GB "disks" and over the years each WWDC I flipflop partitions so I have one current system and one beta system.

The requirement to have 70GB free was a major issue and hindered my setup for the workshop and the actual workshop day. Even my 1st rebuild i.e. 2nd build had issues resulting builds & associated tests running out of disk storage.

The storage was being eroded in the background by my iDrive; and unticking "manage" was not enough, and then attempting to delete the archive the OS had created also was not enough.

I worked out I have to turn off the iCloud Drive immediately the OS becomes active. So I then went to the first beta drop of Catalina; and without iCloud being active, and without vanilla Xcode installed I had enough space to have the freedom to experiment.

III. Latest Xcode beta and Swift clone installation
Having installed Catalina and the Xcode beta I believed I was in a good place; and SwiftUI worked with its canvas.

I then started to reinstall the Swift source. That is when I got the furthest with builds & tests but encountered the first error (top of the post).

Whilst working on that issue, the next Catalina beta and the Xcode tool beta dropped simultaneously.

From that point the SwiftUI canvas stopped, and despite your assistance I continue to struggle with the scripts.

Hence my decision to do my third clean install; I have some confidence that by meticulously following the instructions (I. above) on a naked Catalina beta I will come (close) to the end.

IV. Conclusion
I believe the main issue is not the instructions per se, but me :) or rather my lack of experience with *nix systems. Despite 50! years of working with IT I only two projects (and a beta) where I had to learn (and then forget) AIX to achieve successful installations, PoCs, and benchmarks.

So what I believe I am missing, and what the instructions presume, is a conceptual model of how macOS hangs together -- I am gaining that by resolving each issue however I have yet to find the appropriate "dummies" guide to becoming a systems programmer of Macs!

The other presumption the instructions have is a detailed familiarity with *nix commands: that is more easily addressed by the usual "dummies" guides.

I think it would be unreasonable to expect the instructions in I. above to be more detailed.

Hopefully it is not unreasonable to expect me to adapt and become a more active part of the Swift technical community.

Thanks again for your assistance (and the aforementioned Roberts and Mike), I shall give you an update at the end of my day.

Ed - running on AEST :)

Hi Michael, an update as promised.

  1. I spent 5 hours going through the following process very carefully using 3 source documents (Natasha's email, and Swift.Org download details for Xcode and for Swift) and as predicted gaining a better (however not complete) understanding of the system along the way:
    a) took backups of work this week, and then erased the old APFS volume, and created a new one (45 minutes)
    b) installed and configured a backlevel Mojave (30 minutes)
    c) downloaded the Catalina Beta access utility
    d) commenced Catalina Beta upgrade and configuration process (45 minutes)
    e) waited to see if any additional beta upgrade would be triggered, and then checked for the same (15 minutes) ... I now have a "naked" Catalina and 109GB of free disk storage
    f) used xcode-select -v and xcode-select -p to verify the status of the system (15 minutes)
    g) downloaded and installed latest production Xcode (10.2 with 10.2.1 fixes) (30 minutes)
    h) check status of system (15 minutes)
    i) download and install "production" toolchain (Swift 5.0.1) from (15 minutes)
    j) check status of system and Xcode's preferences and menus for tool chains (15 minutes)

(( As an aside, at this point the documentation was unclear for me; Step 4 of the Installation says: "4. Xcode uses the selected toolchain for building Swift code, debugging, and even code completion and syntax coloring. You’ll see a new toolchain indicator in Xcode’s toolbar when Xcode is using a Swift toolchain. Select the Xcode toolchain to go back to Xcode’s built-in tools." and yet I could not see any differences at the toolbar level (menus yes, preferences yes, but not elsewhere ...) ))

k. At this point I stopped the installation processes (but downloaded the Xcode beta and its associated toolchain - another 20 minutes, and I now have 91.7GB of free disk space create the Xcode Beta and Swift clone & test environments) as I wanted to check with you what my next steps should be:

Q1: where do I install/run the Xcode_11_beta_2.XIP file ?

In the global Applications folder ?
A new directory under my home directory - like I did last time as "Development" ?
In other words can Xcode and Xcode-beta coexist at the global Application level ?

Q2: similarly where do I install the "Trunk Development (Master) Snapshot" ?

Q3: similarly, using home-brew, where (i.e. the best place) should I install ninja ?

Q4: similarly, using home-brew, where should I install CMake ?

Q5. should I continue to clone, debug, build, and test Swift 5.1 in a directory like Development/swift-master/swift ?

Q6: How, i.e. when, should I use the fifth step of the Installation instructions?

"5. Selecting a Swift toolchain affects the Xcode IDE only. To use the Swift toolchain with command-line tools, use xcrun --toolchain swift and xcodebuild -toolchain swift , or add the Swift toolchain to your path as follows:

* *$ export PATH=/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin:"${PATH}"* *"

I hope you don't mind this level of detail, however I am hoping it will serve as a record for others to follow.


As mentioned in our PM I think you are actually trying to do a few different things here which may require different builds:

  1. If you are trying to mess with SwiftUI/etc I would suggest using the beta directly.
  2. If you want to use a release branch toolchain, I would download the snapshot from It should come as a toolchain you can just install. That should show up in Xcode as mentioned in the docs.
  3. If you want to build the master branch, I would follow and use the master scheme from update-checkout: ./swift/utils/update-checkout --scheme master
  4. If you want to build the swift-5.1-branch branch, I would follow and use the master scheme from update-checkout: ./swift/utils/update-checkout --scheme swift-5.1-branch. That being said I wouldn't compile your own if you just want to play around in swift itself, I would just use the snapshot/etc.

Now let me go line by line in the context of building swift's master branch:

I don't think there is a best place to put it necessarily. You can put it in /Application. What is important is that you sudo xcode-select -s $FOLDER_TO_XCODE/ when you build swift.

As mentioned above, it should come as an installer package that you can just install. The installer will put it in the right place.

Home-brew is a package manager for macOS. It should put things in a standard place, you shouldn't have to worry about this. If you can do which cmake and which ninja and get a path you should be fine.

You can do that if you want. I would use the snapshot unless you want to play with the stdlib/compiler itself.

I would use that if you do not want to xcode-select -s the path and want to compile some code. For instance, lets say I had a Makefile based project that I wanted to compile some swift code for. Then I would do:

xcrun --toolchain swift swiftc my_swift_file.swift

The --toolchain just tells xcrun to choose the most recent toolchain from a snapshot.

No worries. I asked for it = p.

(sorry, I hit enter too quickly, I am editing the post above still).

Finished updating.

Thank you so much.
I have read it .... and now need to absorb it.
I know it will help tremendously !
I owe you a beer (at least!) at DubDub 2020
(now there's a alliteration t be played with !)

Terms of Service

Privacy Policy

Cookie Policy