--- Building earlyswiftdriver ---
+ /Users/jason/Documents/Swift/swift-project/swift-driver/Utilities/build-script-helper.py build --package-path /Users/jason/Documents/Swift/swift-project/swift-driver --build-path /Users/jason/Documents/Swift/swift-project/build/Xcode-RelWithDebInfoAssert/earlyswiftdriver-macosx-arm64 --configuration release --toolchain /Library/Developer/CommandLineTools/usr --ninja-bin /opt/homebrew/bin//ninja --cmake-bin /opt/homebrew/bin//cmake --local_compiler_build
env: python: No such file or directory
ERROR: command terminated with a non-zero exit status 127, aborting
Because macOS 12.3 removed python 2, there is no /usr/bin/python anymore. I can't add a symlink or re-install python 2 into that directory because of system integrity protection.
For this case in specific note that the error message says in which file the failure is happening /Users/jason/Documents/Swift/swift-project/swift-driver/Utilities/build-script-helper.py, so we can see that this is on swift driver dependency. I hit the same issue and while investigating noted that this was fixed but then reverted in Revert "Update build-script-helper.py to use python3" by shahmishal · Pull Request #1024 · apple/swift-driver · GitHub so there should be a good reason for that. For now if you want to unblock the build just manually editing those files #!/usr/bin/env python to #!/usr/bin/env python3 should help =]
Thanks! I ended up changing everything in the swift-project/swift directory to use python3, as well as the two files you mentioned.
Now I get past that error and about 20 minutes in it fails with:
clang: error: no such file or directory: '/Users/jason/Documents/Swift/swift-project/build/Xcode-RelWithDebInfoAssert/swift-macosx-arm64/lib/RelWithDebInfo/libswiftCompilerModules-bootstrapping1.a'
On macOS 12.3 M1, Xcode 13.3. I do see in the forums here others having problems doing Xcode builds. Fairly sure at this point it is no longer a python version issue.