php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20083 PHP build fails with GD 2.0.4
Submitted: 2002-10-25 06:48 UTC Modified: 2002-10-25 07:04 UTC
From: maddog2k at maddog2k dot nl Assigned:
Status: Not a bug Package: GD related
PHP Version: 4CVS-2002-10-25 OS: Linux RH 6.2 glibc 2.1.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: maddog2k at maddog2k dot nl
New email:
PHP Version: OS:

 

 [2002-10-25 06:48 UTC] maddog2k at maddog2k dot nl
At least PHP 4.2.2 and above (including php4-STABLE-200210250300) fail to build with GD 2.0.4

Making all in gd
make[2]: Entering directory `/opt/install/APACHE/apache/php4-STABLE-200210250300/ext/gd'
make[3]: Entering directory `/opt/install/APACHE/apache/php4-STABLE-200210250300/ext/gd'
gcc -I. -I/opt/install/APACHE/apache/php4-STABLE-200210250300/ext/gd -I/opt/install/APACHE/apache/php4-STABLE-200210250300/main -I/opt/install/APACHE/apache/php4-STABLE-200210250300 -I/opt/install/APACHE/apache/apache_1.3.27/src/include -I/opt/install/APACHE/apache/apache_1.3.27/src/os/unix -I/opt/install/APACHE/apache/php4-STABLE-200210250300/Zend -I/usr/local/ssl/include -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/include/freetype2/freetype -I/opt/install/APACHE/apache/imap/c-client -I/usr/local/mysql/include/mysql -I/opt/install/APACHE/apache/swf/dist/include -I/opt/install/APACHE/apache/php4-STABLE-200210250300/ext/xml/expat  -I/opt/install/APACHE/apache/php4-STABLE-200210250300/TSRM -g -O2  -c gd.c && touch gd.lo
gd_ctx.c: In function `_php_image_output_ctx':
In file included from gd.c:83:
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 `/opt/install/APACHE/apache/php4-STABLE-200210250300/ext/gd'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/opt/install/APACHE/apache/php4-STABLE-200210250300/ext/gd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/install/APACHE/apache/php4-STABLE-200210250300/ext'
make: *** [all-recursive] Error 1

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-25 06:51 UTC] derick@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the original bug instead.

Thank you for your interest in PHP.
 [2002-10-25 07:03 UTC] maddog2k at maddog2k dot nl
GD 2.0.3 does build :)

Changelog GD 2.0.4:

gdIOCtx correctly calls gdFree rather than free
 [2002-10-25 07:04 UTC] derick@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the original bug instead.

Thank you for your interest in PHP.

Keep it at this status, there are atleast 3 other reports.
 [2002-11-21 14:16 UTC] miro dot kresonja at beaconfire dot com
Folks, just got this with PHP4.22 and GD2.0.7 (the most recent versions as of 11/21/2002). It seems to be an issue with an updated gd call that the PHP doesn't yet know about.

To diagnose, I had to look back at /usr/local/include/gd_io.h
You will notice that the only free call is now:
        void    (*gd_free)(struct gdIOCtx*);

To fix, modify each ->free call in the 5 error lines to ->gd_free.
So for instance, line gd_ctx.c:70 will now read:
ctx->gd_free = _php_image_output_ctxfree;

I recompiled, and voila, everything works again.
Oh, btw, gd.c and gd_ctx.c are in yourphpinstalldir/ext/gd
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 06 13:01:31 2024 UTC