gitin icon indicating copy to clipboard operation
gitin copied to clipboard

Issues with installing gitin

Open thecsw opened this issue 6 years ago • 9 comments

When installing, it errors out:

~ > go get -u github.com/isacikgoz/gitin
# github.com/libgit2/git2go
go/src/github.com/libgit2/git2go/git_dynamic.go:10:3: error: #error "Invalid libgit2 version; this git2go supports libgit2 v0.27"
   10 | # error "Invalid libgit2 version; this git2go supports libgit2 v0.27"
      |   ^~~~~

thecsw avatar Jul 29 '19 02:07 thecsw

Hey @thecsw , thanks for the feedback I will be looking into this once I come back from vacation. Meanwhile, you can use precompiled version from releases page.

isacikgoz avatar Jul 30 '19 18:07 isacikgoz

@isacikgoz Great, thanks! Will be looking forward to it. For now, I'll grab on of the binaries

thecsw avatar Jul 30 '19 20:07 thecsw

Yes. I am attempting to port this to FreeBSD, and am receiving the same error.

jgh9 avatar Aug 26 '19 21:08 jgh9

Hello @thecsw and @jhelfman,

I added git package into project to reduce complexity of dependencies therefore it is not dependent to isacikgoz/libgit2api anymore. I also switched the git2go dependency to gopkg.in/libgit2/git2go.v27. With this you may able to build gitin with 2 different methods.

  1. You may individually build/install/get libgit2.v27 and use dynamic linking. (you can find docs to how to build libgit2 here or more detailed ones on the internet)
  2. You can statically link via running/building with --tags static parameter. (e.g. go build --tags static) To do this, since gitin uses go modules, you need to do a hack:
    • You need to copy the build folder which is inside the $GOPATH/src/gopkg.in/libgit2/git2go.v27/vendor to $GOPATH/pkg/mod/gopkg.in/libgit2/[email protected]/vendor
    • Now you can use --tags static flag to do static builds.
    • This issue may not be an issue if I didn't use go modules. (I will look for a more appropriate solution to this issue.)

I am able to build with the both alternatives. You may also want to try.

Thanks for all the feedback, and I am looking forward to hear more feedback from you.

isacikgoz avatar Aug 28 '19 13:08 isacikgoz

I'm still trying to figure out how to build this based on the information you've supplied, but no luck as of yet. Will get back to you if and when I do. In the meanwhile, simplifying the build would be excellent.

jgh9 avatar Aug 29 '19 02:08 jgh9

You are right @jhelfman It was as easy as running a simple make before go modules. I will be working on this issue.

isacikgoz avatar Aug 29 '19 07:08 isacikgoz

Thank you, and I appreciate your commitment. Is there a commit I can build against in the meanwhile that would build successfully with ‘make’ until it is worked out? This is actually my first go port, and had no idea they were painful until now. :)

jgh9 avatar Aug 29 '19 14:08 jgh9

Any update on this?

I got some stuff I would like to work on to improve gitin, but can't run it locally. Getting the same errors 😕

reobin avatar Jul 30 '20 17:07 reobin

Sorry for the massive delay on this! I updated the README.md and Makefile. Now it is much easier to build gitin. If you run into troubles feel free to open new issues about it.

isacikgoz avatar Sep 08 '20 21:09 isacikgoz

@isacikgoz Might be time to close this, eh?

yochananmarqos avatar Nov 04 '23 20:11 yochananmarqos

Hah! Thank you, crazy it’s been more than four years. Take care!

thecsw avatar Nov 04 '23 20:11 thecsw