Skip to content

fix(release): darwin/amd64 binaries abort on macOS 26#1292

Merged
joemiller merged 1 commit into
mainfrom
joem/cli-macos-deployment-target
Jul 14, 2026
Merged

fix(release): darwin/amd64 binaries abort on macOS 26#1292
joemiller merged 1 commit into
mainfrom
joem/cli-macos-deployment-target

Conversation

@joemiller

Copy link
Copy Markdown
Member

Problem

pscale crashes at launch on macOS 26:

dyld[66420]: __DATA_CONST segment missing SG_READ_ONLY flag
zsh: abort      pscale --version

macOS 26 dyld requires the SG_READ_ONLY flag on the __DATA_CONST segment. The darwin/amd64 release binaries don't have it: osxcross defaults to a 10.9 deployment target, and ld64 only sets the flag when targeting macOS 10.15+. All amd64 release binaries are affected (including under Rosetta on Apple Silicon, e.g. via Intel Homebrew). The arm64 binaries already target 11.0 and are unaffected.

Solution

Set MACOSX_DEPLOYMENT_TARGET=11.0 for the darwin builds — amd64 is the fix; arm64 already targets 11.0 and the env line just makes that explicit. Go itself requires macOS 11+ since Go 1.23, so no supported platform is dropped.

Verified by snapshot-building both darwin targets in the release image and checking the Mach-O segment flags: __DATA_CONST now carries SG_READ_ONLY (0x10) and minos=11.0 on both arches.

macOS 26 dyld requires the SG_READ_ONLY flag on the __DATA_CONST
segment; without it binaries abort at launch:

    dyld[66420]: __DATA_CONST segment missing SG_READ_ONLY flag

osxcross ld64 only sets the flag when the deployment target is >= 10.15
and the darwin/amd64 build defaulted to 10.9, so every amd64 release
binary is affected. arm64 already targets 11.0 and is fine; its env
line just makes the existing default explicit. Go itself requires
macOS 11+ since Go 1.23, so no supported platform is dropped.

Verified by snapshot-building both darwin targets in the release image
and checking the segment flags.
@joemiller joemiller marked this pull request as ready for review July 14, 2026 00:50
@joemiller joemiller requested a review from a team as a code owner July 14, 2026 00:50
@joemiller joemiller merged commit aab6d23 into main Jul 14, 2026
4 checks passed
@joemiller joemiller deleted the joem/cli-macos-deployment-target branch July 14, 2026 00:51
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.

2 participants