ports/57047: Ports fail to detect threads libraries on -CURRENT

Scot W. Hetzel hetzelsw at westbend.net
Sun Sep 21 01:20:03 UTC 2003


>Number:         57047
>Category:       ports
>Synopsis:       Ports fail to detect threads libraries on -CURRENT
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 20 18:20:00 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Scot W. Hetzel
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
West Bend Internet
>Environment:
System: FreeBSD database.westbend.net 5.1-CURRENT FreeBSD 5.1-CURRENT #5: Tue Aug 19 12:12:38 CDT 2003     root at current.westbend.net:/usr/obj/usr/src/C/sys/WB  i386

>Description:
	-CURRENT's gcc no longer has the -pthreads flags.  With this removal of -pthreads,
	ports that try to detect the threads libraries will no longer compile on -CURRENT
	with threads support.

>How-To-Repeat:
	Try to compile security/amavisd as follows:

	    make -DWITH_MILTER build
>Fix:
	Apply the following patch to bsd.port.mk.

	NOTE: This will only fix the ports that have configure scripts that check the
	      value of PTHREAD_{CFLAGS,LIBS} for the thread library to use.

Index: bsd.port.mk
===================================================================
RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.466
diff -u -r1.466 bsd.port.mk
--- bsd.port.mk	29 Aug 2003 02:26:02 -0000	1.466
+++ bsd.port.mk	21 Sep 2003 00:56:11 -0000
@@ -1634,8 +1634,10 @@
 PTHREAD_CFLAGS=	-D_THREAD_SAFE
 PTHREAD_LIBS=		-pthread
 .else
-PTHREAD_CFLAGS=	-D_THREAD_SAFE
-PTHREAD_LIBS=		-lc_r
+PTHREAD_CFLAGS?=	-D_THREAD_SAFE
+PTHREAD_LIBS?=		-lc_r
+CONFIGURE_ENV+=	PTHREAD_CFLAGS=${PTHREAD_CFLAGS} \
+		PTHREAD_LIBS=${PTHREAD_LIBS}
 .endif
 
 .if exists(/usr/bin/fetch)
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list