|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-07-09 12:39 UTC] nospam at 1111-internet dot 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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 22 05:00:01 2025 UTC |
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; }