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

compiler
build-script

(Miguel Salinas) #1

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.


(Jon Shier) #2

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.


(Brent Royal-Gordon) #3

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.


(Miguel Salinas) #4

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


#5

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 https://github.com/apple/swift project.


#6

And may be today Xcode 10 will reales?


(Jon Shier) #7

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.