gdImageCreateFromPng config error on NetBSD, not Linux

From: Date: Wed, 05 Jul 2000 22:15:28 +0000
Subject: gdImageCreateFromPng config error on NetBSD, not Linux
Groups: php.dev 
Request: Send a blank email to php-dev+get-23639@lists.php.net to get a copy of this message
Hi, I have the following problem I finally decide to write down because I can't solve it. Here's my ./configure with PHP-4.0.1pl2 on NetBSD 1.3.3 x86 with gcc 2.7.2.2 with GD 1.8.3, libpng 1.0.7 (also tried 1.0.6) adn zlib 1.1.3. The same setup works with Linux and vanilla gd, libpng install. I can write PHP scripts fine with JPEG output and I remember writing the same scripts fine with PNG output with PHP4 beta 2 or 3 compiled as a module with Apache. GD runs fine and passes every test with png conversion. I'd like to try PHP to force linking with png but don't know how to do this, I modified manually php_config.h to define HAVE_GD_PNG 1 but I don't know where to -lpng so that it doesn't complain when linking. This way, I'd be sure if my GD setup is wrong or if it comes from PHP. I'll also try vanilla setup on OpenBSD 2.6 x86. ./configure --with-config-file-path=/space/www/etc/httpd/conf/php_cgi \ --enable-discard-path \ --with-gd=/u/guest/www/mbin/i386-NetBSD \ --with-mysql \ --with-dbase \ --with-zlib=/u/guest/www/mbin/i386-NetBSD \ --with-mcrypt=/u/guest/www/mbin/i386-NetBSD \ --enable-ftp \ --enable-inline-optimization \ --with-jpeg-dir=/u/guest/www/mbin/i386-NetBSD \ --with-imap=/u/guest/www/mbin/i386-NetBSD/lib Here's config.log: [...] configure:13484: checking whether to include GD support configure:14526: checking for gdImageString16 in -lgd configure:14545: gcc -o conftest -g -O2 -I/usr/pkg/include -L/usr/pkg/lib -R/u/guest/www/mbin/i386-NetBSD/lib -L/u/guest/www/mbin/i386-NetBSD/lib -L/u/guest/www/mbin/i386-NetBSD/lib conftest.c -lgd -lgd -lresolv -lm -lcrypt -lresolv 1>&5 configure:14569: checking for compress in -lz configure:14588: gcc -o conftest -g -O2 -I/usr/pkg/include -L/usr/pkg/lib -R/u/guest/www/mbin/i386-NetBSD/lib -L/u/guest/www/mbin/i386-NetBSD/lib -L/u/guest/www/mbin/i386-NetBSD/lib conftest.c -lz -lgd -lresolv -lm -lcrypt -lresolv 1>&5configure:14609: checking for png_info_init in -lpng configure:14628: gcc -o conftest -g -O2 -I/usr/pkg/include -L/usr/pkg/lib -R/u/guest/www/mbin/i386-NetBSD/lib -L/u/guest/www/mbin/i386-NetBSD/lib -L/u/guest/www/mbin/i386-NetBSD/lib conftest.c -lpng -lgd -lresolv -lm -lcrypt -lresolv -lz 1>&5 configure:14649: checking for gdImageColorResolve in -lgd configure:14668: gcc -o conftest -g -O2 -I/usr/pkg/include -L/usr/pkg/lib -R/u/guest/www/mbin/i386-NetBSD/lib -L/u/guest/www/mbin/i386-NetBSD/lib -L/u/guest/www/mbin/i386-NetBSD/lib conftest.c -lgd -lgd -lresolv -lm -lcrypt -lresolv -lz -lpng 1>&5 configure:14692: checking for gdImageCreateFromPng in -lgd configure:14711: gcc -o conftest -g -O2 -I/usr/pkg/include -L/usr/pkg/lib -R/u/guest/www/mbin/i386-NetBSD/lib -L/u/guest/www/mbin/i386-NetBSD/lib -L/u/guest/www/mbin/i386-NetBSD/lib conftest.c -lgd -lgd -lresolv -lm -lcrypt -lresolv -lz -lpng 1>&5 png.o: Undefined symbol `_crc32' referenced from text segment png.o: Undefined symbol `_crc32' referenced from text segment png.o: Undefined symbol `_inflateReset' referenced from text segment pngread.o: Undefined symbol `_inflateInit_' referenced from text segment pngread.o: Undefined symbol `_inflateInit_' referenced from text segment pngread.o: Undefined symbol `_inflate' referenced from text segment pngread.o: Undefined symbol `_inflateEnd' referenced from text segment pngwrite.o: Undefined symbol `_deflate' referenced from text segment pngwrite.o: Undefined symbol `_deflateEnd' referenced from text segment pngrutil.o: Undefined symbol `_inflate' referenced from text segment pngrutil.o: Undefined symbol `_inflateReset' referenced from text segment pngrutil.o: Undefined symbol `_inflateReset' referenced from text segment pngrutil.o: Undefined symbol `_inflate' referenced from text segment pngrutil.o: Undefined symbol `_inflateReset' referenced from text segment pngwutil.o: Undefined symbol `_deflate' referenced from text segment pngwutil.o: Undefined symbol `_deflate' referenced from text segment pngwutil.o: Undefined symbol `_deflateReset' referenced from text segment pngwutil.o: Undefined symbol `_deflateInit2_' referenced from text segment pngwutil.o: Undefined symbol `_deflate' referenced from text segment pngwutil.o: Undefined symbol `_deflateReset' referenced from text segment pngwutil.o: Undefined symbol `_deflate' referenced from text segment configure: failed program was: #line 14700 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gdImageCreateFromPng(); -- Olivier.Cahagne@epita.fr

« previous php.dev (#23639) next »