Error compiling the Swift compiler; Swift does not support the SDK 'MacOSX10.13.sdk'

I'm getting an error compiling the Swift compiler after almost 2 hours on my 2014 MacBook Pro. This is the only meaningful line I can find.
:0: error: Swift does not support the SDK 'MacOSX10.13.sdk'

Is there something I'm doing wrong? Thank you.

1 Like

Building Swift now requires the toolchain that comes with the Xcode 10 beta, including the 10.14 SDK. Note that are some other issues currently prevent some people from being able to build, as you can see in some threads here.


You’ll need to download the Xcode 10 beta and probably use the xcode-select command to make it the default for command-line builds. Once you do, you should be able to build Swift.


Oh, thanks so much. I'll give that a try.

Due to this is the most top topic in the search I would write my solution. I hope it will be helpful for someone.

After installing XCode 10 do not forget to clean the project by removing build directories in inside swift-source directory – the root directory which is described in the GitHub - apple/swift: The Swift Programming Language project.

And may be today Xcode 10 will reales?

GM is available today, with release likely on Monday, with the release of iOS 12 et. al. They'll only do a new build then if there was a suitable large bug in the GM to require it.

1 Like