ports/56663: apache2 always sets REENTRANT & THREAD_SAFE
Palle Girgensohn
girgen at pingpong.net
Wed Sep 10 01:40:18 UTC 2003
>Number: 56663
>Category: ports
>Synopsis: apache2 always sets REENTRANT & THREAD_SAFE
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Sep 09 18:40:14 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Palle Girgensohn <girgen at pingpong.net>
>Release: FreeBSD 4.8-STABLE i386
>Organization:
PING PONG
>Environment:
System: FreeBSD palle.girgensohn.se 4.7-RC FreeBSD 4.7-RC #0: Sun Sep 29 17:21:22 CEST 2002 root at 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:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list