Jürg Billeter wrote:
Yes, as I've written before, iproute2 is one of the problematic
packages. Besides fixing the includes[1] you need to remove the local
copy of the not sanitized kernel headers, i.e. rm -r include/linux[2]
Jürg
[1]
http://www.paldo.org/paldo/sources/iproute2/iproute2-2.6.15-060110-linux-glibc-headers-1.patch.bz2
[2] http://www.paldo.org/paldo/specs/iproute2.xml
I'm using with the compat headers (modified from Jurg's version of the
script) and glibc-2.3.6. Did not use Jurg's patch, well I did, but came
across the same types of errors. After adding <net/if.h> to ipaddress.c
and ifstat.c, here is the remaining error.
/usr/include/linux/socket.h:2:2: warning: #warning "You should include
<sys/socket.h>. This time I will do it for you. "
ipaddress.c: In function 'print_link_flags':
ipaddress.c:96: error: 'IFF_DYNAMIC' undeclared (first use in this function)
ipaddress.c:96: error: (Each undeclared identifier is reported only once
ipaddress.c:96: error: for each function it appears in.)
make[1]: *** [ipaddress.o] Error 1
IFF_DYNAMIC is not in /usr/include/net/if.h.
The attached patch (please ignore the name, I had already included it in
my scripts and just overwrote the existing one from Jürg) makes it
build. Even though the change is fairly simple, it's not been tested
yet, and this is also some loss of functionality in comparison to using
a kernel header (glibc doesn't supprot it however). Also, no need to
remove the included kernel headers. That is the proper placement if a
package _needs_ kernel headers, correct?
Next error was in sysklogd:
gcc -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce -DFSSTND
-c ksym_mod.cIn file included from ksym_mod.c:97:
module.h:31:24: error: asm/atomic.h: No such file or directory
make: *** [ksym_mod.o] Error 1
I didn't look at the code, a simple "sed -i /atomic.h/d module.h"
'fixed' the compilation problem. Need to double check why it thinks it
needs atomic.h.
And that's it. The build completed successfully.
Hope that helps...
-- DJ Lucas
diff -Naur iproute2-2.6.15-060110-orig/ip/ipaddress.c iproute2-2.6.15-060110/ip/ipaddress.c
--- iproute2-2.6.15-060110-orig/ip/ipaddress.c 2005-09-21 19:33:18.000000000 +0000
+++ iproute2-2.6.15-060110/ip/ipaddress.c 2006-03-19 16:55:26.000000000 +0000
@@ -28,6 +28,7 @@
#include <linux/netdevice.h>
#include <linux/if_arp.h>
#include <linux/sockios.h>
+#include <net/if.h>
#include "rt_names.h"
#include "utils.h"
@@ -92,7 +93,9 @@
_PF(MASTER);
_PF(SLAVE);
_PF(DEBUG);
+#ifdef IFF_DYNAMIC
_PF(DYNAMIC);
+#endif
_PF(AUTOMEDIA);
_PF(PORTSEL);
_PF(NOTRAILERS);
diff -Naur iproute2-2.6.15-060110-orig/misc/ifstat.c iproute2-2.6.15-060110/misc/ifstat.c
--- iproute2-2.6.15-060110-orig/misc/ifstat.c 2005-07-08 22:08:47.000000000 +0000
+++ iproute2-2.6.15-060110/misc/ifstat.c 2006-03-19 16:55:50.000000000 +0000
@@ -30,6 +30,7 @@
#include <libnetlink.h>
#include <linux/netdevice.h>
+#include <net/if.h>
#include <SNAPSHOT.h>
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page