On 4/2/24 01:49, Craig Small via Net-snmp-coders wrote:
Hello All,
  I was attempting to compile the git head of net-snmp. One big change is that uses netlink sockets instead of reading /proc/net/*

The issue is the API is different to the library I can see.

mibgroup/mibII/tcpTable.c:631:12: error: too few arguments to function ‘nl_geterror’
   631 |     return nl_geterror();
       |            ^~~~~~~~~~~

And indeed nl_geterror() requires a int:
https://github.com/tgraf/libnl/blob/master/include/netlink/errno.h#L56 <https://github.com/tgraf/libnl/blob/master/include/netlink/errno.h#L56>
extern const char * nl_geterror(int);

So I'm not exactly sure what netlink library is being used here. I cannot disable this feature either: mibgroup/if-mib/data_access/interface_linux.c:27:2: error: #error libnl-3 is required. Please install the libnl-3 and libnl-route-3 development packages and remove --without-nl from the configure options if necessary.    27 | #error libnl-3 is required. Please install the libnl-3 and libnl-route-3 development packages and remove --without-nl from the configure options if necessary.
       |  ^~~~~

The Net-SNMP configure script detects whether libnl-1 / libnl-3 is
present. The above error message comes from the libnl-3 compat code and
hence means that libnl-3 was not detected. I'm referring to this code:

        if test "x$ac_cv_header_netlink_netlink_h" = xyes; then
            AC_EGREP_HEADER([nl_socket_free], [netlink/socket.h],
                            [AC_DEFINE([HAVE_LIBNL3], [1],
[Define to 1 if <netlink/netlink.h> provides the
                            libnl3 API])])
        fi

Can you please check the configure script logs to see why libnl-3 was
not detected?

Thanks,

Bart.


_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to