osdir.com
mailing list archive

Subject: IProute2 iptables libdir hacking - msg#00020

List: linux.lfs.clfs.devel

Date: Prev Next Index Thread: Prev Next Index
Hey guys,

A while back on one of the LFS lists, someone brought up how the
iptables module directory is hardcoded to /usr/local/lib/iptables in
one of the iproute utilities, basically making it unusable. Jim said
that he was hacking it so he could substitute */lib64/ in addition to
changing the location. I couldn't find that in the CLFS-1.x
development book.

I was wondering if I could see the specific hack you guys have done.
I've been passing -DIPT_LIB_DIR= in my to the Makefile in the CFLAGS,
but it's pretty hacky. I wanted to try to send a patch upstream since
this should be fixed. I thought I had one, but I can't find it now.

--
Dan


Was this page helpful?
Yes No
Thread at a glance:

Previous Message by Date: click to view message preview

IPTables build failing

I'll bet that this is similar to the dropbear issue. [clfs /mnt/vj/sources/iptables-1.3.7]$ make CC="${CC} ${BUILD} -Os" LD=${LD} DO_MULTI=1 PREFIX=/usr LIBDIR=/lib BINDIR=/sbin && make DO_MULTI=1 PREFIX=/usr LIBDIR=/lib BINDIR=/sbin install DESTDIR=${CLFS} Extensions found: i486-pc-linux-uclibc-gcc -m32 -Os -O2 -Wall -Wunused -I"/lib/modules/2.6.18.3vojisto-base/build"/include -Iinclude/ -DIPTABLES_VERSION=\"1.3.7\" -D_UNKNOWN_KERNEL_POINTER_SIZE -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/ccR0Hm3W.o: In function `parse_counters': iptables-xml.c:(.text+0xfc0): multiple definition of `parse_counters' /tmp/ccaWqLys.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/ccaWqLys.o to 52 in /tmp/ccR0Hm3W.o /tmp/ccR0Hm3W.o: In function `iptables_restore_main': iptables-xml.c:(.text+0x1060): multiple definition of `iptables_restore_main' /tmp/ccaWqLys.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/ccaWqLys.o to 2832 in /tmp/ccR0Hm3W.o iptables.o:(.data+0x0): multiple definition of `line' /tmp/ccR0Hm3W.o:(.bss+0x0): first defined here iptables.o: In function `exit_error': iptables.c:(.text+0xe40): multiple definition of `exit_error' /tmp/ccR0Hm3W.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/ccR0Hm3W.o to 149 in iptables.o collect2: ld returned 1 exit status make: *** [iptables] Error 1 Or (upon further inspection) it could be a problem with the source itself. Symbols are changing size left and right! 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?

Next Message by Date: click to view message preview

Re: IPTables build failing

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.) pgpnDwZoj9v2E.pgp Description: PGP signature _______________________________________________ Clfs-dev mailing list Clfs-dev@xxxxxxxxxxxxxxxxxxx http://lists.cross-lfs.org/cgi-bin/mailman/listinfo/clfs-dev

Previous Message by Thread: click to view message preview

IPTables build failing

I'll bet that this is similar to the dropbear issue. [clfs /mnt/vj/sources/iptables-1.3.7]$ make CC="${CC} ${BUILD} -Os" LD=${LD} DO_MULTI=1 PREFIX=/usr LIBDIR=/lib BINDIR=/sbin && make DO_MULTI=1 PREFIX=/usr LIBDIR=/lib BINDIR=/sbin install DESTDIR=${CLFS} Extensions found: i486-pc-linux-uclibc-gcc -m32 -Os -O2 -Wall -Wunused -I"/lib/modules/2.6.18.3vojisto-base/build"/include -Iinclude/ -DIPTABLES_VERSION=\"1.3.7\" -D_UNKNOWN_KERNEL_POINTER_SIZE -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/ccR0Hm3W.o: In function `parse_counters': iptables-xml.c:(.text+0xfc0): multiple definition of `parse_counters' /tmp/ccaWqLys.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/ccaWqLys.o to 52 in /tmp/ccR0Hm3W.o /tmp/ccR0Hm3W.o: In function `iptables_restore_main': iptables-xml.c:(.text+0x1060): multiple definition of `iptables_restore_main' /tmp/ccaWqLys.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/ccaWqLys.o to 2832 in /tmp/ccR0Hm3W.o iptables.o:(.data+0x0): multiple definition of `line' /tmp/ccR0Hm3W.o:(.bss+0x0): first defined here iptables.o: In function `exit_error': iptables.c:(.text+0xe40): multiple definition of `exit_error' /tmp/ccR0Hm3W.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/ccR0Hm3W.o to 149 in iptables.o collect2: ld returned 1 exit status make: *** [iptables] Error 1 Or (upon further inspection) it could be a problem with the source itself. Symbols are changing size left and right! 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?

Next Message by Thread: click to view message preview

Unable to boot freshly built CLFS Embedded

I've got the entire thing finished building. Obviously, the next step is booting ;-) In my development machine, I have two hard drives. The first has the host system, the second is where I'm building CLFS. I added the follow entry to my main /boot/grub/menu.lst: title CLFS root (hd1,0) kernel /boot/clfs-2.6.19 root=/dev/hdb1 The path to the kernel is correct. I may have called it clfs-image-2.6.19 -- if I did, then it's that way in the menu.lst, too. When I attempt to boot from it, I get: Error 13: Invalid or unexecutable image format or something of the like. I checked the permissions on the kernel--they're fine. I've no idea where to begin troubleshooting here, other than to rebuild the kernel, and I'd rather not do that as a first step if I don't have to. Ideas?
Sign up for updates to this mailing list. email:
Loading Comments...
Home | News | Patents | Sitemap | FAQ | advertise

Advertising by