Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 95701

Summary: libgda ebuild does not find postgres header file (libpq-fs.h)
Product: Gentoo Linux Reporter: Max <m.e.bruche>
Component: New packagesAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Status: RESOLVED DUPLICATE    
Severity: normal CC: howard_b_golden, pgsql-bugs, rose
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Max 2005-06-10 09:34:18 UTC
I ran an emerge -u world, in the course of which libgda was going to be updated
from 1.0.2 to 1.0.4.

The postgres use flag is set (and hence libgda is compiled with postgres
support).  I am still using postgresql-7.3.6-r2.

Ebuild bombs with a message saying it cant find libpq-fs.h (details below). The
file is present on my system:
 # ls /usr/include/postgresql/pgsql/libpq/libpq-fs.h
/usr/include/postgresql/pgsql/libpq/libpq-fs.h

Maybe a problem with configure?


Reproducible: Always
Steps to Reproduce:
1. Have postgresql-7.3.6-r2 installed
2. USE=postgres emerge =libgda-1.0.4
3.

Actual Results:  
Ebuild fails with following message:
utils.c:29:28: libpq/libpq-fs.h: No such file or directory
utils.c: In function `gda_postgres_blob_open':
utils.c:201: error: `INV_READ' undeclared (first use in this function)
utils.c:201: error: (Each undeclared identifier is reported only once
utils.c:201: error: for each function it appears in.)
utils.c:204: error: `INV_WRITE' undeclared (first use in this function)
utils.c: In function `gda_postgres_blob_create':
utils.c:383: error: `INV_READ' undeclared (first use in this function)
utils.c:383: error: `INV_WRITE' undeclared (first use in this function)
make[2]: *** [utils.lo] Error 1
make[2]: Leaving directory
`/data/tmp/portage/libgda-1.0.4/work/libgda-1.0.4/providers/postgres'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/data/tmp/portage/libgda-1.0.4/work/libgda-1.0.4/providers'
make: *** [all-recursive] Error 1

!!! ERROR: gnome-extra/libgda-1.0.4 failed.
!!! Function gnome2_src_compile, Line 41, Exitcode 2
!!! compile failure
!!! If you need support, post the topmost build error, NOT this status message.


Expected Results:  
Compile.

 # emerge --info
Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.4.200
41102-r1, 2.6.11-gentoo-r6 i686)
=================================================================
System uname: 2.6.11-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.6.12
Python:              dev-lang/python-2.3.5,dev-lang/python-2.2.3-r5 [2.3.5 (#1, 
Apr 29 2005, 15:03:29)]
dev-lang/python:     2.3.5, 2.2.3-r5
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.9.5, 1.4_p6, 1.8.5-r3, 1.6.3, 1.7.9-r1, 1.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.8.1-r2, 2.4.19-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share
/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/shar
e/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/sh
are/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/tex
mf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.gentoo.no/ http://www.mirror.ac.uk/sites/www.ibibl
io.org/gentoo/ http://gentoo.blueyonder.co.uk"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/data/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/home/max/ebuilds"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 X aac alsa apm arts avi berkdb bitmap-fonts bluetooth bonobo cdr cjk cr
ypt cscope cups curl eds emboss encode esd fam flac foomaticdb fortran gd gdbm g
if gpm gtk gtk2 gtkhtml guile imagemagick imap imlib ipv6 java jpeg junit kde ld
ap libg++ libgda libwww mad mikmod mmx motif mp3 mpeg ncurses nls nntp no_wxgtk1
 nptl odbc ogg oggvorbis opengl oss pam pdflib perl png postgres python qt quick
time readline samba sdl skey slang sms spell sse ssl svga tcltk tcpd tetex tiff 
truetype truetype-fonts type1-fonts unicode vorbis xml xml2 xmms xv zlib userlan
d_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 1 Max 2005-06-10 10:17:05 UTC
After some investigation, it appears that I can't get libgda-1.0.2 to recompile
either, even though I did originally compile it is compiled with postgres
support. Having a look at my emerge logs indicates that I updated postgresql
from 7.3.6-r1 to 7.3.6-r2 *after* compiling libgda with postgres, so maybe 
postgresql-7.3.6-r2 moved libpq-fs.h
Comment 2 Leonardo Boshell (RETIRED) gentoo-dev 2005-06-10 10:39:12 UTC
Could you please attach the complete output from 'emerge'? Thanks.
Comment 3 Max 2005-06-11 03:27:19 UTC
I missed the crucial gcc line, didn't I.

Unfortunately, I didn't make a note of the exact line, but I did try to figure
out what was going wrong.

I tried configuring manually --with-postgres=/usr, and in config.log I found
POSTGRES_CFLAGS='-I/usr/include'. Of course, given the location of the file in
my case, that would not be sufficient to find libpq-fs.h

I had a look at configure.in, POSTGRES_CFLAGS is constructed as follows (after
line 297):
$postgresdir is set to /usr, since configure finds my libpq.so in /usr/lib
and POSTGRES_CFLAGS is set to /usr/include because the script finds libpq-fe.h
in /usr/include. Actually, /usr/include/libpq-fe.h is a symbolic link  to
/usr/include/postgresql/pgsql/libpq-fe.h.

After seeing this, I thought that maybe the problem is that postgresql-7.3.6-r2
puts header files in weird locations. I bit the bullet and upgraded my system to
postgresql-8.0.1-r3 (I had been trying to avoid upgrading since I thought there
might be problems with getting my databases across - as it turns out, I had no
problems). libgda now compiles without problems, as the header file in question
now ended up in /usr/include/libpq/libpq-fs.h (where it is obviously found with
the combination of -I/usr/include and #include <libpq/libpq-fs.h>)
Comment 4 Leonardo Boshell (RETIRED) gentoo-dev 2005-06-13 14:35:01 UTC
Well, if someone else has problems with postgres-7.x.x, we'll need the proper
information.

Thanks.
Comment 5 Howard B. Golden 2005-06-18 19:46:40 UTC
I am getting the same results compiling libgda-1.2.2 WITH postgresql-8.0.1-r4,
so I would ask you to reopen this bug.

Here are the messages I get. They appear identical to the original report of
this bug:

i686-pc-linux-gnu-gcc "-DPACKAGE_NAME=\"GNU Data Access\""
-DPACKAGE_TARNAME=\"libgda\" -DPACKAGE_VERSION=\"1.2.2\" "-DPACKAGE_STRING=\"GNU
Data Access 1.2.2\"" -DPACKAGE_BUGREPORT=\"gnome-db-list@gnome.org\"
-DBONOBO_EXPLICIT_TRANSLATION_DOMAIN=\"libgda-2\" -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1
-DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DYYTEXT_POINTER=1
-DGETTEXT_PACKAGE=\"libgda-2\" -DHAVE_LOCALE_H=1 -DHAVE_LC_MESSAGES=1
-DHAVE_BIND_TEXTDOMAIN_CODESET=1 -DHAVE_GETTEXT=1 -DHAVE_DCGETTEXT=1
-DENABLE_NLS=1 -DHAVE_MYSQL=1 -DHAVE_FREETDS_VER0_6X=1 -DHAVE_FREETDS=1
-DHAVE_SQLITE=1 -DHAVE_MDB=1 -DHAVE_LDAP=1 -DHAVE_POPT_H=1
-DHAVE_READLINE_READLINE_H=1 -DHAVE_READLINE_HISTORY_H=1 -I. -I. -I../.. -I../..
-pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/libxml2 -march=athlon-xp -O2 -pipe -fstack-protector -MT utils.lo
-MD -MP -MF .deps/utils.Tpo -c utils.c  -fPIC -DPIC -o .libs/utils.o
utils.c:29:28: libpq/libpq-fs.h: No such file or directory
utils.c: In function `gda_postgres_blob_open':
utils.c:201: error: `INV_READ' undeclared (first use in this function)
utils.c:201: error: (Each undeclared identifier is reported only once
utils.c:201: error: for each function it appears in.)
utils.c:204: error: `INV_WRITE' undeclared (first use in this function)
utils.c: In function `gda_postgres_blob_create':
utils.c:383: error: `INV_READ' undeclared (first use in this function)
utils.c:383: error: `INV_WRITE' undeclared (first use in this function)
make[2]: *** [utils.lo] Error 1
make[2]: Leaving directory
`/var/tmp/portage/libgda-1.2.2/work/libgda-1.2.2/providers/postgres'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/var/tmp/portage/libgda-1.2.2/work/libgda-1.2.2/providers'
make: *** [all-recursive] Error 1

