[Zope-DB] Problem with Psycopg?

Dieter Maurer dieter@handshake.de
Sat, 29 Jun 2002 10:13:23 +0200

Stylus writes:
 > I finally figured out how to get and install the python2.1 development package and was able to run the ./configure command correctly using the following command :
 > ./configure --with-postgres-libraries=/usr/lib --with-postgres-includes=/usr/include --with-mxdatetime-includes=/usr/lib/python2.1/site-packages/mx/DateTime/mxDateTime --with-zope=~/Zope-2.5.1 --with-python=/usr/bin/python2.1 --with-python-version=2.1 --with-python-exec-prefix=/usr
 > It went through fine but I get the following error when I run 'make' :
 > ./module.o ./connection.o ./cursor.o ./typeobj.o ./typemod.o  -L/usr/lib -lpq  -o ./psycopgmodule
 > make: execvp: ./module.o: Permission denied
 > make: *** [psycopgmodule] Error 127
 > Stuck again - I tried giving module.o +x permissions but it gives me a similar error :
 > make: execvp: ./module.o: cannot execute binary file
 > make: *** [psycopgmodule] Error 126
I have seen an explanation for this problem in the mailing list
(I am almost sure, in this thread).

For some unknown reason, the variable specfying the linker
is undefined in the makefile. What should be:

   LINKER module.o ...


   module.o ...

and, of course, "module.o" is not executable whether or not you give
it the execute permission.

The original message contained the precise name for the 
linker make variable.

It seems that other make variables are also not set.
Almost surely, the command above should end in
"-o ./psycopgmodule.so" and not "-o ./psycopgmodule".

You are sure, you have run "./configure" ?
I think to remember, that you did. In this case, "configure" did
something wrong. I cannot tell you why.

But you might be able to use the makefile from your Python development
package. I cannot give you precise instructions, but it
may look somehow like:

    make -f <path_to_python_devel>/makefile.pre.in boot

It will only work, when Python was correctly configured and
your local module contains a "Setup" file.