- Notifications
You must be signed in to change notification settings - Fork3.1k
Building and installing HHVM on Gentoo
Alex Guzman edited this pageAug 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 --syncsudo emerge dev-vcs/git
If you have layman installed, adding the overlay is fairly straightforward:
sudo layman -Ssudo layman -a hhvm
Otherwise, go ahead and create the local overlay.
sudo mkdir -p /usr/local/portage/hhvmsudo git clone https://github.com/reanimus/hhvm-overlay.git /usr/local/portage/hhvm --depth=1# If you have /etc/portage/repos.conf/ set upsudo cat>>/etc/portage/repos.conf/hhvm.conf<<EOF[hhvm]location = /usr/local/portage/hhvmmasters = gentooauto-sync = noEOF# If you're using the old PORTDIR_OVERLAY method in make.confsudo cat>>/etc/portage/make.conf<<EOFPORTDIR_OVERLAY="/usr/local/portage/hhvm\$PORTDIR_OVERLAY"EOF
sudo cat>>/etc/portage/package.keywords/hhvm<<EOFdev-libs/libdwarf ~amd64dev-php/hhvm ~amd64EOF
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-9999EOF
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<<EOFnet-libs/c-client kerberosdev-libs/jemalloc statsdev-libs/boost contextsys-devel/binutils static-libsEOF
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