Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 37623 - mod_php-4.3.4-r2 (and php-4.3.4-r2) fails with dev-db/postgresql-7.4.1
Summary: mod_php-4.3.4-r2 (and php-4.3.4-r2) fails with dev-db/postgresql-7.4.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-08 09:44 UTC by Martin Ehmsen (RETIRED)
Modified: 2007-09-22 23:15 UTC (History)
2 users (show)

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


Attachments
Patch to fix the configure script so it finds the new postgresql files. (php-4.3.4.postgresql.patch,533 bytes, patch)
2004-01-08 09:45 UTC, Martin Ehmsen (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Ehmsen (RETIRED) gentoo-dev 2004-01-08 09:44:13 UTC
I have the useflag postgres set, and when doing an emerge -u mod_php (upgrading from 4.3.4-r1 to 4.3.4-r2) it fails trying to find libpq-fe.h
I have located and corrected the problem.
The problem is that postgresql 7.4.1 has changed the default locations of it's files.
The first thing I tryed was modifing php-sapi.eclass to do an:
myconf="${myconf} --with-pgsql=/usr/include/postgresql/pgsql"
if the postgres usefalg is set.
Please note that this is the new location of the postgresql stuff, but insteed of harcoding the path, one should use pg_config --includedir to get the correct path.
That fixed the problem but only to created a new one: The package could not find libpq.so.
So I looked into the configure script and it seems that you cannot use --with-pgsql=/usr/include/postgresql/pgsql and still have the configure script look for libpq.so in /usr/lib
So I made a small patch to the configure script, so it works (I will submit in a moment). But I don't think that a patch is a permanent solution, someone should notify the php developers.
I added
epatch ${FILESDIR}/php-4.3.4.postgresql.patch
to the last line of src_unpack in the mod_php ebuild to get it working.

I think a similar apporach will work on php, which fails too.
I will try it out in a moment.

Reproducible: Always
Steps to Reproduce:




Portage 2.0.49-r20 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20031222-r0, 2.6.0)
=================================================================
System uname: 2.6.0 i686 AMD Athlon(TM) XP1900+
Gentoo Base System version 1.4.3.12
ccache version 2.3 [enabled]
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-mcpu=athlon-xp -O3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-mcpu=athlon-xp -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache notitles sandbox"
GENTOO_MIRRORS="http://gentoo.linux.no/ "
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow X alsa amd apache2 apm avi berkdb cdr crypt cups curl doc emacs
emacs-w3 encode faad fam fbcon flac foomaticdb freetype fs gdbm gif gtk gtk2
guile imagemagick imap imlib imlib2 ipv6 jabber java javascript jpeg libg++
libwww mad maildir mbox mikmod mmx motif mozilla mpeg mpeg4 ncurses nls nptl
oggvorbis opengl oss pam pdflib perl png postgres python qt quicktime readline
samba scanner sdl slang spell ssl svga tcltk tcpd tetex tiff truetype type1
unicode usb x86 xml xml2 xmms xv xvid zlib"
Comment 1 Martin Ehmsen (RETIRED) gentoo-dev 2004-01-08 09:45:38 UTC
Created attachment 23395 [details, diff]
Patch to fix the configure script so it finds the new postgresql files.
Comment 2 Martin Ehmsen (RETIRED) gentoo-dev 2004-01-08 09:49:40 UTC
Yeps, the patch works just as well on php-4.3.4-r2 as on mod_php
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-01-08 14:04:57 UTC
fixed in CVS now.

did it a more portable way in all php sapi eclasses.
Comment 4 Tal Peer (RETIRED) gentoo-dev 2004-01-08 14:10:17 UTC
I'll take care of fixing it for php 4.3.5.