nabijaczleweli / cargo-update

A cargo subcommand for checking and applying updates to installed executables
MIT License
1.22k stars 42 forks source link

Unable to install v0.6.2 on Windows with rust 1.13.0 #19

Closed ViktorHavrysh closed 7 years ago

ViktorHavrysh commented 7 years ago

Not sure what's going wrong, here is the result:

$ RUST_BACKTRACE=1 cargo install cargo-update
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling array_tool v0.3.3
   Compiling utf8-ranges v0.1.3
   Compiling regex-syntax v0.3.9
   Compiling libc v0.2.18
   Compiling unicode-width v0.1.3
   Compiling cargo-update v0.6.2
   Compiling json v0.11.3
   Compiling strsim v0.5.2
   Compiling memchr v0.1.11
   Compiling tabwriter v0.1.25
   Compiling lazy_static v0.2.2
   Compiling aho-corasick v0.5.3
   Compiling winapi v0.2.8
   Compiling bitflags v0.7.0
   Compiling ansi_term v0.9.0
Build failed, waiting for other jobs to finish...
error: failed to compile `cargo-update v0.6.2`, intermediate artifacts can be found at `C:\Users\VICTOR~1\AppData\Local\Temp\cargo-install.O2vS7XrFsGJe`

Caused by:
  failed to run custom build command for `cargo-update v0.6.2`
process didn't exit successfully: `C:\Users\VICTOR~1\AppData\Local\Temp\cargo-install.O2vS7XrFsGJe\release\build\cargo-update-32000c146366c1f1\build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'Are you sure you have RC.EXE in your $PATH?: Error { repr: Os { code: 2, message: "The system cannot find the file specified." } }', ../src/libcore\result.rs:799
stack backtrace:
   0:     0x7ff702fe0a94 - <std::io::error::ErrorKind as core::fmt::Debug>::fmt::h4c8259105642d5e7
   1:     0x7ff702fdecd3 - std::rt::lang_start::h538f8960e7644c80
   2:     0x7ff702fdf5dd - std::panicking::rust_panic_with_hook::hc303199e04562edf
   3:     0x7ff702fdf476 - std::panicking::begin_panic_fmt::hc321cece241bb2f5
   4:     0x7ff702fdf394 - std::panicking::begin_panic_fmt::hc321cece241bb2f5
   5:     0x7ff702fdf32b - rust_begin_unwind
   6:     0x7ff702fe4285 - core::panicking::panic_fmt::h27224b181f9f037f
   7:     0x7ff702fd116f - __ImageBase
   8:     0x7ff702fd1721 - __ImageBase
   9:     0x7ff702fe2f61 - _rust_maybe_catch_panic
  10:     0x7ff702fde70a - std::rt::lang_start::h538f8960e7644c80
  11:     0x7ff702fe7298 - __scrt_common_main_seh
                        at f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:253
  12:     0x7ffe8a848101 - BaseThreadInitThunk

What is RC.EXE and why does it have to be in my $PATH?

nabijaczleweli commented 7 years ago

What's the output of rustup show if you run it?

ViktorHavrysh commented 7 years ago

Here it is:

$ rustup show
Default host: x86_64-pc-windows-msvc

installed toolchains
--------------------

stable-x86_64-pc-windows-msvc (default)
nightly-x86_64-pc-windows-msvc

active toolchain
----------------

stable-x86_64-pc-windows-msvc (default)
rustc 1.13.0 (2c6933acc 2016-11-07)
nabijaczleweli commented 7 years ago

You're using the MSVC target environment, so you need the MSVC toolchain in your $PATH.

RC.EXE is MSVC's Resource Compiler, we use it to circumvent Windows' terribleness that is auto-elevation.

ViktorHavrysh commented 7 years ago

Okay, I found this file in C:\Program Files (x86)\Windows Kits\10\bin\x64, added that to $PATH, and it worked. Thanks for your help.

nabijaczleweli commented 7 years ago

Glad it worked.