Open vit1251 opened 6 years ago
Please try using make install
to build grv. Using the Makefile method will fetch all dependecies (as they're git submodules) and build them. A static version of libgit2 will be built and included in the final grv binary.
make command right now require checkout and compile inside GOPATH directory. It creates inconvenience. go-1.11 resolve this problem.
Version go-1.11 resolve dependency issue for you and provide comfortable and developer common way to dependencies resolution without reinvent the wheel: custom scenarios, handy source code/module manipulation and etc..
Another one issue is make stop on recipe "install-static" with Error 2. Last error message about libgit2.pc is no exists on execution pkg-config goal with exit status 1.
What you think about original problem in 1-th post? How I can fix it?
The issue is that GRV is tied to git2go (and so libgit2) v0.27 but the version of libgit2 on your system will be different. On my system libgit2 v0.26 is installed, so if I perform the following steps then it will build:
sed -i 's/git2go\.v27/git2go.v26/g' cmd/grv/*.go
go get gopkg.in/libgit2/git2go.v26
go build ./cmd/grv
I agree that modules are the way to proceed in future. However I'm not sure they'll help in this case yet. For example, git2go doesn't tag any releases, they're only available as branches. This is why the import
statements in the source code are tied to a specific version, and why we had to do the sed
command above.
I checkout master source code and try compile with go-1.11 with go.mod dependency manager and receive error:
Do u have version working without patch OS system library?