i was working on some php/gd code on my x86_64 and after i switched locations to start working on my ppc desktop, the image was coming out black instead of transparent ... the following snippet should produce a large transparent png named "trans.png" ... oddly, changing the image dimensions to something smaller made it start working ... it doesnt appear to be a bug as a test case written in C using GD directly yields correct images Portage 2.1.3_rc4 (default-linux/ppc/ppc32/2006.1, gcc-4.2.0, glibc-2.6-r0, 2.6.20.4 ppc) ================================================================= System uname: 2.6.20.4 ppc PPC970MP, altivec supported Gentoo Base System release 1.12.10 Timestamp of tree: Mon, 18 Jun 2007 07:29:01 +0000 distcc 2.18.3 powerpc-unknown-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.4 [enabled] dev-lang/python: 2.4.4-r4 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.4-r7 sys-apps/sandbox: 1.2.18.1 sys-devel/autoconf: 2.13, 2.61 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.15.90.0.3-r5, 2.16.1-r2, 2.16.91.0.3, 2.16.91.0.4, 2.16.91.0.5, 2.16.91.0.6, 2.16.91.0.7, 2.16.92, 2.16.93, 2.16.94, 2.17, 2.17.50.0.2, 2.17.50.0.3, 2.17.50.0.4, 2.17.50.0.5, 2.17.50.0.6, 2.17.50.0.7, 2.17.50.0.8, 2.17.50.0.9, 2.17.50.0.10, 2.17.50.0.11, 2.17.50.0.12, 2.17.50.0.13, 2.17.50.0.14, 2.17.50.0.15, 2.17.50.0.16 sys-devel/gcc-config: 1.3.16 sys-devel/libtool: 1.5.23b virtual/os-headers: 2.6.21 ACCEPT_KEYWORDS="ppc ~ppc" AUTOCLEAN="yes" CBUILD="powerpc-unknown-linux-gnu" CFLAGS="-Wall -O2 -mcpu=970 -pipe" CHOST="powerpc-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/php/apache1-php5/ext-active/ /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" CXXFLAGS="-Wall -O2 -mcpu=970 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="buildpkg ccache distlocks metadata-transfer noinfo parallel-fetch sandbox sfperms splitdebug unmerge-orphans" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="en_US" LDFLAGS="-Wl,-O1 -Wl,-z,relro" MAKEOPTS="-j6" PKGDIR="/usr/portage/packages/powerpc-unknown-linux-gnu" PORTAGE_RSYNC_EXTRA_OPTS="--exclude=/manifest1_obsolete" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage /usr/portage/local/layman/enlightenment /usr/portage/local/layman/nouveau" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 aac aalib acl alsa altivec amr apache2 arts asf audiofile berkdb bitmap-fonts bonobo boundschecking bzip2 cairo cddb cdparanoia cdr cli cracklib crypt css cups curl directfb divx dri dts dvd dvdr dvdread emboss encode exif fame ffmpeg firefox flac fontconfig fortran ftp gd gif glitz gpm gstreamer gtk gtkhtml iconv ieee1394 imagemagick ipv6 isdnlog jbig jpeg jpeg2k kde ldap libcaca libg++ libwww lzo mad matroska midi mikmod mjpeg mng modplug mozilla mp3 mp4 mpeg mudflap multislot musepack ncurses nls nptl nptlonly ogg openal opengl openmp pcre pdf perl php png ppc pppd python qt3 qt4 quicktime readline reflection rle samba sdl session sndfile spell spl ssl subversion svg tcl tcltk tcpd tga theora threads tiff tk truetype truetype-fonts type1-fonts unicode usb v4l v4l2 vcd vorbis wmp wxwindows x264 xanim xinerama xinetd xml xorg xosd xpm xprint xrandr xv xvid yv12 zip zlib" ALSA_CARDS="aoa aoa-fabric-layout aoa-onyx aoa-soundbus aoa-soundbus-i2s aoa-tas aoa-toonie powermac usb-audio via82xx" 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" ELIBC="glibc" INPUT_DEVICES="mouse keyboard joystick void" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nv nouveau ati r128 radeon sisusb" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Created attachment 122443 [details] trans.php php test code
Created attachment 122444 [details] trans.c raw C / GD test code
Created attachment 122446 [details] trans.bad.png sample broken image
Created attachment 122448 [details] trans.good.png sample good image
in original comment, it should read "it doesnt appear to be a bug in GD as a ..." the good sample came from trans.c while the bad sample came from trans.php
emerge -pv php output, please.
ignoring the fact you can recreate the relevant output yourself ... [ebuild R ] dev-lang/php-5.2.2-r1 USE="apache2 berkdb bzip2 cli crypt curl exif ftp gd iconv ipv6 ldap ncurses nls pcre readline reflection session sockets spell spl ssl threads truetype unicode xml xpm zip zlib (-adabas) -bcmath (-birdstep) -calendar -cdb -cgi -cjk -concurrentmodphp -ctype -curlwrappers (-db2) -dbase (-dbmaker) -debug -discard-path -doc (-empress) (-empress-bcs) (-esoob) -fastbuild (-fdftk) -filter (-firebird) -flatfile -force-cgi-redirect (-frontbase) -gd-external -gdbm -gmp -hash -imap -inifile (-interbase) -iodbc -java-external -json -kerberos -ldap-sasl -libedit -mcve -mhash -msql -mssql -mysql -mysqli (-oci8) (-oci8-instant-client) -odbc -pcntl -pdo -pdo-external -pic -posix -postgres -qdbm -recode -sapdb -sharedext -sharedmem -simplexml -snmp -soap (-solid) -sqlite -suhosin (-sybase) (-sybase-ct) -sysvipc -tidy -tokenizer -wddx -xmlreader -xmlrpc -xmlwriter -xsl -yaz -zip-external"
(In reply to comment #7) > ignoring the fact you can recreate the relevant output yourself ... I'm asking because I want to know whether you are using gd or gd-external. The former uses a bundled gd; the latter uses a shared library. So, if you recompile php w/ USE="-gd gd-external" I assume it will work just fine. If it does, take this upstream please.
the point of having it in our bugzilla is for someone else to verify they see the same behavior on a big endian machine
The php works just fine on my G4 with php built like: [ebuild R ] dev-lang/php-5.2.2-r1 USE="berkdb cli crypt curl ftp iconv ipv6 mysql ncurses nls pcre readline reflection session spell spl ssl sysvipc truetype unicode xml zlib (-adabas) -apache2 -bcmath (-birdstep) -bzip2 -calendar -cdb -cgi -cjk -concurrentmodphp -ctype -curlwrappers (-db2) -dbase (-dbmaker) -debug -discard-path -doc (-empress) (-empress-bcs) (-esoob) -exif -fastbuild (-fdftk) -filter (-firebird) -flatfile -force-cgi-redirect (-frontbase) -gd -gd-external -gdbm -gmp -hash -imap -inifile (-interbase) -iodbc -java-external -json -kerberos -ldap -ldap-sasl -libedit -mcve -mhash -msql -mssql -mysqli (-oci8) (-oci8-instant-client) -odbc -pcntl -pdo -pdo-external -pic -posix -postgres -qdbm -recode -sapdb -sharedext -sharedmem -simplexml -snmp -soap -sockets (-solid) -sqlite -suhosin (-sybase) (-sybase-ct) -threads -tidy -tokenizer -wddx -xmlreader -xmlrpc -xmlwriter -xpm -xsl -yaz -zip -zip-external"
hrm, how do you have working gd functions in php when you have USE=-gd ? you shouldnt have been able to even run that sample php script i posted ...
Sorry, gd was automatically turned on by the truetype flag :p * * USE flag 'truetype' needs one of these additional flag(s) set: * gd gd-external * * 'gd' was automatically selected and enabled. * You can change that by enabling/disabling those flags accordingly * in /etc/portage/package.use. *
Until someone can reproduce this on PPC, closing WORKSFORME.