Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile under go1.11 with libgit2-dev #75

Open
vit1251 opened this issue Sep 13, 2018 · 3 comments
Open

Compile under go1.11 with libgit2-dev #75

vit1251 opened this issue Sep 13, 2018 · 3 comments

Comments

@vit1251
Copy link

vit1251 commented Sep 13, 2018

I checkout master source code and try compile with go-1.11 with go.mod dependency manager and receive error:

could not determine kind of name for C.git_blob_create_fromstream
could not determine kind of name for C.git_blob_create_fromstream_commit

Do u have version working without patch OS system library?

@rgburke
Copy link
Owner

rgburke commented Sep 13, 2018

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.

@vit1251
Copy link
Author

vit1251 commented Sep 14, 2018

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?

@rgburke
Copy link
Owner

rgburke commented Sep 14, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants