Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Mar 2014 11:27:26 -0500 (CDT)
From:      Lawrence "The Dreamer" Chen <beastie@tardisi.com>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/188089: [patch] net/freeradius2: fails to build if devel/libexecinfo is installed
Message-ID:  <201403301627.s2UGRQQO079427@zen.lhaven.homeip.net>
Resent-Message-ID: <201403301630.s2UGU0o7083776@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         188089
>Category:       ports
>Synopsis:       [patch] net/freeradius2: fails to build if devel/libexecinfo is installed
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 30 16:30:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Lawrence "The Dreamer" Chen
>Release:        FreeBSD 9.2-RELEASE-p3 amd64
>Organization:
>Environment:
System: FreeBSD zen.lhaven.homeip.net 9.2-RELEASE-p3 FreeBSD 9.2-RELEASE-p3 #0: Sat Jan 11 03:25:02 UTC 2014 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64


	
>Description:
	
	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?)

>How-To-Repeat:
	
>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

--- patch begins here ---
--- 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} \
--- patch ends here ---

	Ref: ports/83905
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403301627.s2UGRQQO079427>