RE: [PHP-DEV] GD broken ? compiler errors !

2002-09-09 Thread Jani Taskinen

On Fri, 6 Sep 2002, Wez Furlong wrote:

 It's not intended..but I can't reproduce this..
 Do you get any errors during configure ? 

Yes - sorry - I didn't have my head screwed on when I posted:

checking whether to enable truetype string function in GD... yes
checking for jpeg_read_header in -ljpeg... yes
configure: error: PNG support requires ZLIB. Use --with-zlib-dir=DIR

It seems like PHP_ZLIB_DIR is somehow getting set to no in gd/config.m4
when it is not explicitly being set.

Yes, it was because I added the option in there..and it of course
borked the previous check. This is same situation that there is 
with for example openssl and iconv which both are needed also
in other extensions.. maybe someone has better idea to make such
libraries globally available than putting them all in pear/pear.m4
(for phpize) and configure.in.. 

--Jani


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




RE: [PHP-DEV] GD broken ? compiler errors !

2002-09-05 Thread NAIK,ROSHAN (HP-Cupertino,ex1)

Jani, 

   I've committed possible fix in CVS. So please try that.

Thanks.
You may also want to consider fixing another problem with configure ... it
doesnt support --with-zlib-dir option thus requiring a variable
PHP_ZLIB_DIR to be exported  prior to running confgiure. W/o that
configure fails asking for a zlib path.

There are a couple of referneces to  --with-zlib-dir in configure. 
But not implemented, probably due to oversight. 

This is when building GD as a self contained extension.

--Roshan


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




RE: [PHP-DEV] GD broken ? compiler errors !

2002-09-05 Thread Jani Taskinen

On Thu, 5 Sep 2002, NAIK,ROSHAN (HP-Cupertino,ex1) wrote:

Hi Jani,
But ofcourse that isnt that last one is it ? :)
CFLAGS that are assigned in confg_vars.mk 
dont see to get picked up during the actual make.

Huh? What exactly doesn't work?
Please be more specific..

--Jani



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




RE: [PHP-DEV] GD broken ? compiler errors !

2002-09-05 Thread NAIK,ROSHAN (HP-Cupertino,ex1)


CFLAGS is assigned -g -O2 in config_vars.mk

But when performing make on the gd extension, the gcc build commands 
displayed on screen do not contain the options that are part of CFLAGS. 

--Roshan

 -Original Message-
 From: Jani Taskinen [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, September 05, 2002 2:28 PM
 To: NAIK,ROSHAN (HP-Cupertino,ex1)
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP-DEV] GD broken ? compiler errors !
 
 
 On Thu, 5 Sep 2002, NAIK,ROSHAN (HP-Cupertino,ex1) wrote:
 
 Hi Jani,
 But ofcourse that isnt that last one is it ? :)
 CFLAGS that are assigned in confg_vars.mk 
 dont see to get picked up during the actual make.
 
 Huh? What exactly doesn't work?
 Please be more specific..
 
 --Jani
 
 

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




RE: [PHP-DEV] GD broken ? compiler errors !

2002-09-05 Thread Wez Furlong

Hi Jani,

Just a heads up - I now need to

  ./configure ... --with-gd --with-zlib --with-zlib-dir ...

whereas before these last few gd config patches I only needed

  ./configure ... --with-gd --with-zlib ...

to get zlib linked with gd/php correctly.

If this is the intended behaviour I'll shut up :-)

--Wez.




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




Re: [PHP-DEV] GD broken ? compiler errors !

2002-09-04 Thread Markus Fischer

You just can't mix current CVS c sources witth current stable
release. It would be like gambling. The GD module has new
enhancements in it which aren't available in 4.2.2 so that
won't work.

Please first test with
http://www.php.net/~zeev/php-4.2.3RC2.tar.gz
or even better http://snaps.php.net/php4-latest.tar.bz2 and
see if this isse has been fixed already.

Any remaining errors should be reported via bugs.php.net
(preferable against php4-latest).

-- 
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
In short, the window belongs to me.
 The document belongs to the web site designer.
- Poster on opera.wishlist

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




RE: [PHP-DEV] GD broken ? compiler errors !

2002-09-04 Thread NAIK,ROSHAN (HP-Cupertino,ex1)


No doubt.. but then the stuff on the distribution didnt work in the first
place. Thats why i hoped the cvs had a fix for those erros. I have had prior
experinces wherein a few files in the distribtion sources wouldnt compile
and I had to refresh them from the CVS. 

These were the errors in the original gd sources that were part of the 4.2.2
distribtion...

php_gd.h:69: warning: static declaration for `gdImageColorResolve' follows
non-static
gd.c:92: conflicting types for `gdIOCtx'
/somepath/gd-1.8.4/gd_io.h:18: previous declaration of `gdIOCtx'
gd.c: In function `php_imagettftext_common':
gd.c:2800: warning: passing arg 2 of `virtual_filepath' from incompatible
pointer type


Has anybody got GD working in 4.2.2 ?

--Roshan


 -Original Message-
 From: Markus Fischer [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 03, 2002 10:48 PM
 To: NAIK,ROSHAN (HP-Cupertino,ex1)
 Cc: '[EMAIL PROTECTED]'
 Subject: Re: [PHP-DEV] GD broken ? compiler errors !
 
 
 You just can't mix current CVS c sources witth current stable
 release. It would be like gambling. The GD module has new
 enhancements in it which aren't available in 4.2.2 so that
 won't work.
 
 Please first test with
 http://www.php.net/~zeev/php-4.2.3RC2.tar.gz
 or even better http://snaps.php.net/php4-latest.tar.bz2 and
 see if this isse has been fixed already.
 
 Any remaining errors should be reported via bugs.php.net
 (preferable against php4-latest).
 
 -- 
 GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
 In short, the window belongs to me.
  The document belongs to the web site designer.
 - Poster on opera.wishlist
 

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




RE: [PHP-DEV] GD broken ? compiler errors !

2002-09-04 Thread Rasmus Lerdorf

Your problem is that you have multiple versions of gd on your system.  PHP
is picking up a gd.h somewhere on the standard include path and then
trying to build against a different version.  Clean up your system and it
should work just fine.

-Rasmus

On Wed, 4 Sep 2002, NAIK,ROSHAN (HP-Cupertino,ex1) wrote:


 No doubt.. but then the stuff on the distribution didnt work in the first
 place. Thats why i hoped the cvs had a fix for those erros. I have had prior
 experinces wherein a few files in the distribtion sources wouldnt compile
 and I had to refresh them from the CVS.

 These were the errors in the original gd sources that were part of the 4.2.2
 distribtion...

 php_gd.h:69: warning: static declaration for `gdImageColorResolve' follows
 non-static
 gd.c:92: conflicting types for `gdIOCtx'
 /somepath/gd-1.8.4/gd_io.h:18: previous declaration of `gdIOCtx'
 gd.c: In function `php_imagettftext_common':
 gd.c:2800: warning: passing arg 2 of `virtual_filepath' from incompatible
 pointer type


 Has anybody got GD working in 4.2.2 ?

 --Roshan


  -Original Message-
  From: Markus Fischer [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, September 03, 2002 10:48 PM
  To: NAIK,ROSHAN (HP-Cupertino,ex1)
  Cc: '[EMAIL PROTECTED]'
  Subject: Re: [PHP-DEV] GD broken ? compiler errors !
 
 
  You just can't mix current CVS c sources witth current stable
  release. It would be like gambling. The GD module has new
  enhancements in it which aren't available in 4.2.2 so that
  won't work.
 
  Please first test with
  http://www.php.net/~zeev/php-4.2.3RC2.tar.gz
  or even better http://snaps.php.net/php4-latest.tar.bz2 and
  see if this isse has been fixed already.
 
  Any remaining errors should be reported via bugs.php.net
  (preferable against php4-latest).
 
  --
  GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
  In short, the window belongs to me.
   The document belongs to the web site designer.
  - Poster on opera.wishlist
 

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



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




RE: [PHP-DEV] GD broken ? compiler errors !

2002-09-04 Thread NAIK,ROSHAN (HP-Cupertino,ex1)


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.


Multiple versions of gd.h do not exist on my machine. I reconfirmed it by
searching in all the -I directories passed to gcc during make (i.e while
building ext/gd.c) I also did an exhaustive search on the machine !! There
is only one gd.h.

--Roshan


 -Original Message-
 From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, September 04, 2002 2:09 PM
 To: NAIK,ROSHAN (HP-Cupertino,ex1)
 Cc: '[EMAIL PROTECTED]'
 Subject: RE: [PHP-DEV] GD broken ? compiler errors !
 
 
 Your problem is that you have multiple versions of gd on your 
 system.  PHP
 is picking up a gd.h somewhere on the standard include path and then
 trying to build against a different version.  Clean up your 
 system and it
 should work just fine.
 
 -Rasmus
 
 On Wed, 4 Sep 2002, NAIK,ROSHAN (HP-Cupertino,ex1) wrote:
 
 
  No doubt.. but then the stuff on the distribution didnt 
 work in the first
  place. Thats why i hoped the cvs had a fix for those erros. 
 I have had prior
  experinces wherein a few files in the distribtion sources 
 wouldnt compile
  and I had to refresh them from the CVS.
 
  These were the errors in the original gd sources that were 
 part of the 4.2.2
  distribtion...
 
  php_gd.h:69: warning: static declaration for 
 `gdImageColorResolve' follows
  non-static
  gd.c:92: conflicting types for `gdIOCtx'
  /somepath/gd-1.8.4/gd_io.h:18: previous declaration of `gdIOCtx'
  gd.c: In function `php_imagettftext_common':
  gd.c:2800: warning: passing arg 2 of `virtual_filepath' 
 from incompatible
  pointer type
 
 
  Has anybody got GD working in 4.2.2 ?
 
  --Roshan
 
 
   -Original Message-
   From: Markus Fischer [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, September 03, 2002 10:48 PM
   To: NAIK,ROSHAN (HP-Cupertino,ex1)
   Cc: '[EMAIL PROTECTED]'
   Subject: Re: [PHP-DEV] GD broken ? compiler errors !
  
  
   You just can't mix current CVS c sources witth current stable
   release. It would be like gambling. The GD module has new
   enhancements in it which aren't available in 4.2.2 so that
   won't work.
  
   Please first test with
   http://www.php.net/~zeev/php-4.2.3RC2.tar.gz
   or even better http://snaps.php.net/php4-latest.tar.bz2 and
   see if this isse has been fixed already.
  
   Any remaining errors should be reported via bugs.php.net
   (preferable against php4-latest).

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




RE: [PHP-DEV] GD broken ? compiler errors !

2002-09-04 Thread Rasmus Lerdorf

 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 gdImageCreateFromJpegCtxNULL
#define gdImageCreateFromPngCtx NULL
#define gdImageCreateFromWBMPCtxNULL
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




RE: [PHP-DEV] GD broken ? compiler errors !

2002-09-04 Thread Jani Taskinen

On Wed, 4 Sep 2002, Rasmus Lerdorf wrote:

Your problem is that you have multiple versions of gd on your system.  PHP
is picking up a gd.h somewhere on the standard include path and then
trying to build against a different version.  Clean up your system and it
should work just fine.

I don't know for sure...but I think we could fix this easily
in 4.3.0 and the new build stuff. As the problem usually is
that even if you point --with-gd=/some/path, and happen
to have gd.h in e.g. /usr/include, the latter will be used instead.

I've committed possible fix in CVS. So please try that.

--Jani




On Wed, 4 Sep 2002, NAIK,ROSHAN (HP-Cupertino,ex1) wrote:


 No doubt.. but then the stuff on the distribution didnt work in the first
 place. Thats why i hoped the cvs had a fix for those erros. I have had prior
 experinces wherein a few files in the distribtion sources wouldnt compile
 and I had to refresh them from the CVS.

 These were the errors in the original gd sources that were part of the 4.2.2
 distribtion...

 php_gd.h:69: warning: static declaration for `gdImageColorResolve' follows
 non-static
 gd.c:92: conflicting types for `gdIOCtx'
 /somepath/gd-1.8.4/gd_io.h:18: previous declaration of `gdIOCtx'
 gd.c: In function `php_imagettftext_common':
 gd.c:2800: warning: passing arg 2 of `virtual_filepath' from incompatible
 pointer type


 Has anybody got GD working in 4.2.2 ?

 --Roshan


  -Original Message-
  From: Markus Fischer [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, September 03, 2002 10:48 PM
  To: NAIK,ROSHAN (HP-Cupertino,ex1)
  Cc: '[EMAIL PROTECTED]'
  Subject: Re: [PHP-DEV] GD broken ? compiler errors !
 
 
  You just can't mix current CVS c sources witth current stable
  release. It would be like gambling. The GD module has new
  enhancements in it which aren't available in 4.2.2 so that
  won't work.
 
  Please first test with
  http://www.php.net/~zeev/php-4.2.3RC2.tar.gz
  or even better http://snaps.php.net/php4-latest.tar.bz2 and
  see if this isse has been fixed already.
 
  Any remaining errors should be reported via bugs.php.net
  (preferable against php4-latest).
 
  --
  GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
  In short, the window belongs to me.
   The document belongs to the web site designer.
  - Poster on opera.wishlist
 

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





-- 
- For Sale! -


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




[PHP-DEV] GD broken ? compiler errors !

2002-09-03 Thread NAIK,ROSHAN (HP-Cupertino,ex1)

Is GD extension fundamentally broken as of 4.2.2 ?

Configuration: 

PHP version 4.2.2, 
OS: HPUX, 
compiler : gcc 2.9
library versions noted in configure line below..


GD extension fails to build as a self-contained extension, with compiler
errors during make. 
Here is a snapshot


# cd ext/gd

# ../../pear/scripts/phpize

# export PHP_ZLIB_DIR=/path/zlib-1.1.4 

# ./configure --with-gd=/path/gd-1.8.4 \
  --with-jpeg-dir=/path/jpeg-6b \
  --with-png-dir=/path/libpng-1.0.11 \
  --with-xpm-dir=/path/xpm-3.4k \
  --with-freetype-dir=/path/freetype-2.1.2 \
  --with-t1lib=/path/t1lib-1.3.1 \
  --with-php-config=/path/php-4.2.2/pear/scripts/php-config \
  --prefix=/path

# make


gd.c:97: conflicting types for `gdIOCtx'
  /path/gd-1.8.4/gd_io.h:18: previous declaration of `gdIOCtx'
gd.c: In function `zif_imageloadfont':
gd.c:486: `php_stream' undeclared (first use in this function)
gd.c:486: (Each undeclared identifier is reported only once
gd.c:486: for each function it appears in.)
gd.c:486: `stream' undeclared (first use in this function)
gd.c:494: `REPORT_ERRORS' undeclared (first use in this function)

... more errors


Examining the first error i found that gdIOCtx has a simple declaration of
type FILE in ext/gd/gd.c. But a header that is part of the gd library v1.8.4
(gd_io.h) has a conflicting ( and more sophisticated .. struct )
declaration for the same.

But then looks like there are more errors besides that one.

I tried picking up the GD related files (except config.m4) that have changed
in recent 2/3 weeks from cvs.php.net but it didnt help.

adding..
   #define HAVE_PHP_STREAM 
in gd.c seemed to fix the compiler error on undeclared first use of
php_stream

Definitions for macros ...
REPORT_ERRORS , 
PHP_STREAM_IS_STDIO , 
PHP_STREAM_CAST_TRY_HARD 
seems to be missing.


-- Roshan 

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