ID: 20995 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Feedback +Status: Closed -Bug Type: Compile Failure +Bug Type: GD related Operating System: NetBSD/Alpha (64bit) - 1.6 PHP Version: 4CVS-2002-12-13 (stable) New Comment:
Thank you for the good analysis. It's now fixed in CVS. Previous Comments: ------------------------------------------------------------------------ [2002-12-13 15:12:09] [EMAIL PROTECTED] config.nice: './configure' \ '--prefix=/usr/local_install/php-4.2.2' \ '--with-config-file-path=/usr/local/etc' \ '--with-gd=shared,/usr/local' \ '--with-curl=shared,/usr/local' \ '--with-system-regex' \ '--with-gettext=shared,/usr/pkg' \ '--with-pgsql=shared,/usr/local' \ '--with-mysql=shared,/usr/pkg' \ '--with-mcrypt=shared,/usr/pkg' \ '--with-pcre-regex' \ '--with-tiff-dir=/usr/pkg' \ '--with-jpeg-dir=/usr/pkg' \ '--with-png-dir=/usr/pkg' \ '--with-xpm-dir' \ '--with-ttf=/usr/pkg' \ '--with-freetype-dir=/usr/pkg' \ '--with-zlib-dir=shared,/usr' \ '--enable-dbase' \ '--enable-gd-native-ttf' \ '--enable-sysvsem' \ '--enable-sysvshm' \ '--enable-sockets' \ '--enable-xml' \ '--enable-trans-sid' \ '--enable-discard-path' \ '--enable-force-cgi-redirect' \ '--enable-memory-limit' \ '--enable-track-vars' \ '--without-t1lib' \ '--disable-static' \ '--enable-shared' \ Also note this snippet from 'configure': 27268 cat > conftest.$ac_ext <<EOF 27269 #line 27270 "configure" 27270 #include "confdefs.h" 27271 27272 #include <gd.h> 27273 #include <stdlib.h> 27274 27275 int main() { 27276 27277 gdIOCtx *ctx; 27278 ctx = malloc(sizeof(gdIOCtx)); 27279 ctx->gd_free = 1; 27280 27281 ; return 0; } 27282 EOF --- 27272 #include <gd.h> my 'gd.h' is in '/usr/local/gd.h'. Seems like that include line is only looking in the system include path. It's not even using the path that was provided in --with-gd. ------------------------------------------------------------------------ [2002-12-13 14:59:24] [EMAIL PROTECTED] what's your configure line? (see config.nice) ------------------------------------------------------------------------ [2002-12-13 14:53:22] [EMAIL PROTECTED] checking config.log revealed: configure:27284: gcc -c -g -O2 -I/usr/pkg/include conftest.c 1>&5 configure:27272: gd.h: No such file or directory configure: failed program was: #line 27270 "configure" #include "confdefs.h" #include <gd.h> #include <stdlib.h> int main() { gdIOCtx *ctx; ctx = malloc(sizeof(gdIOCtx)); ctx->gd_free = 1; ; return 0; } seems like it can't find gd.h. very strange. # locate gd.h /usr/local/include/gd.h <<-- symlink /usr/local_install/gd-2.0.7/include/gd.h /usr/local_src/gd/gd-2.0.7/gd.h /usr/local_src/php/php-4.2.2/ext/gd/php_gd.h /usr/local_src/php/php4-STABLE-200212131430/ext/gd/libgd/gd.h /usr/local_src/php/php4-STABLE-200212131430/ext/gd/php_gd.h ------------------------------------------------------------------------ [2002-12-13 13:45:49] [EMAIL PROTECTED] I just checked, there is only one install of gd-2.0.7 and one gd.h ('locate gd.h' confirmed that). in /usr/local_src/php/php4-STABLE-200212131430/ext/gd/gd.c:1345: #if HAVE_LIBGD204 io_ctx->gd_free(io_ctx); #else io_ctx->free(io_ctx); <<<-- 1345 #endif If it's doing line 1345 that means that configured failed to detect gd-2.0.7 being compatible with gd-2.0.4 to set the proper define. ------------------------------------------------------------------------ [2002-12-13 13:25:13] [EMAIL PROTECTED] I think the error you are seeing is due to your system having more then one gd library. Old gd versions by default went to /usr, while the new release go to /usr/local, the result is a header confusion responsible for the error you are seeing. To confirm this see if you have more then one copy of gd, by doing 'locate gd.h'. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/20995 -- Edit this bug report at http://bugs.php.net/?id=20995&edit=1