Hi

The system I am using is:
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.6 (Tikanga)
$ uname -a
Linux lb-cbga-04 2.6.18-238.5.1.el5 #1 SMP Mon Feb 21 05:52:39 EST 2011 x86_64 x86_64 x86_64 GNU/Linux

I'm trying to build and run apache 2.4 using locally built apr and apr-utilis libraries. I downloaded the apr libraries, configured and built them as follows:

apr-1.4.6
$ CC="gcc" CFLAGS="-O2" ./configure --prefix=/lb-cbga-04/usr/local/apr
$ make
$ make install
seemed to go Ok

apr-util-1.4.1
$ CC="gcc" CFLAGS="-O2" ./configure --prefix=/lb-cbga-04/usr/local/apr-util --with-apr=/lb-cbga-04/usr/local/apr
$ make
$ make install
seemed to go Ok

Then configured and built httpd:
$ CC="gcc" CFLAGS="-O2" ./configure --prefix=/lb-cbga-04/usr/local/httpd --with-apr=/lb-cbga-04/usr/local/apr --with-apr-util=/lb-cbga-04/usr/local/apr-util
$ make
$ make install
seemed to go Ok


However when I try to start apache I get the following link error:
httpd: Syntax error on line 140 of /lb-cbga-04/usr/local/httpd/conf/httpd.conf: Cannot load /lb-cbga-04/usr/local/httpd/modules/mod_dir.so into server: /lb-cbga-04/usr/local/httpd/modules/mod_dir.so: undefined symbol: apr_array_clear

I have set LD_RUN_PATH=/lb-cbga-04/usr/local/apr/lib:/lb-cbga-04/usr/local/apr-util/lib:/lb-cbga-04/usr/local/apr-iconf/lib (which is where I have put the locally built apr libraries)

$ readelf -d /lb-cbga-04/usr/local/httpd/modules/mod_dir.so | grep RPATH
0x000000000000000f (RPATH) Library rpath: [/lb-cbga-04/usr/local/apr/lib:/lb-cbga-04/usr/local/apr-util/lib:/lb-cbga-04/usr/local/apr-iconf/lib:/tools/oss/packages/x86_64-rhel5/gcc/default/lib64:/tools/oss/packages/x86_64-rhel5/gcc/default/lib:/tools/oss/local/x86_64-rhel5/lib:/tools/oss/local/x86_64-rhel5/lib]

At this point I am a bit stuck.
Anyone have an idea about how I might go about debugging the link problem ?

A little more information -
After building httpd it still uses the original apr libraries:
$ ldd httpd | grep apr
libaprutil-1.so.0 => /usr/lib64/libaprutil-1.so.0 (0x00002b45c0312000)
libapr-1.so.0 => /usr/lib64/libapr-1.so.0 (0x00002b45c052d000)

$ readelf -d httpd | grep RPATH
0x000000000000000f (RPATH) Library rpath: [/usr/lib64]

So LD_RUN_PATH is having no effect when building the httpd executable.