[Zope-DB] Problems with installation of psycopg-1.0.1

Michael Long mlong@datalong.com
Mon, 21 Jan 2002 09:20:47 -0500


Still no joy :( 

I had installed egenix-mx-base-2.0.3-py2.2_1.i386.rpm but I am running Python 
2.1.1. I removed this and compiled it from egenix-mx-base-2.0.3.tar.gz and 
all is well. 

I am running the python and zope versions that come with SuSE 7.3.

Unfortunately when I run through the installation of psycopg-1.0.1 I still do 
not see the adapter in zope. I am obviously missing something. Maybe there is 
an error being reported that I am missing. Here is the output from my last 
session...Thanks for all the support.

linux:/home/mlong/Source/psycopg-1.0.1 # ./configure --with-zope=/opt/zope 
--with-mxdatetime-includes=/usr/lib 
--with-postgres-includes=/usr/include/pgsql --with-postgres-libraries=/usr/lib
creating cache ./config.cache
checking for python... /usr/bin/python
checking python version... 2.1
checking python installation prefix... /usr
checking python installation exec_prefix... /usr
checking definitions in Python library makefile... done
checking location of python library... $(prefix)/lib/python2.1/site-packages
checking location of python shared modules... 
$(exec_prefix)/lib/python2.1/site-packages
checking for gcc... gcc
checking whether the C compiler (gcc   ) works... yes
checking whether the C compiler (gcc   ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking whether make sets ${MAKE}... yes
checking for inline... inline
checking for main in -lcrypt... yes
checking for PQconnectStart in -lpq... yes
checking for asprintf... yes
updating cache ./config.cache
creating ./config.status
creating Setup
creating config.h
creating Makefile.pre
creating Makefile

linux:/home/mlong/Source/psycopg-1.0.1 # make
gcc -fPIC -D_FILE_OFFSET_BITS=64 -DHAVE_LARGEFILE_SUPPORT -O2 -mcpu=i486 
-march=i486  -I/usr/include/python2.1 -I/usr/lib/python2.1/config 
-DHAVE_CONFIG_H=1  -DHAVE_LIBCRYPT=1 -DHAVE_ASPRINTF=1  -I/usr/include/pgsql 
-I/usr/lib -DVERSION=\"1.0.1\" -DNDEBUG -D_REENTRANT -D_GNU_SOURCE  -c 
././module.c -o ./module.o
gcc -fPIC -D_FILE_OFFSET_BITS=64 -DHAVE_LARGEFILE_SUPPORT -O2 -mcpu=i486 
-march=i486  -I/usr/include/python2.1 -I/usr/lib/python2.1/config 
-DHAVE_CONFIG_H=1  -DHAVE_LIBCRYPT=1 -DHAVE_ASPRINTF=1  -I/usr/include/pgsql 
-I/usr/lib -DVERSION=\"1.0.1\" -DNDEBUG -D_REENTRANT -D_GNU_SOURCE  -c 
././connection.c -o ./connection.o
gcc -fPIC -D_FILE_OFFSET_BITS=64 -DHAVE_LARGEFILE_SUPPORT -O2 -mcpu=i486 
-march=i486  -I/usr/include/python2.1 -I/usr/lib/python2.1/config 
-DHAVE_CONFIG_H=1  -DHAVE_LIBCRYPT=1 -DHAVE_ASPRINTF=1  -I/usr/include/pgsql 
-I/usr/lib -DVERSION=\"1.0.1\" -DNDEBUG -D_REENTRANT -D_GNU_SOURCE  -c 
././cursor.c -o ./cursor.o
awk '/.+OID[ \t]+[0-9]+/ {print $2 " " $3}' \
        /usr/include/pgsql/catalog/pg_type.h | \
        python buildtypes.py >typeobj_builtins.c
LZTEXT: value not found
gcc -fPIC -D_FILE_OFFSET_BITS=64 -DHAVE_LARGEFILE_SUPPORT -O2 -mcpu=i486 
-march=i486  -I/usr/include/python2.1 -I/usr/lib/python2.1/config 
-DHAVE_CONFIG_H=1  -DHAVE_LIBCRYPT=1 -DHAVE_ASPRINTF=1  -I/usr/include/pgsql 
-I/usr/lib -DVERSION=\"1.0.1\" -DNDEBUG -D_REENTRANT -D_GNU_SOURCE  -c 
././typeobj.c -o ./typeobj.o
gcc -fPIC -D_FILE_OFFSET_BITS=64 -DHAVE_LARGEFILE_SUPPORT -O2 -mcpu=i486 
-march=i486  -I/usr/include/python2.1 -I/usr/lib/python2.1/config 
-DHAVE_CONFIG_H=1  -DHAVE_LIBCRYPT=1 -DHAVE_ASPRINTF=1  -I/usr/include/pgsql 
-I/usr/lib -DVERSION=\"1.0.1\" -DNDEBUG -D_REENTRANT -D_GNU_SOURCE  -c 
././typemod.c -o ./typemod.o
gcc -shared  ./module.o ./connection.o ./cursor.o ./typeobj.o ./typemod.o  
-L/usr/lib -lpq  -o ./psycopgmodule.so

linux:/home/mlong/Source/psycopg-1.0.1 # make install-zope
rm -f *.o *~
rm -f *.a tags TAGS config.c Makefile.pre python
rm -f *.so *.sl so_locations
rm -fr psycopg-1.0.1 \
                psycopg-1.0.1.tar.gz
rm -f typeobj_builtins.c
rm -fr lib
rm -f config.status config.log config.cache
find . -name ".#*" | xargs rm -fr
find . -name "*~" | xargs rm -fr
rm -fr lib
mkdir lib && mkdir lib/python && mkdir lib/python/Products
cp -pR ZPsycopgDA lib/python/Products/
find lib -name CVS | xargs rm -fr
tar cf ZPsycopgDA-1.0.1.tar lib
gzip -f9 ZPsycopgDA-1.0.1.tar
gzip -dc ZPsycopgDA-1.0.1.tar.gz | tar xf - -C /opt/zope




On Monday 21 January 2002 03:10, Federico Di Gregorio wrote:
> Il lun, 2002-01-21 alle 06:57, Michael Long ha scritto:
> [snip]
>
> > awk '/.+OID[ \t]+[0-9]+/ {print $2 " " $3}' \
> >         /usr/include/pgsql/catalog/pg_type.h | \
> >         python buildtypes.py >typeobj_builtins.c
> > LZTEXT: value not found
>
> this is not an error, as long as typeobj_builtins.c gets generated.
>
> > After running make install-zope and starting a python shell I type:
> > import psycopg and get the following output:
> >
> > Traceback (most recent call last):
> >   File "<stdin>", line 1, in ?
> > ImportError: No module named DateTime
>
> i'll bet that either you're using a version of zop that comes with
> python prepackaged or you are using an earlier version of mxdatetime
> (<2.0.2). after installing mxdatetime, make sure it works by importing
> it in python:
>
> $ python
> Python 2.1.2 (#1, Jan 18 2002, 18:05:45)
> [GCC 2.95.4  (Debian prerelease)] on linux2
> Type "copyright", "credits" or "license" for more information.
>
> >>> from mx import DateTime
>
> hope this helps,
> federico

--