[Xorp-hackers] compiler brokes at EtherMac::valid

Adam Greenhalgh adam@hiddennet.net
Tue, 02 Dec 2003 09:50:55 +0000


I was wondering what you were trying to port it too. The compile being
g++ppc does suggest it is going to be a power pc though.

If you just want to try xorp , check out the software section of 
http://www.cs.ucl.ac.uk/staff/a.greenhalgh , it contains a bootable cd
which boots linux with a xorp router running. It optionally loads the
xorp config files from a floppy, please note that the floppy isn't part
of the boot process, it only contains config.

Adam

On Tue, 2003-12-02 at 08:13, Pavlin Radoslavov wrote:
> >    When porting mac.cc, my compiler broken at EtherMac::valid. 
> > Is "buf[s.size() + 1]" definition valid ? Instead, when replace it with fixed size definition the 
> > compiler doesn't complains.
> >    Is it someting to do with my compiler? My compiler is g++ppc (gcc driver version 
> > cygnus-2.7.2-960126 egcs-971225), below is the output of the compiler :
> 
> The variable-length automatic arrays are GCC-ism.
> They are used in few places, because they help to make the code a
> bit simpler.
> 
> It looks like your compiler is from the gcc family so I guess it
> should be able to compile it, but from the compilation error below
> the reason it fails is obvious: "Internal compiler error" (i.e., a
> compiler bug).
> 
> Nevertheless, variable-length arrays make the code more difficult to
> port (as you have noticed already), hence I think we should try to
> get rid of them (especially given that I am probably the most
> frequent user of variable-length arrays :)
> 
> In other words, your solution of using fixed-size definition is the
> right one.
> 
> Thanks,
> Pavlin
> 
> P.S. BTW, what OS are you trying to port XORP to? Please don't tell
> me it is Windows :)
> 
> > 
> > /* 
> >  * ccppc -g -mcpu=860 -ansi -nostdinc -DRW_MULTI_THREAD -D_REENTRANT -fvolatile -fno-builtin	
> >  * -fno-for-scope -I. -IC:\Tornado\target\h -DCPU=PPC860 -c E:\NIP\source\libxorp\mac.cc
> >  * E:\NIP\source\libxorp\mac.cc: In function `static bool EtherMac::valid(const class basic_s 
> >  * tring<char,string_char_traits<char>,__default_alloc_template<true,0> > &)':
> >  * E:\NIP\source\libxorp\mac.cc:113: Internal compiler error.
> >  * E:\NIP\source\libxorp\mac.cc:113: Please submit a full bug report to `egcs-bugs@cygnus.com 
> >  * '.
> >  * make: *** [mac.o] Error 0x1
> >  */
> > 
> > 
> > Edrt
> _______________________________________________
> Xorp-hackers mailing list
> Xorp-hackers@icir.org
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers