🐛 Fix broken cargo on arm64 and remove cargo-info 🐛

sccache source compilation fails for aarch64-musl (openssl-sys has no
musl cross-compile headers). With RUSTC_WRAPPER=sccache set
unconditionally, any arm64 image user who ran cargo hit an immediate
exec error. Guard the wrapper so it is only set when sccache is
actually present in PATH.
cargo-info v0.7.7 depends on openssl-sys and has no arm64-musl
prebuilt on QuickInstall or GitHub Releases. It was wasting ~15 min
of cold-cache build time before failing. Remove it from the tool list.
sccache is now installed as a separate binstall-only line (no source
fallback) so it silently skips on targets where no prebuilt exists,
rather than blocking the build for 15 minutes before failing.
- Dockerfile: remove cargo-info from bulk list; extract sccache to
standalone `cargo binstall ... 2>/dev/null || true` (prebuilt-only)
- rootfs/root/docker/setup/05-custom.sh: guard SCCACHE_DIR and
RUSTC_WRAPPER inside `if command -v sccache` block

Dockerfile
rootfs/root/docker/setup/05-custom.sh
This commit is contained in:
2026-06-22 00:45:05 -04:00
parent 6db1facb3b
commit 94a68fa08e
2 changed files with 5 additions and 4 deletions
+1 -2
View File
@@ -94,7 +94,6 @@ RUN --mount=type=cache,id=cargo-registry-native,sharing=shared,target=/usr/local
cargo-update \
cargo-outdated \
cargo-expand \
cargo-info \
bacon \
cargo-llvm-cov \
cargo-tarpaulin \
@@ -120,7 +119,6 @@ RUN --mount=type=cache,id=cargo-registry-native,sharing=shared,target=/usr/local
cargo-asm \
mdbook \
mdbook-toc \
sccache \
typos-cli \
taplo-cli \
cargo-sort \
@@ -132,6 +130,7 @@ RUN --mount=type=cache,id=cargo-registry-native,sharing=shared,target=/usr/local
cargo-spellcheck \
cargo-geiger \
grcov || true; \
cargo binstall -y --target "${RUST_TARGET}" sccache 2>/dev/null || true; \
cargo binstall -y --target "${RUST_TARGET}" cargo-nextest 2>/dev/null || \
cargo install --locked --target "${RUST_TARGET}" cargo-nextest || true; \
cargo binstall -y --target "${RUST_TARGET}" cargo-dist 2>/dev/null || \
+4 -2
View File
@@ -210,8 +210,10 @@ export RUSTUP_HOME="${RUSTUP_HOME}"
export CARGO_HOME="${CARGO_HOME}"
export RUSTUP_TOOLCHAIN="stable"
export PATH="${CARGO_HOME}/bin:\${PATH}"
export SCCACHE_DIR="\${SCCACHE_DIR:-/root/.cache/sccache}"
export RUSTC_WRAPPER="\${RUSTC_WRAPPER:-sccache}"
if command -v sccache > /dev/null 2>&1; then
export SCCACHE_DIR="\${SCCACHE_DIR:-/root/.cache/sccache}"
export RUSTC_WRAPPER="\${RUSTC_WRAPPER:-sccache}"
fi
export CARGO_INCREMENTAL="\${CARGO_INCREMENTAL:-0}"
PROFILE