Building and installing HHVM on Ubuntu 12.10

Simon Welsh edited this page Jan 10, 2015 · 20 revisions

Packages installation

Using sudo or as root user: (you may have to run sudo apt-get update first)

sudo apt-get install git-core cmake g++ libboost-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-system-dev libboost-thread-dev \
  libboost-program-options-dev libboost-filesystem-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 subversion \
  libboost-regex-dev libmagickwand-dev libevent-dev ocaml-native-compilers \
  automake libxslt1-dev gawk

Getting HipHop source-code

mkdir dev
cd dev
git clone git:// --depth=1
cd hhvm
git submodule update --init --recursive
export CMAKE_PREFIX_PATH=`pwd`/..
cd ..

Building third-party libraries


Make sure that your system time is correct, otherwise ./configure will fail.

git clone git:// --depth=1
cd curl
./configure --prefix=$CMAKE_PREFIX_PATH
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 third-party to update it prior to the make step.

cat ../hhvm/third-party/libcurl-7.22.1.fb-changes.diff | patch -p1

Google glog

svn checkout google-glog
cd google-glog
./configure --prefix=$CMAKE_PREFIX_PATH
make install
cd ..

JEMalloc 3.x

tar xjvf jemalloc-3.5.1.tar.bz2
cd jemalloc-3.5.1
./configure --prefix=$CMAKE_PREFIX_PATH
make install
cd ..

Building HipHop

cd hhvm
cmake .

Running programs

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 don't, try to remove as explained above.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.