Looks like the problem was elsewhere. there was the correct version of gd
(and the only one) etc.
The problem was in the configure scipt generated by phpize.

Somehow there were lots of occurences of "-R" instead of "-L" option in
there. Thus the needed libraries wouldnt get linked to the "mini test"
programs that and created and compiled on-the-fly by configure and
compilation would fail. "-R" was also causing gcc to complain (in
config.log). so the "GD" version related diagnostics in configure would fail
to detect the correct version of gd. 

Replacing "-R" with "-L" all over the configure file fixed the problem.

But I wonder why "-R" is generated in the first place.

Thanks for pointing it rasmus....gdImagePaletteCopy....that was a good lead.

--Roshan

> -----Original Message-----
> From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 04, 2002 3:10 PM
> To: NAIK,ROSHAN (HP-Cupertino,ex1)
> Cc: '[EMAIL PROTECTED]'
> Subject: RE: [PHP-DEV] GD broken ? compiler errors !
> 
> 
> > gd.h in the GD library (v 1.8.4) distribution 
> (www.boutell.com/gd) declares
> > ...
> >
> >    typedef struct gdIOCtx { ..blah blah... } gdIOCtx;
> >
> > Then ext/gd/gd.c also goes ahead and declares ...
> >
> > #ifdef USE_GD_IOCTX
> > ..
> > ..
> >    typedef struct gdIOCtx;
> > ..
> > ..
> > #endif
> >
> > Perhaps the guard USE_GD_IOCTX should have been taking 
> effect ...but it
> > isnt.
> > So the PHP declaration is clearly conflicting.
> 
> No, you are not reading the code right.  The actual code says:
> 
> #ifdef USE_GD_IOCTX
> #include "gd_ctx.c"
> #else
> #define gdImageCreateFromGdCtx      NULL
> #define gdImageCreateFromGd2Ctx     NULL
> #define gdImageCreateFromGd2partCtx NULL
> #define gdImageCreateFromGifCtx     NULL
> #define gdImageCreateFromJpegCtx    NULL
> #define gdImageCreateFromPngCtx     NULL
> #define gdImageCreateFromWBMPCtx    NULL
> typedef FILE gdIOCtx;
> #define CTX_PUTC(c, fp) fputc(c, fp)
> #endif
> 
> 
> Note the #else there.  So the only way that PHP will do that 
> typedef is if
> USE_GD_IOCTX is not set.  And this will not be set based on this:
> 
> #if HAVE_LIBGD15
> /* it's >= 1.5, i.e. has IOCtx */
> #define USE_GD_IOCTX 1
> #else
> #undef USE_GD_IOCTX
> #endif
> 
> ie. if HAVE_LIBGD15 is set, we set it.  And this symbol comes 
> from this
> config.m4 rule:
> 
>   PHP_CHECK_LIBRARY(gd, gdImagePaletteCopy,     
> [AC_DEFINE(HAVE_LIBGD15,             1, [ ])], [], [ 
> -L$GD_LIB $GD_SHARED_LIBADD ])
> 
> That says that it will link against libgd and check for the
> gdImagePaletteCopy() function.  If it sees this function in 
> the library,
> it will define HAVE_LIBGD15.  My prediction is still that you have
> multiple versions of libgd installed.  Probably an old libgd 
> 1.3 library
> floating around somewhere that is getting picked up on this configure
> link.
> 
> "locate libgd" should prove interesting.
> 
> -Rasmus
> 

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to