Subject: Re: apache, ap-perl and pthread
To: None <tech-pkg@netbsd.org>
From: Jukka Salmi <j+nbsd@2006.salmi.ch>
List: tech-pkg
Date: 03/15/2006 12:49:25
Geert Hendrickx --> tech-pkg (2006-03-15 12:00:05 +0100):
> On Thu, Mar 09, 2006 at 06:04:37PM +0100, Manuel Bouyer wrote:
> > since perl is compiled with threads by default, ap-perl doesn't work
> > anymore with apache-1.3. This is because ap-perl is linked with threads
> > and httpd isn't. Adding -lpthreads when linking httpd fixes this. For now
> > I've done this by hand when building apache for the few servers where I
> > still use apache-1.3 + mod_perl.
> > 
> > What is the best way to fix this in pkgsrc (if we really want to fix it) ?
> 
> Until a proper fix is found, we should at least *document* this: e.g.
> adding something like "to use mod_perl, you must compile apache with
> APACHE_CUSTOM_CFLAGS=-pthread in /etc/mk.conf" to www/ap-perl/MESSAGE.  

Manuel, is this with NetBSD prior to 2.0?

I'm using apache-1.3.34nb6 (built from pkgsrc without any manual
changes) on a NetBSD/i386 2.1_STABLE system, and httpd is linked with
libpthread:

$ ldd /usr/pkg/sbin/httpd
/usr/pkg/sbin/httpd:
         -lgcc_s.1 => /usr/lib/libgcc_s.so.1
	 -lcrypt.0 => /usr/lib/libcrypt.so.0
	 -lmm.14 => /usr/pkg/lib/libmm.so.14
	 -lexpat.1 => /usr/pkg/lib/libexpat.so.1
	 -lpthread.0 => /usr/lib/libpthread.so.0
	 -lc.12 => /usr/lib/libc.so.12

The system in question also uses ap-perl:

$ ldd /usr/pkg/lib/httpd/mod_perl.so
/usr/pkg/lib/httpd/mod_perl.so:
         -lm.0 => /usr/lib/libm387.so.0
	 -lm.0 => /usr/lib/libm.so.0
	 -lcrypt.0 => /usr/lib/libcrypt.so.0
	 -lpthread.0 => /usr/lib/libpthread.so.0
	 -lperl => /usr/pkg/lib/perl5/5.8.0/i386-netbsd-thread-multi/CORE/libperl.so


Cheers, Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~