Bug 188498

Summary: lang/hiphop-php build failure
Product: Ports & Packages Reporter: Eugene M. Zheganin <eugene>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Eugene M. Zheganin 2014-04-12 09:40:00 UTC
Cannot build lang/hiphop-php on FreeBSD 10-STABLE.

The build process complains:

[...]
===>  Performing in-source build
/bin/mkdir -p /usr/ports/lang/hiphop-php/work/hiphop-php-HPHP-2.1
-- CMAKE_PREFIX_PATH was missing, proceeding anyway
-- Using const for input to iconv() call
-- MySQL Include dir: /usr/local/include/mysql  library dir: /usr/local/lib/mysql
-- MySQL client libraries: mysqlclient_r
-- Found GD: /usr/local/lib/libgd.so
-- Found ICU header files in /usr/local/include
-- Found ICU libraries: /usr/local/lib/libicuuc.so
-- Found minimal tcmalloc: /usr/local/lib/libtcmalloc_minimal.so
-- Found Intel TBB
-- Found mcrypt: /usr/local/lib/libmcrypt.so
CMake Error at CMake/HPHPFindLibs.cmake:308 (message):
  You need to install binutils
Call Stack (most recent call first):
  CMake/HPHPSetup.cmake:46 (include)
  hphp/CMakeLists.txt:18 (include)


-- Configuring incomplete, errors occurred!
See also "/usr/ports/lang/hiphop-php/work/hiphop-php-HPHP-2.1/CMakeFiles/CMakeOutput.log".
See also "/usr/ports/lang/hiphop-php/work/hiphop-php-HPHP-2.1/CMakeFiles/CMakeError.log".
*** Signal 11

Stop.
make[1]: stopped in /usr/ports/lang/hiphop-php
*** Error code 1


From what I see this is because libiberty cannot be found:

===Cut===
FIND_LIBRARY (BFD_LIB bfd)
FIND_LIBRARY (BINUTIL_LIB iberty)

if (NOT BFD_LIB)
        message(FATAL_ERROR "You need to install binutils")
endif()

if (NOT BINUTIL_LIB)
        message(FATAL_ERROR "You need to install binutils")
endif()
===Cut===

libiberty is installed as a part of gcc74:

# pkg info -lx gcc | grep iberty
        /usr/local/lib/gcc47/gcc/x86_64-portbld-freebsd10.0/4.7.3/plugin/include/libiberty.h
        /usr/local/lib/gcc47/libiberty.a

