Subject: Re: linux-next: build failure after merge of the net-next tree

From: Stephen Rothwell <[email-masked]>
Date: Tue, 30 Sep 2014 13:22:13 +1000

Hi all,

On Tue, 30 Sep 2014 13:13:54 +1000 Stephen Rothwell <[email-masked]> wrote:
>
> Hi all,
> 
> After merging the net-next tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> net/bridge/br_nf_core.c:77:1: error: expected identifier or '(' before '{' token
>  {
>  ^
> net/bridge/br_nf_core.c:88:12: error: redefinition of 'br_nf_core_init'
>  int __init br_nf_core_init(void)
>             ^
> In file included from net/bridge/br_nf_core.c:23:0:
> net/bridge/br_private.h:762:19: note: previous definition of 'br_nf_core_init' was here
>  static inline int br_nf_core_init(void) { return 0; }
>                    ^
> net/bridge/br_nf_core.c:93:6: error: redefinition of 'br_nf_core_fini'
>  void br_nf_core_fini(void)
>       ^
> In file included from net/bridge/br_nf_core.c:23:0:
> net/bridge/br_private.h:763:20: note: previous definition of 'br_nf_core_fini' was here
>  static inline void br_nf_core_fini(void) {}
>                     ^
> 
> Caused by commit 34666d467cbf ("netfilter: bridge: move br_netfilter
> out of the core").  This build has CONFIG_BRIDGE_NETFILTER not set ...
> 
> I have applied the following patch for today:
> 
> From: Stephen Rothwell <[email-masked]>
> Date: Tue, 30 Sep 2014 13:09:09 +1000
> Subject: [PATCH] netfilter: bridge: don't build br_nf_core unless necessary
> 
> Signed-off-by: Stephen Rothwell <[email-masked]>
> ---
>  net/bridge/Makefile | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/net/bridge/Makefile b/net/bridge/Makefile
> index 5e3eac5dc8b9..eb653a225397 100644
> --- a/net/bridge/Makefile
> +++ b/net/bridge/Makefile
> @@ -6,12 +6,11 @@ obj-$(CONFIG_BRIDGE) += bridge.o
>  
>  bridge-y	:= br.o br_device.o br_fdb.o br_forward.o br_if.o br_input.o \
>  			br_ioctl.o br_stp.o br_stp_bpdu.o \
> -			br_stp_if.o br_stp_timer.o br_netlink.o \
> -			br_nf_core.o
> +			br_stp_if.o br_stp_timer.o br_netlink.o
>  
>  bridge-$(CONFIG_SYSFS) += br_sysfs_if.o br_sysfs_br.o
>  
> -obj-$(CONFIG_BRIDGE_NETFILTER) += br_netfilter.o
> +obj-$(CONFIG_BRIDGE_NETFILTER) += br_netfilter.o br_nf_core.o
>  
>  bridge-$(CONFIG_BRIDGE_IGMP_SNOOPING) += br_multicast.o br_mdb.o
>  
> -- 
> 2.1.1

After whish I get this from an x86_64 allmodconfig build:

ERROR: "br_nf_core_fini" [net/bridge/bridge.ko] undefined!
ERROR: "br_netfilter_rtable_init" [net/bridge/bridge.ko] undefined!
ERROR: "br_nf_core_init" [net/bridge/bridge.ko] undefined!

So I gave up :-(

I have used the net-next tree from next-20140926 for today.
-- 
Cheers,
Stephen Rothwell                    [email-masked]