[packages/hiphop-php] start update to 2.1.0, does not build, c++ errors in folly with gcc 4.8

glen glen at pld-linux.org
Sat Oct 5 22:03:16 CEST 2013


commit ed14b19f31fcb860b124ef8e98aad6b98cc9bfae
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat Oct 5 23:02:36 2013 +0300

    start update to 2.1.0, does not build, c++ errors in folly with gcc 4.8

 hiphop-php.spec | 75 ++++++++++++++++++++++++++++++++++-----------------------
 1 file changed, 45 insertions(+), 30 deletions(-)
---
diff --git a/hiphop-php.spec b/hiphop-php.spec
index 725c435..2922d56 100644
--- a/hiphop-php.spec
+++ b/hiphop-php.spec
@@ -8,16 +8,14 @@
 #   make[2]: *** [src/hphp/hphp] Error 139
 #   relinking succeeds, but resulting binary segfaults as well:
 #   0x0000000000b9cc0b in HPHP::Extension::LoadModules(HPHP::Hdf) ()
-%define		snap	cf9b612
-%define		rel		0.2
-Summary:	HipHop for PHP transforms PHP source code into highly optimized C++
+Summary:	Virtual Machine, Runtime, and JIT for PHP
 Name:		hiphop-php
-Version:	1.000
-Release:	%{rel}.%{snap}
+Version:	2.1.0
+Release:	0.1
 License:	PHP 3.01
 Group:		Development/Languages
-Source0:	%{name}-%{version}_%{snap}.tar.bz2
-# Source0-md5:	16b7928995a91001657b015fe7f8a06d
+Source0:	https://github.com/facebook/hiphop-php/archive/HPHP-%{version}.tar.gz
+# Source0-md5:	edd3d8b4371d38286c7c5f0c2582f5e1
 # need fb.changes.patch, which is available for 1.4 only
 Source1:	http://www.monkey.org/~provos/libevent-1.4.14b-stable.tar.gz
 # Source1-md5:	a00e037e4d3f9e4fe9893e8a2d27918c
@@ -29,61 +27,69 @@ Patch4:		system-libafdt.patch
 URL:		http://wiki.github.com/facebook/hiphop-php/
 BuildRequires:	binutils-devel
 BuildRequires:	bison >= 2.3
-BuildRequires:	boost-devel >= 1.39
-BuildRequires:	cmake >= 2.6.4
-BuildRequires:	curl-devel >= 7.20.1-2
+BuildRequires:	boost-devel >= 1.50
+BuildRequires:	cmake >= 2.8.5
+BuildRequires:	curl-devel >= 7.29.0
+BuildRequires:	elfutils-devel
 BuildRequires:	expat-devel
 BuildRequires:	flex >= 2.5.35
 BuildRequires:	gd-devel
+BuildRequires:	glog-devel >= 0.3.2
+BuildRequires:	imap-devel >= 1:2007
 BuildRequires:	jemalloc-devel
 BuildRequires:	libafdt-devel >= 0.1.0
 BuildRequires:	libcap-devel
-#BuildRequires:	libevent-devel < 2.0
-#BuildRequires:	libevent-devel >= 1.4.13-2
+BuildRequires:	libdwarf-devel
+#BuildRequires:	libevent-devel >= 1.4.14
 BuildRequires:	libicu-devel >= 4.2
 #BuildRequires:	libmbfl-devel
-BuildRequires:	libmcrypt
-BuildRequires:	libmemcached-devel >= 0.39
+BuildRequires:	libmcrypt-devel
+BuildRequires:	libmemcached-devel >= 1.0.9
 BuildRequires:	libstdc++-devel >= 6:4.3
+BuildRequires:	libunwind-devel
 BuildRequires:	libxml2-devel
 BuildRequires:	mysql-devel
 BuildRequires:	oniguruma-devel
 BuildRequires:	openssl-devel
 BuildRequires:	pcre-devel
-BuildRequires:	php-xhp-devel >= 1.3.9-6
+#BuildRequires:	php-xhp-devel >= 1.3.9-6
 BuildRequires:	re2c >= 0.13.0
+BuildRequires:	readline-devel
 BuildRequires:	rpmbuild(macros) >= 1.600
-BuildRequires:	tbb-devel >= 2.2
+BuildRequires:	tbb-devel >= 4.0.6000
 BuildRequires:	zlib-devel
-ExclusiveArch:	%{x8664}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
-HipHop transforms your PHP source code into highly optimized C++ and
-then compiles it with g++ to build binary files. You keep coding in
-simpler PHP, then HipHop executes your source code in a semantically
-equivalent manner and sacrifices some rarely used features - such as
-eval() - in exchange for improved performance.
+HipHop VM (HHVM) is a new open-source virtual machine designed for
+executing programs written in PHP. HHVM uses a just-in-time
+compilation approach to achieve superior performance while maintaining
+the flexibility that PHP developers are accustomed to. HipHop VM (and
+before it HPHPc) has realized > 5x increase in throughput for Facebook
+compared with Zend PHP 5.2.
 
-Facebook sees about a 50% reduction in CPU usage when serving equal
-amounts of Web traffic when compared to Apache and PHP. Facebook's API
-tier can serve twice the traffic using 30% less CPU.
+HipHop is most commonly run as a standalone server, replacing both
+Apache and mod_php.
 
 %prep
-%setup -qn %{name}-%{version}_%{snap} -a1
+%setup -q -n %{name}-HPHP-%{version} -a1
+
+ln -s libevent-1.4.*-stable libevent
+%{__patch} -d libevent -p1 < hphp/third_party/libevent-1.4.14.fb-changes.diff
+
+%if 0
 %patch0 -p1
 %patch1 -p1
 #%patch3 -p1
 %patch4 -p1
 
-ln -s libevent-1.4.*-stable libevent
-%{__patch} -d libevent -p1 < src/third_party/libevent-1.4.14.fb-changes.diff
 
 #rm -rf src/third_party/libmbfl
 #sed -i -e '/add_subdirectory(third_party\/libmbfl)/d' src/CMakeLists.txt
 
 rm -rf src/third_party/xhp
 rm -rf src/third_party/libafdt
+%endif
 
 %build
 # build libevent 1.4 with fb patches
@@ -99,14 +105,23 @@ if [ ! -d libevent/.libs ]; then
 	cd ..
 fi
 
+export USE_HHVM=1
 export HPHP_HOME=$(pwd)
 export HPHP_LIB=$HPHP_HOME/bin
 
+%if 0
+export LIBEVENT_PREFIX=$HPHP_HOME/libevent
+
+	-DLibEvent_LIB=$HPHP_HOME/libevent/libevent.so \
+	-DLibEvent_INCLUDE_PATHS=$HPHP_HOME/libevent \
+	-DLibEvent_LIB_PATHS=$HPHP_HOME/libevent/.libs \
+%endif
+
 install -d build
 cd build
+CPPFLAGS="%{rpmcppflags} -fno-permissive"
 %cmake \
-	-DLibEvent_INCLUDE_PATHS=$HPHP_HOME/libevent \
-	-DLibEvent_LIB_PATHS=$HPHP_HOME/libevent/.libs \
+	-DLIBEVENT_LIB=$HPHP_HOME/libevent/lib/libevent.so \
 	-DCMAKE_PREFIX_PATH=%{_prefix} \
 	-DSKIP_BUNDLED_XHP=ON \
 	-DUSE_JEMALLOC=ON \
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/hiphop-php.git/commitdiff/ed14b19f31fcb860b124ef8e98aad6b98cc9bfae



More information about the pld-cvs-commit mailing list