Doc #55224 [Ver->Csd]: make fails if configured with --with-gd=DIR

From: Date: Wed, 13 Jul 2016 18:51:56 +0000
Subject: Doc #55224 [Ver->Csd]: make fails if configured with --with-gd=DIR
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-13724@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=55224&edit=1 ID: 55224 Updated by: cmb@php.net Reported by: manuel at bouza dot ch Summary: make fails if configured with --with-gd=DIR -Status: Verified +Status: Closed Type: Documentation Problem Package: GD related Operating System: * PHP Version: 5.4 Assigned To: cmb Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2016-07-13 18:51:23] cmb@php.net Automatic comment from SVN on behalf of cmb Revision: http://svn.php.net/viewvc/?view=revision&revision=339659 Log: Fix #55224: make fails if configured with --with-gd=DIR Additionally, we get rid of the out-dated statement that PHP's bundled libgd should generally be preferred. ------------------------------------------------------------------------ [2016-07-13 18:32:14] cmb@php.net As of PHP 5.4 ext/gd requires libgd-2.1.0 at least. If your distro ships older libgd versions, either build it yourself or use PHP's bundled libgd. ------------------------------------------------------------------------ [2013-11-15 02:38:43] addurl at croler dot net Same result with php-5.4.21 on 64 bit CentOS 5. I usually compile php with --with-gd=/usr because without it I get undefined reference errors, but now I can't. ------------------------------------------------------------------------ [2012-05-27 05:46:22] oniuda at oni dot gr dot jp On FreeBSD 9.0-STABLE,I tried to make php-5.4.3 --with-dg=/usr/local. I installed gd from /usr/ports/graphics/gd (gd-2.0.35). --- In file included from /usr/local/src/php-5.4.3/ext/gd/gd.c:103: /usr/local/src/php-5.4.3/ext/gd/gd_ctx.c: In function '_php_image_stream_putc': /usr/local/src/php-5.4.3/ext/gd/gd_ctx.c:51: error: 'struct gdIOCtx' has no member named 'data' /usr/local/src/php-5.4.3/ext/gd/gd_ctx.c: In function '_php_image_stream_putbuf': /usr/local/src/php-5.4.3/ext/gd/gd_ctx.c:58: error: 'struct gdIOCtx' has no member named 'data' /usr/local/src/php-5.4.3/ext/gd/gd_ctx.c: In function '_php_image_stream_ctxfree': /usr/local/src/php-5.4.3/ext/gd/gd_ctx.c:67: error: 'struct gdIOCtx' has no member named 'data' /usr/local/src/php-5.4.3/ext/gd/gd_ctx.c:68: error: 'struct gdIOCtx' has no member named 'data' /usr/local/src/php-5.4.3/ext/gd/gd_ctx.c:69: error: 'struct gdIOCtx' has no member named 'data' /usr/local/src/php-5.4.3/ext/gd/gd_ctx.c: In function '_php_image_output_ctx': /usr/local/src/php-5.4.3/ext/gd/gd_ctx.c:153: error: 'gdIOCtx' has no member named 'data' gmake: *** [ext/gd/gd.lo] Error 1 --- I made php-5.3.13 with same configure options.So I investigated the cause. In php-5.4.3/ext/gd/libgd/gd_io.h typedef struct gdIOCtx { int (*getC)(struct gdIOCtx*); int (*getBuf)(struct gdIOCtx*, void*, int); void (*putC)(struct gdIOCtx*, int); int (*putBuf)(struct gdIOCtx*, const void*, int); int (*seek)(struct gdIOCtx*, const int); long (*tell)(struct gdIOCtx*); void (*gd_free)(struct gdIOCtx*); void *data; } gdIOCtx; But in /usr/local/include/gd_io.h typedef struct gdIOCtx { int (*getC) (struct gdIOCtx *); int (*getBuf) (struct gdIOCtx *, void *, int); void (*putC) (struct gdIOCtx *, int); int (*putBuf) (struct gdIOCtx *, const void *, int); /* seek must return 1 on SUCCESS, 0 on FAILURE. Unlike fseek! */ int (*seek) (struct gdIOCtx *, const int); long (*tell) (struct gdIOCtx *); void (*gd_free) (struct gdIOCtx *); } gdIOCtx; These isn't void *data;.In some gd versions (ex:gd-2.0.36RC,gd-2.0.34) there ins't void *data;. I think that php-5.4.X was required extended gd library. Shuold we configure --with-gd not --with-gd=DIR? ------------------------------------------------------------------------ [2012-05-13 05:24:08] elifan2007 at ya dot ru freebsd 9.0 The same with any php-5.4.x for now (--with-gd=/usr/local). gd-2.0.35 Wasn't corrected in php-5.4.3, so using 5.3.13 instead, thanx /usr/local/src/php-5.4.3/ext/gd/gd_ctx.c: In function '_php_image_stream_putc': /usr/local/src/php-5.4.3/ext/gd/gd_ctx.c:51: error: 'struct gdIOCtx' has no member named 'data' /usr/local/src/php-5.4.3/ext/gd/gd_ctx.c: In function '_php_image_stream_putbuf': /usr/local/src/php-5.4.3/ext/gd/gd_ctx.c:58: error: 'struct gdIOCtx' has no member named 'data' /usr/local/src/php-5.4.3/ext/gd/gd_ctx.c: In function '_php_image_stream_ctxfree': /usr/local/src/php-5.4.3/ext/gd/gd_ctx.c:67: error: 'struct gdIOCtx' has no member named 'data' /usr/local/src/php-5.4.3/ext/gd/gd_ctx.c:68: error: 'struct gdIOCtx' has no member named 'data' /usr/local/src/php-5.4.3/ext/gd/gd_ctx.c:69: error: 'struct gdIOCtx' has no member named 'data' /usr/local/src/php-5.4.3/ext/gd/gd_ctx.c: In function '_php_image_output_ctx': /usr/local/src/php-5.4.3/ext/gd/gd_ctx.c:153: error: 'gdIOCtx' has no member named 'data' *** Error code 1 Stop in /home/src/php-5.4.3. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=55224 -- Edit this bug report at https://bugs.php.net/bug.php?id=55224&edit=1

« previous php.doc.bugs (#13724) next »