Categories

A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.

Building Git 1.8 on Centos 6

We use Centos as a VM for development. Intellij IDEA was complaining about the 1.7.1 version from the Centos distro, requiring 1.7.1.1. Picky.

So I grabbed the git source:
$ git clone https://github.com/git/git
$ cd git
$ make
...
http-push.c:920: error: ‘xml_cdata’ undeclared (first use in this function)
http-push.c:921: warning: implicit declaration of function ‘XML_Parse’
http-push.c:926: warning: implicit declaration of function ‘XML_ErrorString’
http-push.c:927: warning: implicit declaration of function ‘XML_GetErrorCode’
http-push.c:930: warning: implicit declaration of function ‘XML_ParserFree’
http-push.c: In function ‘remote_ls’:
http-push.c:1154: error: ‘XML_Parser’ undeclared (first use in this function)
http-push.c:1154: error: expected ‘;’ before ‘parser’
http-push.c:1161: error: ‘parser’ undeclared (first use in this function)
http-push.c:1164: error: ‘xml_cdata’ undeclared (first use in this function)
http-push.c: In function ‘locking_available’:
http-push.c:1228: error: ‘XML_Parser’ undeclared (first use in this function)
http-push.c:1228: error: expected ‘;’ before ‘parser’
http-push.c:1235: error: ‘parser’ undeclared (first use in this function)

Oh man, compile errors. Bad.

The key seemed to be:
expat.h: No such file or directory

A bit o Googling: missing library headers.
$ sudo yum install expat-devel

Restart the build. Works.

$ make install

Whee!
$ git --version
git version 1.8.3.2.768.g911011a

ps. Dont forget the
export PATH=~/bin:$PATH

Leave a Reply