php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2400 apache with php as a statically linked module does not compile with gd lib
Submitted: 1999-09-28 17:12 UTC Modified: 2000-02-23 13:46 UTC
From: libs at mail dot dotcom dot fr Assigned:
Status: Closed Package: Compile Failure
PHP Version: 3.0.12 OS: Linux
Private report: No CVE-ID: None
 [1999-09-28 17:12 UTC] libs at mail dot dotcom dot fr
I have installed gd-1.7.3 in /usr/local (from the tarball with make; make install)

Then I try to compile php+apache :

thorgal:/home/www> cd apache_1.3.9
thorgal:/home/www/apache_1.3.9> ./configure --prefix=/home/www/apache_config
Configuring for Apache, Version 1.3.9
blablabla
thorgal:/home/www/apache_1.3.9> cd ../php-3.0.12
thorgal:/home/www/php-3.0.12> ./configure \
--with-apache=/home/www/apache_1.3.9 --with-gd=/usr/local --with-imap \
--with-zlib --enable-sysvshm=yes --enable-sysvsem=yes \
--with-config-file-path= /home/www/apache_config --enable-debug=no \
--enable-track-vars=yes --enable-bcmath=yes
thorgal:/home/www/php-3.0.12> make
blablabla... ok
ranlib libmodphp3.a
thorgal:/home/www/php-3.0.12> make install
blablabla... ok
thorgal:/home/www/php-3.0.12> cd ../apache_1.3.9
thorgal:/home/www/apache_1.3.9> ./configure --prefix=/home/www/apache_config \
--activate-module=src/modules/php3/libphp3.a \
--activate-module=src/modules/standard/mod_status \
--activate-module=src/modules/standard/mod_info 
Configuring for Apache, Version 1.3.9
pompompom... ok
thorgal:/home/www/apache_1.3.9> make
blablabla...
<=== src/modules/php3
<=== src/modules
gcc -c  -I./os/unix -I./include   -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT -I./lib/ex
pat-lite `./apaci` modules.c
gcc -c  -I./os/unix -I./include   -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT -I./lib/ex
pat-lite `./apaci` buildmark.c
gcc  -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT -I./lib/expat-lite `./apaci`    \
      -o httpd buildmark.o modules.o modules/standard/libstandard.a modules/php3
/libphp3.a main/libmain.a ./os/unix/libos.a ap/libap.a regex/libregex.a lib/expat-lite/libexpat.a  -Wl,-rpath,/usr/local/lib  -L/usr/local/lib -lgd -Lmodules/ph
p3 -L../modules/php3 -L../../modules/php3 -lmodphp3                -lz        -lpam -lm -ldl -lcrypt -lnsl  -lresolv  -lm -lcrypt -lgdbm
/usr/local/lib/libgd.a(gd.o): In function `gdImageColorResolve':
gd.o(.text+0x288): multiple definition of `gdImageColorResolve'
modules/php3/libphp3.a(gd.o):/home/www/php-3.0.12/functions/gd.c:291: first defined here
ld: Warning: size of symbol `gdImageColorResolve' changed from 202 to 195 in gd.o
make[2]: *** [target_static] Error 1
make[2]: Leaving directory `/home/www/apache_1.3.9/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/home/www/apache_1.3.9'
make: *** [build] Error 2

I have gone into php-xxx/functions/gd.c and changed the line 289

int 
gdImageColorResolve(gdImagePtr im, int r, int g, int b)
{

(notice the two lines)
to

int gdImageColorResolve(gdImagePtr im, int r, int g, int b)
{

If I compile php with --with-gd=no all is well...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-10-01 18:56 UTC] libs at mail dot dotcom dot fr
More Info:
-------
When the source of gdImageColorResolve is removed from
the source file php-3.0.12/functions/gd.c
then it compiles OK.

I suppose that the code is duplicated in the gd-1.7 lib and in the
php-3.0.12 source. This may be version-dependant, though :-(
 [2000-02-23 13:46 UTC] sas at cvs dot php dot net
This is fixed in CVS. Thanks for your report
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 14 20:00:01 2026 UTC