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 cargo-update on Windows #43

Closed ivandardi closed 7 years ago

ivandardi commented 7 years ago

I do have CMake installed and I keep getting this error:

error: failed to run custom build command for `libssh2-sys v0.2.6`
process didn't exit successfully: `C:\Users\Ivan\AppData\Local\Temp\cargo-install.LTkoVxeQFh0P\release\build\libssh2-sys-d3fb74f89e26155a\build-script-build` (exit code: 101)
--- stdout
running: "cmake" "C:\\Users\\Ivan\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\libssh2-sys-0.2.6\\libssh2" "-G" "Visual Studio 14 2015 Win64" "-DCRYPTO_BACKEND=WinCNG" "-DZLIB_INCLUDE_DIR=C:\\Users\\Ivan\\AppData\\Loca
l\\Temp\\cargo-install.LTkoVxeQFh0P\\release\\build\\libz-sys-26642ca3039fad06\\out/include" "-DBUILD_SHARED_LIBS=OFF" "-DENABLE_ZLIB_COMPRESSION=ON" "-DCMAKE_INSTALL_LIBDIR=lib" "-DBUILD_EXAMPLES=OFF" "-DBUILD_TESTING=OFF" "-
DCMAKE_INSTALL_PREFIX=C:\\Users\\Ivan\\AppData\\Local\\Temp\\cargo-install.LTkoVxeQFh0P\\release\\build\\libssh2-sys-d3774949694dd1df\\out" "-DCMAKE_C_FLAGS= /nologo /MD" "-DCMAKE_C_FLAGS_RELEASE= /nologo /MD" "-DCMAKE_CXX_FLA
GS= /nologo /MD" "-DCMAKE_CXX_FLAGS_RELEASE= /nologo /MD" "-DCMAKE_BUILD_TYPE=Release"

--- stderr
fatal: Not a git repository (or any of the parent directories): .git
thread 'main' panicked at '
failed to execute command: The system cannot find the file specified. (os error 2)
is `cmake` not installed?

build script failed, must exit now', .cargo\registry\src\github.com-1ecc6299db9ec823\cmake-0.1.24\src\lib.rs:593
stack backtrace:
   0: std::sys_common::backtrace::_print
             at C:\projects\rust\src\libstd\sys_common\backtrace.rs:94
   1: std::panicking::default_hook::{{closure}}
             at C:\projects\rust\src\libstd\panicking.rs:354
   2: std::panicking::default_hook
             at C:\projects\rust\src\libstd\panicking.rs:371
   3: std::panicking::rust_panic_with_hook
             at C:\projects\rust\src\libstd\panicking.rs:549
   4: std::panicking::begin_panic<alloc::string::String>
             at C:\projects\rust\src\libstd\panicking.rs:511
   5: std::panicking::begin_panic_fmt
             at C:\projects\rust\src\libstd\panicking.rs:495
   6: cmake::Config::build
   7: cmake::Config::build
   8: cmake::Config::build
   9: ZIG_NORM_F
  10: panic_unwind::__rust_maybe_catch_panic
             at C:\projects\rust\src\libpanic_unwind\lib.rs:98
  11: std::rt::lang_start
             at C:\projects\rust\src\libstd\rt.rs:52
  12: __scrt_common_main_seh
             at f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:253
  13: BaseThreadInitThunk

warning: build failed, waiting for other jobs to finish...
error: failed to compile `cargo-update v1.1.1`, intermediate artifacts can be found at `C:\Users\Ivan\AppData\Local\Temp\cargo-install.LTkoVxeQFh0P`

Caused by:
  build failed
mati865 commented 7 years ago
failed to execute command: The system cannot find the file specified. (os error 2)
is `cmake` not installed?

Try running cmake from cmd/powershell, it it doesn't work you will have to install it or add to PATH.

nabijaczleweli commented 7 years ago

The not-a-repo issue is a known one (to me; yelling at libssh2's maintainer would prolly help) - it stems from its dependency which is git submoduled not being actually cloned as submodule. I fixed that by manually cloning it into there, but you may run into some more issues afterwards I can't fix remotely (and which altogether took me a better part of 5 hours, though I hoped they were my-fucked-up-system-specific; again, yelling at `

nabijaczleweli commented 7 years ago

libssh2` maintainer(s) could help bring closure upon this).

ivandardi commented 7 years ago

Apparently I needed to restart my computer for CMake to magically appear on my PATH. Now it works for compiling. Yeah, we probably need to talk to libssh2's maintainer to fix that, because it's affecting crates that depend on it.