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

dev-lang/rust-9999 - cargo clippy: error[E0463]: can't find crate for core #368

Closed
negge opened this issue Sep 26, 2018 · 5 comments
Closed

Comments

@negge
Copy link

negge commented Sep 26, 2018

Redirected here from https://bugs.gentoo.org/667026

After emerging rust-9999 with clippy useflag on, running "cargo clippy" fails with:

$ cargo clippy
    Checking libc v0.2.43                                                                                                                                                         
    Checking unicode-width v0.1.5                                                                                                                                                 
    Checking bitflags v1.0.4                                                                                                                                                      
    Checking cfg-if v0.1.5                                                                                                                                                        
error[E0463]: can't find crate for `core`                                                                                                                                         
                                                                                                                                                                                  
error: aborting due to previous error                                                                                                                                             
                                                                                                                                                                                  
For more information about this error, try `rustc --explain E0463`.                                                                                                               
error: Could not compile `cfg-if`.                                                                                                                                                
warning: build failed, waiting for other jobs to finish...
error[E0463]: can't find crate for `std`                                                                                                                                          
                                                                                                                                                                                  
error: aborting due to previous error                                                                                                                                             
                                                                                                                                                                                  
For more information about this error, try `rustc --explain E0463`.                                                                                                               
error[E0463]: can't find crate for `core`                                                                                                                                         
                                                                                                                                                                                  
error: aborting due to previous error                                                                                                                                             
                                                                                                                                                                                  
For more information about this error, try `rustc --explain E0463`.                                                                                                               
error: Could not compile `libc`.                                                                                                                                                  
warning: build failed, waiting for other jobs to finish...
error: Could not compile `bitflags`.                                                                                                                                              
warning: build failed, waiting for other jobs to finish...
error[E0463]: can't find crate for `core`                                                                                                                                         
                                                                                                                                                                                  
error: aborting due to previous error                                                                                                                                             
                                                                                                                                                                                  
For more information about this error, try `rustc --explain E0463`.                                                                                                               
error: Could not compile `unicode-width`.                                                                                                                                         

To learn more, run the command again with --verbose.
@o01eg
Copy link
Contributor

o01eg commented Sep 26, 2018

There is a workaround: rust-lang/rust-clippy#2874

@lu-zero
Copy link
Member

lu-zero commented Sep 26, 2018

Probably RUSTFLAGS should be set by eselect and part of the env.

We should ask cargo upstream to make it aware of how the toolchain is packaged to make the whole thing transparent (and be instruction compatible e.g. cargo +nightly does not work for us).

@cardoe
Copy link
Contributor

cardoe commented Sep 26, 2018

Well cargo +nightly is a syntax parsed by rustup not cargo. Gentoo could have stubs installed for rustc, cargo, etc that implement the necessary functionality.

@o01eg
Copy link
Contributor

o01eg commented Sep 26, 2018

Actually it's a bug which isn't drawn attention clippy team to. Custom libdir had worked in clippy but was broken sometime.

o01eg added a commit to o01eg/gentoo-rust that referenced this issue Oct 4, 2018
Use multiprocess ecless.
RLS requires analysis and sources.
Fix behaviour if EPYTHON not found.
@o01eg
Copy link
Contributor

o01eg commented Oct 4, 2018

I've managed to fix it in #372 . Use EGIT_OVERRIDE_COMMIT_RUST_LANG_RUST=2bd5993ca25e09b894e4fd6539a2fba64599eee2 due clippy broken in master rust https://rust-lang-nursery.github.io/rust-toolstate/

@cnd cnd closed this as completed in #372 Oct 4, 2018
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

4 participants