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

Build failure on aarch64-darwin (M1)

Open samuela opened this issue 3 years ago • 1 comments

I'm attempting to build a package on an M1 machine that depends on libgit2-sys. This package is known to build successfully on x86_64-darwin. However, I'm getting the following build error on aarch64:

warning: libgit2/src/streams/stransport.c:13:10: fatal error: 'Security/SecureTransport.h' file not found
warning: #include <Security/SecureTransport.h>
warning:          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: 1 error generated.

See https://gist.github.com/samuela/54aa3bfe628c055b6f1f3220a9291e88 for the complete build log.

How can one build git2-rs on aarch64 machines?

samuela avatar Nov 17 '21 07:11 samuela

Adding pkgs.darwin.apple_sdk.frameworks.Security to my nix-shell packages did the trick for me. Not sure what would be required in other situations...

samuela avatar Nov 17 '21 07:11 samuela