On Mon Sep 06 02:20:54 2010, mattcpan wrote:
Show quoted text> I tried to build this module with CPAN download. It would not build
> since the version of installed SNMP does not match the version...
>
> When I tried to run make, I am getting errors compiling the snmp.c file
> stating the net-snmp/net-snmp-config.h and net-snmp/net-snmp-includes.h
> can not be found. It does not look like it was included in the Linux
> tar/gzip file and I believe it should be included...
I found out this problem is due to missing gcc libraries which needed to
be downloaded and installed. There is another issue that should be fixed
for gcc versions 4.4.3 which requires the change of the included header
file from varargs.h to stdarg.h...
Here is the log of the compiler before I manually changed the header
name which fixed this problem...
-----------------------------------------------------------------------
matthew@matthew-desktop:~/Downloads/SNMP-5.0401$ make
cc -c -DNETSNMP_ENABLE_IPV6 -g -O2 -DNETSNMP_USE_INLINE -Ulinux
-Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing
-pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/lib/perl/5.10/CORE -I. -I/usr/include
-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"5.0401\"
-DXS_VERSION=\"5.0401\" -fPIC "-I/usr/lib/perl/5.10/CORE" SNMP.c
In file included from /usr/include/net-snmp/library/snmp_logging.h:14,
from /usr/include/net-snmp/library/container.h:19,
from /usr/include/net-snmp/utilities.h:54,
from /usr/include/net-snmp/net-snmp-includes.h:74,
from SNMP.xs:16:
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/include/varargs.h:4:2: error: #error
"GCC no longer implements <varargs.h>."
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/include/varargs.h:5:2: error: #error
"Revise your code to use <stdarg.h>."
SNMP.xs: In function ‘XS_SNMP__bulkwalk’:
SNMP.xs:3968: warning: format not a string literal and no format arguments
SNMP.xs: In function ‘XS_SNMP__translate_obj’:
SNMP.xs:4761: warning: format ‘%s’ expects type ‘char *’, but argument 2
has type ‘int’
make: *** [SNMP.o] Error 1