-
Notifications
You must be signed in to change notification settings - Fork 3k
Building and installing HHVM on Debian 7
Building HHVM on Debian 7 is no longer supported; we require GCC 4.8, which is newer than the included version.
This approach is not recommended on a production environment because packages from testing might break your system. If you need to use Debian 7 for whatever reason, you can add the testing repository to you apt sources.list and pin it to a low priority. You are then able to install packages from testing but packages from the regular repository are preferred (even with a lower version).
echo "deb http://ftp.de.debian.org/debian jessie main contrib non-free" >> /etc/apt/sources.list
Then create a file /etc/apt/preferences
with the following content:
Package: *
Pin: release n=wheezy
Pin-Priority: 900
Package: *
Pin: release n=jessie
Pin-Priority: 200
Using this configuration you should now be able to install packages from testing like gcc-4.9:
apt-get update && apt-get install g++-4.9
You may need to use aptitude
to install the new version of g++
and select its second suggestion, since apt
will be reluctant to install packages from jessie
(per the preferences file above).
sudo apt-get install git-core automake cmake libmysqlclient-dev \
libxslt1.1 libxml2-dev libmcrypt-dev libicu-dev openssl build-essential binutils-dev \
libcap-dev zlib1g-dev libtbb-dev libonig-dev libpcre3-dev \
autoconf libtool libcurl4-openssl-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 \
libtbb2 libtbb-dev libjemalloc-dev \
libc6-dev libmpfr4 libgcc1 binutils \
libc6 libc-dev-bin libc-bin libgomp1 \
libstdc++-4.9-dev libstdc++6 cmake \
libarchive12 cmake-data libacl1 libattr1 \
g++ cpp gcc make libboost-thread1.49.0 \
libboost-thread-dev libgd2-xpm-dev \
pkg-config libdwarf-dev binutils-dev libboost-system1.49-dev \
libboost-program-options1.49-dev libboost-filesystem1.49-dev libboost-regex1.49-dev \
libmagickwand-dev libxslt1-dev ocaml-native-compilers libevent-dev libiberty-dev
You're also going to have to do some aptitude
fighting here about libcurl4-openssl-dev
-- if you tell aptitude
to install that, a few resolutions down the line will be one that removes and downgrades a few packages but that will keep the new gcc installed.
mkdir dev
cd dev
git clone git://github.com/facebook/hhvm.git --depth=1
export CMAKE_PREFIX_PATH=`pwd`
cd hhvm
git submodule update --init --recursive
cd ..
svn checkout http://google-glog.googlecode.com/svn/trunk/ google-glog
cd google-glog
./configure --prefix=$CMAKE_PREFIX_PATH
make
make install
cd ..
cd hhvm
cmake .
make
The hhvm binary can be found in hphp/hhvm/hhvm
.
See https://github.com/facebook/hhvm/wiki/Building-the-Hack-Typechecker.
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.