Skip to contentSkip to conversation

[LARTC} how can I compile tc

LARTC John Baker 2 participants 4 messages Mar 23, 2007 – Mar 26, 2007

lore
Share & tools
lore

John Baker

author
#0 lore raw

Ok, I tried it out but for some reason it doesn't take for the compile process. This is, after export KERNEL_INCLUDE=/usr/src/linux/include/ if I run export this declare -x KERNEL_INCLUDE="/usr/src/linux/include/" is there. But when I run make in iproute2 I still get the /usr/include/linux/ip.h:93:2: error: #error "Endian problem - this didn't happen" error.

I tried to circumvent this by moving the /usr/include/linux directory to /usr/include/linux.old and then making /usr/include/linux a soft link pointing to /usr/src/linux/include and got a different set of errors as follows.

make[1]: Entering directory `/usr/src/iproute-2.6.20-070313/lib' gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -c -o ll_map.o ll_map.c
In file included from /usr/include/bits/posix1_lim.h:153,
from /usr/include/limits.h:144,
from /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:122, from /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:7, from /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:11, from /usr/include/bits/socket.h:31,
from /usr/include/sys/socket.h:35,
from ll_map.c:18:
/usr/include/bits/local_lim.h:36:26: error: linux/limits.h: No such file or directory
In file included from ../include/linux/netlink.h:5,
from ../include/libnetlink.h:5,
from ll_map.c:23:
../include/linux/types.h:5:31: error: linux/posix_types.h: No such file or directory
In file included from ../include/linux/netlink.h:5,
from ../include/libnetlink.h:5,
from ll_map.c:23:
../include/linux/types.h:166: error: syntax error before ‘__kernel_daddr_t’ ../include/linux/types.h:166: warning: no semicolon at end of struct or union
../include/linux/types.h:167: warning: type defaults to ‘int’ in declaration of ‘f_tinode’
../include/linux/types.h:167: warning: data definition has no type or storage class
../include/linux/types.h:170: error: syntax error before ‘}’ token make[1]: *** [ll_map.o] Error 1
make[1]: Leaving directory `/usr/src/iproute-2.6.20-070313/lib'
make: *** [all] Error 2

The first time I tried this I forgot to run make clean after trying to compile it against the original /usr/include/linux/ and it actually got past the initial endian error and died trying to compile tc. When I ran make clean and tried I go the above error.

Any other thoughts?

Thanks

John

Quoted 14 lines · Andy Furniss
Quoted 5 lines · John Baker

I'm having a bunch of troubles with this as well. I'm using Ubuntu Dapper with vanilla kernel 2.6.20.3.

The iproute2-2.6.20 compile dies right away after

Maybe you are using the wrong headers - before the build do -

export KERNEL_INCLUDE=/path/to/your/linux-2.6.20.3/include/

don't build against anything in /usr/include/linux

Andy.

Signature · 9 lines
John Baker
Network Systems Administrator
Marlboro College
Phone: 451-7551 off campus; 551 on campus 

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
#1 lore raw
Quoted 11 lines · John Baker

Ok, I tried it out but for some reason it doesn't take for the compile process. This is, after export KERNEL_INCLUDE=/usr/src/linux/include/ if I run export this declare -x KERNEL_INCLUDE="/usr/src/linux/include/" is there. But when I run make in iproute2 I still get the /usr/include/linux/ip.h:93:2: error: #error "Endian problem - this didn't happen" error.

I tried to circumvent this by moving the /usr/include/linux directory to /usr/include/linux.old and then making /usr/include/linux a soft link pointing to /usr/src/linux/include and got a different set of errors as follows.

You shouldn't have to do this - maybe just maybe playing with symlinks can help build some old out of tree stuff, but you shouldn't need to do it here.

I don't know what distros do nowadays (use LFS myself), but the very existance of /usr/src/linux link to tree is depreciated.

Why do you need to build a new tc - unless you need the latest features your distro should already have it & I think it should work with a new kernel.

If you really need it, I assume you have built your own 2.6.20.3?

Where is it, what did you do? If after configuring/building it you cleaned with make mrproper that will be too clean to build against - make clean should be OK.

Quoted 4 lines

The first time I tried this I forgot to run make clean after trying to compile it against the original /usr/include/linux/ and it actually got past the initial endian error and died trying to compile tc. When I ran make clean and tried I go the above error.

I would expect tc to fail - you need the git version.

Generally if I have the tar and fail a build I just delete and start again - not saying that will help in this case.

If your distro has git already installed great - if not you can get it from here

http://kernel.org/pub/software/scm/git/git-1.5.0.5.tar.bz2

install where you want - see INSTALL

to get the iproute2 git do -

git clone
git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git

(as one line) and it will get the latest iproute2 tree for you.

Andy
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

author
#2 lore raw
In reply to John Baker

The story here is that I'm am using instructions my predecessor left for building a packet shapeing firewall and trying to update them for a new box that needs some drivers in the newer kernel version. (I can go back, use older versions and manually insert stuff but it makes more sense to try the latest stuff first)

I need to build tc because it needs to be patched with esfq-2.6.20/esfq-iproute2.patch.

So I built the Linux 2.6.20.3 with the necessary patches and left it in /usr/src/linux-2.6.20.3 with a /usr/src/linux symlink pointing to it. I didn't do anything after setting it up.

The git version unfortunatly won't compile either. I get this:

