ref:005fac2de43e23ecb96bb7e022a8852507072b31

Bump zig to 0.15.2 to fix the macOS iconv link error (#26)

The apple-darwin cross-build failed at link with "unable to find dynamic system library 'iconv'" / 'charset'. Root cause is zig 0.14.0's macho linker: under rust >= 1.82 the apple std links -liconv/-lcharset (rust-lang/rust#128370), and zig 0.14.0 can't resolve them from the SDK (cargo-zigbuild#316) — the SDKROOT search path gets doubled (/opt/MacOSX.sdk/opt/MacOSX.sdk/usr/lib). Bumping cargo-zigbuild alone (0.22.3 -> 0.23.0) did NOT help; the variable is the zig version. zig 0.15.2 resolves it. Also fixes the zig archive URL (naming flipped to zig-<arch>-<os>-<ver> as of 0.14.1). Verified end-to-end in Docker (rust:1.95-trixie, same as CI runner): all four targets — linux arm64/amd64 + macos arm64/amd64 — link successfully, and the glibc floor gate still passes (both linux binaries max GLIBC_2.30 <= 2.31). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
SHA: 005fac2de43e23ecb96bb7e022a8852507072b31
Author: CI <ci@anvil.test>
Date: 2026-07-13 03:22
Parents: 0ed4a82
1 files changed +8 -3
Type
ci/build-runner.sh +8 −3
@@ -40,13 +40,18 @@
# zig cc also cross-links amd64, so no separate gnu cross-compiler is needed.
# Pinned, mutually-compatible pair (cargo-zigbuild is sensitive to the zig
# version it drives). Bump both together and re-check the glibc floor.
# zig 0.14.0 has a macho-linker regression that can't resolve -liconv/-lcharset
# for apple-darwin under rust >= 1.82 (rust-lang/rust#128370, cargo-zigbuild#316)
# — the macOS cross-link fails with "unable to find dynamic system library
# 'iconv'". zig 0.15.2 resolves it. Bumped cargo-zigbuild in lockstep.
ZIG_VERSION=0.15.2
ZIGBUILD_VERSION=0.23.0
ZIG_VERSION=0.14.0
ZIGBUILD_VERSION=0.22.3
GLIBC_FLOOR=2.31
if ! command -v zig >/dev/null 2>&1; then
echo "==> Installing zig $ZIG_VERSION"
# zig flipped its archive naming to zig-<arch>-<os>-<ver> as of 0.14.1.
curl -sSL "https://ziglang.org/download/${ZIG_VERSION}/zig-linux-$(uname -m)-${ZIG_VERSION}.tar.xz" \
curl -sSL "https://ziglang.org/download/${ZIG_VERSION}/zig-$(uname -m)-linux-${ZIG_VERSION}.tar.xz" \
-o /tmp/zig.tar.xz
mkdir -p /opt/zig
tar -xJf /tmp/zig.tar.xz -C /opt/zig --strip-components=1