php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41555 Unable to compile with --with-gd switch
Submitted: 2007-06-01 01:54 UTC Modified: 2007-06-01 21:39 UTC
From: genetiq at gmail dot com Assigned:
Status: Closed Package: Compile Failure
PHP Version: 5.2.3 OS: MacOS X 10.4.9
Private report: No CVE-ID:
 [2007-06-01 01:54 UTC] genetiq at gmail dot com
Description:
------------
Unable to compile with bundled GD library - configure script fails with 
an error.

Reproduce code:
---------------
trying to compile with the following options:

./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man/ --with-apxs2=/usr/sbin/apxs --with-curl --with-gd --enable-exif --enable-fastcgi --with-pgsql --with-zip --with-jpeg-dir=/usr/src/libjpeg --with-png-dir=/usr/src/libpng  

it fails with this error:
configure: error: GD build test failed. Please check the config.log for details.

in config.log there are following info:
configure:42434: gcc -o conftest -g -O2  -no-cpp-precomp  conftest.c  -L   -lpng -lz -lcurl -lm  -lxml2 -lz -liconv -lm -lcurl -lssl -lcrypto -lz -lxml2 -lz -liconv -lm 1>&5
/usr/bin/ld: -L: directory name missing
collect2: ld returned 1 exit status
configure: failed program was:
#line 42423 "configure"
#include "confdefs.h"

    char foobar () {}
    char foobar();
    int main() {
      foobar();
      return 0;
    }


Expected result:
----------------
php is always expected to build normally :)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-06-01 20:42 UTC] sniper@php.net
Just to be absolutely clear, try this (and exactly this!):

# rm config.cache ; ./configure --disable-all --disable-cgi --with-gd

 [2007-06-01 21:08 UTC] genetiq at gmail dot com
sure.

running this:
./configure --disable-all --disable-cgi --with-gd



------ configure running ------
...
...
checking for the location of libXpm... no
checking for FreeType 1.x support... no
checking for FreeType 2... no
checking for T1lib support... no
checking whether to enable truetype string function in GD... no
checking whether to enable JIS-mapped Japanese font support in GD... 
no
checking for fabsf... yes
checking for floorf... yes
If configure fails try --with-jpeg-dir=<DIR>
checking for png_write_image in -lpng... yes
If configure fails try --with-xpm-dir=<DIR>
If configure fails try --with-freetype-dir=<DIR>
configure: error: GD build test failed. Please check the config.log 
for details.
------ configure stopped ------


------ config.log --------
configure:34272: checking for FreeType 1.x support
configure:34297: checking for FreeType 2
configure:34322: checking for T1lib support
configure:34347: checking whether to enable truetype string function 
in GD
configure:34372: checking whether to enable JIS-mapped Japanese font 
support in GD
configure:34428: checking for fabsf
configure:34456: gcc -o conftest -g -O2  -no-cpp-precomp  conftest.c -
lm  1>&5
configure:34440: warning: conflicting types for built-in function 
'fabsf'
configure:34428: checking for floorf
configure:34456: gcc -o conftest -g -O2  -no-cpp-precomp  conftest.c -
lm  1>&5
configure:34440: warning: conflicting types for built-in function 
'floorf'
configure:34926: checking for png_write_image in -lpng
configure:34945: gcc -o conftest -g -O2  -no-cpp-precomp -L/usr/local/
lib -L/usr/local/lib  -lz conftest.c -lpng  -lm  1>&5
configure:42434: gcc -o conftest -g -O2  -no-cpp-precomp  -L/usr/
local/lib -L/usr/local/lib conftest.c  -L   -lpng -lz -lm  1>&5
/usr/bin/ld: -L: directory name missing
collect2: ld returned 1 exit status
configure: failed program was:
#line 42423 "configure"
#include "confdefs.h"

    char foobar () {}
    char foobar();
    int main() {
      foobar();
      return 0;
    }
----- end of config.log --------

that's all i get
 [2007-06-01 21:39 UTC] sniper@php.net
Thank you for your feedback. This bug is now fixed in CVS.
It was caused by a fix for another bug, trying to prevent such bugs in the future..unfortunately nobody tested the RCs (release candidates) we release before actual releases and 5.2.3 went out with this bug unnoticed..

Thank you for reporting it though.

You can fix your configure by removing -L$GD_LIB on line 42415:

-LIBS=" -L$GD_LIB $GD_SHARED_LIBADD  $LIBS"
+LIBS=" $GD_SHARED_LIBADD  $LIBS"

 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Sat Apr 19 22:02:16 2014 UTC