Patchwork build: resolve link failure for ip6t_NETMAP

login
register
mail settings
Submitter Jan Engelhardt
Date Dec. 2, 2012, 6:16 p.m.
Message ID <1354472208-25759-1-git-send-email-jengelh@inai.de>
Download mbox | patch
Permalink /patch/203249/
State Not Applicable
Headers show

Comments

Jan Engelhardt - Dec. 2, 2012, 6:16 p.m.
Link stage of libip6t_NETMAP failed since recently.

  CCLD     libip6t_NETMAP.so
/usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld:
cannot find -lip6tc

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
---

Retrievable through
	git://git.inai.de/iptables master


 extensions/GNUmakefile.in |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Pablo Neira - Dec. 3, 2012, 1:12 p.m.
On Sun, Dec 02, 2012 at 07:16:48PM +0100, Jan Engelhardt wrote:
> Link stage of libip6t_NETMAP failed since recently.
> 
>   CCLD     libip6t_NETMAP.so
> /usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld:
> cannot find -lip6tc

Is this problem opensuse specific? Need some diagnosing information on
why that's happening.

> Signed-off-by: Jan Engelhardt <jengelh@inai.de>
> ---
> 
> Retrievable through
> 	git://git.inai.de/iptables master
> 
> 
>  extensions/GNUmakefile.in |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/extensions/GNUmakefile.in b/extensions/GNUmakefile.in
> index e71e3ff..68e0b9b 100644
> --- a/extensions/GNUmakefile.in
> +++ b/extensions/GNUmakefile.in
> @@ -101,7 +101,8 @@ libxt_state.so: libxt_conntrack.so
>  	ln -fs $< $@
>  
>  # Need the LIBADDs in iptables/Makefile.am too for libxtables_la_LIBADD
> -ip6t_NETMAP_LIBADD  = -lip6tc
> +ip6t_NETMAP_LIBADD  = -L${top_builddir}/libiptc/.libs \
> +                      -L${top_builddir}/libiptc -lip6tc
>  xt_RATEEST_LIBADD   = -lm
>  xt_statistic_LIBADD = -lm
>  
> -- 
> 1.7.10.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jan Engelhardt - Dec. 3, 2012, 3:58 p.m.
On Monday 2012-12-03 14:12, Pablo Neira Ayuso wrote:

>On Sun, Dec 02, 2012 at 07:16:48PM +0100, Jan Engelhardt wrote:
>> Link stage of libip6t_NETMAP failed since recently.
>> 
>>   CCLD     libip6t_NETMAP.so
>> /usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld:
>> cannot find -lip6tc
>
>Is this problem opensuse specific? Need some diagnosing information on
>why that's happening.

This happens whenever you don't have /usr/lib(64)/libip6tc.so.

In openSUSE, iptables is split into the packages iptables, libiptc0, 
libiptc-devel, libxtables9 and libxtables-devel, and libip6tc.so is a 
-devel thing that is generally not installed on user's machines. (Hence 
I spot this.) I think this should be similar in Debian.

Also, note that iptables itself is not installed while building iptables 
itself (for obvious reasons) in most distribution build systems.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Pablo Neira - Dec. 4, 2012, 12:16 p.m.
On Mon, Dec 03, 2012 at 04:58:11PM +0100, Jan Engelhardt wrote:
> On Monday 2012-12-03 14:12, Pablo Neira Ayuso wrote:
> 
> >On Sun, Dec 02, 2012 at 07:16:48PM +0100, Jan Engelhardt wrote:
> >> Link stage of libip6t_NETMAP failed since recently.
> >> 
> >>   CCLD     libip6t_NETMAP.so
> >> /usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld:
> >> cannot find -lip6tc
> >
> >Is this problem opensuse specific? Need some diagnosing information on
> >why that's happening.
> 
> This happens whenever you don't have /usr/lib(64)/libip6tc.so.
> 
> In openSUSE, iptables is split into the packages iptables, libiptc0, 
> libiptc-devel, libxtables9 and libxtables-devel, and libip6tc.so is a 
> -devel thing that is generally not installed on user's machines. (Hence 
> I spot this.) I think this should be similar in Debian.
> 
> Also, note that iptables itself is not installed while building iptables 
> itself (for obvious reasons) in most distribution build systems.

By this explanation, then I don't see why we need that -lip6tc in the
makefile.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jan Engelhardt - Dec. 4, 2012, 1:42 p.m.
On Tuesday 2012-12-04 13:16, Pablo Neira Ayuso wrote:

>On Mon, Dec 03, 2012 at 04:58:11PM +0100, Jan Engelhardt wrote:
>> On Monday 2012-12-03 14:12, Pablo Neira Ayuso wrote:
>> 
>> >On Sun, Dec 02, 2012 at 07:16:48PM +0100, Jan Engelhardt wrote:
>> >> Link stage of libip6t_NETMAP failed since recently.
>> >> 
>> >>   CCLD     libip6t_NETMAP.so
>> >> /usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld:
>> >> cannot find -lip6tc
>> >
>> >Is this problem opensuse specific? Need some diagnosing information on
>> >why that's happening.
>> 
>> This happens whenever you don't have /usr/lib(64)/libip6tc.so.
>> 
>> In openSUSE, iptables is split into the packages iptables, libiptc0, 
>> libiptc-devel, libxtables9 and libxtables-devel, and libip6tc.so is a 
>> -devel thing that is generally not installed on user's machines. (Hence 
>> I spot this.) I think this should be similar in Debian.
>> 
>> Also, note that iptables itself is not installed while building iptables 
>> itself (for obvious reasons) in most distribution build systems.
>
>By this explanation, then I don't see why we need that -lip6tc in the
>makefile.

Without -lip6tc (the current state of the 'next' branch), it would yield 
an error:

libip6t_NETMAP.oo: In function `NETMAP_print':
/home/jengelh/code/iptables/extensions/libip6t_NETMAP.c:64: undefined 
reference to `ipv6_prefix_length'
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/extensions/GNUmakefile.in b/extensions/GNUmakefile.in
index e71e3ff..68e0b9b 100644
--- a/extensions/GNUmakefile.in
+++ b/extensions/GNUmakefile.in
@@ -101,7 +101,8 @@  libxt_state.so: libxt_conntrack.so
 	ln -fs $< $@
 
 # Need the LIBADDs in iptables/Makefile.am too for libxtables_la_LIBADD
-ip6t_NETMAP_LIBADD  = -lip6tc
+ip6t_NETMAP_LIBADD  = -L${top_builddir}/libiptc/.libs \
+                      -L${top_builddir}/libiptc -lip6tc
 xt_RATEEST_LIBADD   = -lm
 xt_statistic_LIBADD = -lm