Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 96263 - php-5.0.4-r1 can't compile pgsql extension
Summary: php-5.0.4-r1 can't compile pgsql extension
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Other
: High normal (vote)
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
: 97684 100361 (view as bug list)
Depends on:
Blocks: 60438
  Show dependency tree
 
Reported: 2005-06-16 03:07 UTC by Jacoby Yves
Modified: 2005-07-26 11:46 UTC (History)
4 users (show)

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


Attachments
patches the header (php-5.0.4.patch,431 bytes, patch)
2005-06-16 03:08 UTC, Jacoby Yves
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jacoby Yves 2005-06-16 03:07:37 UTC
I'm using postgresql-8.0.1-r4 and some include files moved from include to include/postgresql which makes that php_pgsql.h isn't right anymore. One could add it to the include or patch the header. 

I attached the patch to this report.
Comment 1 Jacoby Yves 2005-06-16 03:08:51 UTC
Created attachment 61323 [details, diff]
patches the header
Comment 2 Masatomo Nakano (RETIRED) gentoo-dev 2005-06-16 09:40:44 UTC
There is no /usr/include/libpq/libpq-fs.h file in your box?
If so, it's postgresql(actually, libpq ebuild) ebuild problem.

can you show me output of these commands please? 
# emerge -pv postgresql
# emerge -pv libpq
# ls -l /usr/include/libpq/libpq-fs.h
Comment 3 Roel Brook 2005-06-16 15:15:38 UTC
same problem here:

/var/tmp/portage/mod_php-5.1.0_beta/work/php-5.1.0b1/ext/pgsql/php_pgsql.h:44:28:
libpq/libpq-fs.h: No such file or directory
/var/tmp/portage/mod_php-5.1.0_beta/work/php-5.1.0b1/ext/pgsql/pgsql.c: In
function `zif_pg_lo_create':
/var/tmp/portage/mod_php-5.1.0_beta/work/php-5.1.0b1/ext/pgsql/pgsql.c:2392:
error: `INV_READ' undeclared (first use in this function)
/var/tmp/portage/mod_php-5.1.0_beta/work/php-5.1.0b1/ext/pgsql/pgsql.c:2392:
error: (Each undeclared identifier is reported only once
/var/tmp/portage/mod_php-5.1.0_beta/work/php-5.1.0b1/ext/pgsql/pgsql.c:2392:
error: for each function it appears in.)
/var/tmp/portage/mod_php-5.1.0_beta/work/php-5.1.0b1/ext/pgsql/pgsql.c:2392:
error: `INV_WRITE' undeclared (first use in this function)
/var/tmp/portage/mod_php-5.1.0_beta/work/php-5.1.0b1/ext/pgsql/pgsql.c: In
function `zif_pg_lo_open':
/var/tmp/portage/mod_php-5.1.0_beta/work/php-5.1.0b1/ext/pgsql/pgsql.c:2540:
error: `INV_READ' undeclared (first use in this function)
/var/tmp/portage/mod_php-5.1.0_beta/work/php-5.1.0b1/ext/pgsql/pgsql.c:2542:
error: `INV_WRITE' undeclared (first use in this function)

Medusa# ls /usr/include/libpq/
Medusa# emerge -pv postgresql libpq

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] dev-db/postgresql-8.0.1-r4  -debug -doc -kerberos +libg++ +nls
+pam +perl -pg-hier -pg-intdatetime +python +readline (-selinux) +ssl +tcltk
+xml2 +zlib 0 kB
[ebuild   R   ] dev-db/libpq-8.0.1  -debug -kerberos +nls +pam +readline +ssl
+zlib 0 kB

The whole directory is empty!

Medusa% ls /usr/include/ -l | grep libpq
lrwxrwxrwx    1 root root     35 jan 21 03:12 libpq ->
/usr/include/postgresql/pgsql/libpq
lrwxrwxrwx    1 root root     29 jun 17 00:01 libpq-fe.h ->
postgresql/libpq-3/libpq-fe.h
lrwxrwxrwx    1 root root     30 jun 17 00:01 pg_config.h ->
postgresql/libpq-3/pg_config.h
lrwxrwxrwx    1 root root     37 jun 17 00:01 pg_config_manual.h ->
postgresql/libpq-3/pg_config_manual.h
lrwxrwxrwx    1 root root     33 jun 17 00:01 pg_config_os.h ->
postgresql/libpq-3/pg_config_os.h
lrwxrwxrwx    1 root root     33 jun 17 00:01 postgres_ext.h ->
postgresql/libpq-3/postgres_ext.h
Medusa% ls /usr/include/postgresql/pgsql/
libpq
Medusa% ls /usr/include/postgresql/pgsql/libpq
Medusa%

Probably an incorrect symlink.

Medusa% locate libpq-fs.h
/usr/include/postgresql/libpq/libpq-fs.h
/usr/include/postgresql/libpq-3/libpq/libpq-fs.h
/usr/include/postgresql/libpq-3/server/libpq/libpq-fs.h
/usr/include/postgresql/server/libpq/libpq-fs.h
Comment 4 Masatomo Nakano (RETIRED) gentoo-dev 2005-06-16 20:22:29 UTC
hmm, i couldn't reproduce the problem.
re-emerging libpq fixs it?
Comment 5 Roel Brook 2005-06-17 14:48:57 UTC
sorry, should have mentioned this, but re-emerging libpq doesn't help.

There are more people reporting bugs about programs relying on postgresql:

see bug 46368 bug 38296 bug 59572 and more.

Almost all bugs on:
http://bugs.gentoo.org/buglist.cgi?query_format=specific&order=relevance+desc&bug_status=__all__&product=&content=libpq-fs.h
Comment 6 Masatomo Nakano (RETIRED) gentoo-dev 2005-06-18 00:03:13 UTC
Hi Roel,

Other bugs are caused by another reason since libpq packages were made two 
months ago..

I asked some people to emerge libpq in irc channel.
But there were no problem there..

Can you shom me 'emerge info' because it might depend Portage version?
Comment 7 Jacoby Yves 2005-06-18 02:06:32 UTC
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-r11 i686)
=================================================================
System uname: 2.6.11-gentoo-r11 i686 AMD Athlon(tm) Processor
Gentoo Base System version 1.6.12
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.5, 2.4.1
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-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=athlon -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe -march=athlon -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.switch.ch/mirror/gentoo/
ftp://mirror.switch.ch/mirror/gentoo/ ftp://ftp.solnet.ch/mirror/Gentoo
http://gentoo.mirror.solnet.ch"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow acpialsa apache2 apm atlas avi berkdb bitmap-fonts bzlib crypt
cups curl doc emboss encode foomaticcdb foomaticdb fortran gd gdbm gif gpm imlib
ipv6 java jce jikes jpeg libg++ libwww mad maildir mikmod mmx motif mp3 mpeg
mysql ncurses nls nptl nptlonly oggvorbis opengl oss pam pdflib perl php png
postgres ppds python quicktime readline samba slang snmp spell sqlite ssl svga
tcpd tiff truetype truetype-fonts type1-fonts usb userlocales xml xml2 xmms xv
zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 8 Roel Brook 2005-06-18 15:49:57 UTC
same portage version, but my emerge is a lot more "aggresive":

Portage 2.0.51.22-r1 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r0,
2.6.12-rc1-love1 i686)
=================================================================
System uname: 2.6.12-rc1-love1 i686 AMD Athlon(tm) XP 2500+
Gentoo Base System version 1.6.12
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.5, 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-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -mmmx -msse -m3dnow
-mfpmath=sse,387 -ffast-math"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /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/share/config /var/qmail/alias
/var/qmail/control /var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -mmmx -msse -m3dnow
-mfpmath=sse,387 -ffast-math"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks parallel-fetch sandbox sfperms
strict"
GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
ftp://gd.tuwien.ac.at/opsys/linux/gentoo/
ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo"
LANG="nl_NL@euro"
LC_ALL="nl_NL@euro"
LDFLAGS="-Wl,-O9 -Wl,--enable-new-dtags -Wl,--sort-common -s -Wl,--as-needed"
LINGUAS="nl"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/bmg-main"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowex X aalib alsa apache2 apm arts audiofile avi
bash-completion bitmap-fonts bonobo bzip2 bzlib calender cdparanoia cdr chipcard
chroot crypt cups curl dba divx4linux dlloader dvd dvdr dvdread eds emboss
encode esd fam festival filepro firefox flac flatfile font-server foomaticdb
fortran ftp gd gdbm gif gnome gphoto2 gpm gstreamer gtk gtk2 guile hal
imagemagick imap imlib insecure-drivers java jpeg jpeg2k junit kde kdgraphics
ldap libg++ libwww live mad mikmod mime mmx mmxext mono motif mozdevelop
moznomail moznoxft mp3 mpeg mplayer msn mysql ncurses network nls nptl nvidia
odbc offensive ogg oggvorbis ooo-kde opengl pam patches pdflib perl php pic png
postgres python qmail qt quicktime readline real rplay samba scanner sdk sdl
session sftplogging slang softmmu speex spell sqlite sse ssl
startup-notification stroke svga tcltk tcpd threads tiff truetype truetype-fonts
type1-fonts unicode usb userlocales v4l v4l2 vorbis win32codecs wmf xine
xinerama xml xml2 xmms xprint xscreensaver xv xvid zlib video_cards_nvidia
linguas_nl userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET

I'm "glad" someone with more conservative flags is having the same problem. That
way I'm sure it's not a ricing issue :)
Comment 9 Masatomo Nakano (RETIRED) gentoo-dev 2005-06-19 01:07:49 UTC
I have several gentoo linux boxes but I can't reproduce this problem yet..

What happens if you remove /usr/include/postgresql manually (i.e. rm -
r /usr/include/postgresql), then emerge libpq/postgresql again.
I realize it's not fundamental solution but I want to know when it happens..

To postgreSQL herd members,
any idea?
Comment 10 Roel Brook 2005-06-19 02:54:27 UTC
I had to remove the /usr/include/libpq symlink too:

>>> Merging dev-db/libpq-8.0.1 to /
--- /usr/
--- /usr/include/

!!! Cannot write to '/usr/include/libpq'.
!!! Please check permissions and directories for broken symlinks.
!!! You may start the merge process again by using ebuild:
!!! ebuild /usr/portage/dev-db/libpq/libpq-8.0.1.ebuild merge
!!! And finish by running this: env-update

This worked!

It was probably the /usr/incluyde/libpq which was pointing somewhere else... now
/usr/include/libpq is a normal directory...
Comment 11 Blu3 2005-06-30 16:02:53 UTC
/bin/sh /var/tmp/portage/mod_php-5.0.4/work/php-5.0.4/libtool --silent
--preserve-dup-deps --mode=compile i686-pc-linux-gnu-gcc  -Iext/pgsql/
-I/var/tmp/portage/mod_php-5.0.4/work/php-5.0.4/ext/pgsql/ -DPHP_ATOM_INC
-I/var/tmp/portage/mod_php-5.0.4/work/php-5.0.4/include
-I/var/tmp/portage/mod_php-5.0.4/work/php-5.0.4/main
-I/var/tmp/portage/mod_php-5.0.4/work/php-5.0.4 -I/usr/include/libxml2
-I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/imap
-I/var/tmp/portage/mod_php-5.0.4/work/php-5.0.4/ext/mbstring/oniguruma
-I/var/tmp/portage/mod_php-5.0.4/work/php-5.0.4/ext/mbstring/libmbfl
-I/var/tmp/portage/mod_php-5.0.4/work/php-5.0.4/ext/mbstring/libmbfl/mbfl
-I/usr/include/pspell -I/var/tmp/portage/mod_php-5.0.4/work/php-5.0.4/TSRM
-I/var/tmp/portage/mod_php-5.0.4/work/php-5.0.4/Zend    -march=pentium3 -O3
-pipe -fomit-frame-pointer  -prefer-non-pic -c
/var/tmp/portage/mod_php-5.0.4/work/php-5.0.4/ext/pgsql/pgsql.c -o
ext/pgsql/pgsql.lo
In file included from
/var/tmp/portage/mod_php-5.0.4/work/php-5.0.4/ext/pgsql/pgsql.c:38:
/var/tmp/portage/mod_php-5.0.4/work/php-5.0.4/ext/pgsql/php_pgsql.h:44:28:
libpq/libpq-fs.h: No such file or directory


Jaymale southmeriden-vfd.org # ls -ld /usr/include/libpq
lrwxrwxrwx  1 root root 35 Oct 25  2004 /usr/include/libpq ->
/usr/include/postgresql/pgsql/libpq

Jaymale southmeriden-vfd.org # ls -ld /usr/include/libpq/libpq-fs.h
lrwxrwxrwx  1 root root 38 Jun 14 04:10 /usr/include/libpq/libpq-fs.h ->
../postgresql/libpq-3/libpq/libpq-fs.h

Jaymale southmeriden-vfd.org # ls -ld
/usr/include/postgresql/libpq-3/libpq/libpq-fs.h
-rw-r--r--  1 root root 691 Jun 14 04:10
/usr/include/postgresql/libpq-3/libpq/libpq-fs.h


that's pretty annoying since the file is semantically /usr/include/libpq/libpq-fs.h
Comment 12 Sebastian Bergmann (RETIRED) gentoo-dev 2005-07-02 00:39:49 UTC
Cannot reproduce, dev-php/php-4.3.11, dev-php/php-4.4.0_rc2, and
dev-php/php-5.0.4-r1 all built fine against dev-db/postgresql-8.0.1-r4.
Comment 13 Blu3 2005-07-02 00:56:36 UTC
i definitely wouldn't call it invalid, it's a very legitimate problem. users
have to manually change already installed items.  i.e. manually deleting the
symlink and re-emerging libpq.  the ebuilds for postgres/libpq need to be fixed
to resolve this issue.
Comment 14 Masatomo Nakano (RETIRED) gentoo-dev 2005-07-02 14:50:27 UTC
sure.
It should be fixed. I'll fix it soon..
Comment 15 Masatomo Nakano (RETIRED) gentoo-dev 2005-07-02 14:57:26 UTC
*** Bug 97684 has been marked as a duplicate of this bug. ***
Comment 16 Masatomo Nakano (RETIRED) gentoo-dev 2005-07-02 15:41:04 UTC
Fixed.

Please re-emerge libpq package if you got the same problem.
Comment 17 Jakub Moc (RETIRED) gentoo-dev 2005-07-26 07:11:29 UTC
*** Bug 100361 has been marked as a duplicate of this bug. ***
Comment 18 Priit Laes (IRC: plaes) 2005-07-26 11:46:07 UTC
Masatomo, could you please revbump the dev-db/libpq which fixes this for good.