From 45158e548724c1741c2b66ed781e59d5d46a00a5 Mon Sep 17 00:00:00 2001 From: joe miller Date: Tue, 14 Jul 2026 00:26:14 +0000 Subject: [PATCH] fix(release): darwin/amd64 binaries abort on macOS 26 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. --- .goreleaser.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.goreleaser.yml b/.goreleaser.yml index 212428669..94fd91d76 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -16,6 +16,9 @@ builds: - CC=o64-clang - CXX=o64-clang++ - CGO_ENABLED=1 + # ld64 only sets SG_READ_ONLY on __DATA_CONST when targeting >= 10.15; + # macOS 26 dyld refuses to load binaries without it. Go requires 11+ anyway. + - MACOSX_DEPLOYMENT_TARGET=11.0 main: ./cmd/pscale/main.go ldflags: - -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}} @@ -31,6 +34,7 @@ builds: - CC=oa64-clang - CXX=oa64-clang++ - CGO_ENABLED=1 + - MACOSX_DEPLOYMENT_TARGET=11.0 main: ./cmd/pscale/main.go ldflags: - -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}}