Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 36795 - libgd-2.0.17 breaks mod_php
Summary: libgd-2.0.17 breaks mod_php
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-30 03:13 UTC by Alberto Ornaghi
Modified: 2004-01-03 21:48 UTC (History)
2 users (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 Alberto Ornaghi 2003-12-30 03:13:34 UTC
after upgrading to libgd-2.0.17, mod_php won't compile anymore...
while performing the final link, the error is :

libtool: link: warning: library `/usr/lib/libsablot.la' was moved.
libtool: link: warning: library `/usr/lib/libsablot.la' was moved.
libtool: link: warning: library `/usr/lib/libsablot.la' was moved.
ext/gd/gd.lo(.text+0x425): In function `zm_deactivate_gd':
: undefined reference to `gdFreeFontCache'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
make: *** Waiting for unfinished jobs....
make: *** Waiting for unfinished jobs....



Reproducible: Always
Steps to Reproduce:
1. emerge sync
2. emerge libgd-2.0.17
3. USE="gd gd-external" emerge mod_php

Actual Results:  
mod_php does not compile


Portage 2.0.49-r18 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.4.23)
=================================================================
System uname: 2.4.23 i686 mobile AMD Athlon(tm) 4 Processor
Gentoo Base System version 1.4.3.12
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon -mcpu=athlon -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/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/bind
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O2 -mcpu=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache fixpackages sandbox"
GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo
http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage.local"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X aalib acpi acpi4linux alsa apache2 avi berkdb cdr crypt cscope curl
dga dvd esd fbcon foomaticdb gd gd-external gif gpm gtk gtk2 imap imlib innodb
java jikes jpeg libwww mbox mmx mpeg mysql ncurses nls oggvorbis opengl oss pam
pcmcia pdflib plotutils png pnp quicktime readline samba sdl slang socks5 spell
sse ssl svga tcpd tetex tiff truetype usb wavelan x86 xv zlib"
Comment 1 aent 2003-12-30 19:38:09 UTC
Updating also seems to break existing installs of mod_php upon restart... I get unresolved symbols in createImageFromGif when starting mod_php now :(
Comment 2 SpanKY gentoo-dev 2003-12-30 20:54:39 UTC
-gdFreeFontCache ()
+gdFontCacheShutdown ()

seems the name was changed between 2.0.15 and 2.0.17

simply changing the func name in ext/gd/gd.c when gd-external is in USE and gd-2.0.17 is present is sufficient to fix this bug
Comment 3 Alberto Ornaghi 2003-12-31 02:03:26 UTC
the GIF support was removed from libgd in the 2.0.17 release. this is the cause for the createImageFromGif() problem on restart.
Comment 4 Stuart Herbert (RETIRED) gentoo-dev 2003-12-31 02:16:26 UTC
It's also worth noting that the PHP Group recommend that you use the version of libgd that is bundled with PHP, rather than the external libgd distribution.  This recommendation has been the case since PHP 4.3.0.

I'd recommend fixing this by restricting which versions of libgb the php ebuilds depend on.

Stu
Comment 5 SpanKY gentoo-dev 2003-12-31 04:50:52 UTC
it is controlled via gd-external USE flag ... i think doing anything beyond that is placing too much control over the user
Comment 6 SpanKY gentoo-dev 2003-12-31 06:40:27 UTC
also, the reason gif support was 'removed' in 2.0.17 is because the
people who write the gif patch havent updated it to 2.0.17 yet

i should have a 2.0.17-r1 in the tree soon that has gif supported
'added' back in (ported the patch myself)

this should be added to the php.eclass though (or something similar):
if has_version '>=media-libs/libgd-2.0.17' \
    && sed -i 's:gdFreeFontCache:gdFontCacheShutdown:' ${S}/ext/gd/gd.c
Comment 7 Stuart Herbert (RETIRED) gentoo-dev 2003-12-31 07:25:59 UTC
Shrugs.  I'm not exactly crazy about patching PHP just to support an alternative (and notoriously buggy) version of the gd library - even if the patch is trivial.  But there again, it's not my shout ;-)

Stu
Comment 8 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-01-03 20:03:53 UTC
I'm closing this as I warned the person that originally wanted gd-external capabilities that it may break due to upstream issues at various times, and the only method i was now officially supporting is the one included with the PHP sources. The sole reason behind this is the in-ordinate amount of work that an external gd has required in the past, and it just isn't worth it to do it myself (but patches definetly accepted if somebody else wants it).

I've put Vapier's sed fix in place for now.
Comment 9 SpanKY gentoo-dev 2004-01-03 21:48:13 UTC
i'm the one who created gd-external and then broke your php setup oh-so-long-ago ;)

thanks