Bug 169996 - lang/hiphop-php fails to link as it requires gettext
lang/hiphop-php fails to link as it requires gettext
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Latest
Any Any
: Normal Affects Only Me
Assigned To: Martin Matuska
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-19 11:50 UTC by c.kworr
Modified: 2012-10-23 21:39 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description c.kworr 2012-07-19 11:50:14 UTC
Build ends with:

Scanning dependencies of target hphp
[ 88%] Building CXX object src/hphp/CMakeFiles/hphp.dir/externals.cpp.o
[ 88%] Building CXX object src/hphp/CMakeFiles/hphp.dir/main.cpp.o
In file included from /tmp/ports/usr/ports/lang/hiphop-php/work/facebook-hiphop-php-96532ec/src/hphp/main.cpp:23:0:
/tmp/ports/usr/ports/lang/hiphop-php/work/facebook-hiphop-php-96532ec/src/compiler/analysis/analysis_result.h: In member function 'bool HPHP::BaseTryLock::acquireImpl(HPHP::BlockScopeRawPtr)':
/tmp/ports/usr/ports/lang/hiphop-php/work/facebook-hiphop-php-96532ec/src/compiler/analysis/analysis_result.h:707:22: warning: variable 'current' set but not used [-Wunused-but-set-variable]
Linking CXX executable hphp
/usr/local/lib/libc-client4.so: warning: warning: tmpnam() possibly used unsafely; consider using mkstemp()
/usr/local/lib/libbfd.a(bfd.o): In function `bfd_assert':
bfd.c:(.text+0x8fa): undefined reference to `libintl_dgettext'
/usr/local/lib/libbfd.a(bfd.o): In function `_bfd_abort':
bfd.c:(.text+0x968): undefined reference to `libintl_dgettext'
bfd.c:(.text+0x993): undefined reference to `libintl_dgettext'
bfd.c:(.text+0x9ba): undefined reference to `libintl_dgettext'
/usr/local/lib/libbfd.a(bfd.o): In function `bfd_errmsg':
bfd.c:(.text+0x11b3): undefined reference to `libintl_dgettext'
/usr/local/lib/libbfd.a(bfd.o):bfd.c:(.text+0x1205): more undefined references to `libintl_dgettext' follow
collect2: ld returned 1 exit status
*** Error code 1

Stop in /tmp/ports/usr/ports/lang/hiphop-php/work/facebook-hiphop-php-96532ec.
*** Error code 1

Stop in /tmp/ports/usr/ports/lang/hiphop-php/work/facebook-hiphop-php-96532ec.
*** Error code 1

Stop in /tmp/ports/usr/ports/lang/hiphop-php/work/facebook-hiphop-php-96532ec.
*** Error code 1

Stop in /usr/ports/lang/hiphop-php.
Comment 1 Edwin Groothuis freebsd_committer 2012-07-19 11:50:25 UTC
Responsible Changed
From-To: freebsd-ports-bugs->mm

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Martin Matuska freebsd_committer 2012-07-19 12:15:08 UTC
Could you please tell me if it builds ok if you add the following line
to the port's Makefile:

USE_GETTEXT=yes
right below
USE_OPENLDAP=yes

Thanks.

-- 
Martin Matuska
FreeBSD committer
http://blog.vx.sk
Comment 3 c.kworr 2012-07-19 13:42:30 UTC
Martin Matuska wrote:
> Could you please tell me if it builds ok if you add the following line
> to the port's Makefile:
>
> USE_GETTEXT=yes
> right below
> USE_OPENLDAP=yes

Does nothing for me. Full build log is at: 
http://limbo.xim.bz/hiphop.build.log

-- 
Sphinx of black quartz judge my vow.
Comment 4 Martin Matuska freebsd_committer 2012-07-19 13:50:25 UTC
Ok, I guess you built binutils using WITH_NLS and that causes the error.
I will check on this.

-- 
Martin Matuska
FreeBSD committer
http://blog.vx.sk
Comment 5 c.kworr 2012-07-19 15:23:02 UTC
Martin Matuska wrote:
> Ok, I guess you built binutils using WITH_NLS and that causes the error.
> I will check on this.

Exactly. Rebuilding binutils WITHOUT_NLS fixes linking.

-- 
Sphinx of black quartz judge my vow.
Comment 6 dfilter freebsd_committer 2012-07-19 19:05:27 UTC
Author: mm
Date: Thu Jul 19 18:05:12 2012
New Revision: 301181
URL: http://svn.freebsd.org/changeset/ports/301181

Log:
  Fix build if binutils are linked to gettext [1]
  Depend on libexecinfo
  
  PR:		ports/169996
  Reported by:	Volodymyr Kostyrko

Added:
  head/lang/hiphop-php/files/extra-patch-gettext   (contents, props changed)
Modified:
  head/lang/hiphop-php/Makefile

Modified: head/lang/hiphop-php/Makefile
==============================================================================
--- head/lang/hiphop-php/Makefile	Thu Jul 19 17:43:22 2012	(r301180)
+++ head/lang/hiphop-php/Makefile	Thu Jul 19 18:05:12 2012	(r301181)
@@ -7,7 +7,7 @@
 
 PORTNAME=	hiphop-php
 PORTVERSION=	0.0.20120716
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	lang devel www
 MASTER_SITES=	https://github.com/facebook/hiphop-php/tarball/${GITVERSION}/:main \
 		http://unicode.org/Public/UNIDATA/:unidata \
@@ -38,6 +38,7 @@ LICENSE_DISTFILES_ZEND200=	${PORTNAME}-$
 
 LIB_DEPENDS=	icudata.48:${PORTSDIR}/devel/icu \
 		boost_thread:${PORTSDIR}/devel/boost-libs \
+		execinfo:${PORTSDIR}/devel/libexecinfo \
 		tbb.4:${PORTSDIR}/devel/tbb \
 		gd.4:${PORTSDIR}/graphics/gd \
 		mcrypt.8:${PORTSDIR}/security/libmcrypt \
@@ -47,6 +48,10 @@ LIB_DEPENDS=	icudata.48:${PORTSDIR}/deve
 		memcached.10:${PORTSDIR}/databases/libmemcached \
 		c-client4.9:${PORTSDIR}/mail/cclient
 
+OPTIONS_DEFINE=	NLS
+OPTIONS_DEFAULT=	NLS
+NLS_DESC=	Depend on gettext (required if binutils have NLS)
+
 _EXTDIR=	share/hiphop-php/ext
 
 BUILD_DEPENDS+=	bison:${PORTSDIR}/devel/bison \
@@ -67,6 +72,7 @@ USE_MYSQL=	yes
 USE_GNOME=	libxml2
 USE_OPENSSL=	yes
 USE_OPENLDAP=	yes
+USE_GETTEXT=	yes
 USE_GCC=	4.4+
 
 GITVERSION=	96532ec
@@ -105,6 +111,12 @@ SUB_LIST+=	CC="${CC}" \
 
 SUB_FILES+=	hphp
 
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MNLS}
+EXTRA_PATCHES+=	${FILESDIR}/extra-patch-gettext
+.endif
+
 .include <bsd.port.pre.mk>
 
 _CFLAGS=	-rpath=${LOCALBASE}/lib/${_GCC_BUILD_DEPENDS} \

Added: head/lang/hiphop-php/files/extra-patch-gettext
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/hiphop-php/files/extra-patch-gettext	Thu Jul 19 18:05:12 2012	(r301181)
@@ -0,0 +1,25 @@
+--- CMake/HPHPFindLibs.cmake.orig	2012-07-15 01:13:18.000000000 +0200
++++ CMake/HPHPFindLibs.cmake	2012-07-19 16:20:37.949508810 +0200
+@@ -304,6 +284,14 @@
+ 
+ if (FREEBSD)
+ 	FIND_LIBRARY (EXECINFO_LIB execinfo)
++	FIND_LIBRARY (GETTEXT_LIB intl)
++
++	if (NOT EXECINFO_LIB)
++		message(FATAL_ERROR "You need to install libexecinfo")
++	endif()
++	if (NOT GETTEXT_LIB)
++		message(FATAL_ERROR "You need to install gettext (libintl)")
++	endif()
+ endif()
+ 
+ #find_package(BISON REQUIRED)
+@@ -349,6 +337,7 @@
+ 
+ if (FREEBSD)
+ 	target_link_libraries(${target} ${EXECINFO_LIB})
++	target_link_libraries(${target} ${GETTEXT_LIB})
+ endif()
+ 
+ 	target_link_libraries(${target} ${BFD_LIB})
_______________________________________________
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 7 Martin Matuska freebsd_committer 2012-10-23 21:39:31 UTC
State Changed
From-To: open->closed

Resolved. Thanks!