Skip to content

fix: macOS x64 prebuilt binary contains arm64 architecture#446

Merged
JCMais merged 2 commits intodevelopfrom
fix/macos-x64-binary-packaging
Apr 12, 2026
Merged

fix: macOS x64 prebuilt binary contains arm64 architecture#446
JCMais merged 2 commits intodevelopfrom
fix/macos-x64-binary-packaging

Conversation

@JCMais
Copy link
Copy Markdown
Owner

@JCMais JCMais commented Apr 12, 2026

Summary

  • Fixes the universal build packaging in scripts/ci/build.sh where both lipo extractions wrote to the same output file before either was packaged — the arm64 slice overwrote the x86_64 one, so both tarballs contained arm64 binaries
  • The fix interleaves extraction and packaging: extract arm64 → package arm64 → extract x86_64 → package x64
  • Bug was introduced in 1e2f55e ("ci: attestations") and affects all macOS releases since (v5.0.0 through v5.0.2)

Test plan

  • Built a universal binary locally, ran the fixed lipo+package steps, and verified via file that each tarball contains the correct architecture

Fixes #445

JCMais added 2 commits April 12, 2026 11:23
The universal build lipo extraction wrote both architectures to the same
output file before packaging, so the arm64 slice overwrote the x86_64
one. Both tarballs ended up containing the arm64 binary.

Fix by interleaving: extract each architecture and package it immediately
before extracting the next.

Fixes #445
…for cross arch

The previous fix left the x86_64 binary in lib/binding/ after packaging,
causing tests to fail on arm64 CI runners. Now we package the cross arch
first (without testpackage since it can't be loaded), then the native
arch last (with testpackage) so the correct binary remains for tests.
@JCMais JCMais merged commit cdb5aec into develop Apr 12, 2026
16 of 22 checks passed
@JCMais JCMais deleted the fix/macos-x64-binary-packaging branch April 12, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect bindings architecture installed on Intel MacOS

1 participant