Bug #18248 Updated: build problem after upgrade to GD2

From: Date: Thu, 11 Jul 2002 01:39:05 +0000
Subject: Bug #18248 Updated: build problem after upgrade to GD2
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-13785@lists.php.net to get a copy of this message
ID: 18248 Updated by: sniper@php.net Reported By: nospam@1111-internet.com Status: Feedback Bug Type: GD related Operating System: FreeBSD 4.0 PHP Version: 4.2.1 New Comment: First of all, these configure options: --with-zlib-dir and --with-jpeg-dir don't accept anything else but a path. 'shared' is not useful with these. Second, did you clean up your system of all the remains of the old GD before installing new version? Then try with ONLY the GD related configure options. (without mcrypt, pdflib, ftp) Previous Comments: ------------------------------------------------------------------------ [2002-07-10 18:40:55] nospam@1111-internet.com I tried all of the following combinations (plus the other config options indicated in my original report) using snapshot "php4-200207091500" and got the following results - none of which solve my original problem: --with-gd=/usr/local, --with-jpeg-dir: Result A --with-gd=/usr/local, --with-jpeg-dir=/usr/local: Result A --with-gd=/usr/local, --with-jpeg-dir=shared: Result A --with-gd=/usr/local, no --with-jpeg-dir: Result C --with-gd=php, --with-jpeg-dir: Result A --with-gd=php, --with-jpeg-dir=/usr/local: Result A --with-gd=php, --with-jpeg-dir=shared: Result A --with-gd=php, no --with-jpeg-dir: Result D no --with-gd, --with-jpeg-dir: Result B no --with-gd, --with-jpeg-dir=/usr/local: Result B no --with-gd, --with-jpeg-dir=shared: Result B no --with-gd, no --with-jpeg-dir: Result B Result A: stops at jpeg function multiple definitions Result B: stops at ext/mysql/libmysql/my_tempnam.lo: In function `my_tempnam': /usr/local/src/php_src/php4-200207091500/ext/mysql/libmysql/my_tempnam.c(.text+0x51): warning: tempnam() possibly used unsafely; consider using mkstemp() (I think this build is successful and this message is a warning only - but this only arises when --with-gd is not included) Result C: stops at checking for mcrypt support... yes checking for mcrypt_module_open in -lmcrypt... no checking for init_mcrypt in -lmcrypt... no configure: error: Sorry, I was not able to diagnose which libmcrypt version you have installed. gmake: *** No targets specified and no makefile found. Stop. Result D: stops at ext/mysql/libmysql/my_tempnam.lo: In function `my_tempnam': /usr/local/src/php_src/php4-200207091500/ext/mysql/libmysql/my_tempnam.c(.text+0x51): warning: tempnam() possibly used unsafely; consider using mkstemp() ext/gd/gd.lo: In function `php_imagettftext_common': /usr/local/src/php_src/php4-200207091500/ext/gd/gd.c(.text+0x9413): undefined reference to `gdttf' gmake: *** [sapi/cli/php] Error 1 ------------------------------------------------------------------------ [2002-07-09 18:49:13] sniper@php.net Does this happen with this snapshot: http://snaps.php.net/php4-latest.tar.gz And when NOT using --with-gd=php ------------------------------------------------------------------------ [2002-07-09 14:27:56] nospam@1111-internet.com I got some more clues from the tail of the config.log - which is included below. I had previously been having problems with the --with-jpeg-dir configure line when I recently upgraded from php 4.0.6 to 4.2.1 - whereby using --with-jpeg-dir=/usr/local started producing errors with multiple definitions of about 100 jpeg-related functions right at the end of the configure process, i.e.: /usr/local/lib/libjpeg.a(jcapimin.o): In function `jpeg_CreateCompress': jcapimin.o(.text+0x0): multiple definition of `jpeg_CreateCompress' /usr/local/lib/libjpeg.a(jcapimin.o)(.text+0x0): first defined here /usr/local/lib/libjpeg.a(jcapimin.o): In function `jpeg_destroy_compress': jcapimin.o(.text+0x114): multiple definition of `jpeg_destroy_compress' /usr/local/lib/libjpeg.a(jcapimin.o)(.text+0x114): first defined here (...) I figured that this was due to the fact that --with-jpeg-dir can apply to both gd and directly to the php configuration, so I changed the configuration to --with-jpeg-dir=shared, which made everything work ok - until the new mcrypt problems arose when I changed to gd 2.0.1. Reverting the configuration to --with-jpeg-dir=/usr/local with gd 2.0.1 gets me past the mcrypt problem but still runs into the multiple function definition problem which kills the build. So I suspect that this whole thing might actually be a config issue with libjpeg... Here's the aforementioned config.log tail: (gd functions are tested and confirmed) (...) configure:34119: checking for mcrypt support configure:34181: checking for mcrypt_module_open in -lmcrypt configure:34200: gcc -o conftest -g -O2 -DMOD_SSL=208108 -DEAPI -DUSE_EXPAT -L/usr/local/lib -lltdl -R/usr/local/lib -L/usr/local/lib conftest.c -lmcrypt -lgd -lttf -lpng -lz -lz -lcrypt -lm -lcrypt 1>&5 /usr/local/lib/libgd.so: undefined reference to `jpeg_read_scanlines' /usr/local/lib/libgd.so: undefined reference to `jpeg_simple_progression' /usr/local/lib/libgd.so: undefined reference to `jpeg_set_defaults' /usr/local/lib/libgd.so: undefined reference to `jpeg_start_decompress' /usr/local/lib/libgd.so: undefined reference to `jpeg_destroy' /usr/local/lib/libgd.so: undefined reference to `jpeg_write_marker' /usr/local/lib/libgd.so: undefined reference to `jpeg_destroy_decompress' /usr/local/lib/libgd.so: undefined reference to `jpeg_std_error' /usr/local/lib/libgd.so: undefined reference to `jpeg_CreateDecompress' /usr/local/lib/libgd.so: undefined reference to `jpeg_read_header' /usr/local/lib/libgd.so: undefined reference to `jpeg_start_compress' /usr/local/lib/libgd.so: undefined reference to `jpeg_destroy_compress' /usr/local/lib/libgd.so: undefined reference to `jpeg_finish_decompress' /usr/local/lib/libgd.so: undefined reference to `jpeg_resync_to_restart' /usr/local/lib/libgd.so: undefined reference to `jpeg_CreateCompress' /usr/local/lib/libgd.so: undefined reference to `jpeg_finish_compress' /usr/local/lib/libgd.so: undefined reference to `jpeg_set_quality' /usr/local/lib/libgd.so: undefined reference to `jpeg_write_scanlines' configure: failed program was: #line 34189 "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 mcrypt_module_open(); int main() { mcrypt_module_open() ; return 0; } configure:34321: checking for init_mcrypt in -lmcrypt configure:34340: gcc -o conftest -g -O2 -DMOD_SSL=208108 -DEAPI -DUSE_EXPAT -L/usr/local/lib -R/usr/local/lib -L/usr/local/lib conftest.c -lmcrypt -lgd -lttf -lpng -lz -lz -lcrypt -lm -lcrypt 1>&5 /usr/local/lib/libgd.so: undefined reference to `jpeg_read_scanlines' /usr/local/lib/libgd.so: undefined reference to `jpeg_simple_progression' /usr/local/lib/libgd.so: undefined reference to `jpeg_set_defaults' /usr/local/lib/libgd.so: undefined reference to `jpeg_start_decompress' /usr/local/lib/libgd.so: undefined reference to `jpeg_destroy' /usr/local/lib/libmcrypt.so: undefined reference to `lt_dlerror' /usr/local/lib/libgd.so: undefined reference to `jpeg_write_marker' /usr/local/lib/libgd.so: undefined reference to `jpeg_destroy_decompress' /usr/local/lib/libgd.so: undefined reference to `jpeg_std_error' /usr/local/lib/libgd.so: undefined reference to `jpeg_CreateDecompress' /usr/local/lib/libmcrypt.so: undefined reference to `lt_dlclose' /usr/local/lib/libgd.so: undefined reference to `jpeg_read_header' /usr/local/lib/libgd.so: undefined reference to `jpeg_start_compress' /usr/local/lib/libgd.so: undefined reference to `jpeg_destroy_compress' /usr/local/lib/libgd.so: undefined reference to `jpeg_finish_decompress' /usr/local/lib/libgd.so: undefined reference to `jpeg_resync_to_restart' /usr/local/lib/libgd.so: undefined reference to `jpeg_CreateCompress' /usr/local/lib/libmcrypt.so: undefined reference to `lt_dlexit' /usr/local/lib/libgd.so: undefined reference to `jpeg_finish_compress' /usr/local/lib/libmcrypt.so: undefined reference to `lt_dlsetsearchpath' /usr/local/lib/libmcrypt.so: undefined reference to `lt_dlopenext' /usr/local/lib/libmcrypt.so: undefined reference to `lt_dlsym' /usr/local/lib/libgd.so: undefined reference to `jpeg_set_quality' /usr/local/lib/libgd.so: undefined reference to `jpeg_write_scanlines' /usr/local/lib/libmcrypt.so: undefined reference to `lt_dlinit' configure: failed program was: #line 34329 "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 init_mcrypt(); int main() { init_mcrypt() ; return 0; } ------------------------------------------------------------------------ [2002-07-09 12:39:50] nospam@1111-internet.com I am having a problem with the following php configuration after upgrading gd from version 1.8.3 to 2.0.1 (on FreeBSD 4.0 w/ PHP 4.2.1): ./configure \ --prefix=/usr/local/php4 \ --with-apxs=/usr/local/apache/bin/apxs \ --with-mysql \ --enable-track-vars \ --with-gd=/usr/local \ --with-zlib-dir=shared \ --with-ttf \ --with-jpeg-dir=shared \ --with-png-dir=/usr/local \ --with-tiff-dir=/usr/local \ --with-mcrypt=/usr/local \ --with-pdflib=/usr/local \ --enable-ftp Before the gd upgrade this compilation ran fine, but now the output stops at: (...) checking for mcrypt support... yes checking for mcrypt_module_open in -lmcrypt... no checking for init_mcrypt in -lmcrypt... no configure: error: Sorry, I was not able to diagnose which libmcrypt version you have installed. At first I took this as an mcrypt problem - which was counterintuitive since I'd never had such a problem before - but nonetheless I rebuilt mcrypt and tried again only to get the same error. Then I pulled --with-mcrypt out of the php configuration and got: (...) checking for the location of libpng... yes checking for png_create_info_struct in -lpng... no configure: error: libpng not found! I've also never had a problem with the png library in the past... So I tried downgrading gd to the original version 1.8.3 and rebuilding php with the full configuration above - that worked. But it still leaves me without the newer gd features that I need... A search through the bug database and research on the web did not give me a solution (other than trying --with-gd=php using the CVS version of php, which I'm very reluctant to do on a production server) - so I'm hoping the php experts here might be able to come up with one... Thanks, Chuck Hohn ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18248&edit=1

« previous php.bugs (#13785) next »