cargo-update: Unable to install

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

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

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

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

@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.