All of lore.kernel.org
 help / color / mirror / Atom feed
* Failing to compile latest iptables from git
@ 2016-02-09 21:16 Mart Frauenlob
  2016-02-10 16:31 ` Mart Frauenlob
  2016-02-11  3:34 ` Mart Frauenlob
  0 siblings, 2 replies; 3+ messages in thread
From: Mart Frauenlob @ 2016-02-09 21:16 UTC (permalink / raw)
  To: netfilter

Hello list,

I'm trying to prepare a patch for iptables, but unfortunately I'm 
failing to build it. I've done it many times before, but this time I 
don't know what's wrong, so I hope for your assistance.

The ./configure step runs just fine. It stops at the make process with 
this error:

   CC       libxt_connlabel.oo
   CCLD     libxt_connlabel.so
libxt_connlabel.oo: In function `connlabel_open':
/home/ellen/git/iptables.git/extensions/libxt_connlabel.c:40: undefined 
reference to `nfct_labelmap_new'
libxt_connlabel.oo: In function `connlabel_mt_parse':
/home/ellen/git/iptables.git/extensions/libxt_connlabel.c:56: undefined 
reference to `nfct_labelmap_get_bit'
libxt_connlabel.oo: In function `connlabel_get_name':
/home/ellen/git/iptables.git/extensions/libxt_connlabel.c:76: undefined 
reference to `nfct_labelmap_get_name'
collect2: ld returned 1 exit status


I have installed latest libs (libmnl, libnetlink, 
libnetfilter_conntrack) from git. The ld.so.conf.d files point to the 
libaries but that seems to be ignored (ldconfig was run), so I put this 
into my environment:

export LDFLAGS="-L/usr/local/lib/ 
-L/opt/k_3.2.35/libnetfilter_conntrack/lib/ 
-L/opt/k_3.2.35/libnfnetlink/lib -L/opt/k_3.2.35/libmnl/lib/"

export LD_LIBRARY_PATH="-L/opt/k_3.2.35/libnfnetlink/lib 
-L/opt/k_3.2.35/libmnl/lib -L/opt/k_3.2.35/libnetfilter_conntrack/lib"

export LD_RUN_PATH="-L/opt/k_3.2.35/libnfnetlink/lib 
-L/opt/k_3.2.35/libmnl/lib -L/opt/k_3.2.35/libnetfilter_conntrack/lib"

export libmnl_LIBS=-L/opt/k_3.2.35/libmnl/lib/

export libnfnetlink_LIBS=-L/opt/k_3.2.35/libnfnetlink/lib/

export 
libnetfilter_conntrack_LIBS=-L/opt/k_3.2.35/libnetfilter_conntrack/lib

export 
PKG_CONFIG_PATH=/opt/k_3.2.35/libnetfilter_conntrack/lib/pkgconfig:/opt/k_3.2.35/libnfnetlink/lib/pkgconfig:/opt/k_3.2.35/libmnl/lib/pkgconfig

At configure it finds the correct conntrack lib (at least it looks like 
to me).
My configure command was:
./configure --with-gnu-ld --prefix=/tmp --disable-nftables 
--with-ksource=/usr/src/linux-3.14-rc1 --enable-devel

I'm running a custom vanilla kernel 3.14.0-rc1.
build directory should be correct:
/lib/modules/3.14.0-rc1.custom-03.02.2014/build -> /usr/src/linux-3.14-rc1

gcc --version
gcc (Debian 4.4.5-8) 4.4.5


What am I missing?
Is more information needed?

Thank you very much for your help
Mart

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Failing to compile latest iptables from git
  2016-02-09 21:16 Failing to compile latest iptables from git Mart Frauenlob
@ 2016-02-10 16:31 ` Mart Frauenlob
  2016-02-11  3:34 ` Mart Frauenlob
  1 sibling, 0 replies; 3+ messages in thread
From: Mart Frauenlob @ 2016-02-10 16:31 UTC (permalink / raw)
  To: netfilter

On 09.02.2016 22:16, netfilter-owner@vger.kernel.org wrote:
> Hello list,
>
> I'm trying to prepare a patch for iptables, but unfortunately I'm
> failing to build it. I've done it many times before, but this time I
> don't know what's wrong, so I hope for your assistance.
>
> The ./configure step runs just fine. It stops at the make process with
> this error:
>
>    CC       libxt_connlabel.oo
>    CCLD     libxt_connlabel.so
> libxt_connlabel.oo: In function `connlabel_open':
> /home/ellen/git/iptables.git/extensions/libxt_connlabel.c:40: undefined
> reference to `nfct_labelmap_new'
> libxt_connlabel.oo: In function `connlabel_mt_parse':
> /home/ellen/git/iptables.git/extensions/libxt_connlabel.c:56: undefined
> reference to `nfct_labelmap_get_bit'
> libxt_connlabel.oo: In function `connlabel_get_name':
> /home/ellen/git/iptables.git/extensions/libxt_connlabel.c:76: undefined
> reference to `nfct_labelmap_get_name'
> collect2: ld returned 1 exit status
[...]

Ok, I'm running into the same problem on fresh install of debian 8.3 
(stable).
Only non standard libs are mnl netlink and conntrack.
This time I added the CPPFLAGS variable I previously forgot, but doesn't 
change anything.
pkg-config --list-all shows all the libs with correct versions.
I'm bit clueless, I must admit.

Looking for help, thank you
Mart

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Failing to compile latest iptables from git
  2016-02-09 21:16 Failing to compile latest iptables from git Mart Frauenlob
  2016-02-10 16:31 ` Mart Frauenlob
@ 2016-02-11  3:34 ` Mart Frauenlob
  1 sibling, 0 replies; 3+ messages in thread
From: Mart Frauenlob @ 2016-02-11  3:34 UTC (permalink / raw)
  To: netfilter

On 09.02.2016 22:16, netfilter-owner@vger.kernel.org wrote:
> Hello list,
>
> I'm trying to prepare a patch for iptables, but unfortunately I'm
> failing to build it. I've done it many times before, but this time I
> don't know what's wrong, so I hope for your assistance.
>
> The ./configure step runs just fine. It stops at the make process with
> this error:
>
>    CC       libxt_connlabel.oo
>    CCLD     libxt_connlabel.so
> libxt_connlabel.oo: In function `connlabel_open':
> /home/ellen/git/iptables.git/extensions/libxt_connlabel.c:40: undefined
> reference to `nfct_labelmap_new'
> libxt_connlabel.oo: In function `connlabel_mt_parse':
> /home/ellen/git/iptables.git/extensions/libxt_connlabel.c:56: undefined
> reference to `nfct_labelmap_get_bit'
> libxt_connlabel.oo: In function `connlabel_get_name':
> /home/ellen/git/iptables.git/extensions/libxt_connlabel.c:76: undefined
> reference to `nfct_labelmap_get_name'
> collect2: ld returned 1 exit status
>
>
> I have installed latest libs (libmnl, libnetlink,
> libnetfilter_conntrack) from git. The ld.so.conf.d files point to the
> libaries but that seems to be ignored (ldconfig was run), so I put this
> into my environment:
>
> export LDFLAGS="-L/usr/local/lib/
> -L/opt/k_3.2.35/libnetfilter_conntrack/lib/
> -L/opt/k_3.2.35/libnfnetlink/lib -L/opt/k_3.2.35/libmnl/lib/"
>
> export LD_LIBRARY_PATH="-L/opt/k_3.2.35/libnfnetlink/lib
> -L/opt/k_3.2.35/libmnl/lib -L/opt/k_3.2.35/libnetfilter_conntrack/lib"
>
> export LD_RUN_PATH="-L/opt/k_3.2.35/libnfnetlink/lib
> -L/opt/k_3.2.35/libmnl/lib -L/opt/k_3.2.35/libnetfilter_conntrack/lib"

omg, those two should be colon separated, not -L prefixed.
Now it works....


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-11  3:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-09 21:16 Failing to compile latest iptables from git Mart Frauenlob
2016-02-10 16:31 ` Mart Frauenlob
2016-02-11  3:34 ` Mart Frauenlob

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.