You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to build a docker image for a Raspberry Pi 4 which uses Trunk to build a web page.
Pretty common use-case, right? I would think so. It doesn't build on Arm64v8 architecture and fails to find cc.
I checked /usr/local/rustup/toolchains/1.60.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/bin and confirmed cc does not exist, but gcc/g++ is installed.
Here was my Dockerfile:
FROM rust as builder
RUN rustup target add wasm32-unknown-unknown
RUN cargo install trunk # <--- BUILD FAILS HERE
RUN trunk build
I expected this small example to build.
Instead:
note: Error while loading /usr/local/rustup/toolchains/1.60.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/bin/cc: No such file or directory
#0 183.5
#0 183.5
#0 187.1 error: failed to compile `trunk v0.14.0`, intermediate artifacts can be found at `/tmp/cargo-installzc7X1O`
#0 187.1
#0 187.1 Caused by:
#0 187.1 build failed
I had this issue (missing cc) happen to me when trying to cross compile for an M1 Mac from an X86 machine. I was able to fix it by switching the docker buildx builder to use the multiarch/qemu-user-static as described here: docker/buildx#495 (comment). For me, I think the issue is that the arm64 builder that comes out of the box with buildx has incorrect/different paths. You might be experiencing something similar with the WASM builder and arm64?
Triage: Thanks for reporting! But I'm pretty sure no cc is ever distributed by Rust, so the problem must be somewhere else. In other words, I don't think this is a Rust bug. Feel free to re-open if you can prove or strongly indicate that this is a Rust bug.
I'm trying to build a docker image for a Raspberry Pi 4 which uses Trunk to build a web page.
Pretty common use-case, right? I would think so. It doesn't build on Arm64v8 architecture and fails to find cc.
I checked
/usr/local/rustup/toolchains/1.60.0-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/bin
and confirmed cc does not exist, but gcc/g++ is installed.Here was my Dockerfile:
I expected this small example to build.
Instead:
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: