Upgrade Zig to 0.14.0, add glibc 2.39-2.41#256
Open
zpon wants to merge 6 commits into
Open
Conversation
- Bump Zig SDK from 0.12.0 to 0.14.0 with updated SHA256 hashes - Add glibc versions 2.39, 2.40, 2.41 to supported targets - Fix zig-wrapper.zig for Zig 0.14.0 API changes: - std.ChildProcess → std.process.Child - std.ComptimeStringMap → std.StaticStringMap with initComptime() - mem.split → mem.splitScalar Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- Add generic-musl to WASI include path: Zig 0.14.0 moved features.h out of wasm-wasi-musl/ into generic-musl/, but wasm-wasi-musl/stdio.h still includes it, causing compilation failures. - Work around zig lld colon-link bug (ziglang/zig#23287): zig 0.14.0 lld does not handle -l:filename syntax. Resolve such flags to full paths in zig-wrapper by searching the -L directories. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Zig 0.14.0 no longer auto-links against the C library for build-exe targets. cp.zig uses stdlib functions (copyFile, argsAlloc) that call macOS system APIs, requiring explicit -lc. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Zig 0.14.0 dropped the implicit -D_GNU_SOURCE that 0.12.0 passed. Without it, glibc headers gate POSIX extensions (posix_openpt, grantpt, unlockpt, ptsname, ...) behind __USE_XOPEN_EXTENDED/__USE_XOPEN2KXSI, which are only enabled when _XOPEN_SOURCE>=500/600. This broke CGO stdlib compilation on Windows cross-compiling to Linux (internal/testpty). Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Zig 0.14.0 locates the macOS SDK by running xcrun --show-sdk-path. Bazel sandboxes clear PATH via 'exec env -', making xcrun unfindable and causing zig build-exe to fail with undefined system symbols (abort, arc4random_buf, fcopyfile, etc.). Restore /usr/bin:/bin in PATH on macOS so xcrun can be found. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
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.
Co-Authored-By: Claude Sonnet 4.6 (1M context) noreply@anthropic.com