Skip to content

fix(docker): unbreak the arm64 image build under Rust 1.98 - #521

Merged
henry40408 merged 1 commit into
mainfrom
fix/zigbuild-0-23
Aug 28, 2026
Merged

henry40408 merged 1 commit into
mainfrom
fix/zigbuild-0-23

Conversation

@henry40408

Copy link
Copy Markdown
Owner

The Docker workflow has been failing on main since #510 bumped the toolchain to Rust 1.98. Only the arm64 leg is affected; amd64 builds fine.

Cause

Rust 1.98 passes -Wl,--fix-cortex-a53-843419 as a pre-link arg for aarch64-unknown-linux-musl (rust-lang/rust#155453). zig's linker does not accept it:

error: linking with `/root/.cache/cargo-zigbuild/0.22.3/wrappers/6f7f/zigcc-aarch64-unknown-linux-musl-5d3b.sh` failed: exit status: 1
  = note: error: unsupported linker arg: --fix-cortex-a53-843419
error: could not compile `rdrs` (bin "rdrs") due to 1 previous error

Failing run on main: https://github.com/henry40408/rdrs/actions/runs/33187487621

cargo-zigbuild filters that arg out as of rust-cross/cargo-zigbuild#452, first released in 0.23.0. The Dockerfile pinned 0.22.3, which predates the fix.

Change

ZIGBUILD_VERSION 0.22.3 → 0.23.0. 0.23.1 through 0.23.3 all landed within the last seven days and are inside this repo's dependency cooldown; 0.23.0 (published 2026-06-16) is the oldest release carrying the fix, and is what noadd, pingward and liftlog already pin.

ZIG_VERSION stays at 0.14.1 — 0.23.0 still supports it, and the libc++-19 bindgen caveat in the existing comment only applies to zig 0.15+.

Verification

docker.yml only fires on pushes to main and on tags, so this PR's own checks do not exercise the cross-compile. Verified locally instead:

$ docker buildx build --platform linux/arm64 --target build \
    --build-arg GIT_VERSION=v0.81.1-3-g70c2e57 .
#15 128.1     Finished `release` profile [optimized] target(s) in 2m 01s
#15 128.2 + install -Dm755 target/aarch64-unknown-linux-musl/release/rdrs /out/rdrs
#15 DONE 128.3s

The build emits one benign warning from zig — linker stderr: ignoring deprecated linker optimization setting '1' — which does not fail the build.

No Rust test accompanies this change: it is a single build-argument edit in the Dockerfile, unreachable from the project's test harness and exercised only by the Docker workflow.

🤖 Generated with Claude Code

Rust 1.98 passes `-Wl,--fix-cortex-a53-843419` as a pre-link arg for
aarch64-unknown-linux-musl (rust-lang/rust#155453). zig's linker rejects
it, so the arm64 leg of the image has failed to link since the toolchain
bump in #510:

    error: unsupported linker arg: --fix-cortex-a53-843419
    error: could not compile `rdrs` (bin "rdrs")

cargo-zigbuild filters the arg out as of rust-cross/cargo-zigbuild#452,
first released in 0.23.0, so ZIGBUILD_VERSION moves 0.22.3 -> 0.23.0.
0.23.1 through 0.23.3 are all inside the seven-day dependency cooldown;
0.23.0 (published 2026-06-16) is the oldest release carrying the fix.

ZIG_VERSION stays at 0.14.1 — 0.23.0 still supports it, and the libc++-19
bindgen caveat in the existing comment only applies to zig 0.15+.
@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.52%. Comparing base (70c2e57) to head (a9d48c4).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #521   +/-   ##
=======================================
  Coverage   93.52%   93.52%           
=======================================
  Files          87       87           
  Lines       25896    25896           
=======================================
  Hits        24218    24218           
  Misses       1678     1678           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@henry40408
henry40408 merged commit 28b22b9 into main Aug 28, 2026
9 checks passed
@henry40408
henry40408 deleted the fix/zigbuild-0-23 branch August 28, 2026 17:00
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