php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9778 error when compiling with gd
Submitted: 2001-03-16 02:22 UTC Modified: 2001-03-16 13:56 UTC
From: pof at innocent dot com Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.0.4pl1 OS: Slackware-current (20010316)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: pof at innocent dot com
New email:
PHP Version: OS:

 

 [2001-03-16 02:22 UTC] pof at innocent dot com
My configure command:
./configure --prefix=/usr/local --with-apxs=/usr/local/bin/apxs --enable-versioning --enable-track-vars --enable-ftp --enable-xml --with-mysql=/usr --with-pgsql=/usr/local --enable-safe-mode --with-openssl=/usr --enable-bcmath --with-bz2 --enable-sockets --enable-memory-limit --with-jpeg-dir=/usr/lib --with-xpm-dir=/usr/X11R6/lib --with-ttf=/usr/X11R6 --with-gd=/usr/local/gd --enable-gd-imgstrttf --enable-gd-native-ttf --with-mhash=/usr/local --with-mcrypt --with-t1lib=/usr/local --with-gettext --enable-freetype-4bit-antialias-hack


The configure part of GD:
checking whether to enable truetype string function in gd... yes
checking for libjpeg (needed by gd-1.8+)... yes
checking for jpeg_read_header in -ljpeg... yes
checking for libXpm (needed by gd-1.8+)... yes
checking for XpmFreeXpmImage in -lXpm... no
no
checking whether to include GD support... yes (static)
checking for gdImageString16 in -lgd... no
checking for gdImagePaletteCopy in -lgd... no
checking for gdImageColorClosestHWB in -lgd... no
checking for compress in -lz... no
checking for png_info_init in -lpng... no
checking for gdImageColorResolve in -lgd... no
checking for gdImageCreateFromPng in -lgd... no
checking for gdImageCreateFromGif in -lgd... no
checking for gdImageWBMP in -lgd... no
checking for gdImageCreateFromJpeg in -lgd... no
checking for gdImageCreateFromXpm in -lgd... no
checking whether to include FreeType 1.x support... yes
checking for T1lib support... yes
checking for T1_GetExtend in -lt1... yes
checking whether to include GNU gettext support... yes


The error when compiling:
/bin/sh /tmp/build-php-4.0.4pl1-i586-1/php-4.0.4pl1/libtool --silent --mode=link gcc  -I. -I/tmp/build-php-4.0.4pl1-i586-1/php-4.0.4pl1/ -I/tmp/build-php-4.0.4pl1-i586-1/php-4.0.4pl1/main -I/tmp/build-php-4.0.4pl1-i586-1/php-4.0.4pl1 -I/usr/local/apache/include -I/tmp/build-php-4.0.4pl1-i586-1/php-4.0.4pl1/Zend -I/usr/X11R6/include/freetype -I/usr/local/include -I/usr/local/gd -I/usr/include/mysql -I/tmp/build-php-4.0.4pl1-i586-1/php-4.0.4pl1/ext/xml/expat/xmltok -I/tmp/build-php-4.0.4pl1-i586-1/php-4.0.4pl1/ext/xml/expat/xmlparse -I/tmp/build-php-4.0.4pl1-i586-1/php-4.0.4pl1/TSRM  -DLINUX=2 -DTARGET="httpsd" -DUSE_HSREGEX -DUSE_EXPAT -DAPACHE_SSL -DXML_BYTE_ORDER=12 -g -O2   -o libphp4.la -rpath /tmp/build-php-4.0.4pl1-i586-1/php-4.0.4pl1/libs -export-symbols /tmp/build-php-4.0.4pl1-i586-1/php-4.0.4pl1/sapi/apache/php.sym -avoid-version -L/usr/lib/lib -L/usr/X11R6/lib/lib -L/usr/local/gd -L/usr/X11R6/lib -L/usr/local/lib -L/usr/lib/mysql  -R /usr/lib/lib -R /usr/X11R6/lib/lib -R /usr/local/gd -R /usr/X11R6/lib -R /usr/local/lib -R /usr/lib/mysql stub.lo  Zend/libZend.la sapi/apache/libsapi.la main/libmain.la regex/libregex.la ext/bcmath/libbcmath.la ext/bz2/libbz2.la ext/ftp/libftp.la ext/gd/libgd.la ext/gettext/libgettext.la ext/mcrypt/libmcrypt.la ext/mhash/libmhash.la ext/mysql/libmysql.la ext/openssl/libopenssl.la ext/pcre/libpcre.la ext/pgsql/libpgsql.la ext/posix/libposix.la ext/session/libsession.la ext/sockets/libsockets.la ext/standard/libstandard.la ext/xml/libxml.la TSRM/libtsrm.la -ldl -lpq -lmysqlclient -lmhash -lmcrypt -lltdl -lt1 -lttf -lgd -lX11 -lXpm -ljpeg -lbz2 -lcrypto -lssl -lresolv -lm -ldl -lcrypt -lnsl -lresolv -L/usr/lib/lib -ljpeg -L/usr/X11R6/lib/lib -lXpm -L/usr/X11R6/lib/lib -lX11 -L/usr/local/lib -lt1
/usr/local/gd/libgd.a(gd.o): In function `gdImageColorResolve':
gd.o(.text+0x69c): multiple definition of `gdImageColorResolve'
ext/gd/.libs/libgd.al(gd.lo):/tmp/build-php-4.0.4pl1-i586-1/php-4.0.4pl1/ext/gd/gd.c:322: first defined here
/usr/i386-slackware-linux/bin/ld: Warning: size of symbol `gdImageColorResolve' changed from 243 to 226 in gd.o
collect2: ld returned 1 exit status
make[1]: *** [libphp4.la] Error 1
make[1]: Leaving directory `/tmp/build-php-4.0.4pl1-i586-1/php-4.0.4pl1'
make: *** [all-recursive] Error 1


Notes:
I don't have any other versions of gd installed, this is a fresh install. I've tryed in it in 2 different computers, and get the same error. GD version installed is 1.8.4.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-16 06:26 UTC] sniper@php.net
Check what config.log has to say when it checks for
gdImageColorResolve in libgd as it seems it does have
it but the configure doesn't get it for some reason.

--Jani

 [2001-03-16 13:43 UTC] pof at innocent dot com
Here is the error from config.log:
configure:16597: checking for gdImageColorResolve in -lgd
configure:16616: gcc -o conftest -g -O2  -DLINUX=2 -DTARGET="httpsd" -DUSE_HSREGEX -DUSE_EXPAT -DAPACHE_SSL  -Wl,-rpath,/usr/lib/lib -L/usr/lib/lib -Wl,-rpath,/usr/X11R6/lib/lib -L/usr/X11R6/lib/lib -Wl,-rpath,/usr/local/gd -L/usr/local/gd -L/usr/local/gd conftest.c -lgd  -lgd -lX11 -lXpm -ljpeg -lbz2 -lcrypto -lssl -lresolv -lm -ldl -lcrypt -lnsl  -lresolv -L/usr/lib/lib -ljpeg -L/usr/X11R6/lib/lib -lXpm -L/usr/X11R6/lib/lib -lX11 1>&5
/usr/i386-slackware-linux/bin/ld: cannot find -lX11
collect2: ld returned 1 exit status
configure: failed program was:
#line 16605 "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 gdImageColorResolve();
 
int main() {
gdImageColorResolve()
; return 0; }

Any ideas of what's the problem?
 [2001-03-16 13:56 UTC] sniper@php.net
1. Delete config.cache
2. Remove those /lib parts from the configure options.
3. After configure, 'make clean ; make ; make install'

--Jani

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 19:01:32 2025 UTC