M2 MacBook Pro: utils/build-script results in error looking for x86_64 File

Hey all,

Apologies if this is a silly question. I have contributed to Swift before and was working on an issue on my old Mac. I recently got this new M2 (love it), and was trying to execute the build-script. It failed for me with the following error:

ninja: error: 'stdlib/swift-test-stdlib-macosx-x86_64', needed by 'stdlib/CMakeFiles/swift-test-stdlib', missing and no known rule to make it
ERROR: command terminated with a non-zero exit status 1, aborting

The commands I've ran are:

  1. Clean Build
utils/build-script --skip-build-benchmarks --skip-ios --skip-watchos --skip-tvos --swift-darwin-supported-archs "$(uname -m)" --sccache --release-debuginfo --swift-disable-dead-stripping --clean 
  1. Without Clean
    utils/build-script --skip-build-benchmarks --skip-ios --skip-watchos --skip-tvos --swift-darwin-supported-archs "$(uname -m)" --sccache --release-debuginfo --swift-disable-dead-stripping

I've also tried to create a new branch, remove all the homebrew dependencies and reinstalling them, recloning, etc. And I'm having no luck.

Any help or suggestions would be much appreciated! :)

Is there any chance that you need to upgrade your shell to get a native arm version of it? That tripped me up initially, I had an old version of fish installed.

@David_Smith -- you're a genius! Thank you for helping me - that was exactly it.

1 Like

As a bonus it should run quite a bit faster now :slight_smile:

1 Like