forked from facebook/hhvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Building and installing HHVM on Ubuntu 12.04
Kody J. Peterson edited this page Jun 4, 2013
·
50 revisions
Using sudo or as root user: (you may have to run sudo apt-get update
first)
sudo apt-get install git-core cmake g++ libboost1.48-dev libmysqlclient-dev \
libxml2-dev libmcrypt-dev libicu-dev openssl build-essential binutils-dev \
libcap-dev libgd2-xpm-dev zlib1g-dev libtbb-dev libonig-dev libpcre3-dev \
autoconf libtool libcurl4-openssl-dev libboost-regex1.48-dev libboost-system1.48-dev \
libboost-program-options1.48-dev libboost-filesystem1.48-dev wget memcached \
libreadline-dev libncurses-dev libmemcached-dev libbz2-dev \
libc-client2007e-dev php5-mcrypt php5-imagick libgoogle-perftools-dev \
libcloog-ppl0 libelf-dev libdwarf-dev libunwind7-dev subversion
mkdir dev
cd dev
git clone git://github.com/facebook/hiphop-php.git
cd hiphop-php
export CMAKE_PREFIX_PATH=`pwd`/..
export HPHP_HOME=`pwd`
cd ..
git clone git://github.com/libevent/libevent.git
cd libevent
git checkout release-1.4.14b-stable
cat ../hiphop-php/hphp/third_party/libevent-1.4.14.fb-changes.diff | patch -p1
./autogen.sh
./configure --prefix=$CMAKE_PREFIX_PATH
make
make install
cd ..
Make sure that your system time is correct, otherwise ./configure will fail.
git clone git://github.com/bagder/curl.git
cd curl
./buildconf
./configure --prefix=$CMAKE_PREFIX_PATH
make
make install
cd ..
Note: If you're building a version of cURL older than 7.28.0 (for whatever reason), you'll need to apply the patch in src/third_party to update it prior to the make step.
cat ../hiphop-php/hphp/third_party/libcurl-7.22.1.fb-changes.diff | patch -p1
svn checkout http://google-glog.googlecode.com/svn/trunk/ google-glog
cd google-glog
./configure --prefix=$CMAKE_PREFIX_PATH
make
make install
cd ..
wget http://www.canonware.com/download/jemalloc/jemalloc-3.0.0.tar.bz2
tar xjvf jemalloc-3.0.0.tar.bz2
cd jemalloc-3.0.0
./configure --prefix=$CMAKE_PREFIX_PATH
make
make install
cd ..
cd hiphop-php
export HPHP_HOME=`pwd`
cmake .
make
The hhvm binary can be found in hphp/hhvm/hhvm
.
If any errors occur, it may be required to remove the CMakeCache.txt directory in the checkout.
If your failure was on the make
command, try to correct the error and run make
again, it should restart from the point it stops. If not, try to remove as explained above.