Commit 4ff46e6
fix: macOS build required a newer OS than the CI runner's OS that day
Confirmed directly: a native `zig build app` (no -Dtarget) bakes in the
exact host machine's current macOS version as the binary's LC_BUILD_VERSION
minos field (verified via `otool -l` on this machine, running 26.2 —
produced `minos 26.2` exactly). Since GitHub's macos-latest runner's exact
OS build can be ahead of any given user's installed version, this made
real shipped builds fail to launch with "You can't use this version of
the application 'Metanoia' with this version of macOS" — reported live by
a user on macOS 26.2 (25C56) — the app was requiring whatever OS the CI
runner happened to be on that day, not any real API dependency.
Tried `-Dtarget=aarch64-macos.13.0` first and rejected it: it makes zig
treat the build as cross-compiling even though it's the same arch+OS,
which broke native system-library search — sqlite3 (which macOS ships as
a system dylib at /usr/lib, not via Homebrew) could no longer be found,
reproduced exactly via a local build attempt.
Fixed instead with `vtool` (Apple's Mach-O load-command editor, part of
Xcode Command Line Tools, present on every macOS GitHub Actions runner):
rewrites LC_BUILD_VERSION's minos/sdk fields to 13.0 in place, after
linking but before codesigning (patching after signing would invalidate
it). 13.0 (Ventura, 2022) is a conservative multi-year-back floor, well
below any realistically current user's OS while still modern enough for
Homebrew's own gtk4/glib bottles.
Verified end-to-end on this machine (not just reasoned through): ran the
full updated build-macos.sh, confirmed `otool -l` shows minos 13.0,
confirmed `codesign --verify` reports "valid on disk" (the ad-hoc
signature is genuinely intact after the vtool patch, not broken), and
actually launched the resulting Metanoia.app as a real running process.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent f3de8b3 commit 4ff46e6
1 file changed
Lines changed: 38 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
48 | 86 | | |
49 | 87 | | |
50 | 88 | | |
| |||
0 commit comments