databases/py-PyGreSQL with postgresql7-client only fails

Palle Girgensohn girgen at pingpong.net
Sat Aug 28 07:50:20 PDT 2004


Hi.

Well... the python client should of course not need server headers. 
Probably, one might argue that the needed types should really exists in 
some client header as well... I'm not sure. The postgres.h header is not 
needed at all, it is a common mistake to add it to client applications. The 
pg_types.h *is* needed, since it defines the representations numbers for 
different system types.

Anyway, the needed types are system types and very stable according to the 
postgresql folks, so they could really be copied into PyGreSQL 
distribution. The attached patch should fix your problem. Please try it out.

I've cc:ed the developer of PyGreSQL, D'Arcy, as well. Maybe he has 
something to add?

Regards,
Palle

--On fredag, augusti 27, 2004 17.08.41 +0200 Lars Erik Gullerud 
<lerik at nolink.net> wrote:

> I have a problem when trying to install databases/py-PyGreSQL on a
> FreeBSD 4.9-RELEASE-p2 host. The host in question talks to an external
> PostgreSQL server only, so it has databases/postgresql7 installed built
> with WITHOUT_SERVER defined (i.e. giving an installed pkg-name of
> "postgresql7-client-7.4.3").
>
> There seems to be a dependency not fulfilled in this scenario. I.e. the
> py-PyGreSQL port has a LIB_DEPENDS on "pq" in the Makefile, which the
> build seems to find satisfied by the installed postgresql7-client.
> However, it seems that the -client build of postgresql7 does in fact not
> install the necessary headers linked to by py-PyGreSQL, giving the build
> error pasted below. Now, I don't know if the real problem is using a too
> weak dependency in py-PyGreSQL or the if postgresql7 with WITHOUT_SERVER
> should install a few more libraries/headers. I have no plans on ever
> putting a PostgreSQL server locally on this machine, but I would like to
> access an external database from it just the same. I would very much
> prefer it if I didn't have to install the entire server build (creating
> the pgsql user and everything else) just to access an external database
> from within Python...
>
> Anyway, here is the build output:
>
> ===>  Vulnerability check disabled
> ===>  Extracting for py23-PyGreSQL-3.4_1,1
>>> Checksum OK for PyGreSQL-3.4.tgz.
> ===>  Patching for py23-PyGreSQL-3.4_1,1
> ===>  Applying FreeBSD patches for py23-PyGreSQL-3.4_1,1
> ===>   py23-PyGreSQL-3.4_1,1 depends on file:
> /usr/local/lib/python2.3/site-packages/mx/DateTime/__init__.py - found
> ===>   py23-PyGreSQL-3.4_1,1 depends on file: /usr/local/bin/python -
> found ===>   py23-PyGreSQL-3.4_1,1 depends on shared library: pq - found
> ===>  Configuring for py23-PyGreSQL-3.4_1,1
> ===>  Building for py23-PyGreSQL-3.4_1,1
> /usr/local/lib/python2.3/distutils/dist.py:213: UserWarning: 'licence'
> distribution option is deprecated; use 'license'   warnings.warn(msg)
> running build
> running build_py
> creating build
> creating build/lib.freebsd-4.9-RELEASE-p2-i386-2.3
> copying pg.py -> build/lib.freebsd-4.9-RELEASE-p2-i386-2.3
> copying pgdb.py -> build/lib.freebsd-4.9-RELEASE-p2-i386-2.3
> running build_ext
> building '_pg' extension
> creating build/temp.freebsd-4.9-RELEASE-p2-i386-2.3
> cc -fno-strict-aliasing -DNDEBUG -O -pipe -D_THREAD_SAFE
> -DTHREAD_STACK_SIZE=0x20000 -fPIC -I/usr/local/include
> -I/usr/local/include/postgresql -I/usr/local/include/postgresql/server
> -I/usr/local/include/python2.3 -c pgmodule.c -o
> build/temp.freebsd-4.9-RELEASE-p2-i386-2.3/pgmodule.o pgmodule.c:30:
> postgres.h: No such file or directory
> pgmodule.c:33: catalog/pg_type.h: No such file or directory
> pgmodule.c: In function `get_type_array':
> pgmodule.c:290: `INT2OID' undeclared (first use in this function)
> pgmodule.c:290: (Each undeclared identifier is reported only once
> pgmodule.c:290: for each function it appears in.)
> pgmodule.c:291: `INT4OID' undeclared (first use in this function)
> pgmodule.c:295: `INT8OID' undeclared (first use in this function)
> pgmodule.c:296: `OIDOID' undeclared (first use in this function)
> pgmodule.c:300: `FLOAT4OID' undeclared (first use in this function)
> pgmodule.c:301: `FLOAT8OID' undeclared (first use in this function)
> pgmodule.c:302: `NUMERICOID' undeclared (first use in this function)
> pgmodule.c:306: `CASHOID' undeclared (first use in this function)
> pgmodule.c:292: warning: unreachable code at beginning of switch statement
> error: command 'cc' failed with exit status 1
> *** Error code 1
>
> Stop in /usr/ports/databases/py-PyGreSQL.
>
> -----
>
> Regards,
> Lars Erik Gullerud
>



-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-pgmodule.c
Type: application/octet-stream
Size: 521 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20040828/75707bc0/patch-pgmodule.obj


More information about the freebsd-ports mailing list