Hi all, I was trying to compile the net-snmp souce code with the module 'disman/ping-mib' added.
./configure --prefix=/usr --with-mib-modules=disman/ping-mib But I failed with such errors: gcc -I../../include -I. -I../../agent -I../../agent/mibgroup -I../../snmplib -g -O2 -Dlinux -c disman/ping/pingCtlTable.c -fPIC -DPIC -o disman/ping/.libs/pingCtlTable.lo In file included from disman/ping/pingCtlTable.c:44: disman/ping/pingCtlTable.h:98:17: in6.h: No such file or directory disman/ping/pingCtlTable.h:99:18: ipv6.h: No such file or directory disman/ping/pingCtlTable.c: In function `parse_reply': disman/ping/pingCtlTable.c:5679: error: invalid use of undefined type `struct ipv6hdr' disman/ping/pingCtlTable.c:5689: error: invalid application of `sizeof' to an incomplete type disman/ping/pingCtlTable.c:5692: error: dereferencing pointer to incomplete typedisman/ping/pingCtlTable.c:5695: error: dereferencing pointer to incomplete typemake[2]: *** [disman/ping/pingCtlTable.lo] Error 1 make[2]: Leaving directory `/root/net-snmp-5.2.1.2/agent/mibgroup' make[1]: *** [subdirs] Error 1 make[1]: Leaving directory `/root/net-snmp-5.2.1.2/agent' make: *** [subdirs] Error 1 Obviously, the included files are missing. Then I opened the file `pingCtlTable.h', here's the code snippet: /* #include <linux/in6.h> */ /* #include <linux/ipv6.h> */ #include "in6.h" #include "ipv6.h" After viewing the above code, I would tend to think that the author originally had two methods to handle the headers. Therefore I changed the above code to: #include <linux/in6.h> #include <linux/ipv6.h> /* #include "in6.h" */ /* #include "ipv6.h" */ But I still failed with the error shown below: gcc -I../../include -I. -I../../agent -I../../agent/mibgroup -I../../snmplib -g -O2 -Dlinux -c disman/ping/pingCtlTable.c -fPIC -DPIC -o disman/ping/.libs/pingCtlTable.lo In file included from disman/ping/pingCtlTable.h:95, from disman/ping/pingCtlTable.c:44: /usr/include/linux/in6.h:31: error: redefinition of `struct in6_addr' /usr/include/linux/in6.h:54: error: redefinition of `struct sockaddr_in6' /usr/include/linux/in6.h:62: error: redefinition of `struct ipv6_mreq' In file included from disman/ping/pingCtlTable.h:96, from disman/ping/pingCtlTable.c:44: /usr/include/linux/ipv6.h:19: error: redefinition of `struct in6_pktinfo' make[2]: *** [disman/ping/pingCtlTable.lo] Error 1 make[2]: Leaving directory `/root/net-snmp-5.2.1.2/agent/mibgroup' make[1]: *** [subdirs] Error 1 make[1]: Leaving directory `/root/net-snmp-5.2.1.2/agent' make: *** [subdirs] Error 1 The re-definition error. I'm puzzled. Anyone who knows how to solve the problem? Thanks in advance. Best regards, Guanqun Lu ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders