php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40876 SNMP sanity check failed
Submitted: 2007-03-21 05:09 UTC Modified: 2007-03-21 09:37 UTC
From: chenberschen at yahoo dot com dot tw Assigned:
Status: Not a bug Package: *Configuration Issues
PHP Version: 5.2.1 OS: RedHat9.0
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: chenberschen at yahoo dot com dot tw
New email:
PHP Version: OS:

 

 [2007-03-21 05:09 UTC] 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; }



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-03-21 06:50 UTC] chenberschen at yahoo dot com dot tw
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 ../
 [2007-03-21 09:37 UTC] tony2001@php.net
Not PHP problem.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 13:01:30 2024 UTC