cross-rs/cross

`CROSS_CUSTOM_TOOLCHAIN` doesn't work properly

Emilgardis opened this issue · 3 comments

CROSS_DEBUG=1 CROSS_CUSTOM_TOOLCHAIN=1 CROSS_TARGET_X86_64_UNKNOWN_LINUX_GNU_IMAGE="ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main-centos" cross +78c8355821161d05841b58cd7c27ff0bb679847d build --target x86_64-unknown-linux-gnu -v

results in us mounting .rustup/toolchains/nightly-x86_64-unknown-linux-gnu

tried fixing it in https://github.com/Emilgardis/cross/tree/fix-custom-toolchain but it doesn't seem to work as intended

tried this for rust-lang/rust#125417 (comment)

above results in

emil@Ubuntu-2110-impish-amd64-base:~/hellow-world$ CROSS_DEBUG=1 CROSS_CUSTOM_TOOLCHAIN=1 CROSS_TARGET_X86_64_UNKNOWN_LINUX_GNU_IMAGE="ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main-centos" cross +78c8355821161d05841b58cd7c27ff0bb679847d build --target x86_64-unknown-linux-gnu -v
[src/cargo.rs:156] ->
+ cargo +78c8355821161d05841b58cd7c27ff0bb679847d metadata --format-version 1 --filter-platform x86_64-unknown-linux-gnu
[src/rustc.rs:383] ->
+ rustc --print sysroot
[src/rustc.rs:166] ->
+ /home/emil/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc
[src/rustc.rs:166] ->
+ /home/emil/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc
[src/docker/engine.rs:220] ->
+ /usr/bin/docker
[src/docker/engine.rs:295] ->
+ /usr/bin/docker version -f '{{ .Server.Os }},,,{{ .Server.Arch }}'
[src/docker/engine.rs:163] ->
+ /usr/bin/docker info -f {{.SecurityOptions}}
[src/docker/local.rs:161] ->
+ /usr/bin/docker run --userns host -e 'XARGO_HOME=/home/emil/.xargo' -e 'CARGO_HOME=/home/emil/.cargo' -e 'CROSS_RUST_SYSROOT=/home/emil/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu' -e 'CARGO_TARGET_DIR=/target' -e 'CROSS_RUNNER=' -e CROSS_TARGET_X86_64_UNKNOWN_LINUX_GNU_IMAGE -e CROSS_CUSTOM_TOOLCHAIN -e CROSS_DEBUG -e TERM -e 'USER=emil' -e 'CROSS_RUSTC_MAJOR_VERSION=1' -e 'CROSS_RUSTC_MINOR_VERSION=80' -e 'CROSS_RUSTC_PATCH_VERSION=0' --name cross-nightly-x86_64-unknown-linux-gnu-bd83c-791adf759-x86_64-unknown-linux-gnu-abea3-1716417687202 --rm --user 1001:1001 -v /home/emil/.xargo:/home/emil/.xargo:z -v /home/emil/.cargo:/home/emil/.cargo:z -v /home/emil/.cargo/bin -v /home/emil/hellow-world:/home/emil/hellow-world:z -v /home/emil/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu:/home/emil/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu:z,ro -v /home/emil/hellow-world/target:/target:z -w /home/emil/hellow-world -t ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main-centos sh -c 'PATH="$PATH":"/home/emil/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin" cargo build --target x86_64-unknown-linux-gnu -v'
   Compiling hellow-world v0.1.0 (/home/emil/hellow-world)
     Running `rustc --crate-name hellow_world --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=182 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values())' -C metadata=2ab283230da12896 -C extra-filename=-2ab283230da12896 --out-dir /target/x86_64-unknown-linux-gnu/debug/deps --target x86_64-unknown-linux-gnu -C incremental=/target/x86_64-unknown-linux-gnu/debug/incremental -L dependency=/target/x86_64-unknown-linux-gnu/debug/deps -L dependency=/target/debug/deps`

this might actually have been broken for some time, I can see that our bisect test is not failing as intended. Should fix that

this is also related to #1511 (reply in thread)