libgit2/git2go

Macbook M1 support

jcrqr opened this issue · 2 comments

jcrqr commented

Hey there!

Has anyone been able to use this package with an M1 Macbook? I'm having some issues when go getting the package and I'm not really sure what I should do:

$ go get github.com/libgit2/git2go/v32
# github.com/libgit2/git2go/v32
Undefined symbols for architecture arm64:
  "_git_remote_name_is_valid", referenced from:
      __cgo_c4e5c3df4da7_Cfunc_git_remote_name_is_valid in _x033.o
     (maybe you meant: __cgo_c4e5c3df4da7_Cfunc_git_remote_name_is_valid)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I've installed libgit2 using Homebrew: brew install libgit2.

Output from pkg-config:

$ pkg-config --cflags -- libgit2
-I/opt/homebrew/Cellar/libgit2/1.2.0/include

Appreciate any help, thanks in advance!

It's not a question about the M1 Macbook, rather there's a bug in libgit2 1.2.0 :S #834

Closing this as duplicate