Giter Club home page Giter Club logo

Comments (11)

carlosmn avatar carlosmn commented on August 19, 2024

Make sure the submodule is in the right version, and don't use go build, as that cannot build libgit2, which git2go needs. See the README.md for building instructions.

from git2go.

jwaldrip avatar jwaldrip commented on August 19, 2024

@carlosmn this comes back to an issue I am having by trying to compile from homebrew #124 . I am trying to use the homebrew provided version of libgit2 but that does not seem to be working either. I would really appreciate your help on this if you have a moment.

from git2go.

carlosmn avatar carlosmn commented on August 19, 2024

The homebrew version of libgit2 won't help you at buliding git2go. They're different versions with a different API and ABI, which is why git2go has its own copy of the library which it builds.

from git2go.

jwaldrip avatar jwaldrip commented on August 19, 2024

@carlosmn okay thats fine but then why the cgo issue when just using make install from inside homebrew. Can you please try it and help me debug?

$ brew install jwaldrip/utils/git-get -v --HEAD

from git2go.

carlosmn avatar carlosmn commented on August 19, 2024

I have tried that command, but it doesn't get as far as cgo running. From the double-slash in your output form the other issue, it looks like some variable isn't set properly. Go's build is very sensitive to missing TMPDIR e.g. and will fail with odd messages in that case too.

I'd try running go env in-between the rest of the command to check that there's a sane environment when go is trying to run.

from git2go.

jwaldrip avatar jwaldrip commented on August 19, 2024

This is the GOENV.

GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/private/tmp/git-get-vGF4Ph"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.3.3/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.3.3/libexec/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
CXX="clang++"
CGO_ENABLED="1"

from git2go.

jwaldrip avatar jwaldrip commented on August 19, 2024

@carlosmn can you give it another try?

from git2go.

carlosmn avatar carlosmn commented on August 19, 2024

I do get the same error now, but I still don't know the cause. This is something interacting between cgo and homebrew. There is a lot in the environment that homebrew puts there. Some might be interacting badly with cgo, but I'm not familiar with homebrew's environment or with the cgo details.

from git2go.

jwaldrip avatar jwaldrip commented on August 19, 2024

My other option is to just ship a precompiled binary or just shell out to "real git" in my program.

from git2go.

nicerobot avatar nicerobot commented on August 19, 2024

This is how i build it on Mac OS X without brew's libxml2.

!#/bin/bash
src=$(IFS=':';p=(${GOPATH}); echo "${p[0]}")/src/github.com/libgit2/git2go
[ -d ${src} ] || exit 1
git clone https://github.com/libgit2/git2go.git ${src} || exit 2
cd ${src} || exit 3
git submodule init || exit 4
git submodule update || exit 5
make && make install

from git2go.

DanielHeath avatar DanielHeath commented on August 19, 2024

s/git2gi/git2go/?

from git2go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.