Closed xronosuf closed 7 years ago
Resolved the issue by installing libgit2 manually (also fun, requires make to install from source I think) Stuck at the following error:
~/go/src/github.com/ximeraproject/xake $ go get .
# github.com/libgit2/git2go
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
The main causes (according to Google) is go version (I'm at most recent), version of librdkafka (I'm at most recent), and error in the script somewhere (which seems unlikely if this works for others). Any ideas?
I had these issues, too. What worked for me was following the "For NEXT" directions in the README file for git2go branch v25 (after deleting the git2go folder I had already downloaded). The instructions in that branch seem different from the other branches, but worked for me.
Instead of trying to build xake, I would recommend trying to install the .deb at https://github.com/XimeraProject/xake/releases which is statically linked to libgit2.
The build commands in the .travis.yml file are a good place to look since they are enough to build xake on the trusty environment. Specifically the commands below build a xake binary statically linked to the master branch of libgit2. Tracking the master branch of libgit2 seems reasonable, given how hard it would be otherwise to get the right version of libgit2 installed everywhere.
mkdir -p ${GOPATH}/bin
export PKG_CONFIG_PATH=$GOPATH/src/github.com/libgit2/git2go/vendor/libgit2/build
go get -d github.com/libgit2/git2go
cd $GOPATH/src/github.com/libgit2/git2go
git submodule update --init
export CGO_CFLAGS="-I$GOPATH/src/github.com/libgit2/git2go/vendor/libgit2/include"
make install-static
cd $GOPATH/src/github.com/XimeraProject/xake
go get -tags static .
Just an fyi, on Ubuntu 16.04 the default apt-get install for go is version 1.6 which returns a "context" error. Updating to 1.8.3 fixed the problem, but you have to do it manually either by downloading the tar or adding an unofficial repo.
After I got that to work however, I am now getting the following error on the go get . command:
Not sure what this is, or where I should find it. Continuing to look into it but I figure if I have the problem, others will too. Will update if I find a solution.