[mod_python] mod_python / psycopg problems

Christoph Pingel ch.pingel at web.de
Mon Feb 14 15:27:04 EST 2005

>There are two problems in getting psycopg to build. The Makefile 
>includes -lcrypto when it doesn't need it -- it's included by the 
>framework. And, this has to be added:


thanks for you input. But I think it's not psycopg's problem. There's 
no problem with psycopg as long as I don't use mod_python.

Looking at these lines (that's what I see in my browser when trying 
to load a page made with mod_python) I think Daniel was right:

ImportError: Failure linking new module: : dyld: 
/opt/local/apache2/bin/httpd Undefined symbols:
/opt/local/lib/python2.4/site-packages/psycopg.so undefined reference 
to _PyArg_ParseTuple expected to be defined in the executable

The 'executable' in this case is mod_python, and psycopg is looking 
for some method, I guess, that's not present in the version of 
mod_python that I built using darwinports.

By now, I try to build mod_python against Python 2.4, but something goes wrong.

*** Warning: linker path does not have real file for library -lpython2.4.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libpython2.4 and none of the candidates passed a file format test
*** using a file magic. Last file checked: 

*** Warning: libtool could not satisfy all declared inter-library
*** dependencies of module mod_python.  Therefore, libtool will create
*** a static module, that should work as long as the dlopening
*** application is linked with the -dlopen flag.
make[3]: `psp_parser.c' is up to date.
/opt/local/bin/python2.4 setup.py build
running build
running build_py
running build_ext

Now su and make install
   (or, if you only want to perform a partial install,
    you can use make install_dso and make install_py_lib)

Performing DSO installation.

/usr/bin/install -c -d /opt/local/apache2/modules
/usr/bin/install -c src/mod_python.so /opt/local/apache2/modules
install: src/mod_python.so: No such file or directory
make[1]: *** [install_dso] Error 71
make: *** [install] Error 2

This is odd, since the ./configure script doesn't complain about 
-lpython2.4 being absent.

Anyone able to help here?


More information about the Mod_python mailing list