php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64281 PHP fails to compile with GD
Submitted: 2013-02-22 19:39 UTC Modified: 2013-02-23 04:04 UTC
From: mark at kreine dot ru Assigned:
Status: Closed Package: Compile Failure
PHP Version: 5.4.12 OS: Ubuntu
Private report: No CVE-ID: None
 [2013-02-22 19:39 UTC] mark at kreine dot ru
Description:
------------
If enabled --with-gd, php fails to compile resulting in the following errors:

In file included from /tmp/php-5.4.12/ext/gd/gd.c:103:0:
/tmp/php-5.4.12/ext/gd/gd_ctx.c: In function '_php_image_stream_putc':
/tmp/php-5.4.12/ext/gd/gd_ctx.c:51:41: error: 'struct gdIOCtx' has no member named 'data'
/tmp/php-5.4.12/ext/gd/gd_ctx.c: In function '_php_image_stream_putbuf':
/tmp/php-5.4.12/ext/gd/gd_ctx.c:58:41: error: 'struct gdIOCtx' has no member named 'data'
/tmp/php-5.4.12/ext/gd/gd_ctx.c: In function '_php_image_stream_ctxfree':
/tmp/php-5.4.12/ext/gd/gd_ctx.c:67:8: error: 'struct gdIOCtx' has no member named 'data'
/tmp/php-5.4.12/ext/gd/gd_ctx.c:68:3: error: 'struct gdIOCtx' has no member named 'data'
/tmp/php-5.4.12/ext/gd/gd_ctx.c:69:6: error: 'struct gdIOCtx' has no member named 'data'
In file included from /tmp/php-5.4.12/ext/gd/gd.c:103:0:
/tmp/php-5.4.12/ext/gd/gd_ctx.c: In function '_php_image_output_ctx':
/tmp/php-5.4.12/ext/gd/gd_ctx.c:153:6: error: 'gdIOCtx' has no member named 'data'
make: *** [ext/gd/gd.lo] Error 1


Test script:
---------------
Here is my configure script as an example:

./configure --prefix=/soft/php --with-apxs2=/soft/httpd/bin/apxs --with-mysql=shared,/soft/mysql --with-pdo-mysql=shared,/soft/mysql --with-mysqli=shared,/soft/mysql/bin/mysql_config --with-libxml-dir=/soft/libxml --with-iconv=shared,/soft/libiconv --with-zlib=shared,/soft/zlib --with-zlib-dir=/soft/zlib --with-gettext=shared,/soft/gettext --with-gd=shared,/soft/gd --with-jpeg-dir=/soft/libjpeg --with-png-dir=/soft/libpng --enable-ftp --enable-exif --enable-mbstring --enable-bcmath --enable-calendar --enable-zip --enable-gd-native-ttf --with-pcre-dir=/soft/pcre --enable-soap --enable-sockets



Expected result:
----------------
Successful compilation

Actual result:
--------------
The following compilation errors:

In file included from /tmp/php-5.4.12/ext/gd/gd.c:103:0:
/tmp/php-5.4.12/ext/gd/gd_ctx.c: In function '_php_image_stream_putc':
/tmp/php-5.4.12/ext/gd/gd_ctx.c:51:41: error: 'struct gdIOCtx' has no member named 'data'
/tmp/php-5.4.12/ext/gd/gd_ctx.c: In function '_php_image_stream_putbuf':
/tmp/php-5.4.12/ext/gd/gd_ctx.c:58:41: error: 'struct gdIOCtx' has no member named 'data'
/tmp/php-5.4.12/ext/gd/gd_ctx.c: In function '_php_image_stream_ctxfree':
/tmp/php-5.4.12/ext/gd/gd_ctx.c:67:8: error: 'struct gdIOCtx' has no member named 'data'
/tmp/php-5.4.12/ext/gd/gd_ctx.c:68:3: error: 'struct gdIOCtx' has no member named 'data'
/tmp/php-5.4.12/ext/gd/gd_ctx.c:69:6: error: 'struct gdIOCtx' has no member named 'data'
In file included from /tmp/php-5.4.12/ext/gd/gd.c:103:0:
/tmp/php-5.4.12/ext/gd/gd_ctx.c: In function '_php_image_output_ctx':
/tmp/php-5.4.12/ext/gd/gd_ctx.c:153:6: error: 'gdIOCtx' has no member named 'data'


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-02-22 19:51 UTC] rasmus@php.net
You are probably using an incompatible external version of gd. Use the bundled 
one. As in, just do --with-gd=shared
 [2013-02-23 02:59 UTC] mark at kreine dot ru
Well, that made sense in the point that I had successful compilation. But despite that there is a compiled gd.so extension, there are no actual functions. The following script:

<?php
echo !function_exists('imagecreatefromjpeg');
?>

gives me '1' as a result of its execution. Neither does imagecreatefrompng and any other gd function.

Here you can see my phpinfo() output: http://www.kreine.ru/test/f.php
My extension_dir directive is absolutely correct as any other compiled extension shows up in the result of phpinfo().I can send my php.ini to you if you provide any email address.
 [2013-02-23 04:04 UTC] mark at kreine dot ru
OK, this problem has been resolved.
 [2013-02-23 04:04 UTC] mark at kreine dot ru
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 05:01:29 2024 UTC