Patchwork static build breakage - 1.4.16.2.

login
register
mail settings
Submitter Jan Engelhardt
Date Oct. 8, 2012, 10:04 p.m.
Message ID <alpine.LNX.2.01.1210090002380.21001@nerf07.vanv.qr>
Download mbox | patch
Permalink /patch/190155/
State Accepted
Headers show

Comments

Jan Engelhardt - Oct. 8, 2012, 10:04 p.m.
On Monday 2012-10-08 23:04, Maciej Żenczykowski wrote:
>
>Not entirely clear what's breaking, but:
>
>./configure --enable-static --disable-shared --enable-ipv4 --enable-ipv6
>
>make[3]: *** No rule to make target `libxt_NOTRACK.o', needed by
>`libext.a'.  Stop.
>

(N.B. You can have both --enable-static and --enable-shared)

This patch seems to do it for me. Ok for you?

origin git://git.inai.de/iptables master
parent c1a150c98fc94858a440550f0cb347a6060ebb30 (v1.4.16.2)
commit 13527271f1db3c0576ab47b84e85d979f56281a6
Author: Jan Engelhardt <jengelh@inai.de>
Date:   Mon Oct 8 23:56:12 2012 +0200

build: remove symlink-only extensions from static object list

$ ./configure --enable-static --disable-shared --enable-ipv4
  --enable-ipv6 && make
[...]
make[3]: *** No rule to make target "libxt_NOTRACK.o", needed by
"libext.a". Stop.

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
---
 extensions/GNUmakefile.in |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Maciej Żenczykowski - Oct. 9, 2012, 12:16 a.m.
> (N.B. You can have both --enable-static and --enable-shared)

Yeah, but I just want a small binary and don't need shared support
(indeed it's even undesirable).

> This patch seems to do it for me. Ok for you?

Looks like it.
Care to push and release as .3?

Although perhaps calling it pfx_aliases or pfx_build_alias would be
better (there doesn't seem to be any actual symlinks are there?)

This also skips the blacklist_modules logic, which I guess in this
case doesn't matter.

> @@ -39,7 +39,7 @@ endif
>  #      Wildcard module list
>  #
>  pfx_build_mod := $(patsubst ${srcdir}/libxt_%.c,%,$(sort $(wildcard ${srcdir}/libxt_*.c)))
> -pfx_build_mod += NOTRACK state
> +pfx_symlinks  := NOTRACK state
>  @ENABLE_IPV4_TRUE@ pf4_build_mod := $(patsubst ${srcdir}/libipt_%.c,%,$(sort $(wildcard ${srcdir}/libipt_*.c)))
>  @ENABLE_IPV6_TRUE@ pf6_build_mod := $(patsubst ${srcdir}/libip6t_%.c,%,$(sort $(wildcard ${srcdir}/libip6t_*.c)))
>  pfx_build_mod := $(filter-out @blacklist_modules@,${pfx_build_mod})
> @@ -48,7 +48,7 @@ pf6_build_mod := $(filter-out @blacklist_modules@,${pf6_build_mod})
>  pfx_objs      := $(patsubst %,libxt_%.o,${pfx_build_mod})
>  pf4_objs      := $(patsubst %,libipt_%.o,${pf4_build_mod})
>  pf6_objs      := $(patsubst %,libip6t_%.o,${pf6_build_mod})
> -pfx_solibs    := $(patsubst %,libxt_%.so,${pfx_build_mod})
> +pfx_solibs    := $(patsubst %,libxt_%.so,${pfx_build_mod} ${pfx_symlinks})
>  pf4_solibs    := $(patsubst %,libipt_%.so,${pf4_build_mod})
>  pf6_solibs    := $(patsubst %,libip6t_%.so,${pf6_build_mod})
>
> @@ -220,7 +220,7 @@ man_run    = \
>         done >$@;
>
>  matches.man: .initext.dd .initext4.dd .initext6.dd $(wildcard ${srcdir}/lib*.man)
> -       $(call man_run,$(call ex_matches,${pfx_build_mod} ${pf4_build_mod} ${pf6_build_mod}))
> +       $(call man_run,$(call ex_matches,${pfx_build_mod} ${pf4_build_mod} ${pf6_build_mod} ${pfx_symlinks}))
>
>  targets.man: .initext.dd .initext4.dd .initext6.dd $(wildcard ${srcdir}/lib*.man)
> -       $(call man_run,$(call ex_targets,${pfx_build_mod} ${pf4_build_mod} ${pf6_build_mod}))
> +       $(call man_run,$(call ex_targets,${pfx_build_mod} ${pf4_build_mod} ${pf6_build_mod} ${pfx_symlinks}))
> --
> # Created with git-export-patch
--
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 - Oct. 9, 2012, 12:49 a.m.
On Tuesday 2012-10-09 02:16, Maciej Żenczykowski wrote:

>> (N.B. You can have both --enable-static and --enable-shared)
>
>Yeah, but I just want a small binary and don't need shared support
>(indeed it's even undesirable).
>
>> This patch seems to do it for me. Ok for you?
>
>Looks like it.
>Care to push and release as .3?
>
>Although perhaps calling it pfx_aliases or pfx_build_alias would be
>better (there doesn't seem to be any actual symlinks are there?)

You should build with --disable-static sometimes. :)


>This also skips the blacklist_modules logic, which I guess in this
>case doesn't matter.

Indeed not.


--
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 - Oct. 9, 2012, 10:04 a.m.
On Mon, Oct 08, 2012 at 05:16:14PM -0700, Maciej Żenczykowski wrote:
> > (N.B. You can have both --enable-static and --enable-shared)
> 
> Yeah, but I just want a small binary and don't need shared support
> (indeed it's even undesirable).
> 
> > This patch seems to do it for me. Ok for you?
> 
> Looks like it.

Applied, thanks a lot.

> Care to push and release as .3?

Will do in a couple of days.
--
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 8b38df9..1cef239 100644
--- a/extensions/GNUmakefile.in
+++ b/extensions/GNUmakefile.in
@@ -39,7 +39,7 @@  endif
 #	Wildcard module list
 #
 pfx_build_mod := $(patsubst ${srcdir}/libxt_%.c,%,$(sort $(wildcard ${srcdir}/libxt_*.c)))
-pfx_build_mod += NOTRACK state
+pfx_symlinks  := NOTRACK state
 @ENABLE_IPV4_TRUE@ pf4_build_mod := $(patsubst ${srcdir}/libipt_%.c,%,$(sort $(wildcard ${srcdir}/libipt_*.c)))
 @ENABLE_IPV6_TRUE@ pf6_build_mod := $(patsubst ${srcdir}/libip6t_%.c,%,$(sort $(wildcard ${srcdir}/libip6t_*.c)))
 pfx_build_mod := $(filter-out @blacklist_modules@,${pfx_build_mod})
@@ -48,7 +48,7 @@  pf6_build_mod := $(filter-out @blacklist_modules@,${pf6_build_mod})
 pfx_objs      := $(patsubst %,libxt_%.o,${pfx_build_mod})
 pf4_objs      := $(patsubst %,libipt_%.o,${pf4_build_mod})
 pf6_objs      := $(patsubst %,libip6t_%.o,${pf6_build_mod})
-pfx_solibs    := $(patsubst %,libxt_%.so,${pfx_build_mod})
+pfx_solibs    := $(patsubst %,libxt_%.so,${pfx_build_mod} ${pfx_symlinks})
 pf4_solibs    := $(patsubst %,libipt_%.so,${pf4_build_mod})
 pf6_solibs    := $(patsubst %,libip6t_%.so,${pf6_build_mod})
 
@@ -220,7 +220,7 @@  man_run    = \
 	done >$@;
 
 matches.man: .initext.dd .initext4.dd .initext6.dd $(wildcard ${srcdir}/lib*.man)
-	$(call man_run,$(call ex_matches,${pfx_build_mod} ${pf4_build_mod} ${pf6_build_mod}))
+	$(call man_run,$(call ex_matches,${pfx_build_mod} ${pf4_build_mod} ${pf6_build_mod} ${pfx_symlinks}))
 
 targets.man: .initext.dd .initext4.dd .initext6.dd $(wildcard ${srcdir}/lib*.man)
-	$(call man_run,$(call ex_targets,${pfx_build_mod} ${pf4_build_mod} ${pf6_build_mod}))
+	$(call man_run,$(call ex_targets,${pfx_build_mod} ${pf4_build_mod} ${pf6_build_mod} ${pfx_symlinks}))