Re: how can i compile tc

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
/usr/include/linux/ip.h:93:2: error: #error "Endian problem - this didn't happen"
iptunnel.c: In function ‘parse_args’:
iptunnel.c:62: error: ‘struct iphdr’ has no member named ‘version’
iptunnel.c:63: error: ‘struct iphdr’ has no member named ‘ihl’
make[1]: *** [iptunnel.o] Error 1
make[1]: Leaving directory `/usr/src/iproute-2.6.20-070313/ip'
make: *** [all] Error 2

The iproute2-2.6.19 kicks out that same error (except the last line) and tries to run the whole thing but nothing compiles correctly.
The tc section looks like this:

make[1]: Entering directory `/usr/src/iproute2-2.6.19-061214/tc'
gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DCONFIG_GACT -DCONFIG_GACT_PROB -c -o m_ipt.o m_ipt.c
In file included from ../include/libiptc/libiptc.h:6,
from ../include/iptables.h:5,
from m_ipt.c:20:
../include/linux/netfilter_ipv4/ip_tables.h:20:38: error: linux/netfilter/x_tables.h: No such file or directory
In file included from ../include/libiptc/libiptc.h:6,
from ../include/iptables.h:5,
from m_ipt.c:20:
../include/linux/netfilter_ipv4/ip_tables.h:87: error: field ‘counters’ has incomplete type ../include/linux/netfilter_ipv4/ip_tables.h:115:39: error: linux/netfilter/xt_tcpudp.h: No such file or directory ../include/linux/netfilter_ipv4/ip_tables.h:144: error: ‘XT_FUNCTION_MAXNAMELEN’ undeclared here (not in a function)
In file included from m_ipt.c:20:
../include/iptables.h:56: warning: ‘struct xt_entry_match’ declared inside parameter list ../include/iptables.h:56: warning: its scope is only this definition or declaration, which is probably not what you want ../include/iptables.h:63: warning: ‘struct xt_entry_match’ declared inside parameter list ../include/iptables.h:70: warning: ‘struct xt_entry_match’ declared inside parameter list ../include/iptables.h:74: warning: ‘struct xt_entry_match’ declared inside parameter list
m_ipt.c: In function ‘build_st’:
m_ipt.c:356: error: invalid application of ‘sizeof’ to incomplete type ‘struct xt_entry_target’
m_ipt.c:360: error: dereferencing pointer to incomplete type
m_ipt.c:364: error: dereferencing pointer to incomplete type
m_ipt.c:368: error: dereferencing pointer to incomplete type
m_ipt.c: In function ‘parse_ipt’:
m_ipt.c:499: error: dereferencing pointer to incomplete type
m_ipt.c: In function ‘print_ipt’:
m_ipt.c:547: error: dereferencing pointer to incomplete type
m_ipt.c:559: error: dereferencing pointer to incomplete type
make[1]: *** [m_ipt.o] Error 1
make[1]: Leaving directory `/usr/src/iproute2-2.6.19-061214/tc'

I have very little experience compiling software so I'm not entirely sure where to go from here. How can I try to compile iproute2-2.6.20 with only tc?

As I have installed iptables-1.3.7 and various kernel patches it seems likely that some variation on the fix suggested below would help. But I'm just not sure exactly what I need.

Any suggestions?

Thank

John

Andy Furniss wrote:
Vincent Dautremont wrote:
Hi, i'm just new here,
i'm searching for how to compile tc (if i've understood correctly, i must compile the whole iproute2 thing).

So i did like the read me file said:
------
1. Look at start of Makefile and set correct values for:
KERNEL_INCLUDE
-----
i did that, and then i doesn't understand a damn thing about the reste of the the 1st step about ADDLIB and LDLIBS. so when i type the make command, the compiling process fail and end before compiling ip.

Could someone give me better indications than this read me file perhaps ?

I've never had to change anything other than KERNEL_INCLUDE and sometimes remove arpd from the build because I don't need it and it sometimes causes errors (for me because of no/wrong BerkeleyDB).

Just tried the 2.6.19 and 20 versions (I notice iproute-latest still points at 19). Neither build - Error on m_ipt.o. This was just a quick test against a vanilla 2.6.19-rc6.

Previously putting different iptables/netfilter headers into iproute include fixed this - was along time ago. Maybe Stephen will know - added to cc.

Andy.
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


--
John Baker
Network Systems Administrator
Marlboro College
Phone: 451-7551 off campus; 551 on campus
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux