-
Notifications
You must be signed in to change notification settings - Fork 3k
Building and installing HHVM on CentOS 6.4
Kamil Tunkiewicz edited this page Aug 19, 2014
·
26 revisions
WORK IN PROGRESS
sudo yum install git svn cpp make autoconf automake libtool patch memcached gcc-c++ cmake wget boost-devel mysql-devel pcre-devel gd-devel libxml2-devel expat-devel libicu-devel bzip2-devel oniguruma-devel openldap-devel readline-devel libc-client-devel libcap-devel binutils-devel pam-devel elfutils-libelf-devel ImageMagick-devel libxslt-devel libevent-devel libcurl-devel libmcrypt-devel tbb-devel libdwarf-devel
mkdir dev
cd dev
git clone git://github.com/facebook/hhvm.git
cd hhvm
export CMAKE_PREFIX_PATH=`pwd`/..
cd ..
wget http://www.cmake.org/files/v2.8/cmake-2.8.12.tar.gz
tar zxvf cmake-2.8.12.tar.gz
cd cmake-2.8.12
./configure
nano Source/CMakeFiles/ccmake.dir/link.txt # add "-ltinfo" to the end of the only line
make
sudo make install
PATH=/usr/local/cmake/bin:$PATH
cd ..
wget http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gz/download -O boost_1_55_0.tar.gz
tar xvzf boost_1_55_0.tar.gz
cd boost_1_55_0
./bootstrap.sh --prefix=$CMAKE_PREFIX_PATH --libdir=$CMAKE_PREFIX_PATH/lib
./b2 --layout=system install
export Boost_LIBRARYDIR=$CMAKE_PREFIX_PATH/include/boost/
cd ..
wget https://google-glog.googlecode.com/files/glog-0.3.3.tar.gz
tar zxvf glog-0.3.3.tar.gz
svn checkout http://google-glog.googlecode.com/svn/trunk/ google-glog
cd google-glog
./configure --prefix=$CMAKE_PREFIX_PATH
make
make install
cd ..
wget http://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz
tar -xzvf libmemcached-1.0.18.tar.gz
cd libmemcached-1.0.18
./configure --prefix=$CMAKE_PREFIX_PATH
make
make install
cd ..
wget http://www.canonware.com/download/jemalloc/jemalloc-3.5.1.tar.bz2
tar xjvf jemalloc-3.5.1.tar.bz2
cd jemalloc-3.5.1
./configure --prefix=$CMAKE_PREFIX_PATH
make
make install
cd ..
cd hhvm
git submodule update --init --recursive
cmake .
make
--
gcc vps uses excessive amounts of memory when building hhvm, llvm can significantly speed up the Assembly and to eliminate the overhead of memory
# yum install llvm clang
# clang --version
clang version 3.4 (tags/RELEASE_34/final)
Target: x86_64-redhat-linux-gnu
Thread model: posix
# cmake \
-DCMAKE_CXX_COMPILER=/usr/bin/clang++ \
-DCMAKE_C_COMPILER=/usr/bin/clang \
-DCMAKE_ASM_COMPILER=/usr/bin/clang .