Skip to content
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

armv7-unknown-linux-gnueabihf: sh: 1: cargo: not found #437

Closed
thavlik opened this issue Jun 27, 2020 · 5 comments
Closed

armv7-unknown-linux-gnueabihf: sh: 1: cargo: not found #437

thavlik opened this issue Jun 27, 2020 · 5 comments

Comments

@thavlik
Copy link

thavlik commented Jun 27, 2020

Also tried with this Cross.toml, with no change:

[target.armv7-unknown-linux-gnueabihf]
image = "rustembedded/cross:armv7-unknown-linux-gnueabihf"
$ cross build --target armv7-unknown-linux-gnueabihf
Unable to find image 'rustembedded/cross:armv7-unknown-linux-gnueabihf' locally
armv7-unknown-linux-gnueabihf: Pulling from rustembedded/cross
e92ed755c008: Pull complete
b9fd7cb1ff8f: Pull complete
ee690f2d57a1: Pull complete
53e3366ec435: Pull complete
732605659179: Pull complete
21108c3ed136: Pull complete
030cdc7e51ee: Pull complete
111887b17cf4: Pull complete
0c5d70e1b7c6: Pull complete
cae016bf043c: Pull complete
afdf93775758: Pull complete
c3ae44d12984: Pull complete
1d020a9214bb: Pull complete
f5bea794ce4d: Pull complete
d66c18a188f8: Pull complete
6760aa4f7ae9: Pull complete
138d357e3459: Pull complete
a50866218188: Pull complete
Digest: sha256:624aaaf5a437c22aed39d340666e9f5b30c2c4a37e9bfcb7917f748ba7a5f2bc
Status: Downloaded newer image for rustembedded/cross:armv7-unknown-linux-gnueabihf
sh: 1: cargo: not found
@forslund
Copy link

forslund commented Jun 30, 2020

Had similar experience on armv7-unknown-linux-musleabihf

Edit:
Seem to be getting the error on more platforms as well:

$cross build --target  aarch64-unknown-linux-gnu --verbose
+ "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/bin/docker" "run" "--userns" "host" "-e" "PKG_CONFIG_ALLOW_CROSS=1" "--rm" "--user" "0:0" "-e" "XARGO_HOME=/xargo" "-e" "CARGO_HOME=/cargo" "-e" "CARGO_TARGET_DIR=/target" "-e" "USER=root" "-e" "CROSS_RUNNER=" "-v" "/root/.xargo:/xargo:Z" "-v" "/root/.cargo:/cargo:Z" "-v" "/cargo/bin" "-v" "/workspaces/rust-dbus-example:/project:Z" "-v" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu:/rust:Z,ro" "-v" "/workspaces/rust-dbus-example/target:/target:Z" "-w" "/project" "-i" "-t" "rustembedded/cross:aarch64-unknown-linux-gnu-0.2.1" "sh" "-c" "PATH=$PATH:/rust/bin cargo build --target aarch64-unknown-linux-gnu --verbose"
sh: 1: cargo: not found

@forslund
Copy link

In my case it may be a Windows thing...Docker needs to be allowed to share the folder (and me running docker inside docker makes this no less tricky)

@ghost
Copy link

ghost commented Jul 25, 2020

This may be a duplicate of #260. There are some posts in that thread that are helpful for debugging.

@Alexhuszagh
Copy link
Contributor

Alexhuszagh commented Jul 2, 2022

This may be a duplicate of #260. There are some posts in that thread that are helpful for debugging.

That seems to have evolved into numerous, unrelated issues including running docker in docker, Nix stores, remote docker usage, and WSL issues, of which this is unrelated probably related.

@Alexhuszagh
Copy link
Contributor

Alexhuszagh commented Jul 15, 2022

None of this seems to reproduce anymore, and based on the fact you're running this as a root user suggests to me that this is actually a duplicate. You need to use the CROSS_CONTAINER_IN_CONTAINER environment variable to use Docker within Docker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants