-
Notifications
You must be signed in to change notification settings - Fork 3k
Building and installing HHVM on Gentoo
Alex Guzman edited this page Aug 11, 2016
·
16 revisions
There's a community-maintained Portage overlay containing an HHVM ebuild. Adding this overlay will let you install HHVM through Gentoo's package manager.
If not already installed, install git.
sudo emerge --sync
sudo emerge dev-vcs/git
If you have layman installed, adding the overlay is fairly straightforward:
sudo layman -S
sudo layman -a hhvm
Otherwise, go ahead and create the local overlay.
sudo mkdir -p /usr/local/portage/hhvm
sudo git clone https://github.com/reanimus/hhvm-overlay.git /usr/local/portage/hhvm --depth=1
# If you have /etc/portage/repos.conf/ set up
sudo cat >>/etc/portage/repos.conf/hhvm.conf <<EOF
[hhvm]
location = /usr/local/portage/hhvm
masters = gentoo
auto-sync = no
EOF
# If you're using the old PORTDIR_OVERLAY method in make.conf
sudo cat >>/etc/portage/make.conf <<EOF
PORTDIR_OVERLAY="/usr/local/portage/hhvm \$PORTDIR_OVERLAY"
EOF
sudo cat >>/etc/portage/package.keywords/hhvm <<EOF
dev-libs/libdwarf ~amd64
dev-php/hhvm ~amd64
EOF
If you want to use the latest version of HHVM (git master), you should add it to the unmasked package list:
sudo cat >>/etc/portage/package.unmask/hhvm <<EOF
=dev-php/hhvm-9999
EOF
Some of these may be unnecessary, depending on your system's USE flags/profile. These are required when using the base amd64 profile.
sudo cat >>/etc/portage/package.use/hhvm <<EOF
net-libs/c-client kerberos
dev-libs/jemalloc stats
dev-libs/boost context
sys-devel/binutils static-libs
EOF
Hint: Having enough memory can prevent some errors (RAM + swap >= 8 GiB)
sudo emerge -av hhvm
sudo rc-update add hhvm default
sudo /etc/init.d/hhvm start