-
Notifications
You must be signed in to change notification settings - Fork 377
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
cross 0.2.2 hangs forever when CARGO
env var set to cross
#864
Comments
It's unclear how this should work. What This was introduced as a fix in #808 I suppose we could try to detect this scenario and exit early or try to recover. |
I think you just need to remove I had fixed a similar issue in messense/cargo-options@52f8953 |
I don't think this is correct. I think we can have a better solution, since We might want to actually correctly handle all of the above, and I can try adding testing for it: |
I believe setting I'm not sure where it originated from but I know core crates like regex use it, and as a temporary workaround, resorted to pinning to cross v0.2.1 (cc @BurntSushi, this is the cause of the issues you seem to be experiencing) |
Right, I think there's a way to better handle this than how we currently do, since we should be able to detect at a higher level if we're using cross or not, and if so, fallback to I'll work on this. |
This will take a little while since I want to support all of the following, or make it clear we do not support some of these flags:
And then also the following: This will mean playing with multiple It also seems that We can probably break this into 2 PRs so we can get |
Ok main.rs use std::env;
fn main() {
println!("env::var_os(\"CARGO\")={:?}", env::var_os("CARGO"));
println!("env::var(\"CARGO\")={:?}", env::var("CARGO"));
} Output $ cargo run
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
Running `target/debug/envvar`
env::var_os("CARGO")=Some("~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo")
env::var("CARGO")=Ok("~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo")
$ CARGO=cross cargo run
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
Running `target/debug/envvar`
env::var_os("CARGO")=Some("~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo")
env::var("CARGO")=Ok("~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo") |
cross should have a |
What's the intended outcome for that? |
being able to tell |
I think respecting |
To unblock release. See cross-rs/cross#864
To unblock release. See cross-rs/cross#864
Checklist
Describe your issue
cross 0.2.1 works fine when executing with
CARGO=cross
, but 0.2.2 hangs forever.What target(s) are you cross-compiling for?
aarch64-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
cross 0.2.2
Example
0.2.2 broken: https://github.com/PyO3/setuptools-rust/runs/7051863085?check_suite_focus=true
0.2.1 works fine: https://github.com/PyO3/setuptools-rust/runs/7052877232?check_suite_focus=true
Additional information / notes
Local testing shows that it recursively executing
cross metadata
.The text was updated successfully, but these errors were encountered: