All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Daniel Wagner <daniel.wagner@bmw-carit.de>
Cc: netfilter-devel@vger.kernel.org, fw@strlen.de
Subject: Re: [PATCH] iptables: Link libext_arpt to static build
Date: Wed, 9 Dec 2015 13:53:32 +0100	[thread overview]
Message-ID: <20151209125332.GA17240@salvia> (raw)
In-Reply-To: <5656A9D2.3080502@bmw-carit.de>

[-- Attachment #1: Type: text/plain, Size: 1301 bytes --]

On Thu, Nov 26, 2015 at 07:42:26AM +0100, Daniel Wagner wrote:
> On 11/25/2015 08:45 PM, Pablo Neira Ayuso wrote:
> > On Mon, Nov 23, 2015 at 11:18:47AM +0100, Daniel Wagner wrote:
> >> The libext_arpt is not included when linking the static version of
> >> iptables.
> >>
> >> Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
> >> ---
> >> Hi,
> >>
> >> I had some troubles getting a static version of iptables. Not sure
> >> if I fixed it correctly. Anyway I am able to proceed with testing.
> > 
> > Could you tell me what options you're using to compile iptables so I
> > can try to reproduce it?
> 
> Yes, sure. I am using this simple toy script to build:
> 
> declare -a arr=("libmnl" "libnl" "libnftnl" "libnfnetlink"
> "libnetfilter" "libnetfilter_acct" "libnetfilter_conntrack"
> "libnetfilter_cthelper" "libnetfilter_cttimeout" "libnetfilter_queue"
> "iptables")
> 
> NFPATH=/home/wagi/connman/netfilter
> export PKG_CONFIG_PATH=$NFPATH/lib/pkgconfig
> export LD_LIBRARY_PATH=$NFPATH/lib
> 
> ## now loop through the above array
> for i in "${arr[@]}"
> do
>     echo "$i"
>     (
> 	cd $i
> 	./configure --prefix=$NFPATH --enable-static

I can reproduce this, thanks.

We also need to include libnetfilter_conntrack otherwise static builds
also break when connlabel support is on.

[-- Attachment #2: x.patch --]
[-- Type: text/x-diff, Size: 1487 bytes --]

diff --git a/iptables/Makefile.am b/iptables/Makefile.am
index 132fe5f..3c0faa5 100644
--- a/iptables/Makefile.am
+++ b/iptables/Makefile.am
@@ -1,7 +1,7 @@
 # -*- Makefile -*-
 
 AM_CFLAGS        = ${regular_CFLAGS}
-AM_CPPFLAGS      = ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_srcdir}/include ${kinclude_CPPFLAGS} ${libmnl_CFLAGS} ${libnftnl_CFLAGS}
+AM_CPPFLAGS      = ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_srcdir}/include ${kinclude_CPPFLAGS} ${libmnl_CFLAGS} ${libnftnl_CFLAGS} ${libnetfilter_conntrack_CFLAGS}
 AM_YFLAGS = -d
 
 xtables_multi_SOURCES  = xtables-multi.c iptables-xml.c
@@ -41,7 +41,7 @@ xtables_compat_multi_SOURCES += xtables-save.c xtables-restore.c \
 				xtables-arp-standalone.c xtables-arp.c \
 				getethertype.c nft-bridge.c \
 				xtables-eb-standalone.c xtables-eb.c
-xtables_compat_multi_LDADD   += ${libmnl_LIBS} ${libnftnl_LIBS} ../extensions/libext4.a ../extensions/libext6.a ../extensions/libext_ebt.a
+xtables_compat_multi_LDADD   += ${libmnl_LIBS} ${libnftnl_LIBS} ${libnetfilter_conntrack_LIBS} ../extensions/libext4.a ../extensions/libext6.a ../extensions/libext_ebt.a ../extensions/libext_arpt.a
 # yacc and lex generate dirty code
 xtables_compat_multi-xtables-config-parser.o xtables_compat_multi-xtables-config-syntax.o: AM_CFLAGS += -Wno-missing-prototypes -Wno-missing-declarations -Wno-implicit-function-declaration -Wno-nested-externs -Wno-undef -Wno-redundant-decls
 xtables_compat_multi_SOURCES += xshared.c

      reply	other threads:[~2015-12-09 12:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-23 10:18 [PATCH] iptables: Link libext_arpt to static build Daniel Wagner
2015-11-25 19:45 ` Pablo Neira Ayuso
2015-11-26  6:42   ` Daniel Wagner
2015-12-09 12:53     ` Pablo Neira Ayuso [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151209125332.GA17240@salvia \
    --to=pablo@netfilter.org \
    --cc=daniel.wagner@bmw-carit.de \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.