Skip to content

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

Closed
@ark-

Description

@ark-

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.

Activity

oli-obk

oli-obk commented on Oct 17, 2017

@oli-obk
Contributor

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-

ark- commented on Oct 18, 2017

@ark-
Author

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @oli-obk@phansch@ark-

        Issue actions

          Clippy fails as subcommand on Windows when rustc installed via installer · Issue #2142 · rust-lang/rust-clippy