git2go icon indicating copy to clipboard operation
git2go copied to clipboard

Allow libgit2 1.4.0

Open darix opened this issue 3 years ago • 9 comments

Any big issues blocking the bump or is it just a case of "allow newer version" as in the past?

darix avatar Feb 22 '22 14:02 darix

no issues that i know of! (although we might want to check out the vendored directory to v1.4.1 instead of v1.4.0, because there were some breaking Windows bugs in v1.4.0)

lhchavez avatar Feb 22 '22 15:02 lhchavez

i just test build gitaly with libgit2 1.4.1 and ran into:

/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: $WORK/b046/_x045.o: in function `_cgo_013e402b01a7_Cfunc_git_transport_smart_proxy_options':
/tmp/go-build/cgo-gcc-prolog:155: undefined reference to `git_transport_smart_proxy_options'
collect2: error: ld returned 1 exit status

they intree v33

darix avatar Feb 22 '22 15:02 darix

I ran into the same issue that @darix has reported above. In my case I created a symlink for libgit2.1.3.dylib and pointed it to libgit2.1.4.0.dylib. This has solved the immediate problem for me. But I would want to build my binary against the latest libgit2.

xiaket avatar Mar 09 '22 11:03 xiaket

Also in case any one want to look into this issue. I'm trying to build this single file on a macos and it failed with:

{~/.Git/etc/go} go build ps1.go
# command-line-arguments
/usr/local/Cellar/go/1.17.2/libexec/pkg/tool/darwin_amd64/link: running clang failed: exit status 1
Undefined symbols for architecture x86_64:
  "_git_transport_smart_proxy_options", referenced from:
      __cgo_bf848eecc823_Cfunc_git_transport_smart_proxy_options in 000044.o
     (maybe you meant: __cgo_bf848eecc823_Cfunc_git_transport_smart_proxy_options)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

libgit2 are installed via homebrew. libgit2: stable 1.4.2 (bottled), HEAD

xiaket avatar Mar 09 '22 11:03 xiaket

I ran into the same issue that @darix has reported above. In my case I created a symlink for libgit2.1.3.dylib and pointed it to libgit2.1.4.0.dylib. This has solved the immediate problem for me. But I would want to build my binary against the latest libgit2.

How could do this?

long2ice avatar Mar 10 '22 08:03 long2ice

Turns out that we need https://github.com/libgit2/libgit2/pull/6278 to land upstream, otherwise there's no way to get the connect options and that would break remote operations that require a proxy.

lhchavez avatar Apr 16 '22 15:04 lhchavez

Would it be OK to also allow v1.5.0?

pjbgf avatar Jul 18 '22 10:07 pjbgf

is this repo abandoned? is there an alternative to it? unable to target newer versions of libgit2 is blocking us right now

We have been using git2go v33 with libgit2 v1.3.1 in a couple of Flux controllers (for example: https://github.com/fluxcd/source-controller). We have been observing intermittent panics with this version. Using git2go compiled with libgit2 v1.5.0 seems to solve the panics, so it'd be great if we could have a new release. I have opened a PR for the same: #929. cc: @lhchavez

aryan9600 avatar Sep 20 '22 12:09 aryan9600