Ubuntu 19.10
snmp v5.8-585-g4efee9f06
Configuring & compiling with:
./configure --build=x86_64-pc-linux-gnu \ --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --with-logfile="/var/log/snmpd.log" --with-persistent-directory="/var/net-snmp" \ --enable-blumenthal-aes \ --enable-embedded-perl \ --enable-ipv6 \ --enable-mib-config-checking \ --enable-shared \ --with-default-snmp-version="3" --with-sys-contact="noone@no.where" --with-sys-location="Unknown" \ --with-mib-modules="agent_mibs agentx disman/event disman/schedule etherlike-mib host mibII misc/ipfwacc notification sctp-mib smux snmpv3mibs target tunnel ucd_snmp ucd-snmp/diskio ucd-snmp/lmSensors utilities" \ --with-mysql \ --with-openssl \ --with-perl-modules \ --without-python-modules \ --with-security-modules="usm ksm tsm" \ --with-systemd \ --with-transports="UDP UDPIPv6 TCP TCPIPv6 DTLSUDP TLSTCP" make
leads to:
ucd-snmp/diskio.c: In function 'getstats': ucd-snmp/diskio.c:1428:2: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, sizeof(buffer), parts); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ucd-snmp/diskio.c:1429:2: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, sizeof(buffer), parts); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ libtool: compile: gcc -I../../include -I. -I../../agent -I../../agent/mibgroup -I/usr/include/libnl3 -I../../snmplib -I/usr/include/libnl3 -D_GNU_SOURCE -D_ALL_SOURCE -D_THREAD_SAFE -D__EXTENSIONS__ -isystem /usr/include/mit-krb5 -g -O2 -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -DNETSNMP_REMOVE_U64 -g -O2 -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/x86_64-linux-gnu/perl/5.28/CORE -Wall -Wextra -Wstrict-prototypes -Wwrite-strings -Wcast-qual -Wimplicit-fallthrough=2 -Wlogical-op -Wno-format-truncation -Wno-missing-field-initializers -Wno-sign-compare -Wno-unused-parameter -Wno-type-limits -c ucd-snmp/diskio.c -o ucd-snmp/diskio.o >/dev/null 2>&1 /bin/bash ../../libtool --mode=compile gcc -I../../include -I. -I../../agent -I../../agent/mibgroup -I/usr/include/libnl3 -I../../snmplib -I/usr/include/libnl3 -D_GNU_SOURCE -D_ALL_SOURCE -D_THREAD_SAFE -D__EXTENSIONS__ -isystem /usr/include/mit-krb5 -g -O2 -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -DNETSNMP_REMOVE_U64 -g -O2 -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/x86_64-linux-gnu/perl/5.28/CORE -Wall -Wextra -Wstrict-prototypes -Wwrite-strings -Wcast-qual -Wimplicit-fallthrough=2 -Wlogical-op -Wno-format-truncation -Wno-missing-field-initializers -Wno-sign-compare -Wno-unused-parameter -Wno-type-limits -c -o ucd-snmp/lmSensors.lo ucd-snmp/lmSensors.c libtool: compile: gcc -I../../include -I. -I../../agent -I../../agent/mibgroup -I/usr/include/libnl3 -I../../snmplib -I/usr/include/libnl3 -D_GNU_SOURCE -D_ALL_SOURCE -D_THREAD_SAFE -D__EXTENSIONS__ -isystem /usr/include/mit-krb5 -g -O2 -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -DNETSNMP_REMOVE_U64 -g -O2 -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/x86_64-linux-gnu/perl/5.28/CORE -Wall -Wextra -Wstrict-prototypes -Wwrite-strings -Wcast-qual -Wimplicit-fallthrough=2 -Wlogical-op -Wno-format-truncation -Wno-missing-field-initializers -Wno-sign-compare -Wno-unused-parameter -Wno-type-limits -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:11: error: unknown type name 'sensors_feature_data' const sensors_feature_data *data; ^~~~~~~~~~~~~~~~~~~~ ucd-snmp/lmSensors.c:972:47: warning: passing argument 1 of 'sensors_get_detected_chips' from incompatible pointer type [-Wincompatible-pointer-types] while ((chip = sensors_get_detected_chips(&chip_nr))) { ^~~~~~~~ In file included from ucd-snmp/lmSensors.c:96: /usr/include/sensors/sensors.h:130:26: note: expected 'const sensors_chip_name *' {aka 'const struct sensors_chip_name *'} but argument is of type 'int *' const sensors_chip_name *sensors_get_detected_chips(const sensors_chip_name ^~~~~~~~~~~~~~~~~~~~~~~~~~ ucd-snmp/lmSensors.c:972:20: error: too few arguments to function 'sensors_get_detected_chips' while ((chip = sensors_get_detected_chips(&chip_nr))) { ^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ucd-snmp/lmSensors.c:96: /usr/include/sensors/sensors.h:130:26: note: declared here const sensors_chip_name *sensors_get_detected_chips(const sensors_chip_name ^~~~~~~~~~~~~~~~~~~~~~~~~~ ucd-snmp/lmSensors.c:976:24: warning: implicit declaration of function 'sensors_get_all_features'; did you mean 'sensors_get_all_subfeatures'? [-Wimplicit-function-declaration] while ((data = sensors_get_all_features(*chip, &a, &b))) { ^~~~~~~~~~~~~~~~~~~~~~~~ sensors_get_all_subfeatures ucd-snmp/lmSensors.c:976:22: warning: assignment to 'const int *' from 'int' makes pointer from integer without a cast [-Wint-conversion] while ((data = sensors_get_all_features(*chip, &a, &b))) { ^ ucd-snmp/lmSensors.c:980:22: error: request for member 'mode' in something not a structure or union if ((data->mode & SENSORS_MODE_R) && ^~ ucd-snmp/lmSensors.c:981:22: error: request for member 'mapping' in something not a structure or union (data->mapping == SENSORS_NO_MAPPING) && ^~ ucd-snmp/lmSensors.c:981:35: error: 'SENSORS_NO_MAPPING' undeclared (first use in this function); did you mean 'SENSORS_COMPUTE_MAPPING'? (data->mapping == SENSORS_NO_MAPPING) && ^~~~~~~~~~~~~~~~~~ SENSORS_COMPUTE_MAPPING 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 !sensors_get_label(*chip, data->number, &label) && ^~ ucd-snmp/lmSensors.c:982:36: error: incompatible type for argument 1 of 'sensors_get_label' !sensors_get_label(*chip, data->number, &label) && ^~~~~ In file included from ucd-snmp/lmSensors.c:96: /usr/include/sensors/sensors.h:106:7: note: expected 'const sensors_chip_name *' {aka 'const struct sensors_chip_name *'} but argument is of type 'sensors_chip_name' {aka 'const struct sensors_chip_name'} char *sensors_get_label(const sensors_chip_name *name, ^~~~~~~~~~~~~~~~~ ucd-snmp/lmSensors.c:982:18: error: too many arguments to function 'sensors_get_label' !sensors_get_label(*chip, data->number, &label) && ^~~~~~~~~~~~~~~~~ In file included from ucd-snmp/lmSensors.c:96: /usr/include/sensors/sensors.h:106:7: note: declared here char *sensors_get_label(const sensors_chip_name *name, ^~~~~~~~~~~~~~~~~ ucd-snmp/lmSensors.c:983:18: warning: implicit declaration of function 'sensors_get_feature'; did you mean 'sensors_get_features'? [-Wimplicit-function-declaration] !sensors_get_feature(*chip, data->number, &val)) { ^~~~~~~~~~~~~~~~~~~ sensors_get_features ucd-snmp/lmSensors.c:983:49: error: request for member 'number' in something not a structure or union !sensors_get_feature(*chip, data->number, &val)) { ^~ make[2]: *** [Makefile:100: ucd-snmp/lmSensors.lo] Error 1
The whole build log is attached.
Are you sure about the Ubuntu version? According to https://wiki.ubuntu.com/Releases the latest version is 19.04.
Please also provide the lmsensors version.
Yes I'm sure. I use the develoment version 'eoan'.
How can I download and install Ubuntu 19.10?
You need to
I can reproduce the build failure. Do you really need the UCD implementation of the sensors MIB (ucd-snmp/lmSensors)? I'm asking this because there is a newer implementation of the sensors MIB that builds fine on Ubuntu 19.10, namely hardware/sensors.
hardware/sensors is fine if it can be interpreted/used by OpenNMS.
./configure --help
does not show hardware/sensors Any other MIB not shown by ../configure --help
that I should know about?These are the MIBs I enable when running unit tests:
Very helpful!
Any reason why you don't use the following mibs?
Also, ./configure offers the possibility to use
ucd_snmp
mib: does it include allucd_snmp/*
?I think that --with-mib-modules enables additional MIBs on top of the default and that the MIBs you mentioned are enabled by default. On the master branch the list I mentioned gets expanded by the configure script into the following:
Nice!
You must have used a hidden ./configure option because I couldn't see anything allowing a complete list of all available mibs for the current host.
I tried your list, but it fails to compile unfortuantely:
That MIB list is the result of analyzing the output of the following grep command:
git grep -nH config_require agent/mibgroup
.The host/data_access/swinst_rpm code can only be built on RPM-based systems so not on Debian systems.
The solution is to remove
host/data_access/swinst_rpm
and it compiles fine!However, now snmpd crashes:
syslog:
Last edit: Jean-christophe Manciot 2019-06-29
Debugging with gdb:
A workaround is to configure without any sctp-mib: