fix(build): work around Zig 0.15.2 macOS 26.4 SDK issue#277
Merged
forketyfork merged 2 commits intomainfrom Apr 10, 2026
Merged
fix(build): work around Zig 0.15.2 macOS 26.4 SDK issue#277forketyfork merged 2 commits intomainfrom
forketyfork merged 2 commits intomainfrom
Conversation
Keep the macOS 26.4 SDK workaround, but trim it to the pieces we actually need. The dev shell now uses a fake DEVELOPER_DIR plus a narrow xcrun --sdk macosx --show-sdk-path shim. build.zig resolves framework paths from DEVELOPER_DIR and xcrun before falling back to hardcoded SDK locations, so we no longer need to force SDKROOT. Refs https://codeberg.org/ziglang/zig/issues/31756. Remove this once Architect moves off Zig 0.15.2 or Zig's Darwin SDK lookup no longer needs the workaround.
forketyfork
added a commit
that referenced
this pull request
Apr 13, 2026
Issue: PR #277 introduced a fake `DEVELOPER_DIR` for the Zig 0.15.2 macOS SDK workaround, but that developer tree did not include `usr/bin/xcrun`, so Git and other commands started failing until `DEVELOPER_DIR` was unset. Solution: Install the shim at `DEVELOPER_DIR/usr/bin/xcrun` and reuse it from the PATH entry so the fake developer directory stays valid for both Zig and tools that delegate to `/usr/bin/xcrun`. Update the development docs and repo notes so the workaround is easier to understand and maintain.
4 tasks
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.
Summary
ghosttytov1.3.10.15.2build.zigresolve framework paths fromDEVELOPER_DIRandxcrunbefore falling back to hardcoded SDK locationsWhy
After the Xcode / Command Line Tools
26.4update, Zig0.15.2started failing during native Darwin linking on this machine with errors likeundefined symbol: __availability_version_check.The upstream regression is tracked here:
https://codeberg.org/ziglang/zig/issues/31756
Architect still needs Zig
0.15.2today, so this PR adds a workaround. The important part is that it is intentionally narrow:DEVELOPER_DIRbacked byMacOSX15.4.sdkxcrun --sdk macosx --show-sdk-pathshimSDKROOTbuild.zignow followsDEVELOPER_DIRandxcrunfirst so the workaround stays local to the dev shell instead of leaking into the project more broadly.This should be removed once Architect moves off Zig
0.15.2, or once Zig handles the arm64e-only macOS SDK stubs correctly.Verification
nix develop -c zig buildnix develop -c zig build testnix develop -c env ZIG_GLOBAL_CACHE_DIR=$PWD/.zig-global-cache ZIG_LOCAL_CACHE_DIR=$PWD/.zig-local-cache just lint