-
Notifications
You must be signed in to change notification settings - Fork 388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"no matching manifest" on cross v0.2.5 #1214
Comments
I think this is a regression in docker, pretty sure it used to work $ cross build --target x86_64-unknown-linux-gnu -v
+ cargo metadata --format-version 1 --filter-platform x86_64-unknown-linux-gnu
+ rustc --print sysroot
+ 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
+ /usr/local/bin/docker run --userns host -e 'PKG_CONFIG_ALLOW_CROSS=1' -e 'XARGO_HOME=/xargo' -e 'CARGO_HOME=/cargo' -e 'CARGO_TARGET_DIR=/target' -e 'CROSS_RUNNER=' -e TERM -e 'USER=emil' --rm --user 501:20 -v /Users/emil/.xargo:/xargo:z -v /Users/emil/.cargo:/cargo:z -v /cargo/bin -v /Users/emil/workspace/cross:/project:z -v /Users/emil/.rustup/toolchains/stable-x86_64-unknown-linux-gnu:/rust:z,ro -v /Users/emil/workspace/cross/target:/target:z -w /project -i -t ghcr.io/cross-rs/x86_64-unknown-linux-gnu:0.2.5 sh -c 'PATH=$PATH:/rust/bin cargo build --target x86_64-unknown-linux-gnu -v'
Unable to find image 'ghcr.io/cross-rs/x86_64-unknown-linux-gnu:0.2.5' locally
0.2.5: Pulling from cross-rs/x86_64-unknown-linux-gnu
docker: no matching manifest for linux/arm64/v8 in the manifest list entries.
See 'docker run --help'.
+ rustup component list --toolchain stable-x86_64-unknown-linux-gnu the fix is as mentioned adding for now, if you must use $ CROSS_CONTAINER_OPTS="--platform linux/amd64" cross build --target x86_64-unknown-linux-gnu -v
+ 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
+ /usr/local/bin/docker run --userns host -e 'PKG_CONFIG_ALLOW_CROSS=1' -e 'XARGO_HOME=/xargo' -e 'CARGO_HOME=/cargo' -e 'CARGO_TARGET_DIR=/target' -e 'CROSS_RUNNER=' -e TERM -e 'USER=emil' --platform linux/amd64 --rm --user 501:20 -v /Users/emil/.xargo:/xargo:z -v /Users/emil/.cargo:/cargo:z -v /cargo/bin -v /Users/emil/workspace/cross:/project:z -v /Users/emil/.rustup/toolchains/stable-x86_64-unknown-linux-gnu:/rust:z,ro -v /Users/emil/workspace/cross/target:/target:z -w /project -i -t ghcr.io/cross-rs/x86_64-unknown-linux-gnu:0.2.5 sh -c 'PATH=$PATH:/rust/bin cargo build --target x86_64-unknown-linux-gnu -v'
Unable to find image 'ghcr.io/cross-rs/x86_64-unknown-linux-gnu:0.2.5' locally
0.2.5: Pulling from cross-rs/x86_64-unknown-linux-gnu
58690f9b18fc: Pulling fs layer
b51569e7c507: Pulling fs layer
da8ef40b9eca: Pulling fs layer
fb15d46c38dc: Waiting
7cd0932c59ac: Waiting
b8099f45b9a5: Waiting
640227c3e7fb: Waiting
... |
Hmm, actually, is it a change in the oci images? $ cross-v0.2.5 metadata --target x86_64-unknown-linux-gnu -v
+ cargo metadata --format-version 1 --filter-platform x86_64-unknown-linux-gnu
+ rustc --print sysroot
+ 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
+ /usr/local/bin/docker run --userns host -e 'PKG_CONFIG_ALLOW_CROSS=1' -e 'XARGO_HOME=/xargo' -e 'CARGO_HOME=/cargo' -e 'CARGO_TARGET_DIR=/target' -e 'CROSS_RUNNER=' -e TERM -e 'USER=emil' --rm --user 501:20 -v /Users/emil/.xargo:/xargo:z -v /Users/emil/.cargo:/cargo:z -v /cargo/bin -v /Users/emil/workspace/cross:/project:z -v /Users/emil/.rustup/toolchains/stable-x86_64-unknown-linux-gnu:/rust:z,ro -v /Users/emil/workspace/cross/target:/target:z -w /project -i -t ghcr.io/cross-rs/x86_64-unknown-linux-gnu:0.2.5 sh -c 'PATH=$PATH:/rust/bin cargo metadata -v'
Unable to find image 'ghcr.io/cross-rs/x86_64-unknown-linux-gnu:0.2.5' locally
0.2.5: Pulling from cross-rs/x86_64-unknown-linux-gnu
docker: no matching manifest for linux/arm64/v8 in the manifest list entries.
See 'docker run --help'.
+ rustup component list --toolchain stable-x86_64-unknown-linux-gnu
$ cross-v0.2.4 metadata --target x86_64-unknown-linux-gnu -v
+ rustc --print sysroot
+ 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
+ /usr/local/bin/docker run --userns host -e 'PKG_CONFIG_ALLOW_CROSS=1' -e 'XARGO_HOME=/xargo' -e 'CARGO_HOME=/cargo' -e 'CARGO_TARGET_DIR=/target' -e 'CROSS_RUNNER=' -e TERM -e 'USER=emil' --rm --user 501:20 -v /Users/emil/.xargo:/xargo:Z -v /Users/emil/.cargo:/cargo:Z -v /cargo/bin -v /Users/emil/workspace/cross:/project:Z -v /Users/emil/.rustup/toolchains/stable-x86_64-unknown-linux-gnu:/rust:Z,ro -v /Users/emil/workspace/cross/target:/target:Z -w /project -i -t ghcr.io/cross-rs/x86_64-unknown-linux-gnu:0.2.4 sh -c 'PATH=$PATH:/rust/bin cargo metadata -v'
Unable to find image 'ghcr.io/cross-rs/x86_64-unknown-linux-gnu:0.2.4' locally
0.2.4: Pulling from cross-rs/x86_64-unknown-linux-gnu
58690f9b18fc: Pulling fs layer
b51569e7c507: Pulling fs layer
da8ef40b9eca: Pulling fs layer
fb15d46c38dc: Waiting
ba4cfa0d02e9: Waiting
9b3d6abb553f: Waiting
7e4f4e01d8cc: Waiting
7457ea83291e: Waiting
385151f4cf4a: Waiting
dd3a4857dad0: Waiting
f4c64b50a179: Waiting
634c7871468d: Waiting
94489cc40d0c: Waiting
f47e7b8372aa: Waiting
70626baa3f44: Waiting
8c9e9eeed2e0: Waiting
de83618d0833: Waiting
^C there's no changes in the invocation between 0.2.4 and 0.2.5 except we're using the tag 0.2.5 and using very strange |
the sha for https://github.com/cross-rs/cross/actions/runs/4092128923/jobs/7057264550#step:16:129
I've never seen this before, but apparently it's https://docs.docker.com/build/attestations/attestation-storage/ not sure if it's worth disabling, since I definitely feel like this is an upstream issue in that, imo, if the manifest only has one valid and supported platform, it should use that, if there's multiple supported platforms, then prompt the user to pick. |
related: docker/build-push-action#820 we don't use the build-push-action, but I suspect the issue it the same here as we basically do the same thing as it. |
So to summarize, the problem is
$ docker buildx imagetools inspect ghcr.io/cross-rs/x86_64-unknown-linux-gnu:0.2.5
Name: ghcr.io/cross-rs/x86_64-unknown-linux-gnu:0.2.5
MediaType: application/vnd.oci.image.index.v1+json
Digest: sha256:9e5b39c09874bc1816c675ed11afca2c2ed6cee0c4ed2b3c1d5763c346c9ae3f
Manifests:
Name: ghcr.io/cross-rs/x86_64-unknown-linux-gnu:0.2.5@sha256:a2d924b0399f17432c3c8d6af2136903c5105bf71c726044a988427f849a8509
MediaType: application/vnd.oci.image.manifest.v1+json
Platform: linux/amd64
Name: ghcr.io/cross-rs/x86_64-unknown-linux-gnu:0.2.5@sha256:a62738a88fd7403bf1fd5beb14d391013206ec8e7d3a4ba6522cf61a411b20a0
MediaType: application/vnd.oci.image.manifest.v1+json
Platform: unknown/unknown
Annotations:
vnd.docker.reference.type: attestation-manifest
vnd.docker.reference.digest: sha256:a2d924b0399f17432c3c8d6af2136903c5105bf71c726044a988427f849a8509
now, there's one issue, we never enabled provenence. docker/build-push-action#771 suggests that setting edit: ah, https://docs.docker.com/engine/reference/commandline/buildx_build/#provenance
as can be seen here
|
so there's three ways to solve this
|
Thanks for figuring this out! There's no rush on a fix from my point of view (I can use 0.2.4 successfully). |
If you missed it, you can also use use
|
For anybody else, to save you spending days looking for a solution here is how I solved it: |
Hey, sorry for my lack of knowledge, but what's exactly the problem that blocks |
The blocker is implementation in #975 and particularly access to GHA runners on aarch64 architecture to not have to emulate the containers in CI |
Checklist
Describe your issue
I've been cross-compiling https://github.com/automerge/automerge-go for a while. Today I upgraded
cross
, and it broke cross-compilation:The error message is the same as the one I get when I run docker with no
--platform
argument, when I do not have the image cached locally (once the image has run once, I no longer need to pass --platform to docker to make it work).In case it helps tracking this down, I'm using Docker version 20.10.23, build 7155243 (as provided by Docker Desktop 4.17.0 (99724).
What target(s) are you cross-compiling for?
aarch64-unknown-linux-gnu, x86_64-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
0.2.5
Example
Additional information / notes
This is not a problem on the previous version with
cargo install [email protected]
. Everything works fine!The text was updated successfully, but these errors were encountered: