./configure complaining about zlib dependency

[email protected] (Richard H Lee)
Newsgroups php.install
Message-ID <[email protected]>
php.install,

I'm trying to compile php 5.3.2 and I get an error about not having the 
right zlib version. I have zlib and zlib-devel installed at version 1.2.3 .

I get the error:

checking for ZLIB support... yes
checking if the location of ZLIB install directory is defined... no
checking for gzgets in -lz... no
configure: error: ZLIB extension requires zlib >= 1.0.9

The tail of the configure.log is:

configure:23803: checking for ZLIB support
configure:23850: checking if the location of ZLIB install directory is 
defined
configure:24296: checking for gzgets in -lz
configure:24315: gcc -o conftest -g -O2 -fvisibility=hidden 
-L/usr/local/lib -L/usr/kerberos/lib64 conftest.c -lz  -lpcre -lrt -lm 
-ldl -lnsl  -lxml2 -lz -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err 
-lssl -lcrypto -ldl -lz 1>&5
/usr/bin/ld: skipping incompatible /usr/lib/libcom_err.so when searching 
for -lcom_err
/usr/bin/ld: skipping incompatible /usr/lib/libcom_err.a when searching 
for -lcom_err
/usr/bin/ld: cannot find -lcom_err
collect2: ld returned 1 exit status
configure: failed program was:
#line 24304 "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 gzgets();

int main() {
gzgets()
; return 0; }


My configure command from phpinfo is:

./configure --build=x86_64-redhat-linux-gnu 
--host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu 
--program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin 
--sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share 
--includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec 
--localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man 
--infodir=/usr/share/info --cache-file=../config.cache 
--with-libdir=lib64 --with-config-file-path=/etc 
--with-config-file-scan-dir=/etc/php.d --disable-debug --with-pic 
--disable-rpath --without-pear --with-bz2 --with-curl 
--with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr 
--enable-gd-native-ttf --without-gdbm --with-gettext --with-gmp 
--with-iconv --with-jpeg-dir=/usr --with-openssl --with-png 
--with-pspell --with-expat-dir=/usr --with-pcre-regex=/usr --with-zlib 
--with-layout=GNU --enable-exif --enable-ftp --enable-magic-quotes 
--enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg 
--enable-track-vars --enable-trans-sid --enable-yp --enable-wddx 
--with-kerberos --enable-ucd-snmp-hack --with-unixODBC=shared,/usr 
--enable-memory-limit --enable-shmop --enable-calendar --enable-dbx 
--enable-dio --with-mime-magic=/usr/share/file/magic.mime 
--without-sqlite --with-libxml-dir=/usr --with-xml --with-system-tzdata 
--with-apxs2=/usr/sbin/apxs --without-mysql --without-gd --without-odbc 
--disable-dom --disable-dba --without-unixODBC --disable-pdo 
--disable-xmlreader --disable-xmlwriter

I get the feeling this is the same issue as

http://bugs.php.net/bug.php?id=27357

but I don't understand the solution:

 >The missing iconv library comes from libxml2 setup.
 >Try this:
 >
 ># xml2-config --libs

Also, I had to compile xml2-config just before configuring php and the 
configure script seemed to find xml2-config fine.


Rich
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.