From dom@wirespeed.org.uk  Wed Sep 10 11:02:35 2003
Return-Path: <dom@wirespeed.org.uk>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 5EE3516A4BF
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 10 Sep 2003 11:02:35 -0700 (PDT)
Received: from gadolinium.btinternet.com (gadolinium.btinternet.com [194.73.73.111])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 5AA7343FDD
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 10 Sep 2003 11:02:34 -0700 (PDT)
	(envelope-from dom@wirespeed.org.uk)
Received: from host81-128-4-89.in-addr.btopenworld.com ([81.128.4.89] helo=sausage)
	by gadolinium.btinternet.com with esmtp (Exim 3.22 #23)
	id 19x9Hy-0002Tg-00; Wed, 10 Sep 2003 19:01:58 +0100
Message-Id: <200309101757.45031.dom@wirespeed.org.uk>
Date: Wed, 10 Sep 2003 17:57:44 +0000
From: Dominic Marks <dom@wirespeed.org.uk>
Reply-To: dom@wirespeed.org.uk
To: Palle Girgensohn <girgen@pingpong.net>, FreeBSD-gnats-submit@freebsd.org
Cc: dominic.marks@btinternet.com
In-Reply-To: <200309100135.h8A1ZgTO058398@palle.girgensohn.se>
Subject: Re: apache2 always sets REENTRANT & THREAD_SAFE
References: <200309100135.h8A1ZgTO058398@palle.girgensohn.se>

>Number:         56681
>Category:       ports
>Synopsis:       Re: apache2 always sets REENTRANT & THREAD_SAFE
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    ceri
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 10 11:10:13 PDT 2003
>Closed-Date:    Thu Sep 18 14:03:40 PDT 2003
>Last-Modified:  Thu Sep 18 14:04:15 PDT 2003
>Originator:     Dominic Marks
>Release:        
>Organization:
>Environment:
>Description:
 On Wednesday 10 September 2003 1:35 am, Palle Girgensohn wrote:
 > >Submitter-Id:	current-users
 > >Originator:	Palle Girgensohn <girgen@pingpong.net>
 > >Organization:	PING PONG
 > >Confidential:	no
 > >Synopsis:	apache2 always sets REENTRANT & THREAD_SAFE
 > >Severity:	critical
 > >Priority:	medium
 > >Category:	ports
 > >Class:		sw-bug
 > >Release:	FreeBSD 4.8-STABLE i386
 > >Environment:
 >
 > System: FreeBSD palle.girgensohn.se 4.7-RC FreeBSD 4.7-RC #0: Sun
 > Sep 29 17:21:22 CEST 2002    
 > root@palle.girgensohn.se:/usr/local/obj/usr/src/sys/STORDATAN  i386
 >
 > >Description:
 >
 > After installing apache2 on freebsd4.8, MPM=prefork (i.e. default),
 > $ apxs -q EXTRA_CPPFLAGS
 > -D_REENTRANT -D_THREAD_SAFE
 > $ ldd /usr/local/sbin/httpd
 > ...
 >         libc.so.4 => /usr/lib/libc.so.4 (0x4824c000)
 >
 > and strings /usr/local/sbin/httpd | grep pthread
 > gives nothing.
 >
 > I don't get it; why _REENTRANT and _THREAD_SAFE if there are no
 > threads, and httpd is linked with libc, not libc_r? Seems like a
 > bug to me? The gcc manpage says to use thread_safe only when
 > linking with ptreads, here we don't...
 >
 > This breaks mod_jk that I'm porting right now... apache fails to
 > run with the built mod_jk:
 >
 > Cannot load /usr/local/libexec/apache2/mod_jk.so into server:
 > /usr/local/libexec/apache2/mod_jk.so: Undefined symbol
 > "pthread_mutex_unlock"
 >
 > Hence, this sometimes breaks module building, if the module trusts
 > apxs to give correct CFLAGS & CPPFLAGS.
 >
 > >How-To-Repeat:
 >
 > build apache2 without any extra options, (on freebsd 4.8)
 >
 > $ apxs -q EXTRA_CPPFLAGS
 > -D_REENTRANT -D_THREAD_SAFE
 >
 > although httpd is linked with lib_c.so
 >
 > >Fix:
 
 Thanks for the bug report. I will try and produce a fix soon.
 
 -- 
 Dominic <dom at wirespeed.org.uk>
 
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: ceri 
State-Changed-When: Thu Sep 18 14:02:59 PDT 2003 
State-Changed-Why:  
Misfiled followup to ports/56663 [content migrated]. 


Responsible-Changed-From-To: gnats-admin->ceri 
Responsible-Changed-By: ceri 
Responsible-Changed-When: Thu Sep 18 14:02:59 PDT 2003 
Responsible-Changed-Why:  

Take from gnats-admin. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=56681 
>Unformatted:
