I'm trying to install libgit2 on OSX, and I keep running into issues. Ultimately I'm trying to get pygit2 installed, which fails because it doesn't recognize libgit2 being installed.
libgit2's instructions are the following according to their github page:
$ mkdir build && cd build
$ cmake ..
$ cmake --build .
They then say that in order to build the universal binary for OSX, you can use the following when configuring:
-DCMAKE_OSX_ARCHITECTURES="i386;x86_64"
To me that means do the following:
$ mkdir build && cd build
$ cmake .. -DCMAKE_OSX_ARCHITECTURES="i386;x86_64"
$ cmake --build .
However, that doesn't appear to work. I still have pygit2 bomb out when I try and install it through pip.
$ pip install pygit2
This is the error I get:
In file included from src/pygit2.c:32:
include/pygit2/types.h:60: error: expected specifier-qualifier-list before ‘git_diff_list’
src/pygit2.c: In function ‘moduleinit’:
src/pygit2.c:231: error: ‘GIT_STATUS_CURRENT’ undeclared (first use in this function)
src/pygit2.c:231: error: (Each undeclared identifier is reported only once
src/pygit2.c:231: error: for each function it appears in.)
*snip*
Command /Users/HOMEDIR/VIRTUALENVPATH/bin/python -c "import setuptools;__file__='/Users/HOMEDIR/VIRTUALENVPATH/build/pygit2/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/3v/7q7kyp3x4js3j0hvhmfkt6fw0000gn/T/pip-Sbr_Q3-record/install-record.txt --single-version-externally-managed --install-headers /Users/HOMEDIR/VIRTUALENVPATH/bin/../include/site/python2.7 failed with error code 1 in /Users/HOMEDIR/VIRTUALENVPATH/build/pygit2
Has anyone been through this rodeo before and can help out?