This port also misses a dependency to devel/libinotify and devel/google-perftools (it complains during build but this doesn't lead to a crash).

How-To-Repeat: Try to install hiphop-php from fresh ports.
Comment 1 Eugene M. Zheganin 2014-04-12 10:44:05 UTC
This error can be worked around by adding the following change to the 
/usr/ports/lang/hiphop-php/work/hiphop-php-HPHP-2.1/CMake/HPHPFindLibs.cmake:

# FIND_LIBRARY (BINUTIL_LIB iberty)
SET(BINUTIL_LIB /usr/local/lib/gcc47/libiberty.a)
Comment 2 Eugene M. Zheganin 2014-04-12 10:53:27 UTC
Then cmake dumps core:

===>  Performing in-source build
/bin/mkdir -p /usr/ports/lang/hiphop-php/work/hiphop-php-HPHP-2.1
-- CMAKE_PREFIX_PATH was missing, proceeding anyway
-- Using const for input to iconv() call
-- MySQL Include dir: /usr/local/include/mysql  library dir: 
/usr/local/lib/mysql
-- MySQL client libraries: mysqlclient_r
-- Found GD: /usr/local/lib/libgd.so
-- Found ICU header files in /usr/local/include
-- Found ICU libraries: /usr/local/lib/libicuuc.so
-- Found minimal tcmalloc: /usr/local/lib/libtcmalloc_minimal.so
-- Found Intel TBB
-- Found mcrypt: /usr/local/lib/libmcrypt.so
Generating Release build
-- Found libevent: /usr/local/share/hiphop-php/ext/lib/libevent.a
-- Found libevent 1.4.5+
-- Configuring done
*** Signal 11

Stop.
make[1]: stopped in /usr/ports/lang/hiphop-php
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/hiphop-php
Comment 3 Eugene M. Zheganin 2014-04-12 13:19:29 UTC
This, again, can be got rid off using cmake 3.0.0-rc2 built from sources 
(and installed to a custom PREFIX), but all it does - cmake coredumps later.

===> Building for hiphop-php-2.1_8
[ 0%] Built target lz4
[ 1%] Built target timelib
[ 1%] Built target sqlite3
[ 2%] Built target double-conversion
[ 2%] Built target afdt
[ 2%] Generating systemlib.php
[ 10%] Built target mbfl
[ 10%] Built target systemlib
[ 14%] Built target folly
[ 14%] Built target gen-infotabs
[ 14%] Built target gen-class-map
[ 14%] Generating class_map.cpp and constants.h
ÐÑибка ÑегменÑаÑии (core dumped)
--- hphp/system/class_map.cpp ---
*** [hphp/system/class_map.cpp] Error code 139

make[4]: stopped in /usr/ports/lang/hiphop-php/work/hiphop-php-HPHP-2.1
1 error

make[4]: stopped in /usr/ports/lang/hiphop-php/work/hiphop-php-HPHP-2.1
--- hphp/system/CMakeFiles/hphp_system.dir/all ---
*** [hphp/system/CMakeFiles/hphp_system.dir/all] Error code 2

make[3]: stopped in /usr/ports/lang/hiphop-php/work/hiphop-php-HPHP-2.1
Linking CXX executable gen-ext-hhvm
A failure has been detected in another branch of the parallel make

make[4]: stopped in /usr/ports/lang/hiphop-php/work/hiphop-php-HPHP-2.1
--- hphp/tools/bootstrap/CMakeFiles/gen-ext-hhvm.dir/all ---
*** [hphp/tools/bootstrap/CMakeFiles/gen-ext-hhvm.dir/all] Error code 2

make[3]: stopped in /usr/ports/lang/hiphop-php/work/hiphop-php-HPHP-2.1
2 errors

make[3]: stopped in /usr/ports/lang/hiphop-php/work/hiphop-php-HPHP-2.1
*** [all] Error code 2

make[2]: stopped in /usr/ports/lang/hiphop-php/work/hiphop-php-HPHP-2.1
1 error

make[2]: stopped in /usr/ports/lang/hiphop-php/work/hiphop-php-HPHP-2.1
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/lang/hiphop-php
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/hiphop-php
Comment 4 dfilter service freebsd_committer freebsd_triage 2014-04-20 21:44:51 UTC
Author: antoine
Date: Sun Apr 20 20:44:48 2014
New Revision: 351646
URL: http://svnweb.freebsd.org/changeset/ports/351646
QAT: https://qat.redports.org/buildarchive/r351646/

Log:
  Mark broken: Fails to configure
  
  -- Performing Test ELF_GETSHDRSTRNDX
  -- Performing Test ELF_GETSHDRSTRNDX - Success
  -- Found LibDwarf: /usr/local/lib/libdwarf.a
  CMake Error at CMake/HPHPFindLibs.cmake:308 (message):
    You need to install binutils
  Call Stack (most recent call first):
    CMake/HPHPSetup.cmake:46 (include)
    hphp/CMakeLists.txt:18 (include)
  -- Configuring incomplete, errors occurred!
  
  PR:		ports/188498
  Reported by:	pkg-fallout
  With hat:	portmgr

Modified:
  head/lang/hiphop-php/Makefile

Modified: head/lang/hiphop-php/Makefile
==============================================================================
--- head/lang/hiphop-php/Makefile	Sun Apr 20 20:37:14 2014	(r351645)
+++ head/lang/hiphop-php/Makefile	Sun Apr 20 20:44:48 2014	(r351646)
@@ -16,6 +16,8 @@ PATCH_SITES=	http://cpp.in/dev/
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	HipHop Virtual Machine for PHP (HHVM)
 
+BROKEN=		Fails to configure
+
 LICENSE=	PHP301 ZEND200 UNICODE
 LICENSE_COMB=	multi
 LICENSE_NAME_UNICODE=	Unicode, Inc. License Agreement
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 5 Antoine Brodin freebsd_committer freebsd_triage 2014-04-20 21:45:12 UTC
State Changed
From-To: open->closed

Close: the port has been marked broken 
Please open a new PR if you have a patch to maintain/stage/unbreak this port