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 #40

Closed balkierode closed 6 years ago

balkierode commented 7 years ago

First, I got an error that cmake was not installed. I installed cmake and then I get the following error

running: "cmake" "--build" "." "--target" "install" "--config" "Release" "--" "-j8"
Scanning dependencies of target libssh2
[  9%] [  9%] [ 14%] [ 19%] [ 23%] Building C object src/CMakeFiles/libssh2.dir/agent.c.o
Building C object src/CMakeFiles/libssh2.dir/comp.c.o
Building C object src/CMakeFiles/libssh2.dir/channel.c.o
Building C object src/CMakeFiles/libssh2.dir/openssl.c.o
[ 28%] Building C object src/CMakeFiles/libssh2.dir/crypt.c.o
cc1: error: unrecognized command line option "-std=gnu90"
cc1: error: unrecognized command line option "-std=gnu90"
[ 33%] gmake[2]: *** [src/CMakeFiles/libssh2.dir/agent.c.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[2]: *** [src/CMakeFiles/libssh2.dir/comp.c.o] Error 1
cc1: error: unrecognized command line option "-std=gnu90"
cc1: error: unrecognized command line option "-std=gnu90"
gmake[2]: *** [src/CMakeFiles/libssh2.dir/openssl.c.o] Error 1
gmake[2]: *** [src/CMakeFiles/libssh2.dir/channel.c.o] Error 1
cc1: error: unrecognized command line option "-std=gnu90"
gmake[2]: *** [src/CMakeFiles/libssh2.dir/crypt.c.o] Error 1
Building C object src/CMakeFiles/libssh2.dir/global.c.o
Building C object src/CMakeFiles/libssh2.dir/hostkey.c.o
cc1: error: unrecognized command line option "-std=gnu90"
gmake[2]: *** [src/CMakeFiles/libssh2.dir/global.c.o] Error 1
cc1: error: unrecognized command line option "-std=gnu90"
gmake[2]: *** [src/CMakeFiles/libssh2.dir/hostkey.c.o] Error 1
gmake[1]: *** [src/CMakeFiles/libssh2.dir/all] Error 2
gmake: *** [all] Error 2

--- stderr
fatal: Not a git repository (or any of the parent directories): .git
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_CXX_COMPILER

thread 'main' panicked at '
command did not execute successfully, got: exit code: 2

build script failed, must exit now', /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.24/src/lib.rs:593
note: Run with `RUST_BACKTRACE=1` for a backtrace.

Build failed, waiting for other jobs to finish...
error: failed to compile `cargo-update v1.1.1`, intermediate artifacts can be found at `/tmp/cargo-install.UvhJhzltj6lc`

Caused by:
  build failed
balkierode commented 7 years ago

rust version 1.8.0. I don't think that matters though

balkierode commented 7 years ago
Using built-in specs.
Target: x86_64-amazon-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --disable-gjdoc --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --disable-libgcj --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-amazon-linux
Thread model: posix
gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC) 
nabijaczleweli commented 7 years ago

Update Rust to 1.18.0. How old even is 1.8.0 at this point?

This is an issue of libgit2 (or, well, technically, libssh2-sys, but it's pulled in by libgit2) I've run across in the past (or one similar thereto, anyway). You're in terra incognita for me now, probably best course of action would be to yell at libssh2-sys maintainer.

balkierode commented 7 years ago

My bad (typo). it is 1.18

nabijaczleweli commented 7 years ago

Aye. Anyway, that "solution" still stands. It's shit, I know (I even wasted a good six hours on it or a similar one but I thought it was just my setup because it's weird), but yelling at the maintainers of libssh2-sys might get us somewhere.

baileyn commented 7 years ago

@balkierode you may need to try upgrading GCC. GCC <= 4.4 only accepted the flag -std=gnu89, but support was later added (after 4.4) to support -std=gnu90. I can't say that's the primary error, but I believe that's your main compiler errors when rust is building libssh2.

perryprog commented 7 years ago

Getting the same problem. Any solution? I kinda want to update my things...

nabijaczleweli commented 7 years ago

@perryprog Did someone finally open an issue over at the libssh2-sys repository? If not, that's the solution. If they did, then the solution is probably there. I have no idea why the libssh2-sys build error happens (and it seems to have different solutions on different systems) so I don't think I can provide anything beside that.

perryprog commented 7 years ago

Paging @balkierode: did you make an issue?

@nabijaczleweli Fair enough, I’ll do some research I suppose.

mati865 commented 7 years ago

The only solution is updating system compiler (GCC in this case).

perryprog commented 7 years ago

@mati865 that’s lovely. I can’t update GCC right now, cause Homebrew doesn’t support High Sierra enough yet. I guess I’ll have to wait!

balkierode commented 7 years ago

@perryprog I didn't open an issue as I moved on to different system now.

nabijaczleweli commented 6 years ago

What's the status on this? @perryprog, does it work after updating GCC? @balkierode, does the issue persist on that "different system"?

perryprog commented 6 years ago

I'm not sure what I changed, (I assume I've updated GCC by now probably) but it installs fine now.

nabijaczleweli commented 6 years ago

Cool and good 👍