Skip to content

Fix Linux ARM64 linking, and make CI link every release target - #10

Closed
fenrick wants to merge 1 commit into
mainfrom
fix/arm64-cross-libc
Closed

fenrick wants to merge 1 commit into
mainfrom
fix/arm64-cross-libc

Conversation

@fenrick

@fenrick fenrick commented Sep 9, 2026

Copy link
Copy Markdown
Owner

v1.1.0 published no Linux ARM64 assets. This fixes the cause and closes the
gap in CI that let it through.

What broke

Both ARM64 jobs failed at link time:

ld: cannot find crti.o: No such file or directory
ld: cannot find -lc
ld: cannot find -lm
ld: cannot find -lrt
ld: cannot find -lpthread
collect2: error: ld returned 1 exit status

gcc-aarch64-linux-gnu only recommends libc6-dev-arm64-cross, and the
install used --no-install-recommends. The cross compiler therefore arrived
without a target C library. Naming the library explicitly fixes it.

Why CI missed it

The targets job ran cargo check, which type-checks but does not link. A
missing link-time dependency is invisible to it, so this could only surface
during a release — which is exactly what happened.

The job now runs cargo build --release for all five targets, installing the
cross toolchain where one is needed. A link failure will now appear on the
pull request that causes it, not on a tag.

Damage

None beyond the missing assets. fail-fast: false on the packaging job meant
the failure cost only the two new architectures; v1.1.0 kept the same twelve
assets v1.0.0 had.

The other half of v1.1.0 worked: the published macOS binary carries 0
runner paths, down from 49 in v1.0.0. The /rustc/<hash>/… entries that
remain are the standard library's own virtualised paths.

Note

v1.1.0 will remain without ARM64 assets — re-running its jobs would use the
workflow as it was at that tag, bug included. The assets arrive with 1.1.1.

v1.1.0 published no Linux ARM64 assets. Both jobs failed to link with
"cannot find crti.o" and "cannot find -lc": gcc-aarch64-linux-gnu only
*recommends* libc6-dev-arm64-cross, and the install used
--no-install-recommends, so the cross compiler arrived without a target C
library. The library is now named explicitly alongside it.

CI could not have caught this. It ran `cargo check`, which does not link,
so a missing link-time dependency was invisible until a release ran. The
targets job now runs `cargo build --release` for all five targets, with
the cross toolchain where one is needed, so a link failure surfaces on the
pull request that causes it.

v1.1.0 keeps its other twelve assets: fail-fast was already disabled on
the packaging job, so the failure cost only the two new architectures.
@fenrick

fenrick commented Sep 9, 2026

Copy link
Copy Markdown
Owner Author

Closing unmerged. Linux ARM64 was not wanted — the requested targets are Windows x64, Windows ARM64, macOS ARM64 and Linux x64. Rather than fix the ARM64 cross-link, #11 removes the target. The CI change from this branch (building rather than checking, so link errors surface on a pull request) carries over there, since it is worth having regardless of which targets exist.

@fenrick fenrick closed this Sep 9, 2026
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