perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <>
Subject Re: MP2.0.2 + HTTPD 2.2.0 Linux test failures ( 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/ to add 
> the custom apache build location in order for to find the library.
> I believe the problem can easily be corrected by instructing the test 
> harness where to find and load the 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 and  
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/ to pick up that same path as 
you mention


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message