#19551 [Bgs]: Dupplicate definition of gdIOCtx (again)

From: Date: Sun, 22 Sep 2002 17:52:16 +0000
Subject: #19551 [Bgs]: Dupplicate definition of gdIOCtx (again)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-20046@lists.php.net to get a copy of this message
ID: 19551 User updated by: l_faillie@yahoo.com Reported By: l_faillie@yahoo.com Status: Bogus Bug Type: GD related Operating System: NetBSD 1.6 / Sparc PHP Version: 4.2.3 New Comment: Hi, as you can see bellow, I have only 2 versions of these files on my system : the first one is inside /usr/local/include and was installed by GD2.0.1 installer, and the second one ... is inside PHP source tree ! Bye Laurent find . -name "*gd*.[s|a|h]*" -exec ls -l {} \; -rw-r--r-- 1 laurent wheel 108 Jul 3 2000 ./home/laurent/bidon/php-4.2.3/ext/dba/php_gdbm.h -rw-r--r-- 1 laurent wheel 2850 Jan 7 2001 ./home/laurent/bidon/php-4.2.3/ext/gd/gdcache.h -rw-r--r-- 1 laurent wheel 1464 Feb 28 2002 ./home/laurent/bidon/php-4.2.3/ext/gd/gdt1.h -rw-r--r-- 1 laurent wheel 461 Feb 26 2000 ./home/laurent/bidon/php-4.2.3/ext/gd/gdttf.h -rw-r--r-- 1 laurent wheel 5229 Feb 28 2002 ./home/laurent/bidon/php-4.2.3/ext/gd/php_gd.h lrwxr-xr-x 1 laurent wheel 5 Sep 22 15:25 ./home/laurent/bidon/php-4.2.3/ext/gd/gd.o -> gd.lo lrwxr-xr-x 1 laurent wheel 10 Sep 22 15:25 ./home/laurent/bidon/php-4.2.3/ext/gd/gdcache.o -> gdcache.lo lrwxr-xr-x 1 laurent wheel 8 Sep 22 15:25 ./home/laurent/bidon/php-4.2.3/ext/gd/gdttf.o -> gdttf.lo lrwxr-xr-x 1 laurent wheel 7 Sep 22 15:25 ./home/laurent/bidon/php-4.2.3/ext/gd/gdt1.o -> gdt1.lo -rwxr-xr-x 1 laurent wheel 19226 Apr 3 2001 -r--r--r-- 1 root wheel 3580 Sep 9 08:40 ./usr/include/sys/kgdb.h -rw-r--r-- 1 laurent wheel 19226 Sep 21 17:48 ./usr/local/include/gd.h -rw-r--r-- 1 laurent wheel 2673 Sep 21 17:48 ./usr/local/include/gdcache.h -rw-r--r-- 1 laurent wheel 917 Sep 21 17:48 ./usr/local/include/gd_io.h -rw-r--r-- 1 laurent wheel 490 Sep 21 17:48 ./usr/local/include/gdfontg.h -rw-r--r-- 1 laurent wheel 488 Sep 21 17:48 ./usr/local/include/gdfontl.h -rw-r--r-- 1 laurent wheel 451 Sep 21 17:48 ./usr/local/include/gdfontmb.h -rw-r--r-- 1 laurent wheel 452 Sep 21 17:48 ./usr/local/include/gdfonts.h -rw-r--r-- 1 laurent wheel 484 Sep 21 17:48 ./usr/local/include/gdfontt.h -rw-r--r-- 1 laurent wheel 406926 Sep 21 17:48 ./usr/local/lib/libgd.so.2.0.0 lrwxr-xr-x 1 laurent wheel 29 Sep 21 17:48 ./usr/local/lib/libgd.so.2 -> /usr/local/lib/libgd.so.2.0.0 lrwxr-xr-x 1 laurent wheel 29 Sep 21 17:48 ./usr/local/lib/libgd.so -> /usr/local/lib/libgd.so.2.0.0 -rwxr-xr-x 1 laurent wheel 132724 Sep 22 15:59 ./usr/local/lib/php/extensions/no-debug-non-zts-20020429/gd.so Previous Comments: ------------------------------------------------------------------------ [2002-09-22 10:39:16] sniper@php.net This is fixed in CVS (HEAD, 4.3.0-dev) but the real problem for you is that you have conflicting versions of GD library and it's header files in your system in the include path. Remove all occurances of the headers files and libraries and reinstall the version you want to use. ------------------------------------------------------------------------ [2002-09-22 08:45:13] l_faillie@yahoo.com I found many bug reports about this issus since a long time, sometime from long time ago, but this problem rise again w/ the latest version of the librairie. gdIOCtx is defined in ext/gd/gd.c but a structure using the same name already exist in GD own include. It seems it's only related to GD 2+ My fix is obvious : in ext/gd/gd.c, replace all gdIOCtx occurence by an other name (I choose fgdIOCtx as it's a FILE) and everything goes ok. On previous reports, I saw many time "it's because you have 2 versions of GD installed" : it's not my case as I have just installed my OS from scrach last week and I have installed php/apache/gd/... from tarball. Bye Laurent ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19551&edit=1

« previous php.bugs (#20046) next »