2002-12-13 23:43:40

by Axel Siebenwirth

[permalink] [raw]
Subject: Compiling iproute2(w/HTB patch) for 2.5.51

Hi,

having read an article about QoS and HTB in a German computer magazine I
wanted to implement such thing on my linux router running kernel 2.5.51.
First I patched the iproute2-020116.tar.gz package with the htb3.6_tc.diff
from http://luxik.cdi.cz/~devik/qos/htb/ and started building it. But
unfortunately it resulted in strange compile errors I do not understand.

Hope this is some help for you and I am not doing something terribly wrong.

Best regards,
Axel Siebenwirth

make[1]: Entering directory /usr/local/src/iproute2/misc'
gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g -I../include-glibc
-I/usr/include/db3 -include ../include-glibc/glibc-bugs.h
-I/usr/src/linux/include -I../include -DRESOLVE_HOSTNAMES -c -o ss.o ss.c
In file included from /usr/src/linux/include/linux/skbuff.h:19,
from /usr/src/linux/include/linux/tcp.h:20,
from ss.c:36:
/usr/src/linux/include/linux/time.h:9: redefinition of `struct timespec'
/usr/src/linux/include/linux/time.h:15: redefinition of `struct timeval'
In file included from /usr/src/linux/include/linux/skbuff.h:19,
from /usr/src/linux/include/linux/tcp.h:20,
from ss.c:36:
/usr/src/linux/include/linux/time.h:146:1: warning: "FD_SET" redefined
In file included from /usr/include/sys/types.h:215,
from ../include-glibc/glibc-bugs.h:5,
from <command line>:1:
/usr/include/sys/select.h:89:1: warning: this is the location of the
previous definition
In file included from /usr/src/linux/include/linux/skbuff.h:19,
from /usr/src/linux/include/linux/tcp.h:20,
from ss.c:36:
/usr/src/linux/include/linux/time.h:147:1: warning: "FD_CLR" redefined
In file included from /usr/include/sys/types.h:215,
from ../include-glibc/glibc-bugs.h:5,
from <command line>:1:
/usr/include/sys/select.h:90:1: warning: this is the location of the
previous definition
In file included from /usr/src/linux/include/linux/skbuff.h:19,
from /usr/src/linux/include/linux/tcp.h:20,
from ss.c:36:
/usr/src/linux/include/linux/time.h:148:1: warning: "FD_ISSET" redefined
In file included from /usr/include/sys/types.h:215,
from ../include-glibc/glibc-bugs.h:5,
from <command line>:1:
/usr/include/sys/select.h:91:1: warning: this is the location of the
previous definition
In file included from /usr/src/linux/include/linux/skbuff.h:19,
from /usr/src/linux/include/linux/tcp.h:20,
from ss.c:36:
/usr/src/linux/include/linux/time.h:149:1: warning: "FD_ZERO" redefined
In file included from /usr/include/sys/types.h:215,
from ../include-glibc/glibc-bugs.h:5,
from <command line>:1:
/usr/include/sys/select.h:92:1: warning: this is the location of the
previous definition
In file included from /usr/src/linux/include/linux/sched.h:12,
from /usr/src/linux/include/linux/mm.h:4,
from /usr/src/linux/include/linux/skbuff.h:25,
from /usr/src/linux/include/linux/tcp.h:20,
from ss.c:36:
/usr/src/linux/include/linux/jiffies.h:11: parse error before "jiffies_64"
/usr/src/linux/include/linux/jiffies.h:11: warning: type defaults to nt'
in declaration of
iffies_64'
/usr/src/linux/include/linux/jiffies.h:11: warning: data definition has no
type
or storage class
In file included from /usr/src/linux/include/linux/sched.h:20,
from /usr/src/linux/include/linux/mm.h:4,
from /usr/src/linux/include/linux/skbuff.h:25,
from /usr/src/linux/include/linux/tcp.h:20,
from ss.c:36:
/usr/src/linux/include/asm/mmu.h:13: field `sem' has incomplete type
/usr/src/linux/include/asm/mmu.h:15: confused by earlier errors, bailing out
make[1]: *** [ss.o] Error 1
make[1]: Leaving directory /usr/local/src/iproute2/misc'


2002-12-13 23:48:55

by Axel Siebenwirth

[permalink] [raw]
Subject: Re: Compiling iproute2(w/HTB patch) for 2.5.51

Hi again!

On Sat, 14 Dec 2002, [email protected] wrote:

> having read an article about QoS and HTB in a German computer magazine I
> wanted to implement such thing on my linux router running kernel 2.5.51.
> First I patched the iproute2-020116.tar.gz package with the htb3.6_tc.diff
> from http://luxik.cdi.cz/~devik/qos/htb/ and started building it. But
> unfortunately it resulted in strange compile errors I do not understand.
>
> make[1]: *** [ss.o] Error 1
> make[1]: Leaving directory /usr/local/src/iproute2/misc'

There are no such problems with 2.4.20.

Axel

2002-12-16 06:19:08

by Mikael Starvik

[permalink] [raw]
Subject: RE: Compiling iproute2(w/HTB patch) for 2.5.51

I have the exact same problem with sysklogd and I found
that linux/module.h has a lot of new includes in 2.5
that indirectly brings in a lot of .h files that
shouldn't be included from userspace.

Because of this you get both the compilers definition
of FD_SET etc and the kernels version. I have not yet
had the time to find out how to solve this but the
solution is either to remove some includes or to add
more #ifdef __KERNEL__.

Question 1: Should it at all be possible to compile
applications with 2.5.x headers?

Question 2: Is there any chance that we can remove
or #ifdef some includes in module.h (e.g. sched.h)?

/Mikael