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

Bug 223797

Summary: Error building PHP. Missing package =dev-db/postgresql-base-*
Product: Gentoo Linux Reporter: Kostadin Chikov <kostadin.chikov>
Component: New packagesAssignee: PHP Bugs <php-bugs>
Severity: normal CC: jaak, pgsql-bugs
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Package list:
Runtime testing required: ---
Attachments: fix logic of php-common-r1.eclass
fix logic of php-common-r1.eclass (attempt #2)

Description Kostadin Chikov 2008-05-27 07:48:38 UTC

I cannot compile PHP on a stable system. It complains that the it cannot resolve the =dev-db/postgresql-base-* package. All versions of dev-db/postgresql-base are masked with the ~x86 keyword. 

Here are the package messges:
>>> Emerging (1 of 2) dev-lang/php-5.2.6_rc4 to /
 * php-patchset-5.2.6_rc4-r0.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                                                                                          [ ok ]
 * php-5.2.6RC4.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                                                                                                       [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                                          [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                                         [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                                        [ ok ]
 * checking php-5.2.6RC4.tar.bz2 ;-) ...                                                                                                                      [ ok ]
 * checking php-patchset-5.2.6_rc4-r0.tar.bz2 ;-) ...                                                                                                         [ ok ]
 * Determining SAPI(s) to build
 *   Enabled  SAPI: cli
 *   Enabled  SAPI: cgi
 *   Enabled  SAPI: apache2
 * QA Notice: USE Flag 'kolab' not in IUSE for dev-lang/php-5.2.6_rc4
 * QA Notice: USE Flag 'kolab' not in IUSE for dev-lang/php-5.2.6_rc4
!!! Error: Can't load module postgresql
 * ERROR: dev-lang/php-5.2.6_rc4 failed.
 * Call stack:
 *     , line   49:  Called pkg_setup
 *    php-5.2.6_rc4.ebuild, line   94:  Called php5_2-sapi_pkg_setup
 *      php5_2-sapi.eclass, line  319:  Called php5_2-sapi_check_use_flags
 *      php5_2-sapi.eclass, line  221:  Called php_check_pgsql
 *    php-common-r1.eclass, line  223:  Called built_with_use 'pkg_setup' 'pkg_setup'
 *           eutils.eclass, line 1698:  Called die
 * The specific snippet of code:
 *      [[ -z ${PKG} ]] && die "Unable to resolve $1 to an installed package"
 *  The die message:
 *   Unable to resolve =dev-db/postgresql-base-* to an installed package
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/log/portage/dev-lang:php-5.2.6_rc4:20080527-072812.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-lang/php-5.2.6_rc4/temp/die.env'.

and the emerge info:

Portage (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r4 i686)
System uname: 2.6.24-gentoo-r4 i686 Intel(R) Core(TM)2 CPU 6320 @ 1.86GHz
Timestamp of tree: Tue, 27 May 2008 02:45:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r9
dev-python/pycrypto: 2.0.1-r6
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
CFLAGS="-O2 -march=nocona -pipe"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=nocona -pipe"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
LINGUAS="en de bg"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="X Xaw3d aac aalib acl aim alsa apache2 apm arts audiofile bash-completion bcmath berkdb branding bzip2 bzlib calendar caps cdb cdr cgi cli cracklib crypt ctype cups curl dba dbm dga divx divx4linux dri dts dvd dvdr dvdread emacs encode ethereal exif ffmpeg fftw firefox flac flatfile fortran ftp gd gdbm gif gmedia gmp gpm gtk gtk2 hal history iconv icq imagemagick imap inifile ipv6 isdnlog java javamail jpeg kde lcms leim libwww mad mcal memlimit mhash midi mime ming mmx mng motif mozdevelop mp3 mpeg mudflap mysql ncurses nls nptl nptlonly nsplugin odbc ogg opengl openmp oscar oss pam pcmcia pcntl pcre pdf perl php png posix postgres pppd python qt3 qt4 quicktime readline realmedia reflection ruby samba session sf simplexml slang soap sockets sox speex spell spl sqlite sse sse2 ssl ssse3 subversion svg tcltk tcpd tetex theora threads tidy tiff tkff tokenizer truetype type1 unicode usb utf8 vcd vorbis wddx webdav wifi win32codecs wmf wmp x86 xcomposite xine xinerama xml xml2 xmlrpc xorg xosd xsl xv xvid xvmc yv12 zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias proxy proxy_balancer" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de bg" USERLAND="GNU" VIDEO_CARDS="nvidia vesa fbdev"
Comment 1 Christian Hoffmann (RETIRED) gentoo-dev 2008-05-27 10:15:10 UTC
Created attachment 154455 [details, diff]
fix logic of php-common-r1.eclass

Hm.. the dependencies are right, the problem is that if the libpq check succeeds, the postgresql-base check is done anyway and fails for obvious reasons.
The relevant code path is only hit with USE="postgres apache2 threads", my stable systems where I tested that either had no USE=threads or no apache at all. :/

I just committed the attached patch, in the hope that it fixes this (either patch it yourself using the attachement or re-sync in a few hours).
Comment 2 Kostadin Chikov 2008-05-27 16:22:28 UTC
That did not resolve the problem. I still get the same error message. Btw I do not have a postgresql module in eselect

local pgsql_ver=$(eselect postgresql show) <-- line 222 in php-common-r1.eclass
Comment 3 Christian Hoffmann (RETIRED) gentoo-dev 2008-05-29 14:50:40 UTC
Created attachment 154701 [details, diff]
fix logic of php-common-r1.eclass (attempt #2)

Thanks to zlin and dev-zero, I think I finally fixed it in the tree. Sorry for the long delays. :(
Comment 4 Kostadin Chikov 2008-05-30 07:10:25 UTC
It worked. Thank you for the fix.