Skip to content

Building and Installing on FreeBSD 8.2

louisehu edited this page Jan 9, 2012 · 30 revisions

HipHop-PHP install in FreeBSD 8.2

Fix before FreeBSD update

mkdir -p /usr/src/lib/libc/gen

Update FreeBSD

freebsd-update fetch

freebsd-update install

Add required packages to build HPHP and HPHPI

pkg_add -r cmake flex bison re2c openssl gd libxml2 pcre oniguruma boost-libs libmemcached libmcrypt binutils expat mysql50-client wget tbb icu openldap24-client libexecinfo gcc44 gawk git cclient mc

* current gcc46 is buggy for HipHop build!

Fix for CClient 2007

cd /usr/local/lib

ln -s libc-client4.a libc-client.a

ln -s libc-client4.so libc-client.so

ln -s libc-client4.so.9 libc-client.so.9

Require code fixes for current GIT sources

src/runtime/base/util/thrift_buffer.h:

	#ifdef __FreeBSD__
	#define __FREEBSD__ 1
	#endif

src/runtime/base/zend/zend_string.cpp:

	#ifdef __FreeBSD__
	#define __FREEBSD__ 1
	#endif

src/runtime/ext/ext_ipc.cpp:

	#ifdef __FreeBSD__
	#define __FREEBSD__ 1
	#endif

src/runtime/ext/ext_posix.cpp:

	#ifdef __FreeBSD__
	#define __FREEBSD__ 1
	#endif

src/runtime/ext/ext_thrift.cpp:

	#ifdef __FreeBSD__
	#define __FREEBSD__ 1
	#endif

src/runtime/base/builtin_functions.cpp:1087

#ifdef __FreeBSD__
# ifdef isset
#  undef isset
# endif
#endif