Get the error when building the toolchain

I use the build-toolchain to build, and get the error: swift-project/build/Ninja-RelWithDebInfoAssert/swift-macosx-arm64/bin/swiftc: No such file or directory, my computer is M1 Max.

Can anybody help?

1 Like

And I know because there is no swiftc in swift-macosx-arm64/bin, but why? how can I build swiftc first?

I see this on my M1 machine as well

Hi Keith, How did you solve this?

I think you can potentially work around it by downloading the most recent main snapshot and symlinking the swiftc executable from it to the build directory. You cannot use one from Xcode as it's not recent enough to have the expected features. After doing this I hit many more issues so I don't particularly recommend it. I would recommend filing an issue to hopefully get more visibility on this.

1 Like

OK, Thanks.

Was an issue ever filed about this? I've just run into the same failure.

I don't think so. I never got around it either

I've filed build-toolchain script fails on M1 Mac with `.../swift-macosx-arm64/bin/swiftc: No such file or directory` · Issue #60348 · apple/swift · GitHub.

2 Likes