Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 64060 - PHP and mod_php ebuilds have invalid USE requirements
Summary: PHP and mod_php ebuilds have invalid USE requirements
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-14 15:20 UTC by Peter Colijn
Modified: 2005-05-31 14:19 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Colijn 2004-09-14 15:20:27 UTC
When I try to emerge PHP or mod_php, it tells me that certain USE flags are required (notably GD-related things). IMO, this is invalid. If these things are required, have PHP and mod_php depend on them, and pull them in automatically. I can understand that one of dba or -berkdb is required, that makes sense, but the GD stuff just seems to be hard-required.

At the very least, could you please give me some explanation?

Reproducible: Always
Steps to Reproduce:
1. Remove and GD use flags from your USE variable.
2. Emerge php or mod_php on a ~x86 system.

Actual Results:  
Portage tells me I need to have gd and some other gd-related flags in my USE
variable.

Expected Results:  
It should build PHP anyway, pulling in GD automatically if needed.
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-09-14 17:47:33 UTC
please provide your 'emerge info' output.
and the complete output you see from mod_php/php.
Comment 2 Peter Colijn 2004-09-14 21:59:52 UTC
Whoops. Sorry, here we are:

Emerge info:

Portage 2.0.50-r11 (default-x86-1.4, gcc-3.3.4, glibc-2.3.4.20040808-r0, 2.6.8)=================================================================
System uname: 2.6.8 i686 AMD Athlon(tm) MP 2600+
Gentoo Base System version 1.5.3
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-mp -O2 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /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/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-mp -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.osuosl.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aalib alsa apache2 apm avi berkdb bitmap-fonts bonobo cdr crypt cups dba dvd encode esd foomaticdb freetype gdbm gif gnome gpm gtk gtk2 gtkhtml guile icq imap imlib jabber java jpeg ldap libg++ libwww mad mikmod mmx motif mozilla mpeg msn mysql ncurses nls oggvorbis opengl oss pam pdflib perl png python quicktime readline samba sdl slang smooth spell ssl svga tcltk tcpd tetex truetype x86 xft2 xml2 xmms xprint xv zlib"

Full output of 'emerge mod_php'

[ caffeine@Socrates ~ ]$ sudo emerge mod_php
Calculating dependencies ...done!
>>> emerge (1 of 1) dev-php/mod_php-5.0.1 to /
>>> md5 src_uri ;-) php-5.0.1.tar.bz2
>>> Unpacking source...
 * Apache2 only detected
>>> Unpacking php-5.0.1.tar.bz2 to /var/tmp/portage/mod_php-5.0.1/work
 * Applying php5_soap_persistence_session.diff...                        [ ok ]>>> Source unpacked.
 * Apache2 MPM: prefork

 * USE flag 'jpeg' needs one of these additional flag(s) set:
 *    gd gd-external cpdflib
 *
 * You can do this by enabling one of these flags in /etc/portage/package.use
 *

!!! ERROR: dev-php/mod_php-5.0.1 failed.
!!! Function confutils_use_depend_any, Line 157, Exitcode 0
!!! Need missing USE flag
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-09-14 23:16:15 UTC
you mis-interpreted the error.
It says you need ONE of the flags. Any one will do, and it will not automatically pick one for you, in case it makes the wrong choice.

This is because some of the parts of PHP will only work if some other items (in this case gd or cpdflib) in PHP are being built.
Comment 4 Ciaran McCreesh 2004-09-15 04:58:28 UTC
Well, standard behaviour would be to turn the preferred one on anyway. No combination of USE flags should cause a package to fail to build.
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-09-15 10:11:03 UTC
we've gone with this current behavior precisely because other people in the past have wanted PHP to NOT build certain extensions - eg. GD.
There is no preferred one amongst the set in that case. (Note that in the case of specifying jpeg that PHP will build fine, as it's configure script will just decide to ignore jpeg since none of the extra items it requires enabled were specified).

Furthermore there are plenty of precendents for specific combinations of USE flags causing build failures in other packages.
In the case of PHP5, the build will fail (and upstream specifically set it up this way) if you enable both MySQL and MySQLi OR more than one *DBM [DBM,GDBM,QDBM] OR you try to use the recode extension with imap/nis/mysql OR you specify both readline and libedit (pick one only) as well as several further cases that for a specific thing to work, something else (from a small set of options) must be set.

PHP5 currently has 99 USE flags. And of that, there are these 4 conflicting conditions that we throw an error for, and the ~10 odd cases where one flags depends on any item in a set of other flags.

If there is a way to throw an error during the depend phase, I'd really love it in this case.
Comment 6 Stuart Herbert (RETIRED) gentoo-dev 2005-05-31 14:19:45 UTC
As there's no other way to deal with this situation, I'm closing this bug.

Best regards,
Stu