Skip to content

Commit 91f4563

Browse files
committed
docs(pack-app): document darwin-x64 SEA limitation
Add a "Known limitations" section linking to the upstream Node.js issues (nodejs/node#62893, #59553, #60250) and explaining why signature-side workarounds don't help.
1 parent 1a990a1 commit 91f4563

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

docs/cli/pack-app.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,22 @@ Targets use the format `<os>-<arch>[-<libc>]`:
3434

3535
The `-musl` suffix is only valid for `linux` targets. The `<os>` segment matches `process.platform` values so the flag is consistent with pnpm's `--os` flag and with `supportedArchitectures.os` in `pnpm-workspace.yaml`.
3636

37+
## Known limitations
38+
39+
### `darwin-x64` binaries crash on Intel Macs
40+
41+
`darwin-x64` outputs segfault at startup on Intel Macs because of an upstream Node.js bug in the `--build-sea` injection step. LIEF's Mach-O surgery for x64 leaves `LC_DYLD_CHAINED_FIXUPS` chain entries pointing at stale targets after the SEA segment is inserted; dyld then dereferences a raw chain-encoded value as a pointer and the binary crashes in `__cxx_global_var_init` before any user code runs. This is reproducible with the canonical `node --build-sea` + `codesign --sign -` flow with no pnpm involvement.
42+
43+
The Node.js team has opted not to fix this on the grounds that x64 macOS is being phased out. Signature-related workarounds do not help — the corruption happens in the injection step, *before* signing, so swapping `ldid` for `codesign` (or vice versa) makes no difference. Re-signing produces a valid signature over already-broken bytes.
44+
45+
Tracking:
46+
47+
* [nodejs/node#62893](https://github.com/nodejs/node/issues/62893) — minimal `node --build-sea` repro
48+
* [nodejs/node#59553](https://github.com/nodejs/node/issues/59553) — long-running SEA test failures on macOS x64 with the same root cause
49+
* [nodejs/node#60250](https://github.com/nodejs/node/pull/60250) — Node.js skipping the SEA tests on x64 macOS rather than fixing them
50+
51+
If you need to ship a CLI that runs on Intel Macs, build the `darwin-x64` artifact with a non-SEA tool such as [`@yao-pkg/pkg`](https://github.com/yao-pkg/pkg) (which appends to the binary tail rather than mutating Mach-O sections), or skip the target and direct users to the `darwin-arm64` build under Rosetta.
52+
3753
## Examples
3854

3955
Build for Linux and Windows at once:

0 commit comments

Comments
 (0)