Bryan Kadzban wrote:
On Tue, Jan 23, 2007 at 10:47:41AM -0500, Colin Dean wrote:
The oddity here is in the second line of the actual gcc command. The include path for modules shouldn't be

-I"/lib/modules/2.6.18.3vojisto-base/build"/include

and should be

-I"/lib/modules/2.6.19.2vojisto-base/build"/include

I guess a simple sed on the Makefile would fix that?

The iptables Makefile looks in /lib/modules/`uname -r`/build for the
kernel source tree.  If this isn't right for your system, you need to
set KERNEL_DIR in the make command; for instance:

make <whatever> KERNEL_DIR=/lib/modules/2.6.19.2vojisto-base/build

sounds like it'd work in your case.

(Looks like iptables by default likes to be compiled for the currently
running kernel, not some other kernel version.)

I tried that--no luck. I also tried the method suggested by Maarten--no luck on that, either.

I tried these:

1. KERNEL_DIR=$CLFS/usr/include
2. KERNEL_DIR=$CLFS/lib/modules/2.6.19.2vojisto-base/build
3. KERNEL_DIR=$CLFS/lib/modules/2.6.19.2vojisto-base/build/include
4. KERNEL_DIR=$CLFS/lib/modules/2.6.19.2vojisto-base

All failed. As you can tell, I'm trying shots in the dark. The errors are the same each time--the size of the symbols are changing.

At the close of my message is the output from #2.

I did realize that I'm using a newer version of IPTables than what is in the book (using 1.3.7, where 1.3.6 is in the book). Should I revert to 1.3.6 and go from there?

[clfs /mnt/vj/sources/iptables-1.3.7]$ make CC="${CC} ${BUILD} -Os" LD=${LD} DO_MULTI=1 PREFIX=/usr LIBDIR=/lib BINDIR=/sbin KERNEL_DIR=/mnt/vj/lib/modules/2.6.19vojisto-base/build && make DO_MULTI=1 PREFIX=/usr LIBDIR=/lib BINDIR=/sbin install DESTDIR=${CLFS} KERNEL_DIR=/mnt/vj/lib/modules/2.6.19vojisto-base/build Extensions found: IPv4:CLUSTERIP IPv4:connbytes IPv4:dccp IPv4:quota IPv4:recent IPv4:statistic IPv4:string IPv6:REJECT IPv6:ah IPv6:esp IPv6:frag IPv6:ipv6header IPv6:rt IPv6:sctp i486-pc-linux-uclibc-gcc -m32 -Os -O2 -Wall -Wunused -I/mnt/vj/lib/modules/2.6.19vojisto-base/build/include -Iinclude/ -DIPTABLES_VERSION=\"1.3.7\" -DIPTABLES_MULTI -DIPT_LIB_DIR=\"/lib/iptables\" -rdynamic -o iptables iptables-multi.c iptables-save.c iptables-restore.c iptables-xml.c iptables-standalone.c iptables.o libiptc/libiptc.a -ldl -lnsl
/tmp/ccFeFoFy.o: In function `parse_counters':
iptables-xml.c:(.text+0xfc0): multiple definition of `parse_counters'
/tmp/ccGVB69t.o:iptables-restore.c:(.text+0x60): first defined here
/mnt/vj/cross-tools/lib/gcc/i486-pc-linux-uclibc/4.1.1/../../../../i486-pc-linux-uclibc/bin/ld: Warning: size of symbol `parse_counters' changed from 44 in /tmp/ccGVB69t.o to 52 in /tmp/ccFeFoFy.o
/tmp/ccFeFoFy.o: In function `iptables_restore_main':
iptables-xml.c:(.text+0x1060): multiple definition of `iptables_restore_main'
/tmp/ccGVB69t.o:iptables-restore.c:(.text+0xe0): first defined here
/mnt/vj/cross-tools/lib/gcc/i486-pc-linux-uclibc/4.1.1/../../../../i486-pc-linux-uclibc/bin/ld: Warning: size of symbol `iptables_restore_main' changed from 2362 in /tmp/ccGVB69t.o to 2832 in /tmp/ccFeFoFy.o
iptables.o:(.data+0x0): multiple definition of `line'
/tmp/ccFeFoFy.o:(.bss+0x0): first defined here
iptables.o: In function `exit_error':
iptables.c:(.text+0xe40): multiple definition of `exit_error'
/tmp/ccFeFoFy.o:iptables-xml.c:(.text+0x1000): first defined here
/mnt/vj/cross-tools/lib/gcc/i486-pc-linux-uclibc/4.1.1/../../../../i486-pc-linux-uclibc/bin/ld: Warning: size of symbol `exit_error' changed from 89 in /tmp/ccFeFoFy.o to 149 in iptables.o
collect2: ld returned 1 exit status
make: *** [iptables] Error 1

--
Colin
_______________________________________________
Clfs-dev mailing list
[email protected]
http://lists.cross-lfs.org/cgi-bin/mailman/listinfo/clfs-dev

Reply via email to