Here is my emerge info:

Portage 2.0.51.22-r1 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r0,
2.6.11-gentoo-r5 i686)
=================================================================
System uname: 2.6.11-gentoo-r5 i686 AMD Athlon(tm) XP 2200+
Gentoo Base System version 1.6.12
ccache version 2.4 [enabled]
dev-lang/python:     2.1.3-r1, 2.2.3-r5, 2.3.5-r1, 2.4.1-r1
sys-apps/sandbox:    1.2.9
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -pipe -fstack-protector"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/openjms/config /usr/kde/2/share/config
/usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config
/usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config
/usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/fax
/usr/lib/mozilla/defaults/pref /usr/share/config /var/bind /var/qmail/alias
/var/qmail/control /var/spool/fax/etc /var/vpopmail/domains /var/vpopmail/etc"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fstack-protector"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="ftp://gentoo.ccccom.com http://mirror.datapipe.net/gentoo
ftp://gentoo.chem.wisc.edu/gentoo/ ftp://mirror.usu.edu/mirrors/gentoo/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowex 3dnowext X Xaw3d a52 aac aalib acl acpi acpi4linux adns
alsa amd antlr apache2 apm ared aredmem arts artswrappersuid artworkextra
audiofile avi bash-completion bcmath berkdb bitmap-fonts bonobo bzip2 bzlib c++
calendar caps cdb cdda cddb cdf cdparanoia cdr chroot cjk clamav cln crypt ctype
cups curl curlwrappers dba dbase dbx dio directfb divx4linux djbfft dnd doc
droproot dv dvd dvdr eds emacs emboss encode erandom esd ethereal evo examples
exif fam fastcgi fbcon fdftk flac flatfile font-server foomaticdb
foreign-package foreign-sysvinit fortran freetds ftp gb gcj gcl gd gd-external
gdbm gif ginac glep gmp gnome gnomedb gnuplot gpm graphviz gstreamer gtk gtk2
gtkhtml guile haskell iconv icq idea idl imagemagick imap imlib inifile innodb
insecure-drivers ipv6 jabber jack java javamail jce jdepend jms jpeg jsch junit
jython kde kdeenablefinal kdepim kdexdeltas kerberos latex ldap leim lesstif
libclamav libg++ libgda libwww lids live log4j ltsp lua lzw-tiff mad maildir
mailwrapper matroska mbox mcal mdb memlimit mha mikmod mime ming mmap mmx motif
mozdevelop mozilla moznoirc moznomail mozsvg mozxmlterm mp3 mpeg mysql nas
native ncurses netboot nls nptl nptlonly oav objc ocaml odbc ofx ogg oggvorbis
ooo-kde opengl opens oss pam parse-clocks pcntl pcre pda pdf pdflib pear-db perl
pg-hier pg-intdatetime php pic pie plotutils png posix postgres postgresql ppds
pwdb python qt quicktime radeon rdesktop readline rhino ruby ruby18 samba sasl
sdk sdl session sguil simplexml skey slang slp snmp soap sockets speex spell spl
sql sqlite sse ssl subversion svg svga tcltk tcpd tetex theora threads tidy tiff
tokenizer truetype truetype-fonts type1 type1-fonts unicode usb utf8 vhosts
vorbis wddx win32codecs winbind wmf wxwin wxwindows xalan xemacs xerces xine xml
xml2 xmlrpc xmms xpm xv xvid xvmc yahoo yv12 zeo zlib video_cards_radeon
userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LDFLAGS, LINGUAS
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2005-06-19 03:38:40 UTC
*** Bug 96513 has been marked as a duplicate of this bug. ***
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2005-06-19 03:39:47 UTC
Reopening wrt comment #5 and Bug 96513.
Comment 8 Leonardo Boshell (RETIRED) gentoo-dev 2005-06-21 23:59:40 UTC
This looks like a temporary problem with postgresql/libpq during the testing period.


*** This bug has been marked as a duplicate of 93103 ***
Comment 9 Juergen Rose 2005-06-26 09:28:42 UTC
I can solve the problem with missing "libpq/libpq-fs.h" by removing
/usr/include/libpq which is a link to /usr/include/postgresql/pgsql/libpq/
which contains the following link 
root@kos:/usr/include(8)# ll /usr/include/postgresql/pgsql/libpq/
total 0
lrwxrwxrwx  1 root root 38 Jun 16 00:29 libpq-fs.h ->
../postgresql/libpq-3/libpq/libpq-fs.h

creating a directory /usr/include/libpq which contains a link to
../postgresql/libpq-3/libpq/libpq-fs.h

root@kos:/usr/include(13)# ll -d /usr/include/libpq  ; ll /usr/include/libpq
drwxr-xr-x  2 root root 4096 Jun 26 18:24 /usr/include/libpq/
total 0
lrwxrwxrwx  1 root root 38 Jun 16 00:29 libpq-fs.h ->
../postgresql/libpq-3/libpq/libpq-fs.h

Now "emerge libgda" works fine.
   Regards Juergen