Apache Loads Multiple Version of Libexpat

Apache Loads Multiple Version of Libexpat

am 07.04.2008 04:16:13 von Luyi Chen

Hi,

I am using Apache2.2.6 on Ubuntu6.06. My installation of Apache is in this way:
1) I installed Apache included apr
2) I downloaded apr-util-1.2.12 from Apache website, because the
included apr-util cannot be installed
(If you are interested, I got this error: libtool: install: error:
cannot install `libaprutil-1.la' to a
directory not ending in /usr/local/apache2/lib)
During installation of apr-util, I used --with-expat=/usr to tell it
to use my system installed libexpat.
3) In my Apache2 lib directory, there's an old version libexpat
sitting there, because I originally installed Apache without
--with-expat option.

4) After recompilation, I issued ldd httpd, the result is as following:

libz.so.1 => /usr/lib/libz.so.1 (0x00002aebe6011000)
libm.so.6 => /lib/libm.so.6 (0x00002aebe6127000)
libaprutil-1.so.0 =>
/usr/local/apr-util-httpd//lib/libaprutil-1.so.0 (0x00002aebe62ac000)
libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00002aebe63c4000)
libapr-1.so.0 => /usr/local/apache2/lib/libapr-1.so.0
(0x00002aebe64e8000)
librt.so.1 => /lib/librt.so.1 (0x00002aebe6610000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x00002aebe6718000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00002aebe684c000)
libdl.so.2 => /lib/libdl.so.2 (0x00002aebe6961000)
libc.so.6 => /lib/libc.so.6 (0x00002aebe6a63000)
/lib64/ld-linux-x86-64.so.2 (0x00002aebe5efa000)

httpd is now using libexpat in /usr/lib directory, which is the system
installed libexpat.

5) After restarted Apache, I checked opening file of the running
Apache, I got this:

$ ps aux | grep http | head -3
root 4757 0.0 3.9 47972 10212 ? Ss Apr04 0:00
/usr/local/apache2/bin/httpd -k restart
apache 29984 0.0 3.4 48104 8992 ? S 23:31 0:00
/usr/local/apache2/bin/httpd -k restart
apache 29985 0.0 3.2 47972 8580 ? S 23:31 0:00
/usr/local/apache2/bin/httpd -k restart

$ sudo /usr/sbin/lsof -p 4757 | grep expat
httpd 4757 root mem REG 8,1 397288 1183944
/usr/local/apache2/lib/libexpat.so.0.1.0
httpd 4757 root mem REG 8,1 143944 1115945
/usr/lib/libexpat.so.1.0.0

As the result shows, Apache loads two version of libexpat. The one in
Apache installation location is not needed as shown by ldd result.

The two libexpats are in different versions. The one in Apache
directory is 1.95.2, while the one in /usr/lib directory is 1.95.8. I
have also installed mod_python 3.3.1, so the conflict of libexpat
version crashes Apache every time libexpat is used.

Anyone has idea to solve this? Many thanks.

Luyi

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org