Skip to content

Instantly share code, notes, and snippets.

@tfhartmann
Last active September 14, 2016 06:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tfhartmann/c5274e4a0bb27659b5cc to your computer and use it in GitHub Desktop.
Save tfhartmann/c5274e4a0bb27659b5cc to your computer and use it in GitHub Desktop.
building hhvm rpm

walking through these pages with the huit/vagrant-generic CentOS 6.5 box

https://github.com/facebook/hhvm/wiki/HHVM-Pre-built-packages-for-Centos-6.5 https://github.com/facebook/hhvm/wiki/Building-and-installing-hhvm-on-centos-6.x

Install EPEL

rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Installing Build Depends

yum install git cpp make autoconf automake libtool patch memcached gcc-c++ cmake \
  wget expat-devel binutils-devel elfutils-libelf-devel elfutils-libelf-devel-static rpmdevtools yum-utils
[root@vagrant ~]# yum install libmcrypt-devel glog-devel jemalloc-devel tbb-devel libdwarf-devel mysql-devel libxml2-devel libicu-devel pcre-devel gd-devel boost-devel sqlite-devel pam-devel bzip2-devel oniguruma-devel openldap-devel readline-devel libc-client-devel libcap-devel libevent-devel libcurl-devel libmemcached-devel

Install ths HVM source repo... yeah I know, I could have done it in the order they suggest, but that would have required reading, and I'm lazy --- and apparently I needed to read, cause not doing this stuff in order screwed me up... doh.. starting over

rpm -Uvh http://dheche.fedorapeople.org/hhvm/el6/RPMS/x86_64/hhvm-release-6-1.noarch.rpm

I ran into a dependency problem... ran an yum upgrade to resolve it.. always patch you vagrant box I guess :p

of course yum upgrade had a depencency issue with abrt, so I yum removed it, then upgraded, take that pesky package.

--> Processing Dependency: pkgconfig >= 1:0.24 for package: rpm-build-4.9.1.3-6.el6.x86_64
--> Finished Dependency Resolution
Error: Package: rpm-build-4.9.1.3-6.el6.x86_64 (hhvm)
           Requires: pkgconfig >= 1:0.24
           Installed: 1:pkgconfig-0.23-9.1.el6.x86_64 (@anaconda-CentOS-201311272149.x86_64/6.5)
               pkgconfig = 1:0.23-9.1.el6
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
[root@vagrant ~]# yum upgrade

Ok, to deal with hhvm's repo dependecy hell... I installed both repo's, disabled the HHVM repo, and had to run yum twice to install dependencies, then ENABLE the HHVM repo and install the glog-devel package. HHVM guys.. fix yo busted repo!

Since the github directions only get us 2.3.x series rpms, I downloaded the tarball (https://github.com/facebook/hhvm/archive/HHVM-3.3.tar.gz) to /root/rpmbuild/SOURCES

And update the version in the hvm.spec file.. (will paste in spec file here)

rpmbuild -ba hhvm.spec returns this:

error: Failed build dependencies:
	gcc >= 4.7.2 is needed by hhvm-3.3-0.1.el6.x86_64
	libcurl-devel >= 7.29 is needed by hhvm-3.3-0.1.el6.x86_64
	tbb-devel >= 4.0 is needed by hhvm-3.3-0.1.el6.x86_64
	libedit-devel is needed by hhvm-3.3-0.1.el6.x86_64
	inotify-tools-devel is needed by hhvm-3.3-0.1.el6.x86_64
	boost-devel >= 1.48 is needed by hhvm-3.3-0.1.el6.x86_64
	libmemcached-devel >= 0.39 is needed by hhvm-3.3-0.1.el6.x86_64

I was able to get through all the above dependecies by enabling the hhvm repo and installing or upgrading them

@2ansh7
Copy link

2ansh7 commented Sep 21, 2015

you were telling about update the version in the hhvm.spec. Share that hhvm.spec file so that i am able to build hhvm-3.3 and later versions.
i have a link for hhvm.spec but it is for systemd versions.
https://github.com/no1youknowz/hhvm-repo/blob/master/hhvm/hhvm.spec

if you have any link or idea how dose i modify this file to be usable on Sysinit based centos 6.x versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment