nabijaczleweli / cargo-update

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

Cannot install from MSYS2 shell #105

Closed kozross closed 5 years ago

kozross commented 5 years ago

I'm trying to build in an MSYS2 shell, using cargo. Full backtrace (from RUST_BACKTRACE=1):

$ RUST_BACKTRACE=1 cargo install cargo-update
    Updating crates.io index
  Installing cargo-update v1.7.0
   Compiling cc v1.0.37
   Compiling winapi-x86_64-pc-windows-gnu v0.4.0
   Compiling libc v0.2.54
   Compiling pkg-config v0.3.14
   Compiling winapi v0.3.7
   Compiling proc-macro2 v0.4.30
   Compiling matches v0.1.8
   Compiling unicode-xid v0.1.0
   Compiling smallvec v0.6.9
   Compiling memchr v2.2.0
   Compiling syn v0.15.34
   Compiling serde v1.0.91
   Compiling percent-encoding v1.0.1
   Compiling cfg-if v0.1.7
   Compiling embed-resource v1.2.0
   Compiling ucd-util v0.1.3
   Compiling lazy_static v1.3.0
   Compiling regex v1.1.6
   Compiling unicode-width v0.1.5
   Compiling utf8-ranges v1.0.2
   Compiling bitflags v1.0.4
   Compiling vec_map v0.8.1
   Compiling semver-parser v0.7.0
   Compiling strsim v0.8.0
   Compiling lazysort v0.2.1
   Compiling json v0.11.13
   Compiling array_tool v1.0.3
   Compiling unicode-bidi v0.3.4
   Compiling log v0.4.6
   Compiling unicode-normalization v0.1.8
   Compiling thread_local v0.3.6
   Compiling cargo-update v1.7.0
   Compiling textwrap v0.11.0
   Compiling tabwriter v1.1.0
   Compiling regex-syntax v0.6.6
error: failed to run custom build command for `cargo-update v1.7.0`
process didn't exit successfully: `C:\msys64\tmp\cargo-install8pHd9U\release\build\cargo-update-841785adc4faaf10\build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'Failed to execute windres: Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." }', src\libcore\result.rs:997:5
stack backtrace:
   0: std::sys_common::backtrace::_print
             at src\libstd\sys\windows\backtrace/mod.rs:94
             at src\libstd\sys\windows\backtrace/mod.rs:81
             at src\libstd\sys_common/backtrace.rs:70
   1: std::panicking::default_hook::{{closure}}
             at src\libstd\sys_common/backtrace.rs:58
             at src\libstd/panicking.rs:200
   2: std::panicking::default_hook
             at src\libstd/panicking.rs:215
   3: std::panicking::rust_panic_with_hook
             at src\libstd/panicking.rs:478
   4: std::panicking::continue_panic_fmt
             at src\libstd/panicking.rs:385
   5: rust_begin_unwind
             at src\libstd/panicking.rs:312
   6: core::panicking::panic_fmt
             at src\libcore/panicking.rs:85
   7: core::result::unwrap_failed
   8: embed_resource::windows_not_msvc::compile_resource
   9: embed_resource::compile
  10: std::rt::lang_start::{{closure}}
  11: std::panicking::try::do_call
             at src\libstd/rt.rs:49
             at src\libstd/panicking.rs:297
  12: _rust_maybe_catch_panic
             at src\libpanic_unwind/lib.rs:87
  13: std::rt::lang_start_internal
             at src\libstd/panicking.rs:276
             at src\libstd/panic.rs:388
             at src\libstd/rt.rs:48
  14: main
  15: _tmainCRTStartup
  16: mainCRTStartup
  17: unit_addrs_search
  18: unit_addrs_search

warning: build failed, waiting for other jobs to finish...
error: failed to compile `cargo-update v1.7.0`, intermediate artifacts can be found at `C:\msys64\tmp\cargo-install8pHd9U`

Caused by:
  build failed

I'm not sure exactly what file is supposedly missing here.

nabijaczleweli commented 5 years ago

Hi, sorry for the delay, but: that was meant to indicate (I have now changed it to be less confusing) that windres was not found on your system under $PATH. The way to mitigate that is to either install windres if you don't have it already (which I doubt) or put the windres-executable-containing directory in your $PATH.

kozross commented 5 years ago

@nabijaczleweli Thanks for that - I have just attempted to build cargo-update after installing windres, and it worked. Closing.