[mod_python] Mod_python compilation question, per your's comment on "What Powers Curse"

Graham Dumpleton graham.dumpleton at gmail.com
Mon May 28 06:03:26 EDT 2007


On 28/05/07, ÕÅ³É <czhang.web at gmail.com> wrote:
> Graham or other mod_python gurus on the m-list:
>
> I tried to verify our mod_python compilation/installation is indeed
> correct after I read the comment <http://www.davidcramer.net/curse/44/
> what-powers-curse.html#comment-9271>, especially this part:
> [quote]
> As a reference point for discussion a correctly compiled Python/
> mod_python should only result in an Apache mod_python.so loadable
> module of at most about 400 kilobytes.
> [/quote]
>
> Unfortunately, ours mod_python.so is 1.3M in size:
> # ls -lh /usr/lib64/apache2/modules/mod_python.so
> -rwxr-xr-x 1 root root 1.3M 2007-04-26 08:42 /usr/lib64/apache2/
> modules/mod_python.so
>
> Since our Linux box is running Gentoo 2006.1, we do have the shared
> library for Python:
> # ls -l /usr/lib/libpython2.4.so
> lrwxrwxrwx 1 root root 19 2007-05-28 17:24 /usr/lib/libpython2.4.so -
>  > libpython2.4.so.1.0
> # ls -l /usr/lib/libpython2.4.so.1.0
> -r-xr-xr-x 1 root root 1073360 2007-05-28 17:24 /usr/lib/
> libpython2.4.so.1.0

What Python libraries are in:

  /usr/lib64/python2.4/config

and:

  /usr/lib64

Ie., the 64 bit lib directories.

It is going to look in the 'config' directory location above first and
if there is only a static library there are not a shared library, it
will probably use the static library. This is because the link line
for library building according to your logs is:

  -L/usr/lib64/python2.4/config

Graham

> Currently I have no idea why it doesn't use the shared library for
> Python:
> # ldd /usr/lib64/apache2/modules/mod_python.so
>          libpthread.so.0 => /lib/libpthread.so.0 (0x00002aaef9109000)
>          libdl.so.2 => /lib/libdl.so.2 (0x00002aaef9223000)
>          libutil.so.1 => /lib/libutil.so.1 (0x00002aaef9327000)
>          libm.so.6 => /lib/libm.so.6 (0x00002aaef942b000)
>          libc.so.6 => /lib/libc.so.6 (0x00002aaef9580000)
>          /lib64/ld-linux-x86-64.so.2 (0x0000555555554000)
>
> Our mod_python compilation log file is attached for your reference.
> Any pointer or hint is greatly appreciated. Thanks in advance.



More information about the Mod_python mailing list