../include/linux/types.h:166: error: syntax error before ‘__kernel_daddr_t’ ../include/linux/types.h:166: warning: no semicolon at end of struct or union
../include/linux/types.h:167: warning: type defaults to ‘int’ in declaration of ‘f_tinode’
../include/linux/types.h:167: warning: data definition has no type or storage class
../include/linux/types.h:170: error: syntax error before ‘}’ token make[1]: *** [ll_map.o] Error 1
make[1]: Leaving directory `/usr/src/iproute2/lib'
make: *** [all] Error 2

I'm going to see if I can get iproute 2.6.19 working with this. It seemed to compile once but without the proper patches. If not, I'll have to move back to the 2.6.15 versions that are already prove.

Unless you have some other suggestion for hte above error.

thanks for you help either way.

John

Quoted 58 lines · Andy Furniss
Quoted 11 lines · John Baker

Ok, I tried it out but for some reason it doesn't take for the compile process. This is, after export KERNEL_INCLUDE=/usr/src/linux/include/ if I run export this declare -x KERNEL_INCLUDE="/usr/src/linux/include/" is there. But when I run make in iproute2 I still get the /usr/include/linux/ip.h:93:2: error:
#error "Endian problem - this didn't happen" error.

I tried to circumvent this by moving the /usr/include/linux directory to /usr/include/linux.old and then making /usr/include/linux a soft link pointing to /usr/src/linux/include and got a different set of errors as follows.

You shouldn't have to do this - maybe just maybe playing with symlinks can help build some old out of tree stuff, but you shouldn't need to do it here.

I don't know what distros do nowadays (use LFS myself), but the very existance of /usr/src/linux link to tree is depreciated.

Why do you need to build a new tc - unless you need the latest features your distro should already have it & I think it should work with a new kernel.

If you really need it, I assume you have built your own 2.6.20.3?

Where is it, what did you do? If after configuring/building it you cleaned with make mrproper that will be too clean to build against - make clean should be OK.

Quoted 4 lines

The first time I tried this I forgot to run make clean after trying to compile it against the original /usr/include/linux/ and it actually got past the initial endian error and died trying to compile tc. When I ran make clean and tried I go the above error.

I would expect tc to fail - you need the git version.

Generally if I have the tar and fail a build I just delete and start again - not saying that will help in this case.

If your distro has git already installed great - if not you can get it from here

http://kernel.org/pub/software/scm/git/git-1.5.0.5.tar.bz2

install where you want - see INSTALL

to get the iproute2 git do -

git clone
git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git

(as one line) and it will get the latest iproute2 tree for you.

Andy

Signature · 9 lines
John Baker
Network Systems Administrator
Marlboro College
Phone: 451-7551 off campus; 551 on campus 

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
#3 lore raw
In reply to John Baker
Quoted 27 lines · John Baker

The story here is that I'm am using instructions my predecessor left for building a packet shapeing firewall and trying to update them for a new box that needs some drivers in the newer kernel version. (I can go back, use older versions and manually insert stuff but it makes more sense to try the latest stuff first)

I need to build tc because it needs to be patched with esfq-2.6.20/esfq-iproute2.patch.

So I built the Linux 2.6.20.3 with the necessary patches and left it in /usr/src/linux-2.6.20.3 with a /usr/src/linux symlink pointing to it. I didn't do anything after setting it up.

The git version unfortunatly won't compile either. I get this:

../include/linux/types.h:166: error: syntax error before ‘__kernel_daddr_t’ ../include/linux/types.h:166: warning: no semicolon at end of struct or union
../include/linux/types.h:167: warning: type defaults to ‘int’ in declaration of ‘f_tinode’
../include/linux/types.h:167: warning: data definition has no type or storage class
../include/linux/types.h:170: error: syntax error before ‘}’ token make[1]: *** [ll_map.o] Error 1
make[1]: Leaving directory `/usr/src/iproute2/lib'
make: *** [all] Error 2

Quoted 5 lines

I'm going to see if I can get iproute 2.6.19 working with this. It seemed to compile once but without the proper patches. If not, I'll have to move back to the 2.6.15 versions that are already prove.

Unless you have some other suggestion for hte above error.

I just tried with esfq patches and it still works for me. I notice Correy has started using netfilter - I bet that will take some maintaining, but it doesn't look like it's anything to do with your error.

What is your arch 64bit? I only have 32bit to test with.

My desktop is fairly old tools (LFS 5.1 IIRC - it was still 2.4 I think before I migrated it) - if you are really really old maybe that could hurt you.

Maybe you could try a quick test - no need to build the kernel, but you must configure. For me make menuconfig picks up my last config because I put it in /boot YMMV of course you may need to find/import your config then just exit and save. My configs have pretty much everything tc/qos related selected as modules.

Don't bother with esfq just see if you can build against a vanilla kernel.

just to complicate things git doesn't work for me today -

Initialized empty Git repository in /home/andy/Kern-test/git-test/iproute2.git/.git/
fatal: The remote end hung up unexpectedly
fetch-pack from 'git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/' failed.

But I kept a clean copy of it from the other day, so just used that, I've put a copy up so we know we are using the same thing.

Anyway - just as a user try somewhere -

mkdir tc-test
cd tc-test
wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.3.tar.bz2 wget www.andyqos.ukfsn.org/iproute2-git.tar.bz2
tar xjf linux-2.6.20.3.tar.bz2
tar xjf iproute2-git.tar.bz2
cd linux-2.6.20.3
make [whateveryouuse]config

load/hope it found your recent config exit/save

cd ../iproute2-git
export KERNEL_INCLUDE=/full/path/to/tc-test/linux-2.6.20.3/include/ make

If it still fails maybe we should cc Stephen again :-)

Andy.

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc