Skip to content

Can't use clippy on windows ? #2317

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

Closed
driftluo opened this issue Jan 3, 2018 · 2 comments
Closed

Can't use clippy on windows ? #2317

driftluo opened this issue Jan 3, 2018 · 2 comments
Labels
C-bug Category: Clippy is not doing the correct thing

Comments

@driftluo
Copy link

driftluo commented Jan 3, 2018

C:\Users\luoch>systeminfo | findstr Build
OS 版本:          10.0.15063 暂缺 Build 15063
$ rustc +nightly --version
rustc 1.24.0-nightly (b65f0bedd 2018-01-01)

cargo.toml

[dependencies.clippy]
optional = true
version = "^0.0.177"

lib.rs

#![cfg_attr(feature="clippy", feature(plugin))]
#![cfg_attr(feature="clippy", plugin(clippy))]

run it:

$ cargo +nightly check --features clippy
   Compiling clippy v0.0.177
error: linking with `gcc` failed: exit code: 1
  |
  = note: "gcc" "-Wl,--enable-long-section-names" "-fno-use-linker-plugin" "-Wl,--nxcompat" "-nostdlib" "-m64" "C:\\Users\\luoch\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\dllcrt2.o" "C:\\Users\\luoch\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\rsbegin.o" "-L" "C:\\Users\\luoch\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "E:\\Rust_work\\forustm\\target\\debug\\deps\\clippy-a3117709a6db22eb.clippy0.rcgu.o" "E:\\Rust_work\\forustm\\target\\debug\\deps\\clippy-a3117709a6db22eb.clippy1.rcgu.o" "E:\\Rust_work\\forustm\\target\\debug\\deps\\clippy-a3117709a6db22eb.clippy10.rcgu.o" "E:\\Rust_work\\forustm\\target\\debug\\deps\\clippy-a3117709a6db22eb.clippy11.rcgu.o" "E:\\Rust_work\\forustm\\target\\debug\\deps\\clippy-a3117709a6db22eb.clippy12.rcgu.o" "E:\\Rust_work\\forustm\\target\\debug\\deps\\clippy-a3117709a6db22eb.clippy13.rcgu.o" "E:\\Rust_work\\forustm\\target\\debug\\deps\\clippy-a3117709a6db22eb.clippy14.rcgu.o" "E:\\Rust_work\\forustm\\target\\debug\\deps\\clippy-a3117709a6db22eb.clippy15.rcgu.o" "E:\\Rust_work\\forustm\\target\\debug\\deps\\clippy-a3117709a6db22eb.clippy2.rcgu.o" "E:\\Rust_work\\forustm\\target\\debug\\deps\\clippy-a3117709a6db22eb.clippy3.rcgu.o" "E:\\Rust_work\\forustm\\target\\debug\\deps\\clippy-a3117709a6db22eb.clippy4.rcgu.o" "E:\\Rust_work\\forustm\\target\\debug\\deps\\clippy-a3117709a6db22eb.clippy5.rcgu.o" "E:\\Rust_work\\forustm\\target\\debug\\deps\\clippy-a3117709a6db22eb.clippy6.rcgu.o" "E:\\Rust_work\\forustm\\target\\debug\\deps\\clippy-a3117709a6db22eb.clippy7.rcgu.o" "E:\\Rust_work\\forustm\\target\\debug\\deps\\clippy-a3117709a6db22eb.clippy8.rcgu.o" "E:\\Rust_work\\forustm\\target\\debug\\deps\\clippy-a3117709a6db22eb.clippy9.rcgu.o" "-o" "E:\\Rust_work\\forustm\\target\\debug\\deps\\clippy-a3117709a6db22eb.dll" "E:\\Rust_work\\forustm\\target\\debug\\deps\\clippy-a3117709a6db22eb.crate.metadata.rcgu.o" "E:\\Rust_work\\forustm\\target\\debug\\deps\\clippy-a3117709a6db22eb.crate.allocator.rcgu.o" "-nodefaultlibs" "-L" "E:\\Rust_work\\forustm\\target\\debug\\deps" "-L" "C:\\Users\\luoch\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-Wl,-Bstatic" "-Wl,--whole-archive" "C:\\Users\\luoch\\AppData\\Local\\Temp\\rustc.HWJ2nElyajtx\\libclippy_lints-d2c21a74c004751c.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "C:\\Users\\luoch\\AppData\\Local\\Temp\\rustc.HWJ2nElyajtx\\libif_chain-1967d468be889e6d.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "C:\\Users\\luoch\\AppData\\Local\\Temp\\rustc.HWJ2nElyajtx\\libpulldown_cmark-6ce301c9d5f638a2.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "C:\\Users\\luoch\\AppData\\Local\\Temp\\rustc.HWJ2nElyajtx\\libitertools-f8e83514b4303710.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "C:\\Users\\luoch\\AppData\\Local\\Temp\\rustc.HWJ2nElyajtx\\libeither-77e72721bba1aac6.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "C:\\Users\\luoch\\AppData\\Local\\Temp\\rustc.HWJ2nElyajtx\\liblazy_static-1ad603312f3fd4bf.rlib" "-Wl,--no-whole-archive" "-L" "C:\\Users\\luoch\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-Wl,-Bdynamic" "-l" "rustc_plugin-42aef87285799ffe" "-L" "C:\\Users\\luoch\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-l" "rustc_metadata-75e2081f94ac84e6" "-Wl,-Bstatic" "-Wl,--whole-archive" "C:\\Users\\luoch\\AppData\\Local\\Temp\\rustc.HWJ2nElyajtx\\libquine_mc_cluskey-64056095bf6cffef.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "C:\\Users\\luoch\\AppData\\Local\\Temp\\rustc.HWJ2nElyajtx\\libregex_syntax-6d3e11b6c7adeba1.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "C:\\Users\\luoch\\AppData\\Local\\Temp\\rustc.HWJ2nElyajtx\\libtoml-dc05d049214715e7.rlib" "-Wl,--no-whole-archive" "-L" "C:\\Users\\luoch\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-Wl,-Bdynamic" "-l" "rustc_typeck-f79db586c9206bcd" "-L" "C:\\Users\\luoch\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-l" "rustc_platform_intrinsics-5b52aec4dc7b69e7" "-Wl,-Bstatic" "-Wl,--whole-archive" "C:\\Users\\luoch\\AppData\\Local\\Temp\\rustc.HWJ2nElyajtx\\libsemver-f03d6d3238c7a3ce.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "C:\\Users\\luoch\\AppData\\Local\\Temp\\rustc.HWJ2nElyajtx\\libsemver_parser-f557135a484211ba.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "C:\\Users\\luoch\\AppData\\Local\\Temp\\rustc.HWJ2nElyajtx\\liburl-61c99bdff68264a1.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "C:\\Users\\luoch\\AppData\\Local\\Temp\\rustc.HWJ2nElyajtx\\libpercent_encoding-4b6ce9f2d68e0b3d.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "C:\\Users\\luoch\\AppData\\Local\\Temp\\rustc.HWJ2nElyajtx\\libidna-9db0d76e96ca003a.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "C:\\Users\\luoch\\AppData\\Local\\Temp\\rustc.HWJ2nElyajtx\\libunicode_bidi-716ead3baaf65cdd.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "C:\\Users\\luoch\\AppData\\Local\\Temp\\rustc.HWJ2nElyajtx\\libunicode_normalization-ed1f940b2b3ad812.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "C:\\Users\\luoch\\AppData\\Local\\Temp\\rustc.HWJ2nElyajtx\\libmatches-f3ed3ad203cefe77.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "C:\\Users\\luoch\\AppData\\Local\\Temp\\rustc.HWJ2nElyajtx\\libbitflags-7e0c206b0be6adbb.rlib" "-Wl,--no-whole-archive" "-L" "C:\\Users\\luoch\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-Wl,-Bdynamic" "-l" "syntax_ext-d8397aa0400d2fa8" "-L" "C:\\Users\\luoch\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-l" "proc_macro-b7148af95fd69620" "-Wl,-Bstatic" "-Wl,--whole-archive" "C:\\Users\\luoch\\AppData\\Local\\Temp\\rustc.HWJ2nElyajtx\\libserde-6858ff28f5100aa2.rlib" "-Wl,--no-whole-archive" "-L" "C:\\Users\\luoch\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-Wl,-Bdynamic" "-l" "rustc_const_eval-d808000a0eeb6003" "-L" "C:\\Users\\luoch\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-l" "rustc-191d14b87a9a0d74" "-L" "C:\\Users\\luoch\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-l" "test-7f8edfc5508b21e6" "-L" "C:\\Users\\luoch\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-l" "rustc_const_math-7228c878845b6d3b" "-L" "C:\\Users\\luoch\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-l" "rustc_back-15d32883c82941c6" "-L" "C:\\Users\\luoch\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-l" "graphviz-b60cb81fd28db740" "-L" "C:\\Users\\luoch\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-l" "fmt_macros-606e375f2031fc9d" "-L" "C:\\Users\\luoch\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-l" "syntax-6f536adbc8f54603" "-L" "C:\\Users\\luoch\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-l" "rustc_errors-873775c9d7bd7be5" "-L" "C:\\Users\\luoch\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-l" "syntax_pos-4670b6299eb658a0" "-L" "C:\\Users\\luoch\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-l" "rustc_data_structures-fb38e207a42ce57b" "-L" "C:\\Users\\luoch\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-l" "term-ef7ad31a59e18c57" "-L" "C:\\Users\\luoch\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-l" "serialize-c6f97010da8afb41" "-L" "C:\\Users\\luoch\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-l" "rustc_cratesio_shim-7ca03b3bb6bec15f" "-L" "C:\\Users\\luoch\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-l" "arena-9e1504a3f44bc4a2" "-L" "C:\\Users\\luoch\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-l" "std-b797d7345ed978a7" "-Wl,-Bstatic" "C:\\Users\\luoch\\AppData\\Local\\Temp\\rustc.HWJ2nElyajtx\\libcompiler_builtins-9bcf6ceb38a65e4c.rlib" "-Wl,-Bdynamic" "-l" "psapi" "-l" "dbghelp" "-l" "kernel32" "-l" "advapi32" "-l" "kernel32" "-l" "advapi32" "-l" "ws2_32" "-l" "userenv" "-l" "shell32" "-shared" "-lmingwex" "-lmingw32" "-lgcc" "-lmsvcrt" "-luser32" "-lkernel32" "C:\\Users\\luoch\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\rsend.o"
  = note: ld: cannot find -ldbghelp

but I can do other action with nightly and stable rustc, so what's happen?

@Rantanen
Copy link
Contributor

Rantanen commented Jan 5, 2018

Caused most likely by rust-lang/rust#47029. Should affect only the nightly-windows-gnu compiler.

You should be able to work around the issue by using the nightly-windows-msvc compiler.

@phansch phansch added the C-bug Category: Clippy is not doing the correct thing label Apr 2, 2018
@mati865
Copy link
Contributor

mati865 commented Jan 3, 2019

It should be closed because:

  • running as compiler plugin is not supported anymore
  • it's Rust bug

@flip1995 flip1995 closed this as completed Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing
Projects
None yet
Development

No branches or pull requests

5 participants