Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm getting too many make test fails when I compile PHP (5.3.16) on debian. These errors are mostly about gd library and image processing. As a result GD functions like imagecopyresampled produce corrupted images (generally 0 byte output) when I try to resize uploaded images. (same php code runs well on other servers)

This is my configuration line:

./configure --prefix=/opt/php-5.3.16/ --with-apxs2=/opt/httpd-2.4.3/bin/apxs --with-mysql --with-curl --with-curl=/usr/ --enable-ftp --with-gd --with-xpm-dir --with-ttf --with-jpeg-dir --with-png-dir --enable-gd-native-ttf --with-xpm --with-png-dir --with-zlib-dir --with-zlib --enable-calendar --with-gettext --enable-track-vars --with-config-file-path=/etc --enable-exif --enable-mbstring=all --enable-mbregex --with-iconv --with-mcrypt --with-regex=php --enable-trans-sid --enable-bcmath --enable-ctype --enable-mbstring --with-xml --with-xmlrpc --with-imap --with-kerberos --with-imap-ssl --enable-soap --with-mysqli --with-freetype-dir --with-zlib --enable-pdo --with-pdo-sqlite --with-sqlite --with-xsl --with-pdo-mysql --enable-zip --with-libdir=lib64 --with-openssl=/usr/ --enable-libxml --enable-sockets --with-mcrypt=/usr/ --with-bz2 --with-libexpat-dir=/usr --with-libxml-dir=/opt/xml2/ --with-pcre-regex=/usr/ --with-pic --enable-mysqlnd -enable-wddx --enable-pcntl --enable-sysvmsg --enable-sysvsem -enable-sysvshm

And this is the result: (with a long FAILED TEST SUMMARY)

=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped    :   24
Exts tested     :   54
---------------------------------------------------------------------

