perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <jor...@redhat.com>
Subject Re: MP2.0.2 + HTTPD 2.2.0 Linux test failures (libaprutil-1.so.0: cannot open shared object file)
Date Thu, 18 May 2006 09:41:33 GMT
On Thu, May 04, 2006 at 01:55:01PM +0100, Darryl Miles wrote:
> I am auditing upgrading my development systems for HTTP 2.2.0 usage and 
> thought I should bring your attention the failed test cases.  The host 
> linux system does not have any apache 2.2.x installation and no system 
> libaprutil-1 library, it does have a libaprutil-0 system library.  I do 
> not think it is necessary to have to configure /etc/ld.so.conf to add 
> the custom apache build location in order for ld.so to find the library.
> 
> I believe the problem can easily be corrected by instructing the test 
> harness where to find and load the libaprutil-1.so.0 library from, as 
> this library is installed within the standard apache2 file layout 
> location of my customer apache 2.2 build.  So I think that the mod_perl2 
> should as part of its 'make test' check that APR can be loaded and 
> resolve the filesystem path and force the best candidate library to be 
> loaded during the relevant tests.

The problem is a little tricky to solve.

libtool will ensure that the httpd binary has the right RPATHs set so 
that it can always find the libapr and libaprutil libraries in the 
library path, since it links against libapr-1.la and libaprutil-1.la.  
So this works fine even if apr/apr-util are installed in non-system 
library path.  But this doesn't apply for the mod_perl XS modules since 
they are not linked using libtool.

It's relatively simple to fix at least such that the tests work; the 
generated Makefile could set an LD_LIBRARY_PATH in the environment 
passed to t/TEST (PASSENV).  But this wouldn't help the installed case; 
if you tried to use the Perl XS modules outside of httpd, then they 
could still fail to find the dependent libraries.

There are a few workarounds:

1) set (and export) LD_RUN_PATH to the path containing libapr/libaprutil 
when building mod_perl.  This will ensure that the built XS modules have 
RPATHs pointing to the library paths.

2) adjust your system-wide /etc/ld.so.conf to pick up that same path as 
you mention

joe

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message