Skip to content

fix: re-sign macOS binaries after Bun compile to fix Darwin 25+ SIGKILL#3

Open
rgoshen wants to merge 1 commit intoflexfrom
fix/bun-build-issue-on-macos-darwin25
Open

fix: re-sign macOS binaries after Bun compile to fix Darwin 25+ SIGKILL#3
rgoshen wants to merge 1 commit intoflexfrom
fix/bun-build-issue-on-macos-darwin25

Conversation

@rgoshen
Copy link
Copy Markdown

@rgoshen rgoshen commented Apr 16, 2026

Summary

  • Bun's embedded code signature is rejected by Darwin 25+ (macOS 16) at runtime, killing the binary with SIGKILL (exit 137) before it starts
  • Adds a post-compile step in script/build.ts to strip Bun's signature and apply a fresh ad-hoc one via codesign for all darwin targets
  • Documents the fix in LOCAL_AWS_SETUP.md

Test plan

  • Run bun run --cwd packages/opencode build --single --skip-embed-web-ui on macOS Darwin 25+
  • Verify smoke test passes (no exit 137)
  • Verify ./packages/opencode/dist/opencode-darwin-arm64/bin/opencode --version runs successfully

Bun's embedded code signature is rejected by Darwin 25+ at runtime,
killing the binary with SIGKILL (exit 137) before it starts. Strip the
signature and apply a fresh ad-hoc one via codesign after each darwin
build. Also documents the fix in LOCAL_AWS_SETUP.md.
@github-actions
Copy link
Copy Markdown

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

Copy link
Copy Markdown
Collaborator

@lgarceau768 lgarceau768 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants