Skip to content

Commit 43c1f64

Browse files
committed
build(macos): don't use ssh feature for git2 dependency
Using the `ssh` feature induces a dependency on `openssl`. On my Macbook, this produced the following linking error: ``` = note: Undefined symbols for architecture x86_64: "_OPENSSL_init_ssl", referenced from: std::sync::once::Once::call_once::_$u7b$$u7b$closure$u7d$$u7d$::he73245cadb6fb5f7 (.llvm.1763620816825828942) in libopenssl_sys-e129a1c9f9682ba1.rlib(openssl_sys-e129a1c9f9682ba1.openssl_sys.dn7psuzk-cgu.6.rcgu.o) core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h2d3710fadd6753f9 (.llvm.1763620816825828942) in libopenssl_sys-e129a1c9f9682ba1.rlib(openssl_sys-e129a1c9f9682ba1.openssl_sys.dn7psuzk-cgu.6.rcgu.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) ``` I tried the following: * Running `brew install [email protected]` as per the instructions at https://docs.rs/openssl/0.10.33/openssl/ * Setting the environment variables mentioned in `brew info openssl` * Setting `LIBGIT2_SYS_USE_PKG_CONFIG=1` as mentioned in rust-lang/git2-rs#229 None of these worked. So I'm disabling the `ssh` feature for now. If `git-branchless` needs the `ssh` feature in the future (for example, if we add a Github integration and want it to pull/push directly), then we'll have to resolve the issue properly. It's possible my particular issue is due to running Homebrew on a too-old version of macOS, and that it might be resolved by an OS upgrade and re-installing my Homebrew packages.
1 parent fd21646 commit 43c1f64

File tree

2 files changed

+42
-91
lines changed

2 files changed

+42
-91
lines changed

Cargo.lock

+41-90
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ assert_cmd = "1.0.3"
2222
console = "0.14.0"
2323
cursive = {version = "0.16.3", features = ["crossterm-backend"]}
2424
fn-error-context = "0.1.1"
25-
git2 = "0.13.17"
25+
git2 = {version = "0.13.17", default-features = false}
2626
lazy_static = "1.4.0"
2727
log = "0.4.14"
2828
regex = "1.4.4"

0 commit comments

Comments
 (0)