Subject: Re: apache/ap-python core on NetBSD/i386 3.0_STABLE
To: Joerg Sonnenberger <joerg@britannica.bec.de>
From: Gary Duzan <gary@duzan.org>
List: pkgsrc-users
Date: 08/01/2006 05:23:02
In Message <20060731125830.GB6081@britannica.bec.de> ,
   Joerg Sonnenberger <joerg@britannica.bec.de> wrote:

=>On Mon, Jul 31, 2006 at 05:49:39AM -0400, Gary Duzan wrote:
=>>    Since upgrading apache to 1.3.36 httpd cores on startup when
=>> mod_python is configured; otherwise it comes up fine. The backtrace
=>> is always:
=>
=>Is httpd linked against -lpthread itself or not?

   Oh, right. I had forgotten about that. Too obvious, I guess.
No, it wasn't. It must be a regression since I didn't have the
problem before. This works for me, but probably isn't right for
older NetBSD:

Index: Makefile
===================================================================
RCS file: /usr2/netbsd-cvs/pkgsrc/www/apache/Makefile,v
retrieving revision 1.188
diff -u -p -r1.188 Makefile
--- Makefile	30 Jul 2006 11:17:51 -0000	1.188
+++ Makefile	1 Aug 2006 08:33:09 -0000
@@ -126,6 +126,10 @@ MAKE_ENV+=		LINK_LIBGCC_LDFLAGS=${LINK_L
 LINK_LIBGCC_LDFLAGS+=	-lgcc_s
 .    endif
 .  endif
+#
+# We need pthreads in case one of our DSO modules use them.
+#
+LDFLAGS+=		-lpthread
 .endif
 
 BUILD_DEFS+=		APACHE_CUSTOM_CFLAGS
===================================================================

   That just leaves the question of ap-python on NetBSD/amd64-current.
It looks like amd64 and/or gcc4 doesn't want to make shared library
without compiling things with -fPIC (or "apxs -c", which also does
a "ld -shared -o foo.so foo.o" for each object.) Should we try to
get the module to use "apxs -c"? I haven't found the right pkgsrc
incantation to get the build to use it yet.

   Thanks.

					Gary Duzan