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

can't build with default rustc master setup #4651

Closed
matthiaskrgr opened this issue Oct 11, 2019 · 7 comments · Fixed by #4654
Closed

can't build with default rustc master setup #4651

matthiaskrgr opened this issue Oct 11, 2019 · 7 comments · Fixed by #4654

Comments

@matthiaskrgr
Copy link
Member

We used to be able to

rustup-toolchain-install-master -n master  -f
cargo +master build

but this no longe works due to minimized std I think: rust-lang/rust#64823

When I try the procedure that previously worked, I just get

   Compiling clippy_lints v0.0.212 (/home/matthias/vcs/github/rust-clippy/clippy_lints)
error[E0463]: can't find crate for `fmt_macros`
  --> clippy_lints/src/lib.rs:20:1
   |
20 | extern crate fmt_macros;
   | ^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate

error: aborting due to previous error

We probably need to update at least the docs and CI...

@RalfJung
Copy link
Member

Yeah, you need to add -c rustc-dev to the rustup-toolchain-install-master invocation.

@kaimast
Copy link

kaimast commented Nov 11, 2019

I get this error when running cargo install --git https://github.com/rust-lang/rust-clippy --force clippy.

What am I doing wrong?

@RalfJung
Copy link
Member

RalfJung commented Nov 11, 2019

@kaimast What is the toolchain you are using? rustc --version should tell you. Clippy only compiles with some very specific recent Rust versions. Please make sure you follow the documentation for how to install the right version of Rust for clippy development.

OTOH, I don't think there's any reason to use cargo install for clippy, you can use rustup component add clippy if you just want to use it. This, too, is documented.

@kaimast
Copy link

kaimast commented Nov 11, 2019

Thanks that actually resolves it!

I tried to install using rustup before, but it does not seem to work for me with nightly?

error: component 'clippy' for target 'x86_64-unknown-linux-gnu' is unavailable for download for channel nightly
kai@bravos ~/d/data-pods> rustc --version
rustc 1.40.0-nightly (3fc30d884 2019-11-10)

@RalfJung
Copy link
Member

Not all nightlies come with clippy, yes. See https://rust-lang.github.io/rustup-components-history/ for which tool is present in which recent nightly.

Latest rustup has a way to automatically test older and older nightlies until you get one that has the tool you want... see https://blog.rust-lang.org/2019/10/15/Rustup-1.20.0.html.

@fabio-oesch
Copy link

I'm stuck with this issue as well. I tried to follow the instructions but after rustup self update and then rustup component add clippy I still get the error error: component 'clippy' for target 'x86_64-unknown-linux-gnu' is unavailable for download for channel nightly. I cannot figure out how to install it. I tried to look at the link you linked but trying something like rustup toolchain install nightly -c clippy only yield

info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: latest update on 2019-12-02, rust version 1.41.0-nightly (4007d4ef2 2019-12-01)
info: skipping nightly which is missing installed component 'clippy-preview'
error: component 'clippy' for target 'x86_64-unknown-linux-gnu' is unavailable for download for channel nightly

Do I need to specify a specific version from where I can download clippy?

% rustup -V
rustup 1.20.2 (13979c968 2019-10-16)

@flip1995
Copy link
Member

flip1995 commented Dec 2, 2019

Clippy is not in nightly since Nov 25. We're working hard to get it back in a nightly ASAP. See https://rust-lang.github.io/rustup-components-history/index.html

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

Successfully merging a pull request may close this issue.

5 participants