Open mominul opened 1 month ago
The first problem you describe is an issue with compat between docker-desktop and buildx. There's an option in docker-desktop for macos that has caused issues previously for other people (although it has worked for me), "Use containerd for pulling and storing images"
Should be solved by building with CROSS_BUILD_OPTS="--output=type=docker"
.
For the second issue, I require some more information. Can you post the output together with adding -v
to the command?
The first problem you describe is an issue with compat between docker-desktop and buildx. There's an option in docker-desktop for macos that has caused issues previously for other people (although it has worked for me), "Use containerd for pulling and storing images"
This was already disabled by default, did you meant to enable it?
Should be solved by building with
CROSS_BUILD_OPTS="--output=type=docker"
.For the second issue, I require some more information. Can you post the output together with adding
-v
to the command?
Here is the output of that command, I don't know why it is inquiring rustup about stable-x86_64-unknown-linux-gnu
target.
mominul@Muhammads-MacBook-Air ~/s/tsf-example (main)> CROSS_BUILD_OPTS="--output=type=docker" cross build -v --target aarch64-pc-windows-msvc
+ cargo metadata --format-version 1 --filter-platform aarch64-pc-windows-msvc
+ rustc --print sysroot
+ /usr/local/bin/docker
+ /usr/local/bin/docker version -f '{{ .Server.Os }},,,{{ .Server.Arch }}'
+ /usr/local/bin/docker info -f {{.SecurityOptions}}
+ rustup toolchain list
+ rustup target list --toolchain stable-x86_64-unknown-linux-gnu
+ rustup component list --toolchain stable-x86_64-unknown-linux-gnu
+ /usr/local/bin/docker run --userns host --platform linux/amd64 -e 'XARGO_HOME=/Users/mominul/.xargo' -e 'CARGO_HOME=/Users/mominul/.cargo' -e 'CROSS_RUST_SYSROOT=/Users/mominul/.rustup/toolchains/stable-x86_64-unknown-linux-gnu' -e 'CARGO_TARGET_DIR=/target' -e 'CROSS_RUNNER=' -e BROWSER -e CROSS_BUILD_OPTS -e TERM -e 'USER=mominul' -e 'CROSS_RUSTC_MAJOR_VERSION=1' -e 'CROSS_RUSTC_MINOR_VERSION=78' -e 'CROSS_RUSTC_PATCH_VERSION=0' --name cross-stable-x86_64-unknown-linux-gnu-da827-9b00956e5-aarch64-pc-windows-msvc-80a3f-1717764155689 --rm --user 501:20 -v /Users/mominul/.xargo:/Users/mominul/.xargo:z -v /Users/mominul/.cargo:/Users/mominul/.cargo:z -v /Users/mominul/.cargo/bin -v /Users/mominul/src/tsf-example:/Users/mominul/src/tsf-example:z -v /Users/mominul/.rustup/toolchains/stable-x86_64-unknown-linux-gnu:/Users/mominul/.rustup/toolchains/stable-x86_64-unknown-linux-gnu:z,ro -v /Users/mominul/src/tsf-example/target:/target:z -w /Users/mominul/src/tsf-example -t ghcr.io/cross-rs/aarch64-pc-windows-msvc-cross:local sh -c 'PATH="$PATH":"/Users/mominul/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin" cargo build -v --target aarch64-pc-windows-msvc'
+ rustup component list --toolchain stable-x86_64-unknown-linux-gnu
Thanks for the fast reply!
the toolchain x86_64-unknown-linux-gnu
is what is used to compile for the chosen target.
note: I only suggested CROSS_BUILD_OPTS="--output=type=docker"
for build-docker-image
But back to the issue.
There's literally no output? very strange, what happens if you do cross-util run -i -v --target aarch64-pc-windows-msvc -- bash
There's literally no output? very strange, what happens if you do
cross-util run -i -v --target aarch64-pc-windows-msvc -- bash
It just prints these outputs and exits successfully. 😕
mominul@Muhammads-MacBook-Air ~/s/tsf-example (main)> cross-util run -i -v --target aarch64-pc-windows-msvc -- bash
+ /usr/local/bin/docker
+ /usr/local/bin/docker version -f '{{ .Server.Os }},,,{{ .Server.Arch }}'
+ /usr/local/bin/docker info -f {{.SecurityOptions}}
+ cargo metadata --format-version 1 --filter-platform aarch64-pc-windows-msvc
+ rustc --print sysroot
+ /usr/local/bin/docker
+ /usr/local/bin/docker version -f '{{ .Server.Os }},,,{{ .Server.Arch }}'
+ /usr/local/bin/docker info -f {{.SecurityOptions}}
+ /usr/local/bin/docker run --userns host --platform linux/amd64 -e 'XARGO_HOME=/Users/mominul/.xargo' -e 'CARGO_HOME=/Users/mominul/.cargo' -e 'CROSS_RUST_SYSROOT=/Users/mominul/.rustup/toolchains/stable-x86_64-unknown-linux-gnu' -e 'CARGO_TARGET_DIR=/target' -e 'CROSS_RUNNER=' -e BROWSER -e TERM -e 'USER=mominul' -e 'CROSS_RUSTC_MAJOR_VERSION=1' -e 'CROSS_RUSTC_MINOR_VERSION=0' -e 'CROSS_RUSTC_PATCH_VERSION=0' --name cross-stable-x86_64-unknown-linux-gnu-da827-9b00956e5-aarch64-pc-windows-msvc-80a3f-1717825740164 --rm --user 501:20 -v /Users/mominul/.xargo:/Users/mominul/.xargo:z -v /Users/mominul/.cargo:/Users/mominul/.cargo:z -v /Users/mominul/.cargo/bin -v /Users/mominul/src/tsf-example:/Users/mominul/src/tsf-example:z -v /Users/mominul/.rustup/toolchains/stable-x86_64-unknown-linux-gnu:/Users/mominul/.rustup/toolchains/stable-x86_64-unknown-linux-gnu:z,ro -v /Users/mominul/src/tsf-example/target:/target:z -w /Users/mominul/src/tsf-example -t -i ghcr.io/cross-rs/aarch64-pc-windows-msvc-cross:local sh -c 'PATH="$PATH":"/Users/mominul/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin" sh -c bash'
note: I only suggested
CROSS_BUILD_OPTS="--output=type=docker"
forbuild-docker-image
Do I need to build the image again? 😢
Thanks!
is your docker working?
try docker run -it ghcr.io/cross-rs/aarch64-pc-windows-msvc-cross:local
and docker run -it ubuntu:20.04
docker run -it ghcr.io/cross-rs/aarch64-pc-windows-msvc-cross:local
exits with the same 53 error no and gives a warning:
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
While passing --platform linux/amd64
to the arguments eliminates the warning, it still errors with error no 53 without any output.
My docker is working as it can run the ubuntu:20.04
image interactively:
mominul@Muhammads-MacBook-Air ~ [53]> docker run -it ubuntu:20.04
Unable to find image 'ubuntu:20.04' locally
20.04: Pulling from library/ubuntu
f02209be4ee5: Pull complete
Digest: sha256:0b897358ff6624825fb50d20ffb605ab0eaea77ced0adb8c6a4b756513dec6fc
Status: Downloaded newer image for ubuntu:20.04
root@acd2f0db3510:/#
Checklist
Describe your issue
I have built the
ghcr.io/cross-rs/aarch64-pc-windows-msvc-cross
image withcross-toolchains
. Here is the output of the image build:Here is the screenshot from docker desktop:![image](https://github.com/cross-rs/cross/assets/9459891/8487495d-9ee7-4a0b-afe7-5f052334965f)
and output from
docker image
:and the
Cross.toml
:For the first time I used
cross build --target aarch64-pc-windows-msvc
it errored out with125
and this output:Afterwards I restarted the docker desktop, and now everytime I run
cross build --target aarch64-pc-windows-msvc
it gives no output but errors out with53
error number and a target directory with just aCACHEDIR.TAG
file.What target(s) are you cross-compiling for?
other (specify in description)
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 (19be834 2024-05-17)
Example
No response
Additional information / notes
No response