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 have a simple rust project on aarch64-darwin, targeting arm64 raspberryPi 4B. I have installed cross using cargo, I have added aarch64-unknown-linux-gnu as target via rustup, I have podman installed.
I did a cross build --target aarch64-unknown-linux-gnu, here's the output:
[15:06:23] $ cross build --target aarch64-unknown-linux-gnu
Trying to pull ghcr.io/cross-rs/aarch64-unknown-linux-gnu:0.2.5...
Error: choosing an image from manifest list docker://ghcr.io/cross-rs/aarch64-unknown-linux-gnu:0.2.5: no image found in image index for architecture "arm64", variant "v8", OS "linux"
What target(s) are you cross-compiling for?
aarch64-unknown-linux-gnu
Which operating system is the host (e.g computer cross is on) running?
macOS
Windows
Linux / BSD
other OS (specify in description)
What architecture is the host?
x86_64 / AMD64
arm32
arm64 (including Mac M1)
What container engine is cross using?
docker
podman
other container engine (specify in description)
cross version
cross 0.2.5
Example
[15:06:23] $ cross build --target aarch64-unknown-linux-gnu
Trying to pull ghcr.io/cross-rs/aarch64-unknown-linux-gnu:0.2.5...
Error: choosing an image from manifest list docker://ghcr.io/cross-rs/aarch64-unknown-linux-gnu:0.2.5: no image found in image index for architecture "arm64", variant "v8", OS "linux"
Additional information / notes
No response
The text was updated successfully, but these errors were encountered:
Sorry, my bad. Figured it out: You have to pass in the podman flag --platform=linux/amd64 or --arch=amd64, tweak for your own requirements.
Based on Configuring cross with environment variables, you can pass flags to the container engine. You can do: CROSS_CONTAINER_OPTS=--platform=linux/amd64 cross build --target aarch64-unknown-linux-gnu
Basically, if you fail during a build and it's image not found, inspect the url(in my case it's docker://ghcr.io/cross-rs/aarch64-unknown-linux-gnu:0.2.5) for supported platform, and do the environment variable.
If you use nix, you can simply set up shell hook in flake.nix for this.
Checklist
Describe your issue
I have a simple rust project on aarch64-darwin, targeting arm64 raspberryPi 4B. I have installed cross using cargo, I have added
aarch64-unknown-linux-gnu
as target viarustup
, I havepodman
installed.I did a
cross build --target aarch64-unknown-linux-gnu
, here's the output:What target(s) are you cross-compiling for?
aarch64-unknown-linux-gnu
Which operating system is the host (e.g computer cross is on) running?
What architecture is the host?
What container engine is cross using?
cross version
cross 0.2.5
Example
Additional information / notes
No response
The text was updated successfully, but these errors were encountered: