You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Carl Brewer <ca...@bl.echidna.id.au> on 2004/08/27 00:12:26 UTC

[mp2] a little OT, problem finding libapr


After upgrading to Stas' latest MP2 stuff a few days ago,
I started seeing the following error on a perl script that's
not running through mp2, which I thought a little odd!

steel1: {12} /data/www/aboc/utils/session_cleanup.pl
Can't load 
'/usr/local/perl-5.8.5/lib/site_perl/5.8.5/i386-netbsd/auto/APR/APR.so' 
for module APR: Shared object "libapr-0.so.9" not found at 
/usr/local/perl-5.8.5/lib/5.8.5/i386-netbsd/DynaLoader.pm line 230.
  at /usr/local/perl-5.8.5/lib/site_perl/5.8.5/i386-netbsd/APR/Bucket.pm 
line 23
Compilation failed in require at 
/usr/local/perl-5.8.5/lib/site_perl/5.8.5/i386-netbsd/APR/Bucket.pm line 23.
BEGIN failed--compilation aborted at 
/usr/local/perl-5.8.5/lib/site_perl/5.8.5/i386-netbsd/APR/Bucket.pm line 23.
Compilation failed in require at /data/www/aboc/lib/CB.pm line 378.
BEGIN failed--compilation aborted at /data/www/aboc/lib/CB.pm line 378.
Compilation failed in require at /data/www/aboc/utils/session_cleanup.pl 
line 7.
BEGIN failed--compilation aborted at 
/data/www/aboc/utils/session_cleanup.pl line 7.


This is on NetBSD 1.6.2, and libapr-0.so.9 exists :

steel1: {13} locate libapr-0.so.9
/usr/local/apache2/lib/libapr-0.so.9
/usr/local/apache2/lib/libapr-0.so.9.2
/usr/local/apache2/lib/libapr-0.so.9.3
/usr/local/apache2/lib/libapr-0.so.9.4
/usr/local/apache2/lib/libapr-0.so.9.5


The offending line in CB.pm is :

     use APR::Bucket ();

Which is obviously Apache stuff, so it's probably been affected by
something.  I don't understand why it's not seeing the library
though?

I've tried upgrading to a fresh install of perl 5.8.5 (I was
running 5.8.4) and the latest libapreq2 from Joe this morning,
and recompiing & reinstalling apache2 (2.0.50) hoping that
something in one of those installs would fix whatever's not
looking for the library in the right place, but to no avail.

Any suggestions?

thanks!

Carl





-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [mp2] a little OT, problem finding libapr

Posted by Joe Schaefer <jo...@sunstarsys.com>.
Carl Brewer <ca...@bl.echidna.id.au> writes:

[...]

> Out of curiosity, is anyone working on docs for apreq2 for
> people in a hurry? :)  Ie: with simple examples in it?

Not that I am aware of; I think that makes you
the first volunteer :-).

May I suggest you add these to FAQ.pod instead of the
API docs?  There are plenty of examples in those 
already, and the neat thing is that almost all of 
them are tested to work as documented.

-- 
Joe Schaefer

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [mp2] a little OT, problem finding libapr

Posted by Carl Brewer <ca...@bl.echidna.id.au>.
Stas Bekman wrote:


> I'd suggest to completely nuke /usr/local/apache2, install Apache from 
> scratch and chances are that everything will work fine. You have too 
> many old libs there.

I did that, and still had the same problem.  I ended up setting
LD_LIBRARY_PATH to /usr/local/apache2/lib and it was all ok
again.

I've also moved my code to using apreq2, instead of the Stas &
Carl hack job I was running :) (I cheated and used a wrapper change,
so I didn't have to do wholesale changes to my code).

Out of curiosity, is anyone working on docs for apreq2 for
people in a hurry? :)  Ie: with simple examples in it?

Carl



-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [mp2] a little OT, problem finding libapr

Posted by Carl Brewer <ca...@bl.echidna.id.au>.
> I'd suggest to completely nuke /usr/local/apache2, install Apache from 
> scratch and chances are that everything will work fine. You have too 
> many old libs there.

I'll give that a go tonight or tomorrow when I get a few spare hours,
thanks!


> 


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [mp2] a little OT, problem finding libapr

Posted by Stas Bekman <st...@stason.org>.
Carl Brewer wrote:

> 2. Used Components and their Configuration:

> *** The httpd binary was not found

doh! another Apache-Test bug to fix :(

> *** (apr|apu)-config linking info
> 
>  -L/usr/local/apache2/lib -lapr-0 -lm -lcrypt -lresolv
>  -L/usr/local/apache2/lib -laprutil-0 -lexpat

Looks good. It's probably a problem of symlinks then. It should be:

ls -l ~/httpd/prefork/lib/libapr-0*
-rw-r--r--  1 stas stas  475250 Aug 20 12:19 
/home/stas/httpd/prefork/lib/libapr-0.a
-rw-r--r--  1 stas stas     765 Aug 20 12:19 
/home/stas/httpd/prefork/lib/libapr-0.la
lrwxrwxrwx  1 stas stas      17 Aug 20 12:19 
/home/stas/httpd/prefork/lib/libapr-0.so -> libapr-0.so.0.9.5
lrwxrwxrwx  1 stas stas      26 Aug 20 12:19 
/home/stas/httpd/prefork/lib/libapr-0.so.0 -> libapr-0.so.0.9.5-nondebug
-rwxr-xr-x  1 stas stas  383263 Aug 20 12:19 
/home/stas/httpd/prefork/lib/libapr-0.so.0.9.5
-rwxr-xr-x  1 stas stas 1381266 Sep 30  2003 
/home/stas/httpd/prefork/lib/libapr-0.so.0.9.5-debug
-rwxr-xr-x  1 stas stas 1379306 Sep 30  2003 
/home/stas/httpd/prefork/lib/libapr-0.so.0.9.5-nondebug

at least that's how things work on linux.

ldd /home/stas/apache.org/mp2-pool/blib/arch/Apache2/auto/APR/APR.so
         libapr-0.so.0 => /home/stas/httpd/prefork/lib/libapr-0.so.0 
(0x40007000)

So -lapr-0 links to libapr-0.so.0 which is a symlink to libapr-0.so.0.9.5

I'd suggest to completely nuke /usr/local/apache2, install Apache from 
scratch and chances are that everything will work fine. You have too many 
old libs there.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [mp2] a little OT, problem finding libapr

Posted by Carl Brewer <ca...@bl.echidna.id.au>.
> 
> Please send the output of mp2bug as requested before.
> 

Done.

I just pulled the latest CVS down, same problem.


-------------8<---------- Start Bug Report ------------8<----------
1. Problem Description:

   [DESCRIBE THE PROBLEM HERE]

2. Used Components and their Configuration:

*** mod_perl version 1.9917

*** using /data/src/modperl-2.0/bin/../lib/Apache/BuildConfig.pm

*** Makefile.PL options:
   MP_APR_LIB     => aprext
   MP_APXS        => /usr/local/apache2/bin/apxs
   MP_COMPAT_1X   => 1
   MP_GENERATE_XS => 1
   MP_LIBNAME     => mod_perl
   MP_USE_DSO     => 1
   MP_USE_STATIC  => 1


*** The httpd binary was not found


*** (apr|apu)-config linking info

  -L/usr/local/apache2/lib -lapr-0 -lm -lcrypt -lresolv
  -L/usr/local/apache2/lib -laprutil-0 -lexpat



*** /usr/local/perl-5.8.5/bin/perl -V
Summary of my perl5 (revision 5 version 8 subversion 5) configuration:
   Platform:
     osname=netbsd, osvers=1.6.2, archname=i386-netbsd
     uname='netbsd steel1.stealstopper.com 1.6.2 netbsd 1.6.2 (generic) 
#0: tue feb 10 21:53:10 utc 2004 
autobuild@tgm.netbsd.org:autobuildnetbsd-1-6-patch002i386objautobuildnetbsd-1-6-patch002srcsysarchi386compilegeneric 
i386 '
     config_args=''
     hint=recommended, useposix=true, d_sigaction=define
     usethreads=undef use5005threads=undef useithreads=undef 
usemultiplicity=undef
     useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
     use64bitint=undef use64bitall=undef uselongdouble=undef
     usemymalloc=y, bincompat5005=undef
   Compiler:
     cc='cc', ccflags ='-fno-strict-aliasing -pipe -I/usr/pkg/include',
     optimize='-O',
     cppflags='-fno-strict-aliasing -pipe -I/usr/pkg/include'
     ccversion='', gccversion='2.95.3 20010315 (release) (NetBSD nb3)', 
gccosandvers=''
     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
     ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
     alignbytes=4, prototype=define
   Linker and Libraries:
     ld='cc', ldflags =' -Wl,-rpath,/usr/pkg/lib 
-Wl,-rpath,/usr/local/lib -L/usr/pkg/lib -L/usr/local/lib'
     libpth=/usr/pkg/lib /usr/local/lib /usr/lib
     libs=-lm -lcrypt -lutil -lc -lposix
     perllibs=-lm -lcrypt -lutil -lc -lposix
     libc=/usr/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so
     gnulibc_version=''
   Dynamic Linking:
     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E 
-Wl,-R/usr/local/perl-5.8.5/lib/5.8.5/i386-netbsd/CORE'
     cccdlflags='-DPIC -fPIC ', lddlflags='--whole-archive -shared 
-L/usr/pkg/lib -L/usr/local/lib'


Characteristics of this binary (from libperl):
   Compile-time options: USE_LARGE_FILES
   Built under netbsd
   Compiled at Aug 25 2004 14:17:37
   %ENV:
     PERL_LWP_USE_HTTP_10="1"
   @INC:
     /usr/local/perl-5.8.5/lib/5.8.5/i386-netbsd
     /usr/local/perl-5.8.5/lib/5.8.5
     /usr/local/perl-5.8.5/lib/site_perl/5.8.5/i386-netbsd
     /usr/local/perl-5.8.5/lib/site_perl/5.8.5
     /usr/local/perl-5.8.5/lib/site_perl
     /usr/local/perl-5.8.4
     /usr/local/perl-5.8.1
     .

*** Packages of interest status:

Apache::Request: -
CGI            : 3.05
LWP            : 5.800
mod_perl       : 1.9917


3. This is the core dump trace: (if you get a core dump):

   [CORE TRACE COMES HERE]

This report was generated by ./mp2bug on Fri Aug 27 00:16:18 2004 GMT.

-------------8<---------- End Bug Report --------------8<----------



-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [mp2] a little OT, problem finding libapr

Posted by Stas Bekman <st...@stason.org>.
Carl Brewer wrote:
> Stas Bekman wrote:
> 
> 
>> Carl, remember to always file a proper bug report and save yourself 
>> and us time. The report includes the info we need. Other than that, 
>> please send us the output of:
> 
> 
> I would, except I don't think it's a bug report, it's probably a
> stuff-up at my end :)

don't let the "bug" word mislead you. The report includes information w/o 
which we can't help you even if the problem is on your side.

>> ldd /usr/local/perl-5.8.5/lib/site_perl/5.8.5/i386-netbsd/auto/APR/APR.so
> 
> 
> steel1: {15} ldd 
> /usr/local/perl-5.8.5/lib/site_perl/5.8.5/i386-netbsd/auto/AP
> APR.so
> /usr/local/perl-5.8.5/lib/site_perl/5.8.5/i386-netbsd/auto/APR/APR.so:
>          -lapr-0.9 => not found
>          -lm.0 => /usr/lib/libm387.so.0
>          -lm.0 => /usr/lib/libm.so.0
>          -lcrypt.0 => /usr/lib/libcrypt.so.0
>          -lresolv.1 => /usr/lib/libresolv.so.1
>          -laprutil-0.9 => not found
>          -lexpat.5 => /usr/pkg/lib/libexpat.so.5
> 
> 
> 
>> ls -l /usr/local/apache2/lib/libapr-0.so.9
> 
> 
> steel1: {16} ls -l /usr/local/apache2/lib/libapr-0.so.9
> lrwxrwxr-x  1 root  wheel  15 Aug 25 08:42 
> /usr/local/apache2/lib/libapr-0.so.9 -> libapr-0.so.9.5
> 
> 
> 
> Obviously the lapr being missing is a problem!

Please send the output of mp2bug as requested before.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [mp2] a little OT, problem finding libapr

Posted by Carl Brewer <ca...@bl.echidna.id.au>.
Stas Bekman wrote:


> Carl, remember to always file a proper bug report and save yourself and 
> us time. The report includes the info we need. Other than that, please 
> send us the output of:

I would, except I don't think it's a bug report, it's probably a
stuff-up at my end :)


> 
> ldd /usr/local/perl-5.8.5/lib/site_perl/5.8.5/i386-netbsd/auto/APR/APR.so

steel1: {15} ldd 
/usr/local/perl-5.8.5/lib/site_perl/5.8.5/i386-netbsd/auto/AP
APR.so
/usr/local/perl-5.8.5/lib/site_perl/5.8.5/i386-netbsd/auto/APR/APR.so:
          -lapr-0.9 => not found
          -lm.0 => /usr/lib/libm387.so.0
          -lm.0 => /usr/lib/libm.so.0
          -lcrypt.0 => /usr/lib/libcrypt.so.0
          -lresolv.1 => /usr/lib/libresolv.so.1
          -laprutil-0.9 => not found
          -lexpat.5 => /usr/pkg/lib/libexpat.so.5



> ls -l /usr/local/apache2/lib/libapr-0.so.9

steel1: {16} ls -l /usr/local/apache2/lib/libapr-0.so.9
lrwxrwxr-x  1 root  wheel  15 Aug 25 08:42 
/usr/local/apache2/lib/libapr-0.so.9 -> libapr-0.so.9.5



Obviously the lapr being missing is a problem!




-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [mp2] a little OT, problem finding libapr

Posted by Stas Bekman <st...@stason.org>.
Carl Brewer wrote:
> 
> 
> After upgrading to Stas' latest MP2 stuff a few days ago,
> I started seeing the following error on a perl script that's
> not running through mp2, which I thought a little odd!
> 
> steel1: {12} /data/www/aboc/utils/session_cleanup.pl
> Can't load 
> '/usr/local/perl-5.8.5/lib/site_perl/5.8.5/i386-netbsd/auto/APR/APR.so' 
> for module APR: Shared object "libapr-0.so.9" not found at 
> /usr/local/perl-5.8.5/lib/5.8.5/i386-netbsd/DynaLoader.pm line 230.
>  at /usr/local/perl-5.8.5/lib/site_perl/5.8.5/i386-netbsd/APR/Bucket.pm 
> line 23
> Compilation failed in require at 
> /usr/local/perl-5.8.5/lib/site_perl/5.8.5/i386-netbsd/APR/Bucket.pm line 
> 23.
> BEGIN failed--compilation aborted at 
> /usr/local/perl-5.8.5/lib/site_perl/5.8.5/i386-netbsd/APR/Bucket.pm line 
> 23.
> Compilation failed in require at /data/www/aboc/lib/CB.pm line 378.
> BEGIN failed--compilation aborted at /data/www/aboc/lib/CB.pm line 378.
> Compilation failed in require at /data/www/aboc/utils/session_cleanup.pl 
> line 7.
> BEGIN failed--compilation aborted at 
> /data/www/aboc/utils/session_cleanup.pl line 7.
> 
> 
> This is on NetBSD 1.6.2, and libapr-0.so.9 exists :
> 
> steel1: {13} locate libapr-0.so.9
> /usr/local/apache2/lib/libapr-0.so.9
> /usr/local/apache2/lib/libapr-0.so.9.2
> /usr/local/apache2/lib/libapr-0.so.9.3
> /usr/local/apache2/lib/libapr-0.so.9.4
> /usr/local/apache2/lib/libapr-0.so.9.5
> 
> 
> The offending line in CB.pm is :
> 
>     use APR::Bucket ();
> 
> Which is obviously Apache stuff, so it's probably been affected by
> something.  I don't understand why it's not seeing the library
> though?
> 
> I've tried upgrading to a fresh install of perl 5.8.5 (I was
> running 5.8.4) and the latest libapreq2 from Joe this morning,
> and recompiing & reinstalling apache2 (2.0.50) hoping that
> something in one of those installs would fix whatever's not
> looking for the library in the right place, but to no avail.
> 
> Any suggestions?

Carl, remember to always file a proper bug report and save yourself and us 
time. The report includes the info we need. Other than that, please send 
us the output of:

ldd /usr/local/perl-5.8.5/lib/site_perl/5.8.5/i386-netbsd/auto/APR/APR.so

and

ls -l /usr/local/apache2/lib/libapr-0.so.9


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html