Date: Wed, 10 Sep 2003 03:35:42 +0200 (CEST) From: Palle Girgensohn <girgen@pingpong.net> To: FreeBSD-gnats-submit@FreeBSD.org Cc: dominic.marks@btinternet.com Subject: ports/56663: apache2 always sets REENTRANT & THREAD_SAFE Message-ID: <200309100135.h8A1ZgTO058398@palle.girgensohn.se> Resent-Message-ID: <200309100140.h8A1eEds014622@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200309100135.h8A1ZgTO058398>