Subject: Apache2+ Apache2::Request + unthreaded perl: going nuts
To: None <netbsd-users@netbsd.org>
From: Johan Ihren <johani@ihren.org>
List: netbsd-users
Date: 04/30/2006 16:39:33
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


All,

I'm in the midst of migrating a critical application to Apache2.  
There's not much I can do about that, it's already working just fine  
under Linux and now I must ensure that it continues to work in my  
NetBSD evironment too. This is in a 3.0_STABLE environment with kernel 
+userland from March 2006.

I need Apache2, mod_perl2 and a bunch of sundry perl modules, among  
them Apache2::Request. I install all of this (via pkg_add, haven't  
built anything locally this time) and so far so good. Fire up Apache.  
Get exactly nowhere at all, with the following error in my apache logs:

/usr/pkg/lib/perl5/vendor_perl/5.8.0/i386-netbsd-thread-multi/auto/ 
APR/Request/Apache2/Apache2.so: Undefined PLT symbol  
"apreq_handle_apache2" (symnum = 49)

I have no immediate idea of exactly what this means. But I have tried:

a) booting a current kernel instead (with same userland). No change.

b) building an unthreaded perl (as there was warnings about threaded  
perl from at least one perl module (DBI) that I installed and  
starting from 5.8 or so perl seems to be threaded by default (I'm at  
5.8.7-something).

However, switching to an unthreaded perl means I need to rebuild all  
perl-bits to be unthreaded. This however, does not work out for me,  
but instead crashes and burns in building ap2-perl (i.e. mod_perl2):

===> Building for ap2-perl-2.0.1nb3
cd "src/modules/perl" && /usr/bin/make
cc -I/usr/store/source/netbsd/current/pkgsrc/www/ap2-perl/work.i386/ 
mod_perl-2.0.1/src/modules/perl -I/usr/store/source/netbsd/current/ 
pkgsrc/www/ap2-perl/work.i386/mod_perl-2.0.1/xs -I/usr/pkg/include/ 
apr-0 -I/usr/pkg/include/apr-0 -I/usr/pkg/include -I/usr/pkg/include/ 
httpd -fno-strict-aliasing -pipe -I/usr/pkg/include -I/usr/pkg/lib/ 
perl5/5.8.0/i386-netbsd/CORE -DMOD_PERL -DMP_COMPAT_1X -DNETBSD -O2 - 
pipe -I/usr/include -DPIC -fPIC  -c mod_perl.c && mv mod_perl.o  
mod_perl.lo
In file included from modperl_perl_includes.h:65,
                  from modperl_common_includes.h:23,
                  from mod_perl.h:20,
                  from mod_perl.c:16:
/usr/store/source/netbsd/current/pkgsrc/www/ap2-perl/ 
work.i386/.buildlink/lib/perl5/5.8.0/i386-netbsd/CORE/perl.h:3993:22:  
reentr.inc: No such file or directory

Indeed I cannot find the file "reentr.inc" anywhere.

Come this far I come to the conclusion that I cannot be the first  
person to need the combination of Apache2 + mod_perl + DBI + mysql to  
work and rolling back all threading seems to be the less travelled  
path. I.e. this is probably not where I want to go.

So what am I doing wrong here? If we backtrack to the original error:

/usr/pkg/lib/perl5/vendor_perl/5.8.0/i386-netbsd-thread-multi/auto/ 
APR/Request/Apache2/Apache2.so: Undefined PLT symbol  
"apreq_handle_apache2" (symnum = 49)

Exactly what does that mean?

Utterly frustrated,

Johan

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Darwin)

iD8DBQFEVMwlKJmr+nqSTbYRAkKQAKCD9B2vwtyyX6lgUCLfIHIDCjn1OACfamk3
KoSr6Bht6iJwKA6+9JBzUkM=
=CoIX
-----END PGP SIGNATURE-----