Monday, November 8, 2010

Building hiphop-php

I won't go into the details of hiphop-php but needless to say it rocks. But their documentation seems to be lacking. If you are trying to get hiphop to build, try this script to patch their required changes to libevent and libcurl

git clone http://github.com/facebook/hiphop-php.git
wget http://www.monkey.org/~provos/libevent-1.4.14b-stable.tar.gz
tar xvfz libevent-1.4.14b-stable.tar.gz
cd libevent-1.4.14b-stable/
patch -p1 < ../hiphop-php/src/third_party/libevent-1.4.14.fb-changes.diff
sudo apt-get purge libevent-dev
./configure
sudo make && sudo make install
cd ..
wget http://curl.haxx.se/download/curl-7.21.1.tar.gz
tar xvfz curl-7.21.1.tar.gz
cd curl-7.21.1/
patch -p1 < ../hiphop-php/src/third_party/libcurl.fb-changes.diff
./configure
make
sudo make install
sudo apt-get install libgd2-noxpm-dev libxml2-dev libexpat1-dev libicu-dev libmcrypt-dev libonig-dev libreadline-dev libcap-dev binutils-dev libboost-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libtbb-dev
cd ../hiphop-php
cmake .
make
make install

No comments: