[Xorp-users] freebsd-5.3

Pavlin Radoslavov pavlin@icir.org
Tue, 24 Aug 2004 23:30:46 -0700


> dear all,
> I always get error messages:
> ------------
> g++ -DHAVE_CONFIG_H -I. -I. -I.. -I..    -g  -W -Wall -Wwrite-strings -Wcast-qua
> l -Werror -Wpointer-arith -Wcast-align -Woverloaded-virtual -ftemplate-depth-20
> -c -o mfea_proto_comm.o `test -f mfea_proto_comm.cc || echo './'`mfea_proto_comm
> .cc
> mfea_proto_comm.cc: In member function `int ProtoComm::proto_socket_write(uint16
> _t, const IPvX&, const IPvX&, int, int, bool, const uint8_t*, size_t)':
> mfea_proto_comm.cc:1521: error: cannot bind packed field `ip->ip::ip_src' to `in
> _addr&'
> mfea_proto_comm.cc:1522: error: cannot bind packed field `ip->ip::ip_dst' to `in
> _addr&'
> gmake[3]: *** [mfea_proto_comm.o] Error 1
> gmake[3]: Leaving directory `/usr/local/sources/xorp-1.0/fea'
> gmake[2]: *** [all-recursive] Error 1
> gmake[2]: Leaving directory `/usr/local/sources/xorp-1.0/fea'
> gmake[1]: *** [all-recursive] Error 1
> gmake[1]: Leaving directory `/usr/local/sources/xorp-1.0'
> gmake: *** [all] Error 2
> --------------
> on FreeBSD-5.3-BETA1 using gcc-3.4.2.
> 
> 
> any clues ?

Dikshie,

This appears to be an issue with the gcc compiler. E.g., recently
"struct ip" (inside <netinet/ip.h>) has been defined as __packed,
hence probably the above compilation error.

Nevertheless, I just commited a work-around fix in
mfea/mfea_proto_comm.cc rev 1.19 and pim/pim_proto_register.cc rev
1.16 (which also suffers from the same compilation problem), hence
please do "cvs update" and get the lastest code from the CVS
repository.

Regards,
Pavlin