Hi
Please bear with me as I'm a relative newbie to PHP and source building in general.
So, I've got this NMS system called JFFNMS installed...it requires many different packages which I've installed all from RPM, including PHP from RPM. Now, I need to patch PHP to support SNMPv2, so I've downloaded the PHP source and applied my patch file...but I cant seem to get the configure line correct to compile PHP.
What I've got installed via rpm is :
mysql, apache, graphviz, webfonts, nmap, fping, rrdtool, php, php-snmp, php-mysql, net-snmp, php-devel.
The install document says to compile php with modules:
sockets, snmp, gd, mysql.
Could someone please help me with the configure line, possibly including the paths, as my configure line currently fails with an SNMP Sanity check error. The config.log says:
configure:75500: checking for SNMP support
configure:75546: checking OpenSSL dir for SNMP
configure:75574: checking for net-snmp-config
configure:76733: checking for snmp_parse_oid in -lnetsnmp
configure:76752: gcc -o conftest -g -O2 -Wl,-rpath,/usr/lib/mysql -L/usr/lib/mysql conftest.c -lnetsnmp -lmysqlclient -lpng -lz -lz -lresolv -lm -ldl -lnsl -lnetsnmp -lcrypto -lelf -lm 1>&5
/usr/bin/ld: cannot find -lelf
collect2: ld returned 1 exit status
configure: failed program was:
#line 76741 "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 snmp_parse_oid();
int main() {
snmp_parse_oid()
; return 0; }
configure:76869: checking for init_snmp in -lnetsnmp
configure:76888: gcc -o conftest -g -O2 -Wl,-rpath,/usr/lib/mysql -L/usr/lib/mysql conftest.c -lnetsnmp -lmysqlclient -lpng -lz -lz -lresolv -lm -ldl -lnsl -lnetsnmp -lcrypto -lelf -lm 1>&5
/usr/bin/ld: cannot find -lelf
collect2: ld returned 1 exit status
configure: failed program was:
#line 76877 "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 init_snmp();
int main() {
init_snmp()
; return 0; }
[root@localhost php-4.3.7]#
ANd my current configure line (though, probably totally wrong) says:
./configure --prefix=/var/www/html --with-config-file-path=/var/www/php --with-sockets=/root/downloads/php-4.3.7/ext/sockets --with-mysql=/usr --with-zlib-dir=/root/downloads/php-4.3.7/ext/zlib --with-gd --with-snmp=/usr/lib
Please help
Jason