pksunkara / cargo-workspaces

A tool for managing cargo workspaces and their crates, inspired by lerna
MIT License
478 stars 46 forks source link

Cannot install (git linking error) #100

Closed chrisjsewell closed 1 year ago

chrisjsewell commented 1 year ago

Heya, I would love to try this out, but alas the install errors 😢

I am on MacOS x86_64 (not arm64) Ventura and have rust 1.70.0 and git 2.41.0 installed (the latest):

Install stdout (base) chrisjsewell/$ cargo install cargo-workspaces Updating crates.io index Downloaded cargo-workspaces v0.2.42 Downloaded 1 crate (34.6 KB) in 0.30s Installing cargo-workspaces v0.2.42 Updating crates.io index Downloaded errno v0.3.1 Downloaded atty v0.2.14 Downloaded ctrlc v3.4.0 Downloaded oclif v0.4.0 Downloaded heck v0.4.1 Downloaded smol_str v0.2.0 Downloaded dunce v1.0.4 Downloaded cargo-platform v0.1.2 Downloaded form_urlencoded v1.2.0 Downloaded cargo_metadata v0.13.1 Downloaded version_check v0.9.4 Downloaded pkg-config v0.3.27 Downloaded paste v1.0.12 Downloaded jobserver v0.1.26 Downloaded num_cpus v1.15.0 Downloaded glob v0.3.1 Downloaded termcolor v1.2.0 Downloaded home v0.5.5 Downloaded semver v0.11.0 Downloaded either v1.8.1 Downloaded terminal_size v0.1.17 Downloaded serde_spanned v0.6.2 Downloaded os_str_bytes v6.5.1 Downloaded clap_lex v0.2.4 Downloaded globset v0.4.10 Downloaded crossbeam-deque v0.8.3 Downloaded crates-index v0.19.10 Downloaded static_assertions v1.1.0 Downloaded dialoguer v0.9.0 Downloaded clap_derive v3.1.18 Downloaded proc-macro-error v1.0.4 Downloaded camino v1.1.4 Downloaded proc-macro-error-attr v1.0.4 Downloaded crossbeam-utils v0.8.16 Downloaded log v0.4.19 Downloaded toml v0.7.4 Downloaded io-lifetimes v1.0.11 Downloaded textwrap v0.15.2 Downloaded console v0.15.7 Downloaded rayon-core v1.11.0 Downloaded openssl-sys v0.9.88 Downloaded crossbeam-channel v0.5.8 Downloaded toml_edit v0.19.10 Downloaded pest v2.6.0 Downloaded aho-corasick v0.7.20 Downloaded bstr v1.5.0 Downloaded winnow v0.4.6 Downloaded git2 v0.17.2 Downloaded clap v3.1.18 Downloaded idna v0.4.0 Downloaded rustix v0.37.20 Downloaded nix v0.26.2 Downloaded libgit2-sys v0.15.2+1.6.4 Downloaded hex v0.4.3 Downloaded libz-sys v1.1.9 Downloaded rustc-hash v1.1.0 Downloaded tempfile v3.6.0 Downloaded semver-parser v0.10.2 Downloaded strsim v0.10.0 Downloaded fastrand v1.9.0 Downloaded unicode-width v0.1.10 Downloaded crossbeam-epoch v0.9.15 Downloaded percent-encoding v2.3.0 Downloaded toml_datetime v0.6.2 Downloaded ucd-trie v0.1.5 Downloaded rayon v1.7.0 Downloaded zeroize v1.6.0 Downloaded url v2.4.0 Downloaded 68 crates (7.8 MB) in 1.51s (largest was `libz-sys` at 2.4 MB) Compiling libc v0.2.146 Compiling proc-macro2 v1.0.60 Compiling quote v1.0.28 Compiling unicode-ident v1.0.9 Compiling autocfg v1.1.0 Compiling serde v1.0.164 Compiling cfg-if v1.0.0 Compiling pkg-config v0.3.27 Compiling version_check v0.9.4 Compiling bitflags v1.3.2 Compiling crossbeam-utils v0.8.16 Compiling memchr v2.5.0 Compiling tinyvec_macros v0.1.1 Compiling memoffset v0.9.0 Compiling crossbeam-epoch v0.9.15 Compiling indexmap v1.9.3 Compiling thiserror v1.0.40 Compiling tinyvec v1.6.0 Compiling proc-macro-error-attr v1.0.4 Compiling hashbrown v0.12.3 Compiling syn v2.0.18 Compiling io-lifetimes v1.0.11 Compiling syn v1.0.109 Compiling jobserver v0.1.26 Compiling scopeguard v1.1.0 Compiling cc v1.0.79 Compiling proc-macro-error v1.0.4 Compiling unicode-normalization v0.1.22 Compiling rustix v0.37.20 Compiling ucd-trie v0.1.5 Compiling unicode-bidi v0.3.13 Compiling percent-encoding v2.3.0 Compiling lazy_static v1.4.0 Compiling serde_json v1.0.96 Compiling rayon-core v1.11.0 Compiling idna v0.4.0 Compiling form_urlencoded v1.2.0 Compiling crossbeam-deque v0.8.3 Compiling num_cpus v1.15.0 Compiling errno v0.3.1 Compiling crossbeam-channel v0.5.8 Compiling tempfile v3.6.0 Compiling unicode-width v0.1.10 Compiling paste v1.0.12 Compiling semver v1.0.17 Compiling openssl-sys v0.9.88 Compiling libz-sys v1.1.9 Compiling libgit2-sys v0.15.2+1.6.4 Compiling ryu v1.0.13 Compiling camino v1.1.4 Compiling winnow v0.4.6 Compiling log v0.4.19 Compiling itoa v1.0.6 Compiling console v0.15.7 Compiling url v2.4.0 Compiling terminal_size v0.1.17 Compiling aho-corasick v1.0.2 Compiling serde_derive v1.0.164 Compiling thiserror-impl v1.0.40 Compiling fastrand v1.9.0 Compiling static_assertions v1.1.0 Compiling regex-syntax v0.7.2 Compiling os_str_bytes v6.5.1 Compiling heck v0.4.1 Compiling either v1.8.1 Compiling rayon v1.7.0 Compiling clap_lex v0.2.4 Compiling nix v0.26.2 Compiling pest v2.6.0 Compiling textwrap v0.15.2 Compiling atty v0.2.14 Compiling bstr v1.5.0 Compiling semver-parser v0.10.2 Compiling clap_derive v3.1.18 Compiling regex v1.8.4 Compiling aho-corasick v0.7.20 Compiling once_cell v1.18.0 Compiling strsim v0.10.0 Compiling zeroize v1.6.0 Compiling rustc-hash v1.1.0 Compiling fnv v1.0.7 Compiling home v0.5.5 Compiling termcolor v1.2.0 Compiling globset v0.4.10 Compiling dialoguer v0.9.0 Compiling clap v3.1.18 Compiling oclif v0.4.0 Compiling ctrlc v3.4.0 Compiling dunce v1.0.4 Compiling glob v0.3.1 Compiling serde_spanned v0.6.2 Compiling toml_datetime v0.6.2 Compiling toml_edit v0.19.10 Compiling hex v0.4.3 Compiling semver v0.11.0 Compiling cargo-platform v0.1.2 Compiling smol_str v0.2.0 Compiling cargo_metadata v0.13.1 Compiling toml v0.7.4 Compiling git2 v0.17.2 Compiling crates-index v0.19.10 Compiling cargo-workspaces v0.2.42 error: linking with `cc` failed: exit status: 1 | ... error: could not compile `cargo-workspaces` (bin "cargo-ws") due to previous error warning: build failed, waiting for other jobs to finish... error: linking with `cc` failed: exit status: 1 ... "/Users/chrisjsewell/opt/miniconda3/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-f6407837ce798a3b.rlib" "-liconv" "-framework" "Security" "-framework" "CoreFoundation" "-lssl" "-lcrypto" "-lz" "-liconv" "-lSystem" "-lc" "-lm" "-L" "/Users/chrisjsewell/opt/miniconda3/lib/rustlib/x86_64-apple-darwin/lib" "-o" "/var/folders/t2/xbl15_3n4tsb1vr_ccmmtmbr0000gn/T/cargo-installtYp6QV/release/deps/cargo_workspaces-0d84c217cd370c18" "-Wl,-dead_strip" "-nodefaultlibs" = note: Undefined symbols for architecture x86_64: "_iconv", referenced from: _git_fs_path_iconv in liblibgit2_sys-624c9b089b3e5910.rlib(fs_path.o) (maybe you meant: _git_fs_path_iconv_init_precompose, _git_fs_path_iconv_clear , _git_fs_path_iconv ) "_iconv_close", referenced from: _git_fs_path_direach in liblibgit2_sys-624c9b089b3e5910.rlib(fs_path.o) _git_fs_path_iconv_clear in liblibgit2_sys-624c9b089b3e5910.rlib(fs_path.o) _git_fs_path_diriter_free in liblibgit2_sys-624c9b089b3e5910.rlib(fs_path.o) "_iconv_open", referenced from: _git_fs_path_direach in liblibgit2_sys-624c9b089b3e5910.rlib(fs_path.o) _git_fs_path_iconv_init_precompose in liblibgit2_sys-624c9b089b3e5910.rlib(fs_path.o) _git_fs_path_diriter_init in liblibgit2_sys-624c9b089b3e5910.rlib(fs_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-workspaces` (bin "cargo-workspaces") due to previous error error: failed to compile `cargo-workspaces v0.2.42`, intermediate artifacts can be found at `/var/folders/t2/xbl15_3n4tsb1vr_ccmmtmbr0000gn/T/cargo-installtYp6QV`

I am running rust via a conda environment, here is the fully installed environment:

Environment (base) chrisjsewell/$ mamba list # packages in environment at /Users/chrisjsewell/opt/miniconda3: # # Name Version Build Channel argcomplete 1.12.3 pyhd8ed1ab_2 conda-forge atk-1.0 2.36.0 he69c4ee_4 conda-forge beautifulsoup4 4.9.3 pyhb0f4dca_0 conda-forge black 22.6.0 pyhd8ed1ab_0 conda-forge blinker 1.4 py_1 conda-forge boolean.py 3.7 py_0 conda-forge brotlipy 0.7.0 py38hed1de0f_1004 conda-forge bs4 4.9.3 0 conda-forge bzip2 1.0.8 h0d85af4_4 conda-forge c-ares 1.18.1 h0d85af4_0 conda-forge ca-certificates 2023.5.7 h8857fd0_0 conda-forge cairo 1.16.0 h904041c_1014 conda-forge cctools 973.0.1 h351d84c_10 conda-forge cctools_osx-64 973.0.1 h3eff9a4_10 conda-forge certifi 2023.5.7 pyhd8ed1ab_0 conda-forge cffi 1.15.0 py38h1a44b6c_0 conda-forge cfgv 3.3.1 pyhd8ed1ab_0 conda-forge chardet 5.0.0 py38h50d1736_0 conda-forge charset-normalizer 2.1.0 pyhd8ed1ab_0 conda-forge click 8.1.3 py38h50d1736_0 conda-forge colorama 0.4.5 pyhd8ed1ab_0 conda-forge conda 4.13.0 py38h50d1736_1 conda-forge conda-build 3.21.9 py38h50d1736_1 conda-forge conda-forge-pinning 2022.07.01.13.48.55 hd8ed1ab_0 conda-forge conda-pack 0.6.0 pyhd3deb0d_0 conda-forge conda-package-handling 1.8.1 py38hed1de0f_1 conda-forge conda-smithy 3.21.1 pyhd8ed1ab_0 conda-forge cryptography 41.0.1 py38he13da33_0 conda-forge curl 7.86.0 h581aaea_1 conda-forge dataclasses 0.8 pyhc8e2a94_3 conda-forge deprecated 1.2.13 pyh6c4a22f_0 conda-forge distlib 0.3.6 pyhd8ed1ab_0 conda-forge expat 2.5.0 hf0c8a7f_1 conda-forge fftw 3.3.10 nompi_hf082fe4_102 conda-forge filelock 3.7.1 pyhd8ed1ab_0 conda-forge fmt 9.1.0 hb8565cd_0 conda-forge font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge font-ttf-inconsolata 3.000 h77eed37_0 conda-forge font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge font-ttf-ubuntu 0.83 hab24e00_0 conda-forge fontconfig 2.14.0 h676cef8_0 conda-forge fonts-conda-ecosystem 1 0 conda-forge fonts-conda-forge 1 0 conda-forge freetype 2.12.1 h3f81eb7_0 conda-forge fribidi 1.0.10 hbcb3906_0 conda-forge gdk-pixbuf 2.42.8 hb161b9c_0 conda-forge gettext 0.21.1 h8a4c099_0 conda-forge giflib 5.2.1 hbcb3906_2 conda-forge git 2.41.0 pl5321h5c607e1_0 conda-forge gitdb 4.0.9 pyhd8ed1ab_0 conda-forge gitpython 3.1.27 pyhd8ed1ab_0 conda-forge glob2 0.7 py_0 conda-forge graphite2 1.3.13 h2e338ed_1001 conda-forge graphviz 6.0.1 ha8464fc_0 conda-forge gtk2 2.24.33 h7c1209e_2 conda-forge gts 0.7.6 hccb3bdf_2 conda-forge harfbuzz 5.2.0 h52d05a2_0 conda-forge hdf5 1.12.1 nompi_h0aa1fa2_104 conda-forge icu 70.1 h96cf925_0 conda-forge identify 2.5.13 pyhd8ed1ab_0 conda-forge idna 3.3 pyhd8ed1ab_0 conda-forge importlib-metadata 4.8.1 py38hecd8cb5_0 importlib_metadata 4.8.1 hd8ed1ab_0 conda-forge isodate 0.6.1 pyhd8ed1ab_0 conda-forge jinja2 3.1.2 pyhd8ed1ab_1 conda-forge jpeg 9e hac89ed1_2 conda-forge kim-api 2.3.0 h32d3758_0 conda-forge krb5 1.19.3 hb98e516_0 conda-forge lammps 2021.09.29 py38hca48a09_openmpi_2 conda-forge ld64 609 ha328185_10 conda-forge ld64_osx-64 609 h6fbe7a8_10 conda-forge lerc 3.0 he49afe7_0 conda-forge libarchive 3.5.2 hbf7dfe4_3 conda-forge libcurl 7.86.0 h581aaea_1 conda-forge libcxx 14.0.6 hce7ea42_0 conda-forge libdeflate 1.12 hac89ed1_0 conda-forge libedit 3.1.20191231 h0678c8f_2 conda-forge libev 4.33 haf1e3a3_1 conda-forge libexpat 2.5.0 hf0c8a7f_1 conda-forge libffi 3.4.2 h0d85af4_5 conda-forge libgd 2.3.3 h1e214de_3 conda-forge libgfortran 5.0.0 9_3_0_h6c81a4c_23 conda-forge libgfortran5 9.3.0 h6c81a4c_23 conda-forge libglib 2.76.1 h4c723e1_0 conda-forge libiconv 1.17 hac89ed1_0 conda-forge libidn2 2.3.2 h0d85af4_0 conda-forge liblief 0.11.5 he49afe7_1 conda-forge libllvm13 13.0.1 h64f94b2_2 conda-forge libmamba 1.0.0 hfcd2f64_2 conda-forge libmambapy 1.0.0 py38h96ed6f9_2 conda-forge libnghttp2 1.47.0 h5aae05b_1 conda-forge libpng 1.6.38 ha978bb4_0 conda-forge librsvg 2.54.4 h3d48ba6_0 conda-forge libsodium 1.0.18 hbcb3906_1 conda-forge libsolv 0.7.22 hd9580d2_0 conda-forge libsqlite 3.40.0 ha978bb4_0 conda-forge libssh2 1.10.0 h47af595_3 conda-forge libtiff 4.4.0 h9847915_1 conda-forge libtool 2.4.6 he49afe7_1008 conda-forge libunistring 0.9.10 h0d85af4_0 conda-forge libuv 1.44.2 hac89ed1_0 conda-forge libwebp 1.2.4 hfa4350a_0 conda-forge libwebp-base 1.2.4 h775f41a_0 conda-forge libxml2 2.9.14 hea49891_4 conda-forge libzlib 1.2.13 hfd90126_4 conda-forge license-expression 1.2 py_0 conda-forge llvm-openmp 14.0.4 ha654fa7_0 conda-forge lz4-c 1.9.3 he49afe7_1 conda-forge lzo 2.10 haf1e3a3_1000 conda-forge mamba 1.0.0 py38h2cdcfb1_2 conda-forge markupsafe 2.1.1 py38hed1de0f_1 conda-forge mpi 1.0 openmpi conda-forge msrest 0.6.21 pyh44b312d_0 conda-forge mypy_extensions 0.4.3 py38h50d1736_5 conda-forge ncurses 6.3 h96cf925_1 conda-forge nodeenv 1.7.0 pyhd8ed1ab_0 conda-forge nodejs 16.17.1 hd0c9b3c_0 conda-forge oauthlib 3.2.0 pyhd8ed1ab_0 conda-forge openmpi 4.1.4 h8589876_100 conda-forge openssl 3.1.1 h8a1eda9_1 conda-forge packaging 21.0 pyhd8ed1ab_0 conda-forge pandoc 2.14.2 h0d85af4_0 conda-forge pango 1.50.10 h1f197d0_0 conda-forge patch 2.7.6 hbcf498f_1002 conda-forge pathspec 0.9.0 pyhd8ed1ab_0 conda-forge pcre 8.45 he49afe7_0 conda-forge pcre2 10.40 h1c4e4bc_0 conda-forge perl 5.32.1 2_h0d85af4_perl5 conda-forge pip 23.1.1 pypi_0 pypi pixman 0.40.0 hbcb3906_0 conda-forge pkg-config 0.29.2 ha3d46e9_1008 conda-forge pkginfo 1.8.3 pyhd8ed1ab_0 conda-forge platformdirs 2.5.1 pyhd8ed1ab_0 conda-forge pre-commit 2.21.0 py38h50d1736_0 conda-forge psutil 5.9.1 py38h0dd4459_0 conda-forge py-lief 0.11.5 py38ha048514_1 conda-forge pybind11-abi 4 hd8ed1ab_3 conda-forge pycosat 0.6.3 py38hed1de0f_1010 conda-forge pycparser 2.21 pyhd8ed1ab_0 conda-forge pycrypto 2.6.1 py38h96a0964_1006 conda-forge pygithub 1.55 pyh6c4a22f_0 conda-forge pyjwt 2.4.0 pyhd8ed1ab_0 conda-forge pynacl 1.5.0 py38hed1de0f_1 conda-forge pyopenssl 23.2.0 pyhd8ed1ab_1 conda-forge pyparsing 3.0.9 pyhd8ed1ab_0 conda-forge pysocks 1.7.1 py38h50d1736_5 conda-forge python 3.8.15 hf9b03c3_0_cpython conda-forge python-libarchive-c 4.0 py38h50d1736_1 conda-forge python.app 1.4 py38h96a0964_0 conda-forge python_abi 3.8 2_cp38 conda-forge pytz 2022.1 pyhd8ed1ab_0 conda-forge pyyaml 6.0 py38hed1de0f_4 conda-forge readline 8.1.2 h3899abd_0 conda-forge reproc 14.2.3 h0d85af4_0 conda-forge reproc-cpp 14.2.3 he49afe7_0 conda-forge requests 2.28.1 pyhd8ed1ab_0 conda-forge requests-oauthlib 1.3.1 pyhd8ed1ab_0 conda-forge ripgrep 13.0.0 hbbacdb1_2 conda-forge ruamel.yaml 0.17.21 py38hed1de0f_1 conda-forge ruamel.yaml.clib 0.2.6 py38hed1de0f_1 conda-forge ruamel_yaml 0.15.80 py38h0dd4459_1007 conda-forge rust 1.70.0 h7e1429e_0 conda-forge rust-std-x86_64-apple-darwin 1.70.0 h059895a_0 conda-forge scrypt 0.8.18 py38h006d778_4 conda-forge setuptools 49.6.0 py38h50d1736_3 conda-forge sigtool 0.1.3 h88f4db0_0 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge smmap 3.0.5 pyh44b312d_0 conda-forge soupsieve 2.3.1 pyhd8ed1ab_0 conda-forge sqlite 3.39.0 hd9f0692_0 conda-forge tapi 1100.0.11 h9ce4665_0 conda-forge tk 8.6.12 h5dbffcc_0 conda-forge toml 0.10.2 pyhd8ed1ab_0 conda-forge tomli 2.0.1 pyhd8ed1ab_0 conda-forge toolz 0.11.2 pyhd8ed1ab_0 conda-forge tqdm 4.64.0 pyhd8ed1ab_0 conda-forge typed-ast 1.5.4 py38h0dd4459_0 conda-forge typing_extensions 4.3.0 pyha770c72_0 conda-forge ukkonen 1.0.1 py38h98b9b1b_3 conda-forge urllib3 1.26.9 pyhd8ed1ab_0 conda-forge virtualenv 20.17.1 py38h50d1736_0 conda-forge vsts-python-api 0.1.25 pyhd8ed1ab_1 conda-forge wget 1.20.3 hd3787cc_1 conda-forge wheel 0.37.1 pyhd8ed1ab_0 conda-forge wrapt 1.14.1 py38h0dd4459_0 conda-forge xz 5.2.6 h775f41a_0 conda-forge yaml 0.2.5 h0d85af4_2 conda-forge yaml-cpp 0.7.0 hb486fe8_1 conda-forge zipp 3.8.0 pyhd8ed1ab_0 conda-forge zlib 1.2.13 hfd90126_4 conda-forge zstd 1.5.2 ha9df2e0_2 conda-forge

I guess its related to https://github.com/rust-lang/git2-rs/issues/721, but have no idea how to fix

chrisjsewell commented 1 year ago

Note that e.g. cargo-release provides pre-built binaries, that would at least allow for side-stepping such issues: https://github.com/crate-ci/cargo-release/blob/069f4d4fe74a65fab321313d57d7611764a2309e/.github/workflows/post-release.yml#L93

pksunkara commented 1 year ago

You need libgit2 library in your system. #102 will solve this in the next version by calling shell git directly

pksunkara commented 10 months ago

This should be fixed in the next release.