Compiling Thrift on OSX

Posted by tobi — 12:30 PM Dec 30

Compiling thrift on OSX can be a bit of a hassle because of some POSIX discrepancies.

sudo port install boost 

tar xfz thrift-*
cd thirft-*
curl http://blog.leetsoft.com/files/patches/thrift.patch | patch -p1
./configure --with-boost=/opt/local  --prefix=/opt/local
make
sudo make install 

Update: Installing from SVN is doesn’t require the patch above so I’m recommending to do that now:

svn co http://svn.facebook.com/svnroot/thrift/trunk/ thrift
cd thrift; sh bootstrap.sh
./configure --with-boost=/opt/local --with-libevent=/opt/local --prefix=/opt/local
sudo make install

To install the ruby libs for thrift simply do:

cd lib/rb
ruby setup.rb

Comments

  • Jake Luciani 30 Dec 17:30

    You should submit your patch to thrift team thrift-patch [at] facebook.com

  • tobi 30 Dec 22:07

    Well i would but the problem is that my patch essentially removes some #IFDEFs because the osx autotools set HAVE_CLOCK_GETTIME wrong.

    I’m really beyond sick of autotools issues.

Commenting are now closed…