[quagga-dev 4615] Re: Which Linux Kernel Version?

Andrew J. Schorr aschorr at telemetry-investments.com
Fri Mar 9 17:44:31 GMT 2007


On Fri, Mar 09, 2007 at 01:37:01PM +0000, Paul Jakma wrote:
> Very stange problem this.
> 
> If you compile with:
> 
>    make CFLAGS="-Wall -Os"
> 
> does it work?

Indeed, this is all quite strange.

On FC6/32 bits, this works fine:

   ../../cvs/configure
   make CFLAGS="-Wall -Os"

Without specifying CFLAGS, the build fails almost immediately:

    gcc -DHAVE_CONFIG_H -DSYSCONFDIR=\"/usr/local/etc/\" -I. -I.. -I../../../cvs/lib -I.. -I../../../cvs -I../../../cvs/lib -Os -fno-omit-frame-pointer -g -std=c99 -Wall -Wsign-compare -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wchar-subscripts -Wcast-qual -MT network.lo -MD -MP -MF .deps/network.Tpo -c ../../../cvs/lib/network.c  -fPIC -DPIC -o .libs/network.o
   In file included from /usr/include/linux/rtnetlink.h:5,
		    from ../../../cvs/lib/zebra.h:165,
		    from ../../../cvs/lib/network.c:23:
   /usr/include/linux/if_link.h:43: error: expected specifier-qualifier-list before '__u64'
   In file included from /usr/include/linux/rtnetlink.h:7,
		    from ../../../cvs/lib/zebra.h:165,
		    from ../../../cvs/lib/network.c:23:
   /usr/include/linux/neighbour.h:92: error: expected specifier-qualifier-list before '__u64'

But if I try to build isisd, it fails even with the altered CFLAGS:

   ../../cvs/configure --enable-isisd
   make CFLAGS="-Wall -Os"
   ...
   gcc -DHAVE_CONFIG_H -DSYSCONFDIR=\"/usr/local/etc/\" -I. -I.. -I../../../cvs/isisd -I.. -I../../../cvs -I../../../cvs/lib     -Wall -Os -MT isis_circuit.o -MD -MP -MF .deps/isis_circuit.Tpo -c -o isis_circuit.o ../../../cvs/isisd/isis_circuit.c
   In file included from /usr/include/net/ethernet.h:27,
		    from ../../../cvs/isisd/isis_circuit.c:24:
   /usr/include/linux/if_ether.h:107: error: expected specifier-qualifier-list before ‘__be16’
   ../../../cvs/isisd/isis_circuit.c: In function ‘isis_circuit_type’:
   ../../../cvs/isisd/isis_circuit.c:955: warning: pointer targets in passing argument 1 of ‘string2circuit_t’ differ in signedness

And something I really don't understand is that when I build
on FC6 64 bits, I don't need to change the CFLAGS.  The build
gives the exact same results with or without overriding CFLAGS:
everything except isisd builds fine.

In isisd, 2 files are problematic: isis_circuit.c and isis_network.c.
Both files start like this:

   #include <zebra.h>
   #ifdef GNU_LINUX
   #include <net/ethernet.h>
   #else
   #include <netinet/if_ether.h>
   #endif

Those are the only 2 files in the entire distro that try to
include <net/ethernet.h>...

Regards,
Andy



More information about the Quagga-dev mailing list