git2-rs icon indicating copy to clipboard operation
git2-rs copied to clipboard

git2-rs requires openssl but also requires securetransport

Open masklinn opened this issue 3 years ago • 2 comments

Noticed this while trying to setup a new mac using nix instead of .

libgit2 supports both openssl backends and SecureTransport (and will in fact fall back to openssl if it considers SecureTransport too old), and will build just fine with just openssl (or just SecureTransport I assume though I've had a few issues with that).

However git2-rs apparently requires openssl (not entirely clear why) but still forces SecureTransport in build.rs, refusing to build unless both are available, which seems like an unnecessary complication. More so given SecureTransport is apparently deprecated (cf libgit2/libgit2#5914)

masklinn avatar Nov 23 '21 20:11 masklinn

Having the same issue, can't build the package because it can't find SecureTransport.h, did you manage to build it?

Litarvan avatar Jan 10 '22 13:01 Litarvan

Having the same issue, can't build the package because it can't find SecureTransport.h, did you manage to build it?

If you're using nix, built-in frameworks "live" under the darwin.apple_sdk.frameworks namespace so e.g. the Security framework (of which SecureTransport.h is part) is exposed as the darwin.apple_sdk.frameworks.Security nix package.

If you're not using nix, you probably need to pass the info down to the C compiler, according to Apple's docs its probably something like having -framework Security in your LDFLAGS, something along those lines.

masklinn avatar Jan 10 '22 17:01 masklinn