fix(install): ask for darwin-arm64, not darwin-aarch64, on Apple Silicon#357
Merged
Conversation
ARM64 has two spellings for one architecture, and `uname -m` reports whichever the kernel prefers: `arm64` on Darwin, `aarch64` on Linux. The release assets follow the same split — we publish `darwin-arm64` but `linux-aarch64`. Four downloaders normalized with a blanket `sed 's/arm64/aarch64/'`. On Linux that is a no-op, because `uname -m` already says `aarch64`. The only platform it changes is macOS, where it changes it to the wrong thing: every Apple Silicon install asked for `ways-darwin-aarch64`, an asset that has never existed. Each script then printed `Available: ... darwin-arm64` in its own help text, one screen below the line that had just mangled it. The 404 was not loud. `make setup` treats a failed prebuilt download as "no binary available" and silently degrades to a from-source build — the exact degradation prebuilt-lib.sh was introduced to stop being silent about, hardened there for transient network blips but not for this, which fails 100% of the time on Apple Silicon. Platform detection moves into prebuilt-lib.sh (already sourced by all four) as detect_platform(), mapping per-OS to the spelling each release actually publishes. Verified: all 16 component x platform slugs now resolve to a real published asset. `way-embed/download-binary.sh` was already correct — it never applied the sed — which is why way-embed was the one component that did fetch a prebuilt.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every Apple Silicon install has been silently building from source instead of using our published binaries.
uname -mreportsarm64on Darwin andaarch64on Linux — two spellings, one architecture. Our release assets follow the same split: we publishdarwin-arm64butlinux-aarch64.Four downloaders normalized with a blanket rewrite:
ARCH=$(uname -m | sed 's/arm64/aarch64/')On Linux that's a no-op (
uname -malready saysaarch64). The only platform it changes is macOS, and there it producesdarwin-aarch64— an asset that has never been published. Each script then printsAvailable: ... darwin-arm64in its own--help, one screen below the line that mangled it.Affected:
download-ways.sh,download-attend.sh,download-attend-chat.sh,download-ways-audit.sh.Not affected:
way-embed/download-binary.sh, which never applied the sed — which is precisely whyway-embedis the one component that successfully fetches a prebuilt on macOS.Why it stayed hidden
The 404 isn't loud.
make setuptreats a failed prebuilt download as "no binary available" and falls back to a from-source build. That's the same silent degradationprebuilt-lib.shwas created to eliminate — its header says so:It was hardened against the transient cause. This one fails 100% of the time on Apple Silicon, and produced a working install anyway, so nobody chased it.
Change
Platform detection moves into
prebuilt-lib.sh— already sourced by all four scripts — asdetect_platform(), mapping per-OS to the spelling each release actually publishes.Test plan
detect_platform()unit-checked against a shadowedunamefor all six host combinations:Darwin/arm64 → darwin-arm64,Darwin/x86_64 → darwin-x86_64,Linux/aarch64 → linux-aarch64,Linux/x86_64 → linux-x86_64, plus the inverted spellingsLinux/arm64 → linux-aarch64andDarwin/aarch64 → darwin-arm64. All pass.ways,attend,attend-chat,ways-auditx 4 platforms) — every one resolves to a real asset.bash -non all five scripts; each downloader's--helpstill reports a platform.scripts/check-portability.shpasses.Safety
If a downloaded binary won't execute,
download-ways.shruns--version, deletes it, and exits 1 — somake setupfalls back to the source build. Fixing the slug cannot strand anyone with a binary that doesn't run on their machine.Not in scope
Surfaced while debugging a macOS report where
way-embedis killed withsignal: 9 (SIGKILL)on a CrowdStrike-managed laptop — killed even when built from source, so it is not a provenance/signature issue. Tracked separately. This PR only fixes the slug.