nabijaczleweli / cargo-update

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

Can not install in MacOSX #186

Open ricounet67 opened 2 years ago

ricounet67 commented 2 years ago

I have Rust install with Homebrew and I can't install cargo-update. If I run the command cargo install cargo-update, the installation fails at the very end of the process with the following error messages :

  Compiling git2 v0.11.0
error: linking with `cc` failed: exit status: 1
= note: Undefined symbols for architecture x86_64:
            "_libiconv", referenced from:
                _git_path_iconv in liblibgit2_sys-b19a94382bcd229c.rlib(path.o)
            "_libiconv_open", referenced from:
                _git_path_direach in liblibgit2_sys-b19a94382bcd229c.rlib(path.o)
                _git_path_iconv_init_precompose in liblibgit2_sys-b19a94382bcd229c.rlib(path.o)
                _git_path_diriter_init in liblibgit2_sys-b19a94382bcd229c.rlib(path.o)
            "_libiconv_close", referenced from:
                _git_path_direach in liblibgit2_sys-b19a94382bcd229c.rlib(path.o)
                _git_path_iconv_clear in liblibgit2_sys-b19a94382bcd229c.rlib(path.o)
                _git_path_diriter_free in liblibgit2_sys-b19a94382bcd229c.rlib(path.o)
                _git_path_dirload in liblibgit2_sys-b19a94382bcd229c.rlib(path.o)
          ld: symbol(s) not found for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

error: could not compile `cargo-update` due to previous error
error: failed to compile `cargo-update v8.1.4`, intermediate artifacts can be found at `/var/folders/1n/ghmw9sj13m3428cl4z3_x0bm0000gn/T/cargo-installicU40Z`

I have a MacBook Pro with an Intel processor running Mac OSX 12.5.1

nabijaczleweli commented 2 years ago

Looks similar to #176, which was forwarded to https://github.com/rust-lang/git2-rs/issues/830, which was forwarded to https://gitlab.kitware.com/cmake/cmake/-/issues/23515