Bug 188089 - [patch] net/freeradius2: fails to build if devel/libexecinfo is installed
Summary: [patch] net/freeradius2: fails to build if devel/libexecinfo is installed
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Ryan Steinmetz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-30 17:30 UTC by Lawrence Chen
Modified: 2014-04-02 23:20 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 Lawrence Chen 2014-03-30 17:30:00 UTC
	
	Links fail with:

	/usr/ports/net/freeradius2/work/freeradius-server-2.2.4/src/lib/.libs/libfreeradius-radius.so: undefined reference to `backtrace_symbols'
	/usr/ports/net/freeradius2/work/freeradius-server-2.2.4/src/lib/.libs/libfreeradius-radius.so: undefined reference to `backtrace'

	Noticed this during the configure:

	configure: WARNING: execinfo.h: accepted by the compiler, rejected by the preprocessor!
	configure: WARNING: execinfo.h: proceeding with the compiler's result

	But, its not linking against libexecinfo.so.

	From the release notes, this is probably related to the feature
	improvement where a "panic_action" that can be set to have the server
	dump a gdb log (backtrace/backtrace_symbols?)

Fix: configure doesn't have a control for this auto-activation, so

	* Make devel/libexecinfo an explicit dependency
	* add -I$(LOCALBASE)/include to CPPFLAGS
	* make -lexecinfo library dependency for libfreeradius-radius.so



Ref: ports/83905--0rfMu32AnfzkYCg9FBErkwyVMjO69SPfIb4ZynosPyLUaAKY
Content-Type: text/plain; name="patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="patch"

--- Makefile.orig	2014-03-29 10:26:34.000000000 -0500
+++ Makefile	2014-03-30 10:31:07.000000000 -0500
@@ -16,7 +16,8 @@
 
 LICENSE=	GPLv2
 
-LIB_DEPENDS=	libgdbm.so:${PORTSDIR}/databases/gdbm
+LIB_DEPENDS=	libgdbm.so:${PORTSDIR}/databases/gdbm \
+		libexecinfo.so:${PORTSDIR}/devel/libexecinfo
 
 LOGDIR?=	/var/log
 KRB5_CONFIG?=	/usr/bin/krb5-config --libs
@@ -31,7 +32,8 @@
 USE_BZIP2=	yes
 USE_OPENSSL=	yes
 MAKE_ARGS+=	LDFLAGS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}"
-CFLAGS+=	-I${LOCALBASE}/include -L${LOCALBASE}/lib
+CPPFLAGS+=	-I${LOCALBASE}/include
+CFLAGS+=	-I${LOCALBASE}/include
 MAKE_JOBS_UNSAFE=	yes
 
 PLIST_SUB=	PORTVERSION=${DISTVERSION} LIBVER=0${PORTVERSION:C/\./0/g}
@@ -386,6 +388,10 @@
 	@cd ${WRKSRC}/src/modules/rlm_perl && ${AUTOCONF} -I ${WRKSRC}
 	@cd ${WRKSRC}/src/modules/rlm_python && ${AUTOCONF} -I ${WRKSRC}
 
+post-configure:
+	@${REINPLACE_CMD} -e "s:(LDFLAGS):(LDFLAGS) -lexecinfo:" \
+		${WRKSRC}/src/lib/Makefile
+	
 pre-install:
 # Run pkg-install PRE-INSTALL
 	@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} \
Comment 1 Edwin Groothuis freebsd_committer 2014-03-30 17:30:03 UTC
Responsible Changed
From-To: freebsd-ports-bugs->zi

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer 2014-04-02 23:19:55 UTC
Author: zi
Date: Wed Apr  2 22:19:50 2014
New Revision: 349957
URL: http://svnweb.freebsd.org/changeset/ports/349957
QAT: https://qat.redports.org/buildarchive/r349957/

Log:
  - Fix build when devel/libexecinfo is present
  - Bump PORTREVISION
  
  PR:		ports/188089
  Submitted by:	Lawrence "The Dreamer" Chen <beastie@tardisi.com>, feld@, Konstantin Belousov <kostikbel@gmail.com>

Modified:
  head/net/freeradius2/Makefile
  head/net/freeradius3/Makefile

Modified: head/net/freeradius2/Makefile
==============================================================================
--- head/net/freeradius2/Makefile	Wed Apr  2 21:21:21 2014	(r349956)
+++ head/net/freeradius2/Makefile	Wed Apr  2 22:19:50 2014	(r349957)
@@ -3,6 +3,7 @@
 
 PORTNAME=	freeradius
 DISTVERSION=	2.2.4
+PORTREVISION=	1
 CATEGORIES=	net
 MASTER_SITES=	ftp://ftp.freeradius.org/pub/freeradius/%SUBDIR%/ \
 		ftp://ftp.ntua.gr/pub/net/radius/freeradius/%SUBDIR%/ \
@@ -331,6 +332,9 @@ MAN8=		radiusd.8 radmin.8 raddebug.8 rad
 SUB_LIST+=	REQUIRE="${_REQUIRE}"
 
 post-patch:
+# never try to find execinfo.h (needed until we can enable/disable backtrace
+	@${REINPLACE_CMD} -e '/execinfo.h/d' ${WRKSRC}/configure \
+		${WRKSRC}/configure.in
 # Patch Makefile / Makefile.in throughout the source tree to install raddb
 # contents in ${EXAMPLESDIR}/raddb rather than the raddbdir from configure
 	@${FIND} -E ${WRKSRC} -regex '.*/Makefile(\.in)?$$' -exec \

Modified: head/net/freeradius3/Makefile
==============================================================================
--- head/net/freeradius3/Makefile	Wed Apr  2 21:21:21 2014	(r349956)
+++ head/net/freeradius3/Makefile	Wed Apr  2 22:19:50 2014	(r349957)
@@ -3,6 +3,7 @@
 
 PORTNAME=	freeradius
 DISTVERSION=	3.0.2
+PORTREVISION=	1
 CATEGORIES=	net
 MASTER_SITES=	ftp://ftp.freeradius.org/pub/freeradius/%SUBDIR%/ \
 		ftp://ftp.ntua.gr/pub/net/radius/freeradius/%SUBDIR%/ \
@@ -358,6 +359,9 @@ MAN8=		radiusd.8 radmin.8 raddebug.8 rad
 SUB_LIST+=	REQUIRE="${_REQUIRE}"
 
 post-patch:
+# never try to find execinfo.h (needed until we can enable/disable backtrace
+	@${REINPLACE_CMD} -e '/execinfo.h/d' ${WRKSRC}/configure \
+		${WRKSRC}/configure.in
 	@${REINPLACE_CMD} -Ee "s:tests/all.mk ::" ${WRKSRC}/src/all.mk
 	@${CP} ${WRKSRC}/m4/ax_with_prog.m4 ${WRKSRC}
 	@${REINPLACE_CMD} -Ee "s:^make:${GMAKE}:" \
_______________________________________________
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 3 Ryan Steinmetz freebsd_committer freebsd_triage 2014-04-02 23:20:21 UTC
State Changed
From-To: open->closed

Fix committed.