Message ID | 87bnmkxxko.fsf@husum.klickitat.com |
---|---|
State | Changes Requested |
Headers | show |
Thanks, unfortunately this doesn't compile for me: ccache_cc -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wformat=2 -O2 -Os -pipe -mno-branch-likely -mips32r2 -mtune=34kc -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -mips16 -minterlink-mips16 -DHAVE_SETNS -ffunction-sections -fdata-sections -I../include -I/home/steven/workspace/openwrt/staging_dir/target-mips_34kc_musl-1.1.5/usr/include/libnl-tiny -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib\" -DNO_SHARED_LIBS -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE -DIPROUTE2_TINY -c -o iplink_bridge_slave.o iplink_bridge_slave.c In file included from ../include/linux/if_bridge.h:18:0, from iplink_bridge_slave.c:16: ../include/linux/in6.h:40:0: warning: "s6_addr" redefined #define s6_addr in6_u.u6_addr8 ^ In file included from iplink_bridge_slave.c:14:0: /home/steven/workspace/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.9-linaro_musl-1.1.5/include/netinet/in.h:32:0: note: this is the location of the previous definition #define s6_addr __in6_union.__s6_addr ^ In file included from ../include/linux/if_bridge.h:18:0, from iplink_bridge_slave.c:16: ../include/linux/in6.h:42:0: warning: "s6_addr16" redefined #define s6_addr16 in6_u.u6_addr16 ^ In file included from iplink_bridge_slave.c:14:0: /home/steven/workspace/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.9-linaro_musl-1.1.5/include/netinet/in.h:33:0: note: this is the location of the previous definition #define s6_addr16 __in6_union.__s6_addr16 ^ In file included from ../include/linux/if_bridge.h:18:0, from iplink_bridge_slave.c:16: ../include/linux/in6.h:43:0: warning: "s6_addr32" redefined #define s6_addr32 in6_u.u6_addr32 ^ In file included from iplink_bridge_slave.c:14:0: /home/steven/workspace/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.9-linaro_musl-1.1.5/include/netinet/in.h:34:0: note: this is the location of the previous definition #define s6_addr32 __in6_union.__s6_addr32 ^ In file included from ../include/linux/if_bridge.h:18:0, from iplink_bridge_slave.c:16: ../include/linux/in6.h:169:0: warning: "IPV6_ADD_MEMBERSHIP" redefined #define IPV6_ADD_MEMBERSHIP 20 ^ In file included from iplink_bridge_slave.c:14:0: /home/steven/workspace/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.9-linaro_musl-1.1.5/include/netinet/in.h:369:0: note: this is the location of the previous definition #define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP ^ In file included from ../include/linux/if_bridge.h:18:0, from iplink_bridge_slave.c:16: ../include/linux/in6.h:170:0: warning: "IPV6_DROP_MEMBERSHIP" redefined #define IPV6_DROP_MEMBERSHIP 21 ^ In file included from iplink_bridge_slave.c:14:0: /home/steven/workspace/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.9-linaro_musl-1.1.5/include/netinet/in.h:370:0: note: this is the location of the previous definition #define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP ^ In file included from ../include/linux/if_bridge.h:18:0, from iplink_bridge_slave.c:16: ../include/linux/in6.h:32:8: error: redefinition of 'struct in6_addr' struct in6_addr { ^ In file included from iplink_bridge_slave.c:14:0: /home/steven/workspace/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.9-linaro_musl-1.1.5/include/netinet/in.h:24:8: note: originally defined here struct in6_addr ^ In file included from ../include/linux/if_bridge.h:18:0, from iplink_bridge_slave.c:16: ../include/linux/in6.h:49:8: error: redefinition of 'struct sockaddr_in6' struct sockaddr_in6 { ^ In file included from iplink_bridge_slave.c:14:0: /home/steven/workspace/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.9-linaro_musl-1.1.5/include/netinet/in.h:36:8: note: originally defined here struct sockaddr_in6 ^ In file included from ../include/linux/if_bridge.h:18:0, from iplink_bridge_slave.c:16: ../include/linux/in6.h:59:8: error: redefinition of 'struct ipv6_mreq' struct ipv6_mreq { ^ In file included from iplink_bridge_slave.c:14:0: /home/steven/workspace/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.9-linaro_musl-1.1.5/include/netinet/in.h:45:8: note: originally defined here struct ipv6_mreq ^ <builtin>: recipe for target 'iplink_bridge_slave.o' failed make[4]: *** [iplink_bridge_slave.o] Error 1 make[4]: Leaving directory '/home/steven/workspace/openwrt/build_dir/target-mips_34kc_musl-1.1.5/iproute2-tiny/iproute2-3.18.0/ip' Makefile:45: recipe for target 'all' failed make[3]: *** [all] Error 2
>>>>> "Steven" == Steven Barth <cyrus@openwrt.org> writes:
Steven> Thanks, unfortunately this doesn't compile for me:
Can you email me your .config?
I'll confess I only test-built it with uClibc.
On 05.01.2015 11:28, Russell Senior wrote: >>>>>> "Steven" == Steven Barth <cyrus@openwrt.org> writes: > Steven> Thanks, unfortunately this doesn't compile for me: > > Can you email me your .config? > > I'll confess I only test-built it with uClibc. Thanks. That is usually sufficient, though we are thinking of evaluating musl as a new default libc at some point so we want to keep at least the core packages compiling with it at this point. I'm building with musl as libc and GCC 4.9 linaro as compiler (latter should be standard already) all the rest is defaults. I can send you the .config if you really want to but its cluttered with all sorts of unrelated stuff. This issue mainly looks like wrong order of inclusions or duplicate inclusion of certain headers.
It'd probably be nice to add vlan filtering support to the bridge utility. I submitted a patch to do so earlier https://lists.openwrt.org/pipermail/openwrt-devel/2014-December/030024.html On 30/12/14 11:17 PM, Russell Senior wrote: > Signed-off-by: Russell Senior <russell@personaltelco.net> > > --- > package/network/utils/iproute2/Makefile | 15 +++++++++++++-- > package/network/utils/iproute2/patches/300-ip_tiny.patch | 15 ++++++++------- > 2 files changed, 21 insertions(+), 9 deletions(-) > > diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile > index 9aea05e..13b240e 100644 > --- a/package/network/utils/iproute2/Makefile > +++ b/package/network/utils/iproute2/Makefile > @@ -8,12 +8,12 @@ > include $(TOPDIR)/rules.mk > > PKG_NAME:=iproute2 > -PKG_VERSION:=3.17.0 > +PKG_VERSION:=3.18.0 > PKG_RELEASE:=1 > > PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz > PKG_SOURCE_URL:=http://kernel.org/pub/linux/utils/net/iproute2/ > -PKG_MD5SUM:=b741a02c6dda5818d18011d572874493 > +PKG_MD5SUM:=6f6ad51a00007880460e103367b16057 > PKG_BUILD_PARALLEL:=1 > PKG_LICENSE:=GPL-2.0 > > @@ -63,6 +63,11 @@ $(call Package/iproute2/Default) > TITLE:=Socket statistics utility > endef > > +define Package/ip-bridge > +$(call Package/iproute2/Default) > + TITLE:=Bridge utility from iproute2 > +endef > + > ifeq ($(BUILD_VARIANT),tiny) > IP_CONFIG_TINY:=y > endif > @@ -135,8 +140,14 @@ define Package/ss/install > $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc/ss $(1)/usr/sbin/ > endef > > +define Package/ip-bridge/install > + $(INSTALL_DIR) $(1)/usr/sbin > + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bridge/bridge $(1)/usr/sbin/ > +endef > + > $(eval $(call BuildPackage,ip)) > $(eval $(call BuildPackage,ip-full)) > $(eval $(call BuildPackage,tc)) > $(eval $(call BuildPackage,genl)) > $(eval $(call BuildPackage,ss)) > +$(eval $(call BuildPackage,ip-bridge)) > diff --git a/package/network/utils/iproute2/patches/300-ip_tiny.patch b/package/network/utils/iproute2/patches/300-ip_tiny.patch > index 5b0d56c..3620120 100644 > --- a/package/network/utils/iproute2/patches/300-ip_tiny.patch > +++ b/package/network/utils/iproute2/patches/300-ip_tiny.patch > @@ -1,6 +1,6 @@ > --- a/ip/Makefile > +++ b/ip/Makefile > -@@ -15,6 +15,13 @@ ifeq ($(IP_CONFIG_SETNS),y) > +@@ -16,6 +16,13 @@ ifeq ($(IP_CONFIG_SETNS),y) > CFLAGS += -DHAVE_SETNS > endif > > @@ -14,7 +14,7 @@ > ALLOBJ=$(IPOBJ) $(RTMONOBJ) > SCRIPTS=ifcfg rtpr routel routef > TARGETS=ip rtmon > -@@ -42,7 +49,7 @@ else > +@@ -43,7 +50,7 @@ else > > ip: static-syms.o > static-syms.o: static-syms.h > @@ -25,7 +25,7 @@ > sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \ > --- a/ip/ip.c > +++ b/ip/ip.c > -@@ -66,29 +66,41 @@ static const struct cmd { > +@@ -69,30 +69,42 @@ static const struct cmd { > int (*func)(int argc, char **argv); > } cmds[] = { > { "address", do_ipaddr }, > @@ -44,6 +44,7 @@ > { "link", do_iplink }, > +#ifndef IPROUTE2_TINY > { "l2tp", do_ipl2tp }, > + { "fou", do_ipfou }, > +#endif > { "tunnel", do_iptunnel }, > { "tunl", do_iptunnel }, > @@ -69,7 +70,7 @@ > }; > --- a/lib/utils.c > +++ b/lib/utils.c > -@@ -627,6 +627,7 @@ const char *rt_addr_n2a(int af, int len, > +@@ -629,6 +629,7 @@ const char *rt_addr_n2a(int af, const vo > case AF_INET: > case AF_INET6: > return inet_ntop(af, addr, buf, buflen); > @@ -77,7 +78,7 @@ > case AF_IPX: > return ipx_ntop(af, addr, buf, buflen); > case AF_DECnet: > -@@ -635,6 +636,7 @@ const char *rt_addr_n2a(int af, int len, > +@@ -637,6 +638,7 @@ const char *rt_addr_n2a(int af, const vo > memcpy(dna.a_addr, addr, 2); > return dnet_ntop(af, &dna, buf, buflen); > } > @@ -85,7 +86,7 @@ > default: > return "???"; > } > -@@ -710,6 +712,7 @@ const char *format_host(int af, int len, > +@@ -712,6 +714,7 @@ const char *format_host(int af, int len, > case AF_INET6: > len = 16; > break; > @@ -93,7 +94,7 @@ > case AF_IPX: > len = 10; > break; > -@@ -720,6 +723,7 @@ const char *format_host(int af, int len, > +@@ -722,6 +725,7 @@ const char *format_host(int af, int len, > len = 2; > break; > #endif
diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile index 9aea05e..13b240e 100644 --- a/package/network/utils/iproute2/Makefile +++ b/package/network/utils/iproute2/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iproute2 -PKG_VERSION:=3.17.0 +PKG_VERSION:=3.18.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=http://kernel.org/pub/linux/utils/net/iproute2/ -PKG_MD5SUM:=b741a02c6dda5818d18011d572874493 +PKG_MD5SUM:=6f6ad51a00007880460e103367b16057 PKG_BUILD_PARALLEL:=1 PKG_LICENSE:=GPL-2.0 @@ -63,6 +63,11 @@ $(call Package/iproute2/Default) TITLE:=Socket statistics utility endef +define Package/ip-bridge +$(call Package/iproute2/Default) + TITLE:=Bridge utility from iproute2 +endef + ifeq ($(BUILD_VARIANT),tiny) IP_CONFIG_TINY:=y endif @@ -135,8 +140,14 @@ define Package/ss/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc/ss $(1)/usr/sbin/ endef +define Package/ip-bridge/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bridge/bridge $(1)/usr/sbin/ +endef + $(eval $(call BuildPackage,ip)) $(eval $(call BuildPackage,ip-full)) $(eval $(call BuildPackage,tc)) $(eval $(call BuildPackage,genl)) $(eval $(call BuildPackage,ss)) +$(eval $(call BuildPackage,ip-bridge)) diff --git a/package/network/utils/iproute2/patches/300-ip_tiny.patch b/package/network/utils/iproute2/patches/300-ip_tiny.patch index 5b0d56c..3620120 100644 --- a/package/network/utils/iproute2/patches/300-ip_tiny.patch +++ b/package/network/utils/iproute2/patches/300-ip_tiny.patch @@ -1,6 +1,6 @@ --- a/ip/Makefile +++ b/ip/Makefile -@@ -15,6 +15,13 @@ ifeq ($(IP_CONFIG_SETNS),y) +@@ -16,6 +16,13 @@ ifeq ($(IP_CONFIG_SETNS),y) CFLAGS += -DHAVE_SETNS endif @@ -14,7 +14,7 @@ ALLOBJ=$(IPOBJ) $(RTMONOBJ) SCRIPTS=ifcfg rtpr routel routef TARGETS=ip rtmon -@@ -42,7 +49,7 @@ else +@@ -43,7 +50,7 @@ else ip: static-syms.o static-syms.o: static-syms.h @@ -25,7 +25,7 @@ sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \ --- a/ip/ip.c +++ b/ip/ip.c -@@ -66,29 +66,41 @@ static const struct cmd { +@@ -69,30 +69,42 @@ static const struct cmd { int (*func)(int argc, char **argv); } cmds[] = { { "address", do_ipaddr }, @@ -44,6 +44,7 @@ { "link", do_iplink }, +#ifndef IPROUTE2_TINY { "l2tp", do_ipl2tp }, + { "fou", do_ipfou }, +#endif { "tunnel", do_iptunnel }, { "tunl", do_iptunnel }, @@ -69,7 +70,7 @@ }; --- a/lib/utils.c +++ b/lib/utils.c -@@ -627,6 +627,7 @@ const char *rt_addr_n2a(int af, int len, +@@ -629,6 +629,7 @@ const char *rt_addr_n2a(int af, const vo case AF_INET: case AF_INET6: return inet_ntop(af, addr, buf, buflen); @@ -77,7 +78,7 @@ case AF_IPX: return ipx_ntop(af, addr, buf, buflen); case AF_DECnet: -@@ -635,6 +636,7 @@ const char *rt_addr_n2a(int af, int len, +@@ -637,6 +638,7 @@ const char *rt_addr_n2a(int af, const vo memcpy(dna.a_addr, addr, 2); return dnet_ntop(af, &dna, buf, buflen); } @@ -85,7 +86,7 @@ default: return "???"; } -@@ -710,6 +712,7 @@ const char *format_host(int af, int len, +@@ -712,6 +714,7 @@ const char *format_host(int af, int len, case AF_INET6: len = 16; break; @@ -93,7 +94,7 @@ case AF_IPX: len = 10; break; -@@ -720,6 +723,7 @@ const char *format_host(int af, int len, +@@ -722,6 +725,7 @@ const char *format_host(int af, int len, len = 2; break; #endif
Signed-off-by: Russell Senior <russell@personaltelco.net> --- package/network/utils/iproute2/Makefile | 15 +++++++++++++-- package/network/utils/iproute2/patches/300-ip_tiny.patch | 15 ++++++++------- 2 files changed, 21 insertions(+), 9 deletions(-)