Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build-toolchain script fails on M1 Mac with .../swift-macosx-arm64/bin/swiftc: No such file or directory #60348

Closed
allevato opened this issue Aug 2, 2022 · 2 comments · Fixed by #60664
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. toolchain

Comments

@allevato
Copy link
Member

allevato commented Aug 2, 2022

When running utils/build-toolchain on an M1 Mac, the build fails when compiling Swift modules with the following error:

FAILED: SwiftCompilerSources/_CompilerRegexParser.o /Users/allevato/Source/Swift/build/buildbot_osx/swift-macosx-arm64/SwiftCompilerSources/_CompilerRegexParser.o
cd /Users/allevato/Source/Swift/swift/SwiftCompilerSources && /Users/allevato/Source/Swift/build/buildbot_osx/swift-macosx-arm64/bin/swiftc -c <additional compiler args...>
/bin/sh: /Users/allevato/Source/Swift/build/buildbot_osx/swift-macosx-arm64/bin/swiftc: No such file or directory

Indeed, the only binaries in that directory on my machine are the following:

$ ls /Users/allevato/Source/Swift/build/buildbot_osx/swift-macosx-arm64/bin/
lldb-check-expect lldb-with-tools

Additional discussion at https://forums.swift.org/t/get-the-error-when-building-the-toolchain/58665.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Run utils/build-toolchain $TOOLCHAIN_ID (where TOOLCHAIN_ID is some arbitrary name)

Expected behavior

A toolchain is built.

Environment

  • OS: macOS 12.4
  • Xcode Version/Tag/Branch: Xcode 13.3; apple/swift main branch at HEAD
@allevato allevato added the bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. label Aug 2, 2022
@CNKCQ
Copy link

CNKCQ commented Aug 17, 2022

I got the same error

@keith
Copy link
Member

keith commented Aug 18, 2022

#60624

edymtt added a commit to edymtt/swift that referenced this issue Aug 19, 2022
Use that immediately for the macOS package presets.

Addresses rdar://98787335, swiftlang#60348
edymtt referenced this issue in edymtt/swift Aug 22, 2022
edymtt referenced this issue in edymtt/swift Aug 22, 2022
meg-gupta referenced this issue in meg-gupta/swift Aug 27, 2022
meg-gupta referenced this issue in meg-gupta/swift Aug 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. toolchain
Projects
None yet
4 participants