-
Notifications
You must be signed in to change notification settings - Fork 0
Building and installing
HipHop has been developed on CentOS and Fedora, building on other operating systems may not currently be functional. Support will be added as soon as its ready. If you are using CentOS, you can download RPM’s for everything below using the instructions at Installing or Building HipHop PHP via RPM on CentOS 5.
At the moment, HipHop can only run on 64 bits systems.
The prequisites for HipHop are extensive due to the need to build everything statically, most packages can be installed directly from your distribution’s package management system.
- cmake 2.6.4 is the minimum version
- g++/gcc 4.3 is the minimum version
- Boost 1.39 is the minimum version
- flex
- bison
- re2c 0.13.0 is the minimum version
- libmysql
- libxml2
- libmcrypt
- libicu 4.2 is the minimum version
- openssl
- binutils and binutils-dev
- libcap
- gd
- zlib
- tbb Intel’s Thread Building Blocks 2.2 is the minimum version
- libmbfl
- Oniguruma
- libpcre3
- libexpat
- libmemcached 0.39 is the minimum version
- libc-client2007e-dev
- libbz2-dev
- libreadline-dev
- openldap-dev
The following packages have had slight modifications added to them, patches are provided and should be made against the current source copies.
- libcurl 7.20 src/third_party/libcurl.fb-changes.diff
- libevent 1.4 src/third_party/libevent.fb-changes.diff
To apply the patches, supposed your build environement is:
curl-7.20.0 hiphop-php libevent-1.4.13-stable
Enter the following commands:
cd libevent-1.4.13-stable
cp ../hiphop-php/src/third_party/libevent-1.4.13.fb-changes.diff .
patch -p1 < libevent-1.4.13.fb-changes.diff
cd ..
cd curl-7.20.0
cp ../hiphop-php/src/third_party/libcurl.fb-changes.diff .
patch -p1 < libcurl.fb-changes.diff
- src/third_party
- libafdt
- libmbfl
- sqlite3
- timelib
If you build TBB from source or install the binaries manually you’ll need to export a few variables to hint to the version and location.
export TBB_INSTALL_DIR="/home/user/tbb22_012oss"
export TBB_ARCH_PLATFORM="intel64/cc4.1.2_libc2.5_kernel2.6.20"
The aim is that ls $TBB_INSTALL_DIR/$TBB_ARCH_PLATFORM
shows the files to link against.
CMake is the current build tool of choice.
You may need to point CMake to the location of your custom libcurl and libevent or any other libraries which needed to be installed. The CMAKE_PREFIX_PATH variable is used to hint to the location.
export CMAKE_PREFIX_PATH=/home/user
To build HipHop use the following
cd /home/user/hiphop
git clone git://github.com/facebook/hiphop-php.git
cd hiphop-php
git submodule init
git submodule update
export HPHP_HOME=`pwd`
export HPHP_LIB=`pwd`/bin
cmake .
Once this is done you can generate the build file and this will return you to the shell, finally to build run make, if any errors occur it may be required to remove the CMakeCache.txt directory in the checkout.
make
hphp binary can be found in src/hphp folder and is called hphp