fix(release): darwin/amd64 binaries abort on macOS 26#1292
Merged
Conversation
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.
nickvanw
approved these changes
Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
pscalecrashes at launch on macOS 26:macOS 26 dyld requires the
SG_READ_ONLYflag on the__DATA_CONSTsegment. 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.0for 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_CONSTnow carriesSG_READ_ONLY(0x10) andminos=11.0on both arches.