Skip to content

fix(build): work around Zig 0.15.2 macOS 26.4 SDK issue#277

Merged
forketyfork merged 2 commits intomainfrom
fix/zig-0.15.2-macos-sdk-workaround
Apr 10, 2026
Merged

fix(build): work around Zig 0.15.2 macOS 26.4 SDK issue#277
forketyfork merged 2 commits intomainfrom
fix/zig-0.15.2-macos-sdk-workaround

Conversation

@forketyfork
Copy link
Copy Markdown
Owner

@forketyfork forketyfork commented Apr 10, 2026

Summary

  • bump ghostty to v1.3.1
  • add the smallest macOS SDK workaround we found for Zig 0.15.2
  • make build.zig resolve framework paths from DEVELOPER_DIR and xcrun before falling back to hardcoded SDK locations
  • document why this exists and when it should be removed

Why

After the Xcode / Command Line Tools 26.4 update, Zig 0.15.2 started failing during native Darwin linking on this machine with errors like undefined symbol: __availability_version_check.

The upstream regression is tracked here:

https://codeberg.org/ziglang/zig/issues/31756

Architect still needs Zig 0.15.2 today, so this PR adds a workaround. The important part is that it is intentionally narrow:

  • a fake DEVELOPER_DIR backed by MacOSX15.4.sdk
  • a tiny xcrun --sdk macosx --show-sdk-path shim
  • no forced SDKROOT

build.zig now follows DEVELOPER_DIR and xcrun first 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 build
  • nix develop -c zig build test
  • nix develop -c env ZIG_GLOBAL_CACHE_DIR=$PWD/.zig-global-cache ZIG_LOCAL_CACHE_DIR=$PWD/.zig-local-cache just lint

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 forketyfork changed the title fix(build): minimize Zig 0.15.2 macOS SDK workaround fix(build): work around Zig 0.15.2 macOS 26.4 SDK issue Apr 10, 2026
@forketyfork forketyfork merged commit 2e7c5eb into main Apr 10, 2026
4 checks passed
@forketyfork forketyfork deleted the fix/zig-0.15.2-macos-sdk-workaround branch April 10, 2026 07:54
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.
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.

1 participant