Skip to content

docker/zig.sh: bump cargo-zigbuild 0.17.5 -> 0.23.4 so the zig image builds with Rust >= 1.98 (--fix-cortex-a53-843419) - #1805

Open
glaziermag wants to merge 1 commit into
cross-rs:mainfrom
glaziermag:zigbuild-0-23
Open

glaziermag wants to merge 1 commit into
cross-rs:mainfrom
glaziermag:zigbuild-0-23

Conversation

@glaziermag

@glaziermag glaziermag commented Sep 26, 2026 •

Copy link
Copy Markdown

The zig target of the CI workflow has failed at "Test Zig Image" on every push to main since Rust 1.98.0 (2026-08-20). The image installs cargo-zigbuild 0.17.5 (docker/zig.sh, unchanged since 2024-04), whose zig cc wrapper rejects the -Wl,--fix-cortex-a53-843419 linker argument that rustc now passes for every AArch64 Linux target (rust-lang/rust#155453, milestone 1.98.0). cargo-zigbuild filters that argument since 0.23.0 (rust-cross/cargo-zigbuild#451 / #452), so this bumps the pinned version and adapts the installer to the current release archives.

Failure on main (job target (zig,ubuntu-latest), run 35965047836, 2026-09-24, Rust 1.98.1):

error: linking with `/target/.zig-cache/cargo-zigbuild/0.17.5/zigcc-aarch64-unknown-linux-gnu.sh` failed: exit status: 1
  = note: error: unsupported linker arg: --fix-cortex-a53-843419
error: could not compile `hellopp` (bin "hellopp") due to 1 previous error

The same job was green on 2026-08-19 (run 32250555535, Rust 1.97.1); it has been red on both main pushes since (runs 35964074174 and 35965047836) and in the weekly runs.

Reproduction: cargo xtask build-docker-image zig followed by ./ci/test-zig-image.sh with a stable toolchain >= 1.98, exactly as the CI job does. On my fork, the same steps fail at HEAD (run 36208936418) and pass with this change (runs 36208937247 and 36209338211).

Changes in docker/zig.sh:

  • cargo-zigbuild 0.17.5 -> 0.23.4.
  • The release archives are now named cargo-zigbuild-<triple>.tar.xz and contain a cargo-zigbuild-<triple>/ directory, so the download URL, the tar flags and the extracted path change accordingly; the repository moved to rust-cross/cargo-zigbuild.
  • Prebuilt Linux archives now exist only for x86_64 (gnu, musl) and aarch64 (gnu): linux/amd64 keeps the musl build, linux/arm64 uses the gnu build (the image is Ubuntu 24.04, so glibc is present), and linux/386 falls through to the existing cargo install path.

Zig stays at 0.11.0; cargo-zigbuild 0.23 still supports it. CI builds the image for linux/amd64 only, which is the path exercised by the fork run above.

Disclosure: this change was prepared with an AI coding agent (Claude Code); I reviewed the diff and the fork runs above are the verification.

@glaziermag
glaziermag requested a review from a team as a code owner September 26, 2026 01:49
@Emilgardis

Copy link
Copy Markdown
Member

Please remove the co-authored-by for claude. This change is fine, but I don't want the implication of the attribution in this repo. This change is very small and there's no logic changed, only fixes.

Rust 1.98.0 passes `-Wl,--fix-cortex-a53-843419` to the linker for every
AArch64 Linux target (rust-lang/rust#155453). cargo-zigbuild 0.17.5, pinned
in the zig image, rejects it (`unsupported linker arg`), so the `zig` CI job
has failed at "Test Zig Image" on every push to main since 2026-08-20.
cargo-zigbuild filters the argument since 0.23.0 (rust-cross/cargo-zigbuild#452).

The release archives are now `cargo-zigbuild-<triple>.tar.xz` under the
rust-cross organisation and unpack into a `cargo-zigbuild-<triple>/`
directory; prebuilt Linux binaries exist only for x86_64 (gnu, musl) and
aarch64 (gnu), so linux/arm64 uses the gnu build and linux/386 falls back to
`cargo install`.
@glaziermag

Copy link
Copy Markdown
Author

Removed. The branch is now a single commit (47a82bc) with no co-authored-by trailer; the diff is unchanged.

Since merge commits here carry the PR description, I also dropped the "Generated with" footer line from it. The one-line disclosure is still in the description; tell me if you would rather that stay out of the merge message too and I will move it to a comment.

This branch has not been deployed

No deployments
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.

2 participants