php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20250 Make fails with GD2.0.4
Submitted: 2002-11-04 18:00 UTC Modified: 2002-11-04 18:01 UTC
From: leonard at webhosting dot net Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.2.3 OS: Redhat 7.2, Redhat 8.0
Private report: No CVE-ID: None
 [2002-11-04 18:00 UTC] leonard at webhosting dot net
compile fails when compiling with GD2.0.4 (built as static).

Reproducable on both RedHat7.2 and RedHat 8.0

configure command:
./configure \
--with-apxs=/usr/sbin/apxs \
--with-kerberos=/usr \
--with-config-file-path=/etc \
--with-PEAR \
--with-openssl \
--with-mcrypt \
--with-bz2 \
--with-curl=/usr \
--enable-ftp \
--with-gd=../gd-2.0.4 \
--enable-gd-native-ttf \
--enable-gd-imgstrttf \
--with-jpeg-dir=/usr/lib \
--with-png-dir=/usr/lib \
--with-tiff-dir=/usr \
--with-zlib-dir=/usr/share \
--with-xpm-dir=/usr/X11R6/lib/ \
--with-freetype-dir=/usr/include/freetype2/freetype \
--with-ttf=/usr/include/freetype2 \
--with-t1lib=/usr/include \
--with-gettext=/usr/share/gettext \
--with-imap-ssl \
--with-unixODBC \
--with-pgsql=/usr \
--with-mysql=/usr \
--enable-sockets \
--with-regex \
--with-xmlrpc \
--with-expat

GD2.0.4 compiled from source (in /usr/src/redhat/BUILD/gd-2.0.4/):
./configure
make libgd.a



Description:
'configure' completes perfectly

make fails with the following:
[php 4.2.2]
<snip>
Making all in gd
make[2]: Entering directory `/usr/src/redhat/BUILD/php-4.2.2/ext/gd'
make[3]: Entering directory `/usr/src/redhat/BUILD/php-4.2.2/ext/gd'
/bin/sh /usr/src/redhat/BUILD/php-4.2.2/libtool --silent --mode=compile gcc
-I. -I/usr/src/redhat/BUILD/php-4.2.2/ext/gd
-I/usr/src/redhat/BUILD/php-4.2.2/main -I/usr/src/redhat/BUILD/php-4.2.2
-I/usr/include/apache -I/usr/src/redhat/BUILD/php-4.2.2/Zend
-I/usr/include/freetype2/freetype -I/usr/src/redhat/BUILD/gd-2.0.4
-I/usr/include/mysql -I/usr/local/include -I/usr/include/pgsql
-I/usr/src/redhat/BUILD/php-4.2.2/ext/xml/expat
-I/usr/src/redhat/BUILD/php-4.2.2/ext/xmlrpc/libxmlrpc  -DLINUX=22 -DEAPI
-DEAPI_MM -DEAPI_MM_CORE_PATH=/var/run/httpd.mm
-I/usr/src/redhat/BUILD/php-4.2.2/TSRM -g -O2 -prefer-pic  -c gd.c
In file included from gd.c:83:
gd_ctx.c: In function `_php_image_output_ctx':
gd_ctx.c:70: structure has no member named `free'
gd_ctx.c:98: structure has no member named `free'
gd.c: In function `_php_image_type':
gd.c:1014: structure has no member named `free'
gd.c:1017: structure has no member named `free'
gd.c: In function `_php_image_create_from':
gd.c:1208: structure has no member named `free'
make[3]: *** [gd.lo] Error 1
make[3]: Leaving directory `/usr/src/redhat/BUILD/php-4.2.2/ext/gd'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/redhat/BUILD/php-4.2.2/ext/gd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/redhat/BUILD/php-4.2.2/ext'
make: *** [all-recursive] Error 1


[php4.2.3]
<snip>
Making all in gd
make[2]: Entering directory `/usr/src/redhat/BUILD/php-4.2.3/ext/gd'
make[3]: Entering directory `/usr/src/redhat/BUILD/php-4.2.3/ext/gd'
/bin/sh /usr/src/redhat/BUILD/php-4.2.3/libtool --silent --mode=compile gcc
-I. -I/usr/src/redhat/BUILD/php-4.2.3/ext/gd
-I/usr/src/redhat/BUILD/php-4.2.3/main -I/usr/src/redhat/BUILD/php-4.2.3
-I/usr/include/apache -I/usr/src/redhat/BUILD/php-4.2.3/Zend
-I/usr/include/freetype2/freetype -I/usr/src/redhat/BUILD/gd-2.0.4
-I/usr/include/mysql -I/usr/local/include -I/usr/include/pgsql
-I/usr/src/redhat/BUILD/php-4.2.3/ext/xml/expat
-I/usr/src/redhat/BUILD/php-4.2.3/ext/xmlrpc/libxmlrpc  -DLINUX=22 -DEAPI
-DEAPI_MM -DEAPI_MM_CORE_PATH=/var/run/httpd.mm
-I/usr/src/redhat/BUILD/php-4.2.3/TSRM -g -O2 -prefer-pic  -c gd.c
In file included from gd.c:83:
gd_ctx.c: In function `_php_image_output_ctx':
gd_ctx.c:70: structure has no member named `free'
gd_ctx.c:98: structure has no member named `free'
gd.c: In function `_php_image_type':
gd.c:1014: structure has no member named `free'
gd.c:1017: structure has no member named `free'
gd.c: In function `_php_image_create_from':
gd.c:1209: structure has no member named `free'
make[3]: *** [gd.lo] Error 1
make[3]: Leaving directory `/usr/src/redhat/BUILD/php-4.2.3/ext/gd'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/redhat/BUILD/php-4.2.3/ext/gd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/redhat/BUILD/php-4.2.3/ext'
make: *** [all-recursive] Error 1


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-04 18:01 UTC] leonard at webhosting dot net
Forgot to metion that the error messages are exactly the same for RedHat8.0 as well.
 [2002-11-04 18:01 UTC] iliaa@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 [2002-11-12 00:40 UTC] yinsee at mypdacafe dot com
gdIOCtx struct defined in gd_io.h has changed in gd2.0.4.

should we use gd_free instead of free?

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*);

	<font color=red>void    (*gd_free)(struct gdIOCtx*);</font>

} gdIOCtx;
 [2002-11-16 23:55 UTC] mcdaniew at ucsu dot colorado dot edu
I know that this problem has been solved in CVS. I even looked at the code and it should work, but it still runs as if the code didnt preprocess this: #if HAVE_LIBGD204
Why might this be?

io_ctx->free is replaced with io_ctx->gd_free in gd 2.0.4 but my compiler still tries the io_ctx->free. Am I missing setting some environment variable somewhere?

Any help you can give me would be of great assistance
-wade

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-zlib --with-bz2 --enable-calendar --with-gd=/usr/local/ --with-jpeg-dir=/usr/ --with-png-dir=/usr/ --with-tiff-dir=/usr/ --with-zlib-dir=/usr/ --with-gettext --with-imap --with-imap-ssl=/usr/local/ssl/ --enable-mime-magic --with-mysql=/usr/local/ --enable-sockets --with-pdflib --with-swf=/usr/local/ --with-kerberos
 [2002-11-17 09:24 UTC] mcdaniew at ucsu dot colorado dot edu
I forgot to comment that my version of gd is 2.0.7.
Is that why #if HAVE_LIBGD204 isint activating?

Is there some way to fool php into accecpting 2.0.7 as 2.0.4?
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Jul 18 18:00:02 2025 UTC