Description
Hi!
I'm trying to run some cross jobs in Travis using nightly
. Versions are as follows:
$ cargo --version
cargo 1.41.0-nightly (750cb1482 2019-11-23)
$ cross --version
cross 0.1.16
cargo 1.41.0-nightly (750cb1482 2019-11-23)
$ rustup --version
rustup 1.20.2 (13979c968 2019-10-16)
When running a relatively simple cross build --target armv7-unknown-linux-gnueabihf
, I get the following output. This behavior occurs regardless of my actual target:
$ cross build --target armv7-unknown-linux-gnueabihf
error: no such subcommand: `cargo`
Going --verbose
, I get the following:
$ cross build --target armv7-unknown-linux-gnueabihf --verbose
+ "rustc" "rustc" "--print" "sysroot"
+ "rustup" "rustup" "toolchain" "list"
+ "rustup" "rustup" "target" "list" "--toolchain" "nightly-x86_64-unknown-linux-gnu"
+ "rustup" "rustup" "component" "list" "--toolchain" "nightly-x86_64-unknown-linux-gnu"
+ "cargo" "cargo" "fetch" "--manifest-path" "/home/travis/build/my/project/Cargo.toml"
+ "docker" "docker" "run" "--userns" "host" "--rm" "--user" "2000:2000" "-e" "XARGO_HOME=/xargo" "-e" "CARGO_HOME=/cargo" "-e" "CARGO_TARGET_DIR=/target" "-e" "USER=travis" "-e" "PKG_CONFIG_PATH" "-e" "PKG_CONFIG_ALLOW_CROSS" "-e" "CROSS_RUNNER=" "-v" "/home/travis/.xargo:/xargo:Z" "-v" "/home/travis/.cargo:/cargo:Z" "-v" "/cargo/bin" "-v" "/home/travis/build/my/project:/project:Z,ro" "-v" "/home/travis/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu:/rust:Z,ro" "-v" "/home/travis/build/my/project/target:/target:Z" "-w" "/project" "-i" "-t" "my/custom-cross:armv7-unknown-linux-gnueabihf-v0.1.16" "sh" "-c" "PATH=$PATH:/rust/bin \"cargo\" \"cargo\" \"build\" \"--target\" \"armv7-unknown-linux-gnueabihf\" \"--verbose\""
error: no such subcommand: `cargo`
Note that while I am using a custom Docker image, the same behavior occurs even with the default images.
My Cross.toml
is as follows:
[build.env]
passthrough = ["PKG_CONFIG_PATH", "PKG_CONFIG_ALLOW_CROSS"]
[target.armv7-unknown-linux-gnueabihf]
image = "my/custom-cross:armv7-unknown-linux-gnueabihf-v0.1.16"
[target.aarch64-unknown-linux-gnu]
image = "my/custom-cross:aarch64-unknown-linux-gnu-v0.1.16"
[target.x86_64-unknown-linux-gnu]
image = "my/custom-cross:x86_64-unknown-linux-gnu-v0.1.16"
It seems like it's adding the command its running as an additional argument to itself, at least according to the logs. Running this on my local machine (macOS Mojave 10.14.6), I don't see this "doubling" behavior. My local machine is running the same version of cross
as my Travis build.
cross 0.1.16
cargo 1.41.0-nightly (750cb1482 2019-11-23)
I'm kinda stumped -- I don't see anything in the code that's immediately obvious as a bug/regression or assumption about the running environment that Travis might be violating. Any ideas?