Wednesday, April 9, 2008

Getting postgresql and git to play nice on Mac OS X

If you installed postgresql83 using macports, you may run into some trouble building the apr dependency.

In file included from misc/unix/rand.c:39:
/opt/local/include/uuid.h:94: error: conflicting types for 'uuid_t'
/usr/include/unistd.h:133: error: previous declaration of 'uuid_t' was here
uuid_t is defined in the port of apr(git dependency) and ossp-uuid(postgresql83 dependency). Simply uninstalling postgresql83 and ossp-uuid does not solve the problem. Apparently macports is happy to let one port overwrite files from another without a huge red flag. The commands below should do everything you need.

port uninstall postgresql83-server postgresql83 ossp-uuid
port clean apr
port install git-core +svn
port install postgresql83-server