Emerging the new php ebuild cannot complete the configure process, giving the following error: checking for GD support... yes checking for the location of libjpeg... /usr checking for the location of libpng... no checking for the location of libXpm... no checking for FreeType 1.x support... no checking for FreeType 2... no checking for T1lib support... no checking whether to enable truetype string function in GD... no checking whether to enable JIS-mapped Japanese font support in GD... no checking for fabsf... yes checking for floorf... yes checking for jpeg_read_header in -ljpeg... yes configure: error: PNG support requires ZLIB. Use --with-zlib-dir=<DIR> Reproducible: Always Steps to Reproduce: 1. set use flags in /etc/portage/package.use: dev-lang/php -* apache2 cli crypt jpeg gd mysql pcre pear session tokenizer xml2 2. emerge -av dev-lang/php Actual Results: emerge failed, giving me the mentioned error message Expected Results: The ebuild should either: 1. disable png support for gd 2. check USE flag combination and report to me that gd needs the png USE flag. It does this kind of check with pear USE flag (which requires cli and xml2). emerge --info: Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.5-r1, 2.6.11.11 i686) ================================================================= System uname: 2.6.11.11 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz Gentoo Base System version 1.6.13 dev-lang/python: 2.3.5, 2.4.1-r1 sys-apps/sandbox: 1.2.11 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.6 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe" 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/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks fixpackages sandbox sfperms strict userpriv usersandbox" GENTOO_MIRRORS="ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://ftp.easynet.nl/mirror/gentoo/" LANG="en_US.utf8" LC_ALL="en_US.utf8" MAKEOPTS="-j4" 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="x86 X acpi alsa apache2 avi berkdb bitmap-fonts cdr crypt cups curl eds emboss encode esd evo fam foomaticdb fortran gdbm gif gnome gpm gstreamer gtk gtk2 hal howl imagemagick imlib ipv6 java jpeg junit libg++ libwww mad mikmod motif mozilla mp3 mpeg mysql ncurses nls nptl nptlonly odbc ogg oggvorbis opengl pam pcre pdflib perl png ppds python quicktime readline samba sdl spell ssl svga tcpd tiff truetype truetype-fonts type1-fonts unicode vhosts vorbis xml2 xv zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LDFLAGS, LINGUAS
Yes, it's a known problem, unless other solution is found, php will have to depend on libpng if gd use flag is set.
I have the the same problem. It should be solved by USE="zlib". But it wil fail on configuration: configure: error: ZLIB extendion requires zlib >= 1.0.9 I have got zlib-1.2.3, so this ain't right. Portage 2.0.51.22-r2 (selinux/2004.1/x86/hardened, gcc-3.3.6, glibc-2.3.5-r1, 2.6.11-hardened-r15 i686) ================================================================= System uname: 2.6.11-hardened-r15 i686 AMD Duron(tm) Processor Gentoo Base System version 1.6.13 dev-lang/python: 2.3.5-r2 sys-apps/sandbox: 1.2.11 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.6 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon -O3 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon -O3 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks loadpolicy sandbox selinux sfperms strict" GENTOO_MIRRORS="ftp.snt.utwente.nl/pub/os/linux/gentoo" LINGUAS="en us nl" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="acpi apache2 berkdb bzlib caps crypt cscope dba dio dlloader fam ftp gd gdbm gif gpm hardened imap ipv6 java jpeg junit kerberos ldap libg++ libwww lm_sensor maildir mailwrapper mime mmap mmx motif mysql ncurses nls offensive pam pcre pdflib perl php pic pie png posix postgres python readline ruby sasl selinux slang snmp sockets ssl truetype unicode usb vhosts x86 xml xml2 xmlrpc xsl zlib linguas_en linguas_us linguas_nl userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
(In reply to comment #2) > I have the the same problem. It should be solved by USE="zlib". But it wil fail > on configuration: > configure: error: ZLIB extendion requires zlib >= 1.0.9 > I have got zlib-1.2.3, so this ain't right. Please, don't clutter this bug w/ irrelevant comments. This bug is about USE="-png" emerge dev-lang/php failing at zlib check, not about misdetecting your zlib version. File a new bug.
This was now fixed in the PHP Overlay [1], after further investigation we found out that png and jpeg support is not optional, the GD extensions requires it unconditionally and if you disable it, it fails during compilation since it always wants to compile gd_png.c and gd_jpeg.c, so now the "gd" USE flag automatically enables both JPEG and PNG support in the background and requires the required libraries. Please test the PHP Overlay ebuilds if you want, they should go into official Portage tree during the next week. Best regards, CHTEKK. [1] http://svn.gnqs.org/projects/gentoo-php-overlay/
Please, test and report back if you still have problems.
I tried the for-portage 5.0.5-r1 and 5.1.0_rc1 ebuild, and they both work ;) checking for GD support... yes checking for the location of libjpeg... /usr checking for the location of libpng... /usr checking for the location of libXpm... no checking for FreeType 1.x support... no checking for FreeType 2... /usr checking for T1lib support... /usr checking whether to enable truetype string function in GD... yes checking whether to enable JIS-mapped Japanese font support in GD... no checking for fabsf... yes checking for floorf... yes checking for jpeg_read_header in -ljpeg... yes checking for png_write_image in -lpng... yes If configure fails try --with-xpm-dir=<DIR> checking for T1_StrError in -lt1... yes Unfortunately I don't have any gd-powered scripts lying around, so I can't test the binaries.
The changes work and were verified on several systems, closing. Best regards, CHTEKK.