GithubHelp home page GithubHelp logo

problems building about git2go HOT 9 CLOSED

libgit2 avatar libgit2 commented on August 17, 2024
problems building

from git2go.

Comments (9)

carlosmn avatar carlosmn commented on August 17, 2024

the go build command by itself cannot build libgit2. See the README for building and installation instructions. Having an installed libgit2 is irrelevant here.

from git2go.

davidhq avatar davidhq commented on August 17, 2024

But the first instruction in README is to run go get github.com/libgit2/git2go and when I do, I get that error.

from git2go.

carlosmn avatar carlosmn commented on August 17, 2024

That's just to get the code, it seems it was missing the -d but that doesn't matter too much. You have the go code, so you can keep going.

from git2go.

davidhq avatar davidhq commented on August 17, 2024

OK, that part makes sense... I'm a bit new to Go stuff, so I didn't know about -d... good that you put it there now...

However I still have problems and there's no helpful messages why it won't build: https://gist.github.com/davidhq/6b11ba4f7c49a7447f75

from git2go.

carlosmn avatar carlosmn commented on August 17, 2024

It looks like the compiler doesn't like the include statements, which is quite odd. I've never tried to build this using GCC on OSX. Can you try with clang to see if the issue is a compiler compat/interop issue?

from git2go.

carlosmn avatar carlosmn commented on August 17, 2024

I've just tried with OSX "gcc" (which is really clang in some compat mode in my OSX version) and it does error out. Compiling with real gcc 4.9 from homebrew works as does compiling with clang.

I don't know that there's anything I can do from here to make that fake gcc like this file.

from git2go.

davidhq avatar davidhq commented on August 17, 2024

OK thank you.. I did this:

sudo mv /usr/bin/gcc /user/bin/gcc_original

sudo ln -s /usr/local/Cellar/gcc/4.9.1/bin/gcc-4.9 /usr/local/bin/gcc

I hope this is ok... couldn't figure out how to force your make process to use homebrew gcc (tried setting CMAKE_C_COMPILER env variable)... maybe now it's going to be better for future compiles, just hope some other things don't break because of that.

from git2go.

carlosmn avatar carlosmn commented on August 17, 2024

It's not generally a good idea to replace the system-provided compilers. The traditional and well-respected way of selecting a C compiler is setting the CC environment variable, which you can also set for a particular command like with

CC=clang make

or

CC=/usr/local/Cellar/gcc/4.9.1/bin/gcc-4.9 make

which CMake should also respect (if you clear the cache).

from git2go.

davidhq avatar davidhq commented on August 17, 2024

Thank you for educating me!

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.