Skip to content

Building and installing HHVM on Gentoo

garyemiller edited this page Dec 18, 2013 · 16 revisions

Update repositories and install git

sudo emerge --sync
sudo emerge git

Download and include portage overlay

sudo mkdir -p /usr/local/portage/javer
sudo git clone https:/javer/gentoo-overlay.git /usr/local/portage/javer
sudo cat >>/etc/portage/make.conf <<EOF
PORTDIR_OVERLAY="/usr/local/portage/javer \$PORTDIR_OVERLAY"
EOF

Add necessary keywords

sudo cat >>/etc/portage/package.keywords <<EOF
sys-devel/gcc ~amd64
dev-libs/isl ~amd64
dev-libs/cloog ~amd64
dev-libs/libdwarf ~amd64
EOF

If you want to use the latest version of HHVM (dev-master), you should add the following keyword:

sudo cat >>/etc/portage/package.keywords <<EOF
dev-php/hhvm ~amd64
EOF

Update gcc to 4.8.1

sudo emerge gcc
sudo gcc-config x86_64-pc-linux-gnu-4.8.1
source /etc/profile

Manually download libdwarf

The ebuild for libdwarf points to servers that no long have the tar. So get it from the maintainers page.

sudo wget http://www.prevanders.net/libdwarf-20120410.tar.gz -P /usr/portage/distfiles

Build and install HHVM with all dependencies

sudo emerge hhvm

Adding HHVM server to default runlevel

sudo rc-update add hhvm default

Starting HHVM server

sudo /etc/init.d/hhvm start

Running HHVM in CLI mode

The hhvm run wrapper script can be found in /usr/bin/hhvm.

Clone this wiki locally