Hi all,

I've googled and had a quick leaf through the mailing list archives to
see if this has been a problem before, but not found any reference to
it.

When compiling net-snmp 5.2.1 on a Debian (woody) linux machine with
gcc 3.3.5, configured with "configure --with-mib-modules="host
disman"" I'm getting the following 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 type
disman/ping/pingCtlTable.c:5695: error: dereferencing pointer to incomplete type
make[2]: *** [disman/ping/pingCtlTable.lo] Error 1
make[2]: Leaving directory `/home/dan/net-snmp-5.2.1/agent/mibgroup'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/home/dan/net-snmp-5.2.1/agent'
make: *** [subdirs] Error 1
[EMAIL PROTECTED]:~/net-snmp-5.2.1$ gcc --version

>From pingCtlTable.h -
     95 /* #include <linux/in6.h>  */
     96 /* #include <linux/ipv6.h> */
     97 
     98 #include "in6.h"
     99 #include "ipv6.h"

the missing ipv6hdr struct is indeed defined in
/usr/include/linux/ipv6.h, but changing line 99 in the above file to -

#include <linux/ipv6.h>

results in some redifinitions -

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
In file included from /usr/include/linux/ipv6.h:5,
                 from disman/ping/pingCtlTable.h:99,
                 from disman/ping/pingCtlTable.c:44:
/usr/include/linux/in6.h:31: error: redefinition of `struct in6_addr'
/usr/include/linux/in6.h:52: error: redefinition of `struct sockaddr_in6'
/usr/include/linux/in6.h:60: error: redefinition of `struct ipv6_mreq'
In file included from disman/ping/pingCtlTable.h:99,
                 from disman/ping/pingCtlTable.c:44:
/usr/include/linux/ipv6.h:19: error: redefinition of `struct in6_pktinfo'

I've also tried the same with the in6.h file, to no avail.  I'm a bit
stuck as to how I might fix this, short of copying the ipv6hdr struct
from the kernel headers to a header in the net-snmp source.  It isn't
defined in any other header on my system.  I would have thought it
might have been provided under /usr/inlcude/netinet somewhere, but its
not.  I'm guessing that whereever in6_addr, sockaddr_in6, ipv6_mreq
and in6_pktinfo are defined I should also have ipv6hdr, or am I way
off the mark in thinking that ?

Any pointers much appreciated.

cheers,

-
Danw


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to