* xtables-addons suggestions
@ 2010-02-16 19:51 Jonas Berlin
2010-02-16 20:23 ` Jan Engelhardt
0 siblings, 1 reply; 6+ messages in thread
From: Jonas Berlin @ 2010-02-16 19:51 UTC (permalink / raw)
To: netfilter-devel
[-- Attachment #1: Type: text/plain, Size: 1616 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi, I am using xtables-addons-1.22 and needed to do some changes to get
it to compile in my setup. I thus present a few suggestions below:
1. When using --with-xtables, I got problems at linking time, failing
to find libxtables.. By changing configure.ac like below I was able to
solve the issue.
libxtables_LIBS="-lxtables";
to
libxtables_LIBS="-lxtables -L $xtables_location/lib";
Currently only the include search paths are affected by the
- --with-xtables argument. It seems there could have been an option to
instruct pkg-config to look for the xtables.pc file in the non-standard
location, but I noticed that too late.
2. When using --with-kbuild, I got some strange compile errors which
ended up being because it used header files from /usr/include/linux
instead of from the path given to --with-kbuild. In fact, I was unable
to find anything that would use the --with-kbuild argument. It ended up
in the Makefiles as variables, but nobody used them. By changing
Makefile.iptrules.in like below I was able to solve the issue.
AM_CFLAGS = ${regular_CFLAGS} ${libxtables_CFLAGS}
to
kinclude_CFLAGS = @kinclude_CFLAGS@
AM_CFLAGS = ${regular_CFLAGS} ${libxtables_CFLAGS}
${kinclude_CFLAGS}
My suggestions as separate patches attached.
Thanks for a great product!
- --
- - xkr47
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (GNU/Linux)
iEYEARECAAYFAkt690gACgkQxyF48ZTvn+4ISQCfX48ElW58ew6IXlzTrJGpy3r7
TQUAoIb3fcfd3qNU1mWAEPorY8h/gxlx
=mcB9
-----END PGP SIGNATURE-----
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: kbuild-to-searchpath.patch --]
[-- Type: text/x-patch, Size: 452 bytes --]
diff -u xtables-addons-1.22-orig/configure.ac xtables-addons-1.22/configure.ac
--- xtables-addons-1.22-orig/configure.ac 2010-01-22 21:14:37.000000000 +0200
+++ xtables-addons-1.22/configure.ac 2010-02-16 20:37:54.000000000 +0200
@@ -51,7 +51,7 @@
AC_MSG_RESULT([no])
fi;
fi;
- libxtables_LIBS="-lxtables";
+ libxtables_LIBS="-lxtables -L $xtables_location/lib";
AC_SUBST([libxtables_CFLAGS])
AC_SUBST([libxtables_LIBS])
else
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: libxtables-to-searchpath.patch --]
[-- Type: text/x-patch, Size: 665 bytes --]
diff -u xtables-addons-1.22-orig/Makefile.iptrules.in xtables-addons-1.22/Makefile.iptrules.in
--- xtables-addons-1.22-orig/Makefile.iptrules.in 2010-01-22 21:14:37.000000000 +0200
+++ xtables-addons-1.22/Makefile.iptrules.in 2010-02-16 20:38:57.000000000 +0200
@@ -12,7 +12,8 @@
regular_CFLAGS = @regular_CFLAGS@
libxtables_CFLAGS = @libxtables_CFLAGS@
libxtables_LIBS = @libxtables_LIBS@
-AM_CFLAGS = ${regular_CFLAGS} ${libxtables_CFLAGS}
+kinclude_CFLAGS = @kinclude_CFLAGS@
+AM_CFLAGS = ${regular_CFLAGS} ${libxtables_CFLAGS} ${kinclude_CFLAGS}
AM_DEPFLAGS = -Wp,-MMD,$(@D)/.$(@F).d,-MT,$@
AM_DEFAULT_VERBOSITY = 0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: xtables-addons suggestions
2010-02-16 19:51 xtables-addons suggestions Jonas Berlin
@ 2010-02-16 20:23 ` Jan Engelhardt
2010-02-16 21:32 ` Jan Engelhardt
0 siblings, 1 reply; 6+ messages in thread
From: Jan Engelhardt @ 2010-02-16 20:23 UTC (permalink / raw)
To: Jonas Berlin; +Cc: netfilter-devel
On Tuesday 2010-02-16 20:51, Jonas Berlin wrote:
>
>Hi, I am using xtables-addons-1.22 and needed to do some changes to get
>it to compile in my setup. I thus present a few suggestions below:
>
>1. When using --with-xtables, I got problems at linking time, failing
>to find libxtables.. By changing configure.ac like below I was able to
>solve the issue.
>
> libxtables_LIBS="-lxtables";
> to
> libxtables_LIBS="-lxtables -L $xtables_location/lib";
--with-xtables is supposed to specify an iptables directory directly;
if at all, -L$xtables_location/.libs would have been the right option
(due to how libtool stores its files).
I guess it makes more sense to just remove --with-xtables and let the
user set PKG_CONFIG_PATH and/or CFLAGS,LDFLAGS accordingly instead,
which should have the same result.
>Currently only the include search paths are affected by the
>- --with-xtables argument. It seems there could have been an option to
>instruct pkg-config to look for the xtables.pc file in the non-standard
>location, but I noticed that too late.
>
>2. When using --with-kbuild, I got some strange compile errors which
>ended up being because it used header files from /usr/include/linux
>instead of from the path given to --with-kbuild.
--with-kbuild only affects the build of the kernel modules (which
does not use /usr/include at all) and this is intentional. Userspace
should only use exported headers such as those from /usr/include
or linux-2.6.xy/usr/include.
>In fact, I was unable
>to find anything that would use the --with-kbuild argument.
extensions/Makefile.am:_kcall = -C ${kbuilddir} M=${abs_srcdir}
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: xtables-addons suggestions
2010-02-16 20:23 ` Jan Engelhardt
@ 2010-02-16 21:32 ` Jan Engelhardt
2010-02-18 7:01 ` Jonas Berlin
0 siblings, 1 reply; 6+ messages in thread
From: Jan Engelhardt @ 2010-02-16 21:32 UTC (permalink / raw)
To: Jonas Berlin; +Cc: netfilter-devel
On Tuesday 2010-02-16 21:23, Jan Engelhardt wrote:
>On Tuesday 2010-02-16 20:51, Jonas Berlin wrote:
>>
>>Hi, I am using xtables-addons-1.22 and needed to do some changes to get
>>it to compile in my setup. I thus present a few suggestions below:
>>
>>1. When using --with-xtables, I got problems at linking time, failing
>>to find libxtables.. By changing configure.ac like below I was able to
>>solve the issue.
Well after all, libxtables_LIBS is currently never used.
(Extension modules don't link to it.)
So I cannot imagine linking problems, but that's the point
where you have to provide logs.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: xtables-addons suggestions
2010-02-16 21:32 ` Jan Engelhardt
@ 2010-02-18 7:01 ` Jonas Berlin
2010-02-18 7:55 ` Jan Engelhardt
0 siblings, 1 reply; 6+ messages in thread
From: Jonas Berlin @ 2010-02-18 7:01 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: netfilter-devel
[-- Attachment #1.1: Type: text/plain, Size: 1390 bytes --]
On Tue, 16 Feb 2010 22:32:33 +0100 (CET)
Jan Engelhardt <jengelh@medozas.de> wrote:
>
> On Tuesday 2010-02-16 21:23, Jan Engelhardt wrote:
> >On Tuesday 2010-02-16 20:51, Jonas Berlin wrote:
> >>
> >>Hi, I am using xtables-addons-1.22 and needed to do some changes to get
> >>it to compile in my setup. I thus present a few suggestions below:
> >>
> >>1. When using --with-xtables, I got problems at linking time, failing
> >>to find libxtables.. By changing configure.ac like below I was able to
> >>solve the issue.
>
> Well after all, libxtables_LIBS is currently never used.
> (Extension modules don't link to it.)
> So I cannot imagine linking problems, but that's the point
> where you have to provide logs.
Please find compilation output attached, the essential part being:
make -f ../Makefile.iptrules all;
make[3]: Entering directory `/discs/11/backup/home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions'
CC libxt_CHAOS.oo
CCLD libxt_CHAOS.so
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lxtables
collect2: ld returned 1 exit status
make[3]: *** [libxt_CHAOS.so] Error 1
Seems to be this rule from Makefile.iptrules.in that is used:
lib%.so: lib%.oo
${AM_V_CCLD}${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $< ${libxtables_LIBS} ${LDLIBS};
--
- xkr47
[-- Attachment #1.2: xtables-addons-compile-error.txt --]
[-- Type: text/plain, Size: 18929 bytes --]
$ ./configure --prefix=/lib/modules/2.6.30-2/iptables --with-xtables=/home/xkr47/kernel/router/linux-2.6.30-2/lib/modules/2.6.30-2/iptables --with-gnu-ld --with-kbuild=/home/xkr47/kernel/router/linux-2.6.30-2/linux/src --enable-dependency-tracking
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/x86_64-pc-linux-gnu/bin/ld
checking if the linker (/usr/x86_64-pc-linux-gnu/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/x86_64-pc-linux-gnu/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking xtables.h presence... /home/xkr47/kernel/router/linux-2.6.30-2/lib/modules/2.6.30-2/iptables/include/xtables.h
no
checking linux/netfilter/x_tables.h usability... yes
checking linux/netfilter/x_tables.h presence... yes
checking for linux/netfilter/x_tables.h... yes
Found kernel version 2.6.30.0 in /home/xkr47/kernel/router/linux-2.6.30-2/linux/src
configure: creating ./config.status
config.status: creating Makefile
config.status: creating Makefile.iptrules
config.status: creating Makefile.mans
config.status: creating extensions/Makefile
config.status: creating extensions/ACCOUNT/Makefile
config.status: creating extensions/ipset/Makefile
config.status: creating extensions/pknock/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
$ make
make all-recursive
make[1]: Entering directory `/discs/11/backup/home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src'
Making all in extensions
make[2]: Entering directory `/discs/11/backup/home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions'
if [ -n "/home/xkr47/kernel/router/linux-2.6.30-2/linux/src" ]; then make -C /home/xkr47/kernel/router/linux-2.6.30-2/linux/src M=/home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions modules; fi;
make[3]: Entering directory `/discs/11/backup/home/xkr47/kernel/router/linux-2.6.30-2/linux/src'
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/compat_xtables.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_CHAOS.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_DELUDE.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_DHCPMAC.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_IPMARK.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_LOGMARK.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_RAWNAT.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/iptable_rawpost.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ip6table_rawpost.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_SYSRQ.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_STEAL.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_TARPIT.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_TEE.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_condition.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_fuzzy.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_geoip.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_iface.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_ipp2p.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_ipv4options.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_length2.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_lscan.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_psd.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_quota2.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ACCOUNT/xt_ACCOUNT.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ipt_set.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ipt_SET.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set_ipmap.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set_portmap.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set_macipmap.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set_iphash.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set_nethash.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set_ipporthash.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set_iptree.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set_iptreemap.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set_setlist.o
CC [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/pknock/xt_pknock.o
Building modules, stage 2.
MODPOST 37 modules
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ACCOUNT/xt_ACCOUNT.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ACCOUNT/xt_ACCOUNT.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/compat_xtables.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/compat_xtables.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ip6table_rawpost.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ip6table_rawpost.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set_iphash.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set_iphash.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set_ipmap.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set_ipmap.ko
LIBS =
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LIPO =
LN_S = ln -s
LTLIBOBJS =
MAKEINFO = ${SHELL} /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/missing --run makeinfo
MKDIR_P = /bin/mkdir -p
NM = /usr/bin/nm -B
NMEDIT =
OBJDUMP = objdump
OBJEXT = o
OTOOL =
OTOOL64 =
PACKAGE = xtables-addons
PACKAGE_BUGREPORT =
PACKAGE_NAME = xtables-addons
PACKAGE_STRING = xtables-addons 1.22
PACKAGE_TARNAME = xtables-addons
PACKAGE_VERSION = 1.22
PATH_SEPARATOR = :
PKG_CONFIG =
RANLIB = ranlib
SED = /usr/bin/sed
SET_MAKE =
SHELL = /bin/sh
STRIP = strip
VERSION = 1.22
abs_builddir = /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions
abs_srcdir = /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions
abs_top_builddir = /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src
abs_top_srcdir = /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src
ac_ct_CC = gcc
ac_ct_DUMPBIN =
am__include = include
am__leading_dot = .
am__quote =
am__tar = ${AMTAR} chof - "$$tardir"
am__untar = ${AMTAR} xf -
bindir = ${exec_prefix}/bin
build = x86_64-unknown-linux-gnu
build_alias =
build_cpu = x86_64
build_os = linux-gnu
build_vendor = unknown
builddir = .
datadir = ${datarootdir}
datarootdir = ${prefix}/share
docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
dvidir = ${docdir}
exec_prefix = ${prefix}
host = x86_64-unknown-linux-gnu
host_alias =
host_cpu = x86_64
host_os = linux-gnu
host_vendor = unknown
htmldir = ${docdir}
includedir = ${prefix}/include
infodir = ${datarootdir}/info
install_sh = ${SHELL} /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/install-sh
kbuilddir = /home/xkr47/kernel/router/linux-2.6.30-2/linux/src
kinclude_CFLAGS = -I /home/xkr47/kernel/router/linux-2.6.30-2/linux/src/include
ksourcedir =
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
libxtables_CFLAGS = -I /home/xkr47/kernel/router/linux-2.6.30-2/lib/modules/2.6.30-2/iptables/include
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set_ipporthash.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set_ipporthash.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set_iptree.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set_iptree.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set_iptreemap.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set_iptreemap.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set_macipmap.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set_macipmap.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set_nethash.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set_nethash.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set_portmap.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set_portmap.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set_setlist.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ip_set_setlist.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ipt_SET.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ipt_SET.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ipt_set.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/ipset/ipt_set.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/iptable_rawpost.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/iptable_rawpost.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/pknock/xt_pknock.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/pknock/xt_pknock.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_CHAOS.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_CHAOS.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_DELUDE.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_DELUDE.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_DHCPMAC.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_DHCPMAC.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_IPMARK.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_IPMARK.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_LOGMARK.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_LOGMARK.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_RAWNAT.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_RAWNAT.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_STEAL.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_STEAL.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_SYSRQ.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_SYSRQ.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_TARPIT.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_TARPIT.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_TEE.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_TEE.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_condition.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_condition.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_fuzzy.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_fuzzy.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_geoip.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_geoip.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_iface.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_iface.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_ipp2p.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_ipp2p.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_ipv4options.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_ipv4options.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_length2.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_length2.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_lscan.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_lscan.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_psd.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_psd.ko
CC /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_quota2.mod.o
LD [M] /home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions/xt_quota2.ko
make[3]: Leaving directory `/discs/11/backup/home/xkr47/kernel/router/linux-2.6.30-2/linux/src'
make -f ../Makefile.iptrules all;
make[3]: Entering directory `/discs/11/backup/home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions'
CC libxt_CHAOS.oo
CCLD libxt_CHAOS.so
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lxtables
collect2: ld returned 1 exit status
make[3]: *** [libxt_CHAOS.so] Error 1
make[3]: Leaving directory `/discs/11/backup/home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions'
make[2]: *** [user-all-local] Error 2
make[2]: Leaving directory `/discs/11/backup/home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/discs/11/backup/home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src'
make: *** [all] Error 2
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: xtables-addons suggestions
2010-02-18 7:01 ` Jonas Berlin
@ 2010-02-18 7:55 ` Jan Engelhardt
0 siblings, 0 replies; 6+ messages in thread
From: Jan Engelhardt @ 2010-02-18 7:55 UTC (permalink / raw)
To: Jonas Berlin; +Cc: netfilter-devel
On Thursday 2010-02-18 08:01, Jonas Berlin wrote:
>> Well after all, libxtables_LIBS is currently never used.
(Oh well it is used)
>> (Extension modules don't link to it.)
>> So I cannot imagine linking problems, but that's the point
>> where you have to provide logs.
>
>Please find compilation output attached, the essential part being:
>
>make -f ../Makefile.iptrules all;
>make[3]: Entering directory `/discs/11/backup/home/xkr47/kernel/router/linux-2.6.30-2/xtables-addons/src/extensions'
> CC libxt_CHAOS.oo
> CCLD libxt_CHAOS.so
>/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lxtables
>collect2: ld returned 1 exit status
>make[3]: *** [libxt_CHAOS.so] Error 1
>
>Seems to be this rule from Makefile.iptrules.in that is used:
>
>lib%.so: lib%.oo
> ${AM_V_CCLD}${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $< ${libxtables_LIBS} ${LDLIBS};
And you are able to make it link by overriding said libxtables_LIBS to
your liking either at make time or (preferably) at configure time, as
shown in the updated (in git) INSTALL file.
^ permalink raw reply [flat|nested] 6+ messages in thread
* xtables-addons suggestions
@ 2010-02-16 19:32 Jonas Berlin
0 siblings, 0 replies; 6+ messages in thread
From: Jonas Berlin @ 2010-02-16 19:32 UTC (permalink / raw)
To: netfilter-devel
[-- Attachment #1.1: Type: text/plain, Size: 1341 bytes --]
Hi, I am using xtables-addons-1.22 and needed to do some changes to get it to compile in my setup. I thus present a few suggestions below:
1. When using --with-xtables, I got problems at linking time, failing to find libxtables.. By changing configure.ac like below I was able to solve the issue.
libxtables_LIBS="-lxtables";
to
libxtables_LIBS="-lxtables -L $xtables_location/lib";
Currently only the include search paths are affected by the --with-xtables argument. It seems there could have been an option to instruct pkg-config to look for the xtables.pc file in the non-standard location, but I noticed that too late.
2. When using --with-kbuild, I got some strange compile errors which ended up being because it used header files from /usr/include/linux instead of from the path given to --with-kbuild. In fact, I was unable to find anything that would use the --with-kbuild argument. It ended up in the Makefiles as variables, but nobody used them. By changing Makefile.iptrules.in like below I was able to solve the issue.
AM_CFLAGS = ${regular_CFLAGS} ${libxtables_CFLAGS}
to
kinclude_CFLAGS = @kinclude_CFLAGS@
AM_CFLAGS = ${regular_CFLAGS} ${libxtables_CFLAGS} ${kinclude_CFLAGS}
My suggestions as separate patches attached.
Thanks for a great product!
--
- xkr47
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: kbuild-to-searchpath.patch --]
[-- Type: text/x-patch, Size: 452 bytes --]
diff -u xtables-addons-1.22-orig/configure.ac xtables-addons-1.22/configure.ac
--- xtables-addons-1.22-orig/configure.ac 2010-01-22 21:14:37.000000000 +0200
+++ xtables-addons-1.22/configure.ac 2010-02-16 20:37:54.000000000 +0200
@@ -51,7 +51,7 @@
AC_MSG_RESULT([no])
fi;
fi;
- libxtables_LIBS="-lxtables";
+ libxtables_LIBS="-lxtables -L $xtables_location/lib";
AC_SUBST([libxtables_CFLAGS])
AC_SUBST([libxtables_LIBS])
else
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.3: libxtables-to-searchpath.patch --]
[-- Type: text/x-patch, Size: 665 bytes --]
diff -u xtables-addons-1.22-orig/Makefile.iptrules.in xtables-addons-1.22/Makefile.iptrules.in
--- xtables-addons-1.22-orig/Makefile.iptrules.in 2010-01-22 21:14:37.000000000 +0200
+++ xtables-addons-1.22/Makefile.iptrules.in 2010-02-16 20:38:57.000000000 +0200
@@ -12,7 +12,8 @@
regular_CFLAGS = @regular_CFLAGS@
libxtables_CFLAGS = @libxtables_CFLAGS@
libxtables_LIBS = @libxtables_LIBS@
-AM_CFLAGS = ${regular_CFLAGS} ${libxtables_CFLAGS}
+kinclude_CFLAGS = @kinclude_CFLAGS@
+AM_CFLAGS = ${regular_CFLAGS} ${libxtables_CFLAGS} ${kinclude_CFLAGS}
AM_DEPFLAGS = -Wp,-MMD,$(@D)/.$(@F).d,-MT,$@
AM_DEFAULT_VERBOSITY = 0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-02-18 7:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-16 19:51 xtables-addons suggestions Jonas Berlin
2010-02-16 20:23 ` Jan Engelhardt
2010-02-16 21:32 ` Jan Engelhardt
2010-02-18 7:01 ` Jonas Berlin
2010-02-18 7:55 ` Jan Engelhardt
-- strict thread matches above, loose matches on Subject: below --
2010-02-16 19:32 Jonas Berlin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).