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

Clippy fails as subcommand on Windows when rustc installed via installer #2142

Closed
ark- opened this issue Oct 16, 2017 · 2 comments
Closed

Clippy fails as subcommand on Windows when rustc installed via installer #2142

ark- opened this issue Oct 16, 2017 · 2 comments

Comments

@ark-
Copy link

ark- commented Oct 16, 2017

Installed from here: https://static.rust-lang.org/dist/rust-nightly-x86_64-pc-windows-msvc.msi, --version gives:

rustc 1.22.0-nightly (29ed49fb0 2017-10-15)

The error:

cargo clippy
   Compiling myproject v1.0.0 (file:///D:/myproject)
error[E0463]: can't find crate for `std`

error: aborting due to previous error

thread 'rustc' panicked at 'Box<Any>', src\librustc_errors\lib.rs:525:8
note: Run with `RUST_BACKTRACE=1` for a backtrace.
thread 'main' panicked at 'rustc_thread failed: Any', src\libcore\result.rs:906:4
error: Could not compile `myproject`.

To learn more, run the command again with --verbose.

I have tried setting SYSROOT to the ...\rust-master\src and ...\rust-master\src\librustc where ...\rust-master is cloned from the rust repo (https://github.com/rust-lang/rust) as suggested in the README. This changes nothing.

@oli-obk
Copy link
Contributor

oli-obk commented Oct 17, 2017

SYSROOT is not where the source is, but where the build artifacts are. So usually .rustup/toolchain/nightly, but in case of your manual install, I'm not sure.

Any particular reason you are not using rustup?

@ark-
Copy link
Author

ark- commented Oct 18, 2017

Hi,

Not using rustup because it doesn't work on Windows with a proxy, I'm working in a corporate environment.

Please see the relevent issue in rustup here rust-lang/rustup#581 and as rustup uses reqwest behind the scenes then check out the issue there too seanmonstar/reqwest#185

I think the documentation about SYSROOT needs to be better.

Rust is installed in C:/Program Files/Rust nightly MSVC 1.22, and running rustc --print SYSROOT confirms that.

I reran cargo install clippy --force with SYSROOT set to C:/Program Files/Rust nightly MSVC 1.22, then ran cargo clippy on my project and still get the same errors.

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

No branches or pull requests

3 participants