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