Number of tests : 11867              9558
Tests skipped   : 2309 ( 19.5%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :   65 (  0.5%) (  0.7%)
Expected fail   :   33 (  0.3%) (  0.3%)
Tests passed    : 9460 ( 79.7%) ( 99.0%)
---------------------------------------------------------------------
Time taken      :  595 seconds
=====================================================================

=====================================================================
EXPECTED FAILED TEST SUMMARY
---------------------------------------------------------------------
Inconsistencies when accessing protected members [Zend/tests/access_modifiers_008.phpt]  XFAIL REASON: Discussion: http://marc.info/?l=php-internals&m=120221184420957&w=2
Inconsistencies when accessing protected members - 2 [Zend/tests/access_modifiers_009.phpt]  XFAIL REASON: Discussion: http://marc.info/?l=php-internals&m=120221184420957&w=2
Bug #48770 (call_user_func_array() fails to call parent from inheriting class) [Zend/tests/bug48770.phpt]  XFAIL REASON: See Bug #48770
Bug #48770 (call_user_func_array() fails to call parent from inheriting class) [Zend/tests/bug48770_2.phpt]  XFAIL REASON: See Bug #48770
Bug #48770 (call_user_func_array() fails to call parent from inheriting class) [Zend/tests/bug48770_3.phpt]  XFAIL REASON: See Bug #48770
Bug #62680 (Function isset() throws fatal error on set array if non-existent key depth >= 3) [Zend/tests/bug62680.phpt]  XFAIL REASON: see https://bugs.php.net/62680
DateTime::add() -- fall type2 type3 [ext/date/tests/DateTime_add-fall-type2-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::add() -- fall type3 type2 [ext/date/tests/DateTime_add-fall-type3-type2.phpt]  XFAIL REASON: Various bugs exist
DateTime::add() -- fall type3 type3 [ext/date/tests/DateTime_add-fall-type3-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::add() -- spring type2 type3 [ext/date/tests/DateTime_add-spring-type2-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::add() -- spring type3 type2 [ext/date/tests/DateTime_add-spring-type3-type2.phpt]  XFAIL REASON: Various bugs exist
DateTime::add() -- spring type3 type3 [ext/date/tests/DateTime_add-spring-type3-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::diff() -- fall type2 type3 [ext/date/tests/DateTime_diff-fall-type2-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::diff() -- fall type3 type2 [ext/date/tests/DateTime_diff-fall-type3-type2.phpt]  XFAIL REASON: Various bugs exist
DateTime::diff() -- fall type3 type3 [ext/date/tests/DateTime_diff-fall-type3-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::diff() -- spring type2 type3 [ext/date/tests/DateTime_diff-spring-type2-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::diff() -- spring type3 type2 [ext/date/tests/DateTime_diff-spring-type3-type2.phpt]  XFAIL REASON: Various bugs exist
DateTime::diff() -- spring type3 type3 [ext/date/tests/DateTime_diff-spring-type3-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::sub() -- fall type2 type3 [ext/date/tests/DateTime_sub-fall-type2-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::sub() -- fall type3 type2 [ext/date/tests/DateTime_sub-fall-type3-type2.phpt]  XFAIL REASON: Various bugs exist
DateTime::sub() -- fall type3 type3 [ext/date/tests/DateTime_sub-fall-type3-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::sub() -- spring type2 type3 [ext/date/tests/DateTime_sub-spring-type2-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::sub() -- spring type3 type2 [ext/date/tests/DateTime_sub-spring-type3-type2.phpt]  XFAIL REASON: Various bugs exist
DateTime::sub() -- spring type3 type3 [ext/date/tests/DateTime_sub-spring-type3-type3.phpt]  XFAIL REASON: Various bugs exist
Bug #53437 (Crash when using unserialized DatePeriod instance) [ext/date/tests/bug53437.phpt]  XFAIL REASON: Bug #53437 Not fixed yet
RFC: DateTime and Daylight Saving Time Transitions (zone type 3) [ext/date/tests/rfc-datetime_and_daylight_saving_time-type3.phpt]  XFAIL REASON: RFC not implemented yet
Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) [ext/session/tests/bug60634.phpt]  XFAIL REASON: Long term low priority bug, working on it
Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - fatal error in write during exec [ext/session/tests/bug60634_error_1.phpt]  XFAIL REASON: Long term low priority bug, working on it
Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - exception in write during exec [ext/session/tests/bug60634_error_2.phpt]  XFAIL REASON: Long term low priority bug, working on it
Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - fatal error in write after exec [ext/session/tests/bug60634_error_3.phpt]  XFAIL REASON: Long term low priority bug, working on it
Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - exception in write after exec [ext/session/tests/bug60634_error_4.phpt]  XFAIL REASON: Long term low priority bug, working on it
Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - fatal error in close during exec [ext/session/tests/bug60634_error_5.phpt]  XFAIL REASON: Long term low priority bug, working on it
SimpleXML: array casting bug [ext/simplexml/tests/034.phpt]  XFAIL REASON: Does anyone know why?
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Bug #22544 (TrueColor transparency in PNG images). [ext/gd/tests/bug22544.phpt]
Bug #24155 (gdImageRotate270 rotation problem). [ext/gd/tests/bug24155.phpt]
Bug #27582 (ImageFillToBorder() on alphablending image looses alpha on fill color) [ext/gd/tests/bug27582_1.phpt]
Bug #39780 (PNG image with CRC/data error raises a fatal error) [ext/gd/tests/bug39780.phpt]
Bug #43073 (TrueType bounding box is wrong for angle<>0) [ext/gd/tests/bug43073.phpt]
Bug #45799 (imagepng() crashes on empty image). [ext/gd/tests/bug45799.phpt]
Bug #48732 (TTF Bounding box wrong for letters below baseline) [ext/gd/tests/bug48732.phpt]
imagecreatefromstring [ext/gd/tests/createfromstring.phpt]
gif in/out [ext/gd/tests/gif.phpt]
gif --> jpeg conversion test [ext/gd/tests/gif2jpg.phpt]
gif --> png conversion test [ext/gd/tests/gif2png.phpt]
Testing imagearc() of GD library [ext/gd/tests/imagearc_basic.phpt]
Testing wrong param passing imagearc() of GD library [ext/gd/tests/imagearc_error1.phpt]
Testing passing negative end angle to imagearc() of GD library [ext/gd/tests/imagearc_variation1.phpt]
Testing passing negative start angle to imagearc() of GD library [ext/gd/tests/imagearc_variation2.phpt]
Testing imagechar() of GD library [ext/gd/tests/imagechar_basic.phpt]
Testing imagecharup() of GD library [ext/gd/tests/imagecharup_basic.phpt]
Testing imagecolorallocatealpha() [ext/gd/tests/imagecolorallocatealpha_basic.phpt]
imagecolorclosesthwb() test [ext/gd/tests/imagecolorclosesthwb.phpt]
Test imagecolorset() function : basic functionality [ext/gd/tests/imagecolorset_basic.phpt]
Testing imageconvolution() of GD library [ext/gd/tests/imageconvolution_basic.phpt]
imagecopyresampled() [ext/gd/tests/imagecopyresampled_basic.phpt]
Testing imagecreatetruecolor() of GD library [ext/gd/tests/imagecreatetruecolor_basic.phpt]
imagedashedline() [ext/gd/tests/imagedashedline_basic.phpt]
Testing imageellipse() of GD library [ext/gd/tests/imageellipse_basic.phpt]
Testing imagefilledarc() of GD library [ext/gd/tests/imagefilledarc_basic.phpt]
Testing wrong param passing imagefilledarc() of GD library [ext/gd/tests/imagefilledarc_error1.phpt]
Testing passing negative end angle to imagefilledarc() of GD library [ext/gd/tests/imagefilledarc_variation1.phpt]
Testing passing negative start angle to imagefilledarc() of GD library [ext/gd/tests/imagefilledarc_variation2.phpt]
imagefilledpolygon() [ext/gd/tests/imagefilledpolygon_basic.phpt]
Testing imagefilltoborder() of GD library [ext/gd/tests/imagefilltoborder_basic.phpt]
imagefilter() function test [ext/gd/tests/imagefilter.phpt]
Testing imagegammacorrect() of GD library [ext/gd/tests/imagegammacorrect_basic.phpt]
Testing imagegammacorrect() of GD library with non TrueColor image [ext/gd/tests/imagegammacorrect_variation1.phpt]
Testing imagelayereffect() of GD library [ext/gd/tests/imagelayereffect_basic.phpt]
imageploygon() [ext/gd/tests/imagepolygon_basic.phpt]
Testing imagerectangle() of GD library [ext/gd/tests/imagerectangle_basic.phpt]
Test imagesetbrush() function : basic functionality [ext/gd/tests/imagesetbrush_basic.phpt]
Testing imagetruecolortopalette() of GD library [ext/gd/tests/imagesetthickness_basic.phpt]
Testing imagestring() of GD library [ext/gd/tests/imagestring_basic.phpt]
Testing imagestringup() of GD library [ext/gd/tests/imagestringup_basic.phpt]
Testing imagetruecolortopalette() of GD library [ext/gd/tests/imagetruecolortopalette_basic.phpt]
jpeg <--> png conversion test [ext/gd/tests/jpeg2png.phpt]
Test jpeg2wbmp() function : wrong threshold value param [ext/gd/tests/jpeg2wbmp_error1.phpt]
Test jpeg2wbmp() function : wrong destination filename param [ext/gd/tests/jpeg2wbmp_error3.phpt]
jpeg <--> gd1/gd2 conversion test [ext/gd/tests/jpg2gd.phpt]
libgd #86 (Possible infinite loop in imagecreatefrompng) [ext/gd/tests/libgd00086.phpt]
libgd #100 (spurious horizontal line drawn by gdImageFilledPolygon) [ext/gd/tests/libgd00100.phpt]
png <--> gd1/gd2 conversion test [ext/gd/tests/png2gd.phpt]
Test png2wbmp() function : wrong threshold value param [ext/gd/tests/png2wbmp_error1.phpt]
Test png2wbmp() function : wrong destination filename param [ext/gd/tests/png2wbmp_error3.phpt]
png compression test [ext/gd/tests/pngcomp.phpt]
xbm --> png conversion test [ext/gd/tests/xbm2png.phpt]
xpm --> jpeg conversion test [ext/gd/tests/xpm2jpg.phpt]
xpm --> png conversion test [ext/gd/tests/xpm2png.phpt]
mcrypt_create_iv [ext/mcrypt/tests/mcrypt_create_iv.phpt]
Phar: copy-on-write test 4a [cache_list] [ext/phar/tests/cache_list/copyonwrite4a.phpt]
ReflectionExtension::getDependencies() [ext/reflection/tests/016.phpt]
Test fileatime(), filemtime(), filectime() & touch() functions : usage variation [ext/standard/tests/file/005_variation2.phpt]
realpath_cache_size() and realpath_cache_get() [ext/standard/tests/file/realpath_cache.phpt]
Bug #26614 (CDATA sections skipped on line count) [ext/xml/tests/bug26614_libxml.phpt]
Bug #46699: (xml_parse crash when parser is namespace aware) [ext/xml/tests/bug46699.phpt]
Test xml_error_string() function : usage variations  - test different types for code [ext/xml/tests/xml_error_string_variation1.phpt]
Test xml_set_start_namespace_decl_handler function: basic [ext/xml/tests/xml_set_start_namespace_decl_handler_basic.phpt]
Bug #45556 (Return value from callback isn't freed) [ext/xmlrpc/tests/bug45556.phpt]
=====================================================================

When I remove --with-gd option I don't get any errors (other than the Bugs).

Is there something wrong with the configuration line or what else can be the reason?

Note: I have to compile PHP, apt-get is not an option for me.

share|improve this question
    
What version of GD have you installed on the server? –  symcbean Jan 21 '13 at 17:34
    
GD_VERSION 2.0.36 –  Levent Alpsal Jan 21 '13 at 20:55
    
Yes, but is it compiled from src? A binary package? A src package? –  symcbean Jan 22 '13 at 9:34
    
I'm trying to compile it from source. Not binary package. –  Levent Alpsal Jan 22 '13 at 14:41
    
I wasn't asking about PHP, I was asking where your GD came from. If it wasn't compiled from src then you'll need the GD dev packages installed before you configure PHP. –  symcbean Jan 22 '13 at 17:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.