Bug #17269 Updated: compile problem with GD & JPEG support
| From: | msopacua at idg dot nl | Date: | Thu, 16 May 2002 17:21:30 +0000 |
| Subject: | Bug #17269 Updated: compile problem with GD & JPEG support | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-7854@lists.php.net to get a copy of this message | ||
ID: 17269
Updated by: msopacua@idg.nl
Reported By: jaco@welnet.nl
Status: Feedback
Bug Type: GD related
Operating System: FreeBSD 4.3
PHP Version: 4.2.1
New Comment:
In the libtool script, check whether file_magic_cmd in the
freebsd* case statement lists '/usr/bin/file -L' instead of plain
/usr/bin/file and change accordingly (it should be '/usr/bin/file
-L').
Then try to recompile with shared support.
Previous Comments:
------------------------------------------------------------------------
[2002-05-16 13:09:40] jaco@welnet.nl
just tried it: d57107# ./configure --enable-shared
---
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes
---
libtool version 1.4.2.tar.gz
for some reason jpeg won't compile as a shared library. tried to edit
Makefile and change ./libtool to /usr/local/bin/libtool, but that
doesn't make a difference, they are the same version.
can i change Makefile to build a shared library while configure says it
can't?
and ideas?
------------------------------------------------------------------------
[2002-05-16 11:06:31] derick@php.net
First of all, thanks for this very extensive report... if only all
reports where like this :)
I think the problem might be that libjpeg.a is a static library which
is compiled in in both gd and libpdf, you might try a shared variant
and see if this fixes it.
Derick
------------------------------------------------------------------------
[2002-05-16 07:04:49] jaco@welnet.nl
when compiling PHP with GD & JPEG support i get a lot of errors with
libjpeg.a moaning about 'multiple definitions' and 'first defined here'
stuff.
system config:
FreeBSD 4.3
Apache 2.0.36
PHP 4.2.1
GD 1.8.4 (compiled ok with support for png, jpeg, freetype)
Jpeg 6B
Libpng 1.2.2
Gdbm 1.8.0
Pdflib 4.0.2
Freetype 2.1.0
configure:
./configure \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-config-file-path=/etc \
--enable-shared \
--enable-track-vars \
--enable-ftp \
--with-gdbm=/usr/local \
--with-gd=/usr/local/graph/gd \
--with-jpeg-dir=/usr/local/graph/jpeg \
--enable-gd-native-ttf \
--with-png-dir=/usr/local/graph/png \
--with-freetype-dir=/usr/local/graph/freetype2 \
--with-mysql=/usr/local \
--with-zlib-dir=/usr/local/graph/zlib \
--with-zlib \
--with-pdflib=/usr/local/graph/pdflib \
--with-tsrm-pth \
configure goes OK. all the functions are supported and no errors are
given.
When i do a gmake i get this error:
/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
It goes on for about 50 of these jpeg_<functions>.
you can look at the complete error here:
http://httpd.chello.nl/~jstienstra01/php/compile_error.txt
The STRANGE thing is that if i leave apache2 support out (--with-apxs2)
and compile it as a CGI-BINARY, i do not get errors and it compiles
fine ?
thing i've tried:
-tried GD2.0.1 and gd 1.8.3 instead of gd 1.8.4
-did a system search for old jpeg/png/GD libraries. deleted them all
and did a clean install for these packages
-install the packages in standard directorys (/usr/lib and /usr/include
etc), doesn't work either.
-tried php 4.1.0, php 4.2.0 and php 4.2.1
-searching bug database for similiar problem :)
-been busy googling for 4 days, yet to find no fix for this problem,
only people that have the same problem and didnt
get an answer too.
THE thing that i don't understand is that if i leave apache support out
and compile it as a cgi binary it gives no compile errors.
help?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17269&edit=1