ipset 2.0 - Minor fix

Robert Iakobashvili roberti at Go-WLAN.com
Thu Dec 9 16:51:40 CET 2004


IPset 2.0 works great with the recommended patch-o-patic and iptables version
on linux vanilla kernel 2.6.9.

The minor issue on a Debian 64-bit destribution for AMD:
#cat /etc/debian_version 
3.1
#file /bin/ls
/bin/ls: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.4.0, dynamically linked (uses shared libs), stripped
#gcc -v:
Reading specs from /usr/lib/gcc-lib/x86_64-linux/3.3.5/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc --disable-multilib x86_64-linux
Thread model: posix
gcc version 3.3.5 (Debian 1:3.3.5-2)
# ld -v
GNU ld version 2.15

ipset compilation fails with :

cc -O2 -Wall -Wunused -I/scrap/robert/linux-2.6.9-rob/include -I. -g -DIPSET_DEBUG  -ldl -rdynamic -o ipset ipset.o
cc -O2 -Wall -Wunused -I/scrap/robert/linux-2.6.9-rob/include -I. -g -DIPSET_DEBUG  -c -o ipset_ipmap.o ipset_ipmap.c
ld -shared -o libipset_ipmap.so ipset_ipmap.o
ld: ipset_ipmap.o: relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC
ipset_ipmap.o: could not read symbols: Bad value
make: *** [libipset_ipmap.so] Error 1
rm ipset_ipmap.o

fixed by adding to CFLAGS -fPIC.

Thanks for the great ipset.

Sincerely,
Robert Iakobashvili,
roberti at go-wlan.com





More information about the netfilter-devel mailing list