Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 38380 - Compile fails when trying to find postgresql libraries and include directories with postgresql 7.4.1-r1
Summary: Compile fails when trying to find postgresql libraries and include directorie...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-16 02:16 UTC by Geoff Cant (RETIRED)
Modified: 2007-09-22 23:15 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
New ebuild that compiles correctly with postgresql 7.4.1-r1 (pypgsql-2.4-r1.ebuild,710 bytes, text/plain)
2004-01-16 02:18 UTC, Geoff Cant (RETIRED)
Details
Patch to setup.py of pypgsql to fix lib and include directories. (setup.py.patch-2.4-r1,745 bytes, patch)
2004-01-16 02:18 UTC, Geoff Cant (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Geoff Cant (RETIRED) gentoo-dev 2004-01-16 02:16:40 UTC
When I emerge pypgsql I get a large number of errors, but importantly:

> In file included from pgnotify.c:54:
> libpqmodule.h:29:22: libpq-fe.h: No such file or directory
> libpqmodule.h:30:28: libpq/libpq-fs.h: No such file or directory

Reproducible: Always
Steps to Reproduce:
1. emerge "=dev-python/pypgsql-2.4" -v
2.
3.

Actual Results:  
# emerge "=dev-python/pypgsql-2.4" -v
Calculating dependencies ...done!
>>> emerge (1 of 1) dev-python/pypgsql-2.4 to /
>>> md5 src_uri ;-) pyPgSQL-2.4.tar.gz
>>> Unpacking source...
>>> Unpacking pyPgSQL-2.4.tar.gz to /var/tmp/portage/pypgsql-2.4/work
>>> Source unpacked.
/usr/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.linux-i686-2.3
creating build/lib.linux-i686-2.3/pyPgSQL
copying pyPgSQL/PgSQL.py -> build/lib.linux-i686-2.3/pyPgSQL
copying pyPgSQL/__init__.py -> build/lib.linux-i686-2.3/pyPgSQL
creating build/lib.linux-i686-2.3/pyPgSQL/libpq
copying pyPgSQL/libpq/__init__.py -> build/lib.linux-i686-2.3/pyPgSQL/libpq
running build_ext
building 'pyPgSQL.libpq.libpqmodule' extension
creating build/temp.linux-i686-2.3
creating build/temp.linux-i686-2.3/port
gcc -fno-strict-aliasing -DNDEBUG -O2 -mcpu=i686 -pipe -fPIC -I/usr/include
-I/usr/include/postgresql -I/usr/include/pgsql -I../../../../../
-I/usr/include/python2.3 -c pgnotify.c -o build/temp.linux-i686-2.3/pgnotify.o
In file included from /usr/include/python2.3/Python.h:8,
                 from pgnotify.c:51:
/usr/include/python2.3/pyconfig.h:847:1: warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/string.h:26,
                 from pgnotify.c:47:
/usr/include/features.h:171:1: warning: this is the location of the previous
definition
In file included from pgnotify.c:54:
libpqmodule.h:29:22: libpq-fe.h: No such file or directory
libpqmodule.h:30:28: libpq/libpq-fs.h: No such file or directory
In file included from libpqmodule.h:36,
                 from pgnotify.c:54:
pgconnection.h:41: error: syntax error before "PGconn"
pgconnection.h:41: warning: no semicolon at end of struct or union
pgconnection.h:55: error: syntax error before '}' token
pgconnection.h:55: warning: data definition has no type or storage class
pgconnection.h:59: error: syntax error before '*' token
In file included from libpqmodule.h:37,
                 from pgnotify.c:54:
pgresult.h:49: error: syntax error before "PGresult"
pgresult.h:49: warning: no semicolon at end of struct or union
pgresult.h:50: warning: data definition has no type or storage class
pgresult.h:59: error: syntax error before '}' token
pgresult.h:59: warning: data definition has no type or storage class
pgresult.h:63: error: syntax error before '*' token
In file included from libpqmodule.h:38,
                 from pgnotify.c:54:
pglargeobject.h:50: error: syntax error before "PgConnection"
pglargeobject.h:50: warning: no semicolon at end of struct or union
pglargeobject.h:51: warning: data definition has no type or storage class
pglargeobject.h:60: error: syntax error before '}' token
pglargeobject.h:60: warning: data definition has no type or storage class
pglargeobject.h:66: error: syntax error before "Oid"
In file included from libpqmodule.h:39,
                 from pgnotify.c:54:
pgnotify.h:49: error: syntax error before '*' token
pgnotify.c:56: error: syntax error before '*' token
pgnotify.c: In function `PgNotify_New':
pgnotify.c:60: error: `note' undeclared (first use in this function)
pgnotify.c:60: error: (Each undeclared identifier is reported only once
pgnotify.c:60: error: for each function it appears in.)
pgnotify.c:60: error: `PGnotify' undeclared (first use in this function)
pgnotify.c:60: error: syntax error before ')' token
error: command 'gcc' failed with exit status 1
 
!!! ERROR: dev-python/pypgsql-2.4 failed.
!!! Function distutils_src_compile, Line 38, Exitcode 1
!!! compilation failed

Expected Results:  
# emerge "=dev-python/pypgsql-2.4-r1" -v
Calculating dependencies ...done!
>>> emerge (1 of 1) dev-python/pypgsql-2.4-r1 to /
>>> md5 src_uri ;-) pyPgSQL-2.4.tar.gz
>>> Unpacking source...
>>> Unpacking pyPgSQL-2.4.tar.gz to /var/tmp/portage/pypgsql-2.4-r1/work
patching file setup.py
>>> Source unpacked.
/usr/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.linux-i686-2.3
creating build/lib.linux-i686-2.3/pyPgSQL
copying pyPgSQL/PgSQL.py -> build/lib.linux-i686-2.3/pyPgSQL
copying pyPgSQL/__init__.py -> build/lib.linux-i686-2.3/pyPgSQL
creating build/lib.linux-i686-2.3/pyPgSQL/libpq
copying pyPgSQL/libpq/__init__.py -> build/lib.linux-i686-2.3/pyPgSQL/libpq
running build_ext
building 'pyPgSQL.libpq.libpqmodule' extension
creating build/temp.linux-i686-2.3
creating build/temp.linux-i686-2.3/port
gcc -fno-strict-aliasing -DNDEBUG -O2 -mcpu=i686 -pipe -fPIC -I/usr/include
-I/usr/include/postgresql -I/usr/include/pgsql -I/usr/include/postgresql/pgsql
-I/usr/include/python2.3 -c pgnotify.c -o build/temp.linux-i686-2.3/pgnotify.o
In file included from /usr/include/python2.3/Python.h:8,
                 from pgnotify.c:51:
/usr/include/python2.3/pyconfig.h:847:1: warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/string.h:26,
                 from pgnotify.c:47:
/usr/include/features.h:171:1: warning: this is the location of the previous
definition
gcc -fno-strict-aliasing -DNDEBUG -O2 -mcpu=i686 -pipe -fPIC -I/usr/include
-I/usr/include/postgresql -I/usr/include/pgsql -I/usr/include/postgresql/pgsql
-I/usr/include/python2.3 -c pgconnection.c -o
build/temp.linux-i686-2.3/pgconnection.o
In file included from /usr/include/python2.3/Python.h:8,
                 from pgconnection.c:93:
/usr/include/python2.3/pyconfig.h:847:1: warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/string.h:26,
                 from pgconnection.c:89:
/usr/include/features.h:171:1: warning: this is the location of the previous
definition
gcc -fno-strict-aliasing -DNDEBUG -O2 -mcpu=i686 -pipe -fPIC -I/usr/include
-I/usr/include/postgresql -I/usr/include/pgsql -I/usr/include/postgresql/pgsql
-I/usr/include/python2.3 -c port/strtoull.c -o
build/temp.linux-i686-2.3/port/strtoull.o
In file included from /usr/include/python2.3/Python.h:8,
                 from port/strtoull.c:49:
/usr/include/python2.3/pyconfig.h:847:1: warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/sys/types.h:27,
                 from port/strtoull.c:43:
/usr/include/features.h:171:1: warning: this is the location of the previous
definition
gcc -fno-strict-aliasing -DNDEBUG -O2 -mcpu=i686 -pipe -fPIC -I/usr/include
-I/usr/include/postgresql -I/usr/include/pgsql -I/usr/include/postgresql/pgsql
-I/usr/include/python2.3 -c pgboolean.c -o build/temp.linux-i686-2.3/pgboolean.o
In file included from /usr/include/python2.3/Python.h:8,
                 from pgboolean.c:62:
/usr/include/python2.3/pyconfig.h:847:1: warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/ctype.h:27,
                 from pgboolean.c:61:
/usr/include/features.h:171:1: warning: this is the location of the previous
definition
gcc -fno-strict-aliasing -DNDEBUG -O2 -mcpu=i686 -pipe -fPIC -I/usr/include
-I/usr/include/postgresql -I/usr/include/pgsql -I/usr/include/postgresql/pgsql
-I/usr/include/python2.3 -c pymemstrdup.c -o build/temp.linux-i686-2.3/pymemstrdup.o
In file included from /usr/include/python2.3/Python.h:8,
                 from pymemstrdup.c:37:
/usr/include/python2.3/pyconfig.h:847:1: warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/stdlib.h:25,
                 from pymemstrdup.c:35:
/usr/include/features.h:171:1: warning: this is the location of the previous
definition
gcc -fno-strict-aliasing -DNDEBUG -O2 -mcpu=i686 -pipe -fPIC -I/usr/include
-I/usr/include/postgresql -I/usr/include/pgsql -I/usr/include/postgresql/pgsql
-I/usr/include/python2.3 -c port/strtoll.c -o
build/temp.linux-i686-2.3/port/strtoll.o
In file included from /usr/include/python2.3/Python.h:8,
                 from port/strtoll.c:50:
/usr/include/python2.3/pyconfig.h:847:1: warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/sys/types.h:27,
                 from port/strtoll.c:43:
/usr/include/features.h:171:1: warning: this is the location of the previous
definition
gcc -fno-strict-aliasing -DNDEBUG -O2 -mcpu=i686 -pipe -fPIC -I/usr/include
-I/usr/include/postgresql -I/usr/include/pgsql -I/usr/include/postgresql/pgsql
-I/usr/include/python2.3 -c pgint2object.c -o
build/temp.linux-i686-2.3/pgint2object.o
In file included from /usr/include/python2.3/Python.h:8,
                 from pgint2object.c:57:
/usr/include/python2.3/pyconfig.h:847:1: warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/ctype.h:27,
                 from pgint2object.c:56:
/usr/include/features.h:171:1: warning: this is the location of the previous
definition
gcc -fno-strict-aliasing -DNDEBUG -O2 -mcpu=i686 -pipe -fPIC -I/usr/include
-I/usr/include/postgresql -I/usr/include/pgsql -I/usr/include/postgresql/pgsql
-I/usr/include/python2.3 -c pglargeobject.c -o
build/temp.linux-i686-2.3/pglargeobject.o
In file included from /usr/include/python2.3/Python.h:8,
                 from pglargeobject.c:76:
/usr/include/python2.3/pyconfig.h:847:1: warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/string.h:26,
                 from pglargeobject.c:72:
/usr/include/features.h:171:1: warning: this is the location of the previous
definition
gcc -fno-strict-aliasing -DNDEBUG -O2 -mcpu=i686 -pipe -fPIC -I/usr/include
-I/usr/include/postgresql -I/usr/include/pgsql -I/usr/include/postgresql/pgsql
-I/usr/include/python2.3 -c pgint8object.c -o
build/temp.linux-i686-2.3/pgint8object.o
In file included from /usr/include/python2.3/Python.h:8,
                 from pgint8object.c:73:
/usr/include/python2.3/pyconfig.h:847:1: warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/ctype.h:27,
                 from pgint8object.c:72:
/usr/include/features.h:171:1: warning: this is the location of the previous
definition
gcc -fno-strict-aliasing -DNDEBUG -O2 -mcpu=i686 -pipe -fPIC -I/usr/include
-I/usr/include/postgresql -I/usr/include/pgsql -I/usr/include/postgresql/pgsql
-I/usr/include/python2.3 -c port/strtok.c -o build/temp.linux-i686-2.3/port/strtok.o
gcc -fno-strict-aliasing -DNDEBUG -O2 -mcpu=i686 -pipe -fPIC -I/usr/include
-I/usr/include/postgresql -I/usr/include/pgsql -I/usr/include/postgresql/pgsql
-I/usr/include/python2.3 -c pgresult.c -o build/temp.linux-i686-2.3/pgresult.o
In file included from /usr/include/python2.3/Python.h:8,
                 from pgresult.c:96:
/usr/include/python2.3/pyconfig.h:847:1: warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/string.h:26,
                 from pgresult.c:92:
/usr/include/features.h:171:1: warning: this is the location of the previous
definition
gcc -fno-strict-aliasing -DNDEBUG -O2 -mcpu=i686 -pipe -fPIC -I/usr/include
-I/usr/include/postgresql -I/usr/include/pgsql -I/usr/include/postgresql/pgsql
-I/usr/include/python2.3 -c libpqmodule.c -o build/temp.linux-i686-2.3/libpqmodule.o
In file included from /usr/include/python2.3/Python.h:8,
                 from libpqmodule.c:67:
/usr/include/python2.3/pyconfig.h:847:1: warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/string.h:26,
                 from libpqmodule.c:63:
/usr/include/features.h:171:1: warning: this is the location of the previous
definition
gcc -fno-strict-aliasing -DNDEBUG -O2 -mcpu=i686 -pipe -fPIC -I/usr/include
-I/usr/include/postgresql -I/usr/include/pgsql -I/usr/include/postgresql/pgsql
-I/usr/include/python2.3 -c pgversion.c -o build/temp.linux-i686-2.3/pgversion.o
In file included from /usr/include/python2.3/Python.h:8,
                 from pgversion.c:97:
/usr/include/python2.3/pyconfig.h:847:1: warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/string.h:26,
                 from pgversion.c:91:
/usr/include/features.h:171:1: warning: this is the location of the previous
definition
gcc -pthread -shared -O2 -mcpu=i686 -pipe
build/temp.linux-i686-2.3/libpqmodule.o build/temp.linux-i686-2.3/pgboolean.o
build/temp.linux-i686-2.3/pgint2object.o
build/temp.linux-i686-2.3/pgint8object.o build/temp.linux-i686-2.3/pgversion.o
build/temp.linux-i686-2.3/pglargeobject.o build/temp.linux-i686-2.3/pgnotify.o
build/temp.linux-i686-2.3/pgconnection.o build/temp.linux-i686-2.3/pgresult.o
build/temp.linux-i686-2.3/pymemstrdup.o build/temp.linux-i686-2.3/port/strtoll.o
build/temp.linux-i686-2.3/port/strtoull.o
build/temp.linux-i686-2.3/port/strtok.o -L/usr/lib -L/usr/lib/postgresql -lpq -o
build/lib.linux-i686-2.3/pyPgSQL/libpq/libpqmodule.so
 
>>> Install pypgsql-2.4-r1 into /var/tmp/portage/pypgsql-2.4-r1/image/ category
dev-python
/usr/lib/python2.3/distutils/dist.py:213: UserWarning: 'licence' distribution
option is deprecated; use 'license'
  warnings.warn(msg)
running install
running build
running build_py
running build_ext
running install_lib
creating /var/tmp/portage/pypgsql-2.4-r1/image/usr
creating /var/tmp/portage/pypgsql-2.4-r1/image/usr/lib
creating /var/tmp/portage/pypgsql-2.4-r1/image/usr/lib/python2.3
creating /var/tmp/portage/pypgsql-2.4-r1/image/usr/lib/python2.3/site-packages
creating
/var/tmp/portage/pypgsql-2.4-r1/image/usr/lib/python2.3/site-packages/pyPgSQL
creating
/var/tmp/portage/pypgsql-2.4-r1/image/usr/lib/python2.3/site-packages/pyPgSQL/libpq
copying build/lib.linux-i686-2.3/pyPgSQL/libpq/libpqmodule.so ->
/var/tmp/portage/pypgsql-2.4-r1/image/usr/lib/python2.3/site-packages/pyPgSQL/libpq
copying build/lib.linux-i686-2.3/pyPgSQL/libpq/__init__.py ->
/var/tmp/portage/pypgsql-2.4-r1/image/usr/lib/python2.3/site-packages/pyPgSQL/libpq
copying build/lib.linux-i686-2.3/pyPgSQL/PgSQL.py ->
/var/tmp/portage/pypgsql-2.4-r1/image/usr/lib/python2.3/site-packages/pyPgSQL
copying build/lib.linux-i686-2.3/pyPgSQL/__init__.py ->
/var/tmp/portage/pypgsql-2.4-r1/image/usr/lib/python2.3/site-packages/pyPgSQL
man:
prepallstrip:
strip:
strip:
   usr/lib/python2.3/site-packages/pyPgSQL/libpq/libpqmodule.so
>>> Completed installing into /var/tmp/portage/pypgsql-2.4-r1/image/
 
>>> Merging dev-python/pypgsql-2.4-r1 to /
Lockfile removed: /var/db/pkg/dev-python/pypgsql-2.4-r1.portage_lockfile
--- /usr/
--- /usr/lib/
--- /usr/lib/python2.3/
--- /usr/lib/python2.3/site-packages/
>>> /usr/lib/python2.3/site-packages/pyPgSQL/
>>> /usr/lib/python2.3/site-packages/pyPgSQL/libpq/
>>> /usr/lib/python2.3/site-packages/pyPgSQL/libpq/libpqmodule.so
>>> /usr/lib/python2.3/site-packages/pyPgSQL/libpq/__init__.py
>>> /usr/lib/python2.3/site-packages/pyPgSQL/PgSQL.py
>>> /usr/lib/python2.3/site-packages/pyPgSQL/__init__.py
--- /usr/share/
--- /usr/share/doc/
>>> /usr/share/doc/pypgsql-2.4-r1/
>>> /usr/share/doc/pypgsql-2.4-r1/README.win32.gz
>>> /usr/share/doc/pypgsql-2.4-r1/README.gz
>>> /usr/share/doc/pypgsql-2.4-r1/MANIFEST.in.gz
>>> /usr/share/doc/pypgsql-2.4-r1/MANIFEST.gz
>>> /usr/share/doc/pypgsql-2.4-r1/examples/
>>> /usr/share/doc/pypgsql-2.4-r1/examples/CVS/
>>> /usr/share/doc/pypgsql-2.4-r1/examples/CVS/Root
>>> /usr/share/doc/pypgsql-2.4-r1/examples/CVS/Repository
>>> /usr/share/doc/pypgsql-2.4-r1/examples/CVS/Entries
>>> /usr/share/doc/pypgsql-2.4-r1/examples/demo1a.py
>>> /usr/share/doc/pypgsql-2.4-r1/examples/demo1b.py
>>> /usr/share/doc/pypgsql-2.4-r1/examples/demo2a.py
>>> /usr/share/doc/pypgsql-2.4-r1/examples/demo2b.py
>>> /usr/share/doc/pypgsql-2.4-r1/examples/basic.py
>>> /usr/share/doc/pypgsql-2.4-r1/README.html.gz
>>> /usr/share/doc/pypgsql-2.4-r1/ChangeLog.gz
>>> Regenerating /etc/ld.so.cache...
 * Caching service dependencies...                                             
                                                     [ ok ]>>>
dev-python/pypgsql-2.4-r1 merged.
 
>>> clean: No packages selected for removal.
 
>>> Auto-cleaning packages ...
 
>>> No outdated packages were found on your system.
 
 
 * GNU info directory index is up-to-date.
 


Pypgsql expects the libpq include in "/usr/include", "/usr/include/postgresql"
and "/usr/include/pgsql", where they now are located in
"/usr/include/postgresql/pgsql"
Comment 1 Geoff Cant (RETIRED) gentoo-dev 2004-01-16 02:18:02 UTC
Created attachment 23905 [details]
New ebuild that compiles correctly with postgresql 7.4.1-r1

Here's an ebuild that modifies setup.py to use the correct include and lib
dirs. (Needs the patch in next attachment)
Comment 2 Geoff Cant (RETIRED) gentoo-dev 2004-01-16 02:18:54 UTC
Created attachment 23906 [details, diff]
Patch to setup.py of pypgsql to fix lib and include directories.

Used with updated ebuild to make pypgsql compile properly
Comment 3 Masatomo Nakano (RETIRED) gentoo-dev 2004-01-17 07:17:50 UTC
Python team, shoule we(postgresql herd) fix this bug?
Comment 4 Alastair Tse (RETIRED) gentoo-dev 2004-01-17 08:12:01 UTC
the patch looks good to me, if you like, the pgsql herd can fix this.
Comment 5 Alastair Tse (RETIRED) gentoo-dev 2004-01-17 13:14:42 UTC
so apparently this breakage is from changes in pgsql 7.4.1 ?
Comment 6 Masatomo Nakano (RETIRED) gentoo-dev 2004-01-17 16:20:23 UTC
postgresql-7.4.1-r[12] caused this bug.
I fixed it in postgresql-7.4.1-r3. So this bug would be fixed.