Re: Errors on linux compilation: php-5.2.1 or php-5.2.3
| From: | BuildSmart | Date: | Fri, 17 Aug 2007 12:39:30 +0000 |
| Subject: | Re: Errors on linux compilation: php-5.2.1 or php-5.2.3 | ||
| References: | 1 | Groups: | php.install |
| Request: | Send a blank email to php-install+get-18195@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Aug 16, 2007, at 15:41:34, claire eberlein wrote:
Hi, I tried to compile php-5.2.1 or php-5.2.3 on a redhat host, but kept getting errors about: /usr/bin/ld: cannot find -lkstatEither you need it and don't have it installed or the libkstat library isn't in the linkers search path.
Please let me know how to fix this. Thanks,If you don't have a '--with-snmp=/some-path' in your configure options it shouldn't be trying to enable the snmp extension which is AFAIK, the only extension that requires it. For it to be added it has to have the --with-snmp' option set and it also has to pass a sanity check as taken from ext/snmp/config.m4 file: AC_CHECK_LIB(kstat, kstat_read, [ PHP_ADD_LIBRARY(kstat,,SNMP_SHARED_LIBADD) ]) So there's little chance it got there by itself. Try adding '--with-snmp=no' if you don't need it or install the missing library.
-j # more debug.log './configure' '--prefix=/opt/php/5.2.1'-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (Darwin) iD8DBQFGxZcD0hzWbkf0eKgRAiQ1AKCJt3Oce1LfjH9kktvjMoQjuKKtdwCg1+Xh IcSJtmUebzhubgHgGGjBF6k= =lLx1 -----END PGP SIGNATURE-----CC: gcc CFLAGS: -I/usr/include -g -O2CPPFLAGS: CXX: CXXFLAGS:INCLUDES: -I/usr/include/libxml2 -I/opt/php/php-5.2.1.src /php-5.2.1/ext/date/lib -I/auto/engweb/oracle/product/INSTANTCLIENT/sdk/includeLDFLAGS: -L/usr/lib -Wl,-rpath,/auto/engweb/oracle/product/INSTANTCLIENT -L/auto/engweb/oracle/product/INSTANTCLIENTLIBS: -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm -lkstat -lnsl -lsocket-lgen -ldl -lsched -lclntsh -lxml2 -lz -lm DLIBS:SAPI: apache2handlerPHP_RPATHS: /auto/engweb/oracle/product/INSTANTCLIENT uname -a: Linux build-lnx-003 2.6.9-42.7.ELsmp #1 SMP Tue Sep 5 18:29:39 EDT 2006 i686 i686 i386 GNU/Linux gcc -o conftest -I/usr/include -g -O2 -L/usr/lib -Wl,-rpath,/auto/engweb/oracle/product/INST ANTCLIENT -L/auto/engweb/oracle/product/INSTANTCLIENT conftest.c -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm -lkstat -lnsl -lsocket -lgen -ldl -lsched -lclntsh -lxml2 -lz -l m 1>&5 /usr/bin/ld: cannot find -lkstat collect2: ld returned 1 exit status - -- BuildSmart