When I am done running ./configure in php-4.1.2 (and 4.1.1 as well mind you) I get this in my debug.log. Php configure says everything looks ok but when you run make it fails with the same error at the very bottom.
Error:
/usr/bin/ld: cannot find -l--library=z
collect2: ld returned 1 exit status
It appears that "-l -lz" in the command line may possibly be doing this... Is it because there is nothing after the "-l" but "-lz"?
Anyone else run into this and how the heck did you get around it, I've been stumped for days now. (My whole life really.)
I've installed zlib (as both shared and static and they are in my ld search path)
I did a search but nothing, notta, zip on this subject...
#cat debug.log
CONFIGURE: './configure' '--enable-debug' '--with-xslt-sablot' '--with-regex=php' '--with-mm=/usr/local/httptools/mm-1.1.3' '--with-java=/usr/local/jdk' '--with-expat=/usr/local/httptools/expat-1.95.2' '--with-zlib-dir=/usr/local/lib' '--with-dom=/usr/local/httptools/libxml-1.8.17' '--enable-xslt' '--enable-sockets' '--with-mysql=/usr/local/mysql' '--enable-gmp' '--prefix=/usr/local/php' '--enable-track-vars' '--enable-trans-sid' '--enable-discard-path' '--enable-ftp'
CC: gcc
CFLAGS: -g -O2
CPPFLAGS:
CXX:
CXXFLAGS:
INCLUDES: -I$(top_builddir)/Zend -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/mysql/include/mysql
LDFLAGS: -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/local/mysql/lib/mysql -L/usr/local/mysql/lib/mysql
LIBS: -lmm -lmysqlclient -lz -l -lz -lxml2 -lz -lcrypt -lresolv -lm -ldl -lnsl -lresolv -lcrypt
DLIBS:
SAPI: cgi
PHP_RPATHS: /usr/local/lib /usr/local/mysql/lib/mysql
uname -a: Linux synaxin.synet.org 2.4.9 #4 SMP Sat Feb 2 17:37:59 EST 2002 i686 unknown
gcc -o conftest -g -O2 -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/local/mysql/lib/mysql -L/usr/local/mysql/lib/mysql conftest.c -lmm -lmysqlclient -lz -l -lz -lxml2 -lz -lcrypt -lresolv -lm -ldl -lnsl -lresolv -lcrypt 1>&5
/usr/bin/ld: cannot find -l--library=z
collect2: ld returned 1 exit status