Hello
I've tried to compile net-snmp with lm-sensors after configuring it with:
--with-mib-modules=ucd-snmp/lmSensors --with-ldflags=-lsensors
net-snmp-5.7.2
lm_sensors-3.3.3
glibc-2.17
Code:
libtool: link: ranlib .libs/libnetsnmpagent.a
libtool: link: ( cd ".libs" && rm -f "libnetsnmpagent.la" && ln -s "../libnetsnmpagent.la" "libnetsnmpagent.la" )
: libnetsnmpagent.la
making all in /root/net-snmp-5.7.2/agent/helpers
make[2]: Entering directory `/root/net-snmp-5.7.2/agent/helpers'
make[2]: Leaving directory `/root/net-snmp-5.7.2/agent/helpers'
making all in /root/net-snmp-5.7.2/agent/mibgroup
make[2]: Entering directory `/root/net-snmp-5.7.2/agent/mibgroup'
/bin/sh ../../libtool --mode=compile gcc -I../../include -I. -I../../agent -I../../agent/mibgroup -I../../snmplib -fno-strict-aliasing -g -O2 -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/perl5/CORE -c -o ucd-snmp/lmSensors.lo ucd-snmp/lmSensors.c
libtool: compile: gcc -I../../include -I. -I../../agent -I../../agent/mibgroup -I../../snmplib -fno-strict-aliasing -g -O2 -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/perl5/CORE -c ucd-snmp/lmSensors.c -fPIC -DPIC -o ucd-snmp/.libs/lmSensors.o
ucd-snmp/lmSensors.c: In function '_sensor_load':
ucd-snmp/lmSensors.c:950:5: error: unknown type name 'sensors_feature_data'
ucd-snmp/lmSensors.c:972:5: warning: passing argument 1 of 'sensors_get_detected_chips' from incompatible pointer type [enabled by default]
In file included from ucd-snmp/lmSensors.c:96:0:
/usr/include/sensors/sensors.h:128:26: note: expected 'const struct sensors_chip_name *' but argument is of type 'int *'
ucd-snmp/lmSensors.c:972:5: error: too few arguments to function 'sensors_get_detected_chips'
In file included from ucd-snmp/lmSensors.c:96:0:
/usr/include/sensors/sensors.h:128:26: note: declared here
ucd-snmp/lmSensors.c:976:22: warning: assignment makes pointer from integer without a cast [enabled by default]
ucd-snmp/lmSensors.c:980:22: error: request for member 'mode' in something not a structure or union
ucd-snmp/lmSensors.c:981:22: error: request for member 'mapping' in something not a structure or union
ucd-snmp/lmSensors.c:981:35: error: 'SENSORS_NO_MAPPING' undeclared (first use in this function)
ucd-snmp/lmSensors.c:981:35: note: each undeclared identifier is reported only once for each function it appears in
ucd-snmp/lmSensors.c:982:47: error: request for member 'number' in something not a structure or union
ucd-snmp/lmSensors.c:982:17: error: incompatible type for argument 1 of 'sensors_get_label'
In file included from ucd-snmp/lmSensors.c:96:0:
/usr/include/sensors/sensors.h:104:7: note: expected 'const struct sensors_chip_name *' but argument is of type 'sensors_chip_name'
ucd-snmp/lmSensors.c:982:17: error: too many arguments to function 'sensors_get_label'
In file included from ucd-snmp/lmSensors.c:96:0:
/usr/include/sensors/sensors.h:104:7: note: declared here
ucd-snmp/lmSensors.c:983:49: error: request for member 'number' in something not a structure or union
make[2]: *** [ucd-snmp/lmSensors.lo] Error 1
make[2]: Leaving directory `/root/net-snmp-5.7.2/agent/mibgroup'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/root/net-snmp-5.7.2/agent'
make: *** [subdirs] Error 1
Do you have any idea what can wrong in here?