Menu

#3 Configure fails to recognize net-snmp

v1.0 (example)
open
nobody
None
1
2015-02-26
2014-03-28
No

When configure is run, it fails to recognize snmp type as net-snmp, even when the "--with-snmp-type=net" argument is used.


From echo output:


[wwaseem@labserver mbrowse-0.4.3]$ ./configure --with-snmp-type=net --with-snmp-include=/home/wwaseem/Projects/nms_apps/netsnmp/net-snmp-5.7.2.1/app/include --with-snmp-lib=/home/wwaseem/Projects/nms_apps/netsnmp/net-snmp-5.7.2.1/app/lib/
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
....
....
....
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for snmp-type... ucd
checking for getservbyname in -lsocket... no
checking for gethostbyname... yes
checking for gethostbyname in -lnsl... yes
checking for EVP_md5 in -lcrypto... yes
checking for kstat_lookup in -lkstat... no
checking for ucd-snmp >= v4.2...

Snmp test source had problems, check your config.log.
Chances are, it couldn't find the headers or libraries.

Also try one of the following switches :
--with-snmp-prefix=PFX
--with-snmp-include=DIR
--with-snmp-lib=DIR
***
configure: error: SNMP checks failed


From config.log:


configure:5288: checking for snmp-type
configure:5373: result: ucd


We were able to generate a fix for this, would you like the configure patch?

Discussion

  • Karel Jakubec

    Karel Jakubec - 2014-04-25

    Hi,
    I tried to reproduce it on Debian but without any success. Nevertheless if you have a patch, please send it - if the cause of bug is clear we will merge it.

    Thanks a lot

     
  • Marcel Šebek

    Marcel Šebek - 2014-07-16

    I guess the problem is that configure is locating libraries in hardcoded locations like /usr/lib or /usr/local/lib, instead of taking compiler defaults. Nowadays, 64bit Debian stores libraries into /usr/lib/x86_64-linux-gnu/, other distros will be similar. As a workaround, one can do ./configure --with-snmp-lib=/usr/lib/x86_64-linux-gnu/, a proper fix would likely be to get rid of the ugly acinclude.m4 and use standard and up-to-date autotools. I'm not an autotools expert, any help with this would be appreciated.

     

Log in to post a comment.