ID: 40876
User updated by: chenberschen at yahoo dot com dot tw
Reported By: chenberschen at yahoo dot com dot tw
Status: Open
Bug Type: *Configuration Issues
Operating System: RedHat9.0
PHP Version: 5.2.1
New Comment:
I had just compiled it successful.
I think this script is a useful information for many guys.
#!/bin/sh
#install libxml2-2.6.11 for openssl
tar zxvf libxml2-2.6.11.tar.gz
cd ./libxml2-2.6.11/
./configure
make
make install
cd ../
##install openssl-0.9.6 for net-snmp-5.0.7
##install openssl-0.9.8e for net-snmp-5.3.1
tar zxvf openssl-0.9.8e.tar.gz
cd ./openssl-0.9.8e
./config
make
make install
cd ../
##install net-snmp
tar zxvf net-snmp-5.3.1.tar.gz
cd ./net-snmp-5.3.1
./configure --with-openssl=/usr/local/ssl
### -Press return to continue- enter
### Default version of SNMP to use (3): enter
### System Contact Informaiton (root@):enter
### System Location(Unknow): enter
### Location to write logfile(/var/log/snmpd.log): enter
### Location to write persistent information (/var/net-snmp):enter
###
make
make install
cd ../
###install httpd
tar zxvf httpd-2.2.3.tar.gz
cd ./httpd-2.2.3
./configure --enable-so
make
make install
cd ../
#### install php
tar zxvf php-5.2.1.tar.gz
cd ./php-5.2.1
./configure --with-snmp=/usr/local
--with-apxs2=/usr/local/apache2/bin/apxs --enable-ucd-snmp-hack
#./configure --with-snmp=/usr/local --with-openssl
--with-apxs2=/usr/local/apache2/bin/apxs --enable-ucd-snmp-hack
make
make install
#cd ../
#####
cd ../
Previous Comments:
------------------------------------------------------------------------
[2007-03-21 05:09:46] chenberschen at yahoo dot com dot tw
Description:
------------
When I try to compile php-5.2.1 with net-snmp-5.3.1, I get configure:
error: SNMP sanity check failed.
php-5.1.6 with net-snmp-5.3.1 also has the same problme.
But, php-5.1.6 with net-snmp-5.0.7 has no problem.
php-5.2.1 with net-snmp-5.0.7 also has no problem.
Reproduce code:
---------------
On RedHat9.0
#tar zxvf net-snmp-5.3.1.tar.gz
#cd ./net-snmp-5.3.1
#./configure
#make;make install
#cd ..
#tar zxvf php-5.2.1.tar.gz
#cd ./php-5.2.1
#./configure --with-snmp=/usr/local
Expected result:
----------------
Will get fine mesage:
Thank for using php.
Then you can #make
,php-5.2.1 with net-snmp-5.0.7 is fine.
Actual result:
--------------
you will got failed.
checking for SNMP support... yes
checking OpenSSL dir for SNMP... no
checking for snmp_parse_oid in -lnetsnmp... no
checking for init_snmp in -lnetsnmp... no
configure: error: SNMP sanity check failed. Please check config.log for
more information.
configure: failed program was:
#line 85541 "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:85685: checking for init_snmp in -lnetsnmp
configure:85704: gcc -o conftest -I/usr/include -g -O2 -L/usr/lib
-Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/local/ssl/lib
-L/usr/local/ssl/lib conftest.c -lnetsnmp -lrt -lresolv -lm -ldl -lnsl
-lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lnetsnmp -lcrypto -lm
1>&5
/usr/local/lib/libnetsnmp.so: undefined reference to `des_cbc_encrypt'
/usr/local/lib/libnetsnmp.so: undefined reference to `des_key_sched'
/usr/local/lib/libnetsnmp.so: undefined reference to
`des_ncbc_encrypt'
collect2: ld returned 1 exit status
configure: failed program was:
#line 85693 "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; }
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40876&edit=1