Skip to content

bug: bun 1.3.12 bun build --compile produces broken arm64 binaries (exit 137) #162

@terisuke

Description

@terisuke

Summary

bun build --compile on bun 1.3.12 (macOS 26.4, Apple Silicon arm64) produces binaries that immediately exit with SIGKILL (exit 137). This affects ALL compiled binaries, not just OpenCode.

Minimal Reproduction

echo 'console.log("hello")' > /tmp/hello.ts
bun build --compile /tmp/hello.ts --outfile /tmp/hello-bin
/tmp/hello-bin  # → exit 137 (killed)

Environment

  • bun: 1.3.12 (700fc117a)
  • macOS: 26.4 (25E246)
  • CPU: Apple Silicon arm64 (Mac16,6)
  • Repo expects: bun@1.3.11 (package.json:7)

Evidence

  • Crash report: Abort trap: 6 in Io.GenericWriter.typeErasedWriteFn + setTerminalTitle
  • Binary is unsigned (codesign: code object is not signed at all) but this is NOT the cause — the OLD working binary (4/10) was also unsigned
  • OLD binary (built 2026-04-10 with previous bun version) works fine
  • NEW binary (built 2026-04-11 with bun 1.3.12) crashes on both dev branch and feature branches

Impact

Fix

  1. Downgrade bun to 1.3.11 and verify binary works
  2. If confirmed, pin bun version in CI and local setup
  3. Report upstream to bun if this is a bun regression

Workaround

~/.local/bin/opencode replaced with wrapper script that runs bun run dev directly.

Refs: #161

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions