Hi John, I forced CONFIG_NETFILTER_XT_MATCH_STATISTIC=y in my kernel config by adding it to openwrt/target/linux/brcm63xx/config-4.1 . However, you have to do a complete build from scratch, I noticed that removing iptables build directory and related files in openwrt/staging_dir/target-*/pkginfo directory rendered my build dir unusable.
I use glibc-2.24 and gcc-5.3.0. Alin On Fri, Apr 27, 2018 at 8:41 AM, John Crispin <j...@phrozen.org> wrote: > > > On 24/04/18 10:05, Alin Nastac wrote: >> >> This fixes an iptables link error when kernel config include >> CONFIG_NETFILTER_XT_MATCH_STATISTIC=y >> related to the missing -lm argument on the linker command line. Error is >> caused by >> the odd looking linker argument ${$*_LIBADD} which get expanded to an >> empty string. > > > Hi, > the $* usage is correct > > src/%.c: > echo $* > > ->src/example (bei src/example.c) > > please provide your diffconfig so i can reproduce your issue locally. > > John > > > >> >> Signed-off-by: Alin Nastac <alin.nas...@gmail.com> >> --- >> package/network/utils/iptables/patches/600-shared-libext.patch | 10 >> +++++----- >> 1 file changed, 5 insertions(+), 5 deletions(-) >> >> diff --git >> a/package/network/utils/iptables/patches/600-shared-libext.patch >> b/package/network/utils/iptables/patches/600-shared-libext.patch >> index a906d40..17e7fbe 100644 >> --- a/package/network/utils/iptables/patches/600-shared-libext.patch >> +++ b/package/network/utils/iptables/patches/600-shared-libext.patch >> @@ -28,27 +28,27 @@ >> -libext.a: initext.o ${libext_objs} >> - ${AM_VERBOSE_AR} ${AR} crs $@ $^; >> +libiptext.so: initext.o ${libext_objs} >> -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; >> ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} >> ${xt_connlabel_LIBADD}; >> -libext_ebt.a: initextb.o ${libext_ebt_objs} >> - ${AM_VERBOSE_AR} ${AR} crs $@ $^; >> +libiptext_ebt.so: initextb.o ${libext_ebt_objs} >> -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; >> ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} >> ${xt_connlabel_LIBADD}; >> -libext_arpt.a: initexta.o ${libext_arpt_objs} >> - ${AM_VERBOSE_AR} ${AR} crs $@ $^; >> +libiptext_arpt.so: initexta.o ${libext_arpt_objs} >> -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; >> ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} >> ${xt_connlabel_LIBADD}; >> -libext4.a: initext4.o ${libext4_objs} >> - ${AM_VERBOSE_AR} ${AR} crs $@ $^; >> +libiptext4.so: initext4.o ${libext4_objs} >> -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; >> ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} >> ${xt_connlabel_LIBADD}; >> -libext6.a: initext6.o ${libext6_objs} >> - ${AM_VERBOSE_AR} ${AR} crs $@ $^; >> +libiptext6.so: initext6.o ${libext6_objs} >> -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; >> ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ >> $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} >> ${xt_connlabel_LIBADD}; >> initext_func := $(addprefix xt_,${pfx_build_static}) >> initextb_func := $(addprefix ebt_,${pfb_build_static}) > > _______________________________________________ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev