| Bug #10331 | configure: test gd functions lacks inclusion of -lpng, -lz | ||||
|---|---|---|---|---|---|
| Submitted: | 15 Apr 2001 2:07am UTC | Modified: | 10 May 2001 5:48am UTC | ||
| From: | elkner at linofee dot org | Assigned to: | |||
| Status: | Closed | Category: | GD related | ||
| Version: | 4.0.4pl1 | OS: | Linux 2.4.3 i686 | ||
[15 Apr 2001 2:07am UTC] elkner at linofee dot org
[15 Apr 2001 8:52am UTC] wez@php.net
Support for GD was just added to the latest CVS. Try a snapshot from snaps.php.net or checkout the latest CVS and configure with: ./configure "--with-jpeg-dir" \ "--with-png-dir" \ "--with-freetype-dir" \ "--with-gd" Beware - this will implicitly --enable-gd-native-ttf. Please let me know how you get on. --Wez.
[15 Apr 2001 8:54am UTC] wez@php.net
Sorry - you also need --with-xpm-dir, and I meant to say GD 2.
[15 Apr 2001 12:20pm UTC] elkner at linofee dot org
Nope, --with-png-dir does not resolve the problem (that was my first try). I can't use --with-freetype-dir, since freetype support is not part of the used gd lib. Here the params I used: ./configure --prefix=/develop/sl7/proto/opt/php4 --with-apxs --enable-discard-path --with-config-file-path=/etc --enable-safe-mode --with-exec-dir=/opt/php/bin --with-openssl=/opt/ssl --enable-calendar --enable-ftp --with-gd=/usr/local --with-ldap --with-mysql --with-oci8=/opt/oracle --enable-sockets --with-regex=system --enable-sysvsem --enable-sysvshm --with-zlib=/usr/local --with-xpm-dir=/usr/X11R6 --with-jpeg-dir=/usr --enable-track-vars --with-png-dir=/usr BTW: What for is the --with-sockets stuff (just for incl. of -lsockets ?)
[15 Apr 2001 2:21pm UTC] elkner at linofee dot org
I made a quick and dirty patch to configure, so that it works: --- configure Thu Jan 11 19:39:29 2001 +++ ../../php-4.0.4pl1/configure Sun Apr 15 19:40:28 2001 @@ -16390,7 +16390,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-lgd -lpng -lz $LIBS" cat > conftest.$ac_ext <<EOF #line 16396 "configure" #include "confdefs.h" @@ -16433,7 +16433,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-lgd -lpng -lz $LIBS" cat > conftest.$ac_ext <<EOF #line 16439 "configure" #include "confdefs.h" @@ -16476,7 +16476,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-lgd -lpng -lz $LIBS" cat > conftest.$ac_ext <<EOF #line 16482 "configure" #include "confdefs.h" @@ -16519,7 +16519,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lz $LIBS" +LIBS="-lz -lpng $LIBS" cat > conftest.$ac_ext <<EOF #line 16525 "configure" #include "confdefs.h"
[16 Apr 2001 5:30am UTC] wez@php.net
Could you reverse your patch, and then: rm config.cache ./configure --prefix=/develop/sl7/proto/opt/php4 --with-apxs --enable-discard-path --with-config-file-path=/etc --enable-safe-mode --with-exec-dir=/opt/php/bin --with-openssl=/opt/ssl --enable-calendar --enable-ftp --with-ldap --with-mysql --with-oci8=/opt/oracle --enable-sockets --with-regex=system --enable-sysvsem --enable-sysvshm --with-zlib=/usr/local --with-xpm-dir=/usr/X11R6 --with-jpeg-dir=/usr --enable-track-vars --with-png-dir=/usr --with-gd=/usr/local Let me know if it works; if it does not, I would like to see your config.log to find out what is going on. BTW: --with-sockets enables the sockets extension - you probably don't need it.
[16 Apr 2001 9:12pm UTC] wez@php.net
User Reported: ----------------- Works for some parts, but not all: 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... yes checking for gdImageColorResolve in -lgd... yes checking for gdImageCreateFromPng in -lgd... yes checking for gdImageCreateFromGif in -lgd... no checking for gdImageWBMP in -lgd... yes checking for gdImageCreateFromJpeg in -lgd... yes checking for gdImageCreateFromXpm in -lgd... yes To whom should I send the config.log? It is uncompressed about 120K, compress about 11K - so probably not suitable for a mailing list? Regards, jens. BTW: Any hints how to trace that problem: # /etc/init.d/apachectl-1.3.19 start Syntax error on line 233 of /opt/www/conf/httpd.conf: API module structure `php4_module' in file /opt/www/libexec/libphp4.so is garbled - perhaps this is not an Apache module DSO? /etc/init.d/apachectl start: httpd could not be started ----------------- Please email me the config.log to mailto:wez@php.net The garbled module problem is technically a different bug; I would suggest ensuring that gd links in correctly (or building without) and making sure that you do "./cvsclean; ./buildconf" before you configure.
[10 May 2001 5:48am UTC] sniper@php.net
Try latest CVS. If that doesn't work for you, reopen. --Jani
