[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#712103: linux-3.2.46-1 does not compile (rcupdate.h)



On Thu, Jun 13, 2013 at 09:10:27PM +0000, Bjarni Ingi Gislason wrote:
> On Thu, Jun 13, 2013 at 03:07:26AM +0100, Ben Hutchings wrote:
> > Control: tag -1 moreinfo
> > 
> > On Wed, 2013-06-12 at 23:46 +0000, Bjarni Ingi Gislason wrote:
> > > Package: linux-source-3.2
> > > Version: 3.2.46-1
> > > Severity: important
> > > 
> > > Dear Maintainer,
> > > 
> > >    * What led up to the situation?
> > > 
> > >   Compiling error:
> > > 
> > > In file included from include/linux/mm_types.h:15:0,
> > >                  from include/linux/sched.h:64,
> > >                  from arch/x86/kernel/asm-offsets.c:9:
> > > include/linux/rcupdate.h: In function '__kfree_rcu':
> > > include/linux/rcupdate.h:834:2: error: size of unnamed array is negative
> > > make[1]: *** [arch/x86/kernel/asm-offsets.s] Error 1
> > > make: *** [prepare0] Error 2
> > > 
> > >   Line 834 is BUILD_BUG_ON... in
> > > 
> > > static __always_inline
> > > void __kfree_rcu(struct rcu_head *head, unsigned long offset)
> > > {
> > > 	typedef void (*rcu_callback)(struct rcu_head *);
> > > 
> > > 	BUILD_BUG_ON(!__builtin_constant_p(offset));
> > > 
> > > 
> > >   "offset" is declared as an "unsigned long" so can't be negative!
> > 
> > This is a build-time assertion that the caller is passing a compile-time
> > constant for offset.  If the assertion fails it triggers this weird
> > 'size of unnamed array is negative' error.
> > 
> > But nothing in asm-offsets.c will be calling it, so this doesn't make
> > sense to me.
> > 
> > You forgot to attach your .config.
> > 
> 
>   In the main Makefile I changed "-O2" to "-O0":
> 

  This bug is most probably caused by the "-O0" option for "gcc" as I
got an error when compiling an older version

In file included from linux-2.6.38.5/arch/x86/include/asm/alternative.h:105:0,
                 from linux-2.6.38.5/arch/x86/include/asm/bitops.h:16,
                 from include/linux/bitops.h:22,
                 from include/linux/kernel.h:17,
                 from include/linux/sched.h:55,
                 from include/linux/stackprotector.h:5,
                 from arch/x86/kernel/process_32.c:12:
linux-2.6.38.5/arch/x86/include/asm/cpufeature.h: In function 'prepare_to_copy':
linux-2.6.38.5/arch/x86/include/asm/cpufeature.h:321:4: warning: asm operand 0 probably doesn't match constraints [enabled by default]
linux-2.6.38.5/arch/x86/include/asm/cpufeature.h:321:4: warning: asm operand 0 probably doesn't match constraints [enabled by default]
linux-2.6.38.5/arch/x86/include/asm/cpufeature.h:321:4: error: impossible constraint in 'asm'
linux-2.6.38.5/arch/x86/include/asm/cpufeature.h:321:4: error: impossible constraint in 'asm'
linux-2.6.38.5/arch/x86/include/asm/cpufeature.h: In function '__switch_to':
linux-2.6.38.5/arch/x86/include/asm/cpufeature.h:321:4: warning: asm operand 0 probably doesn't match constraints [enabled by default]
linux-2.6.38.5/arch/x86/include/asm/cpufeature.h:321:4: warning: asm operand 0 probably doesn't match constraints [enabled by default]
make[2]: *** [arch/x86/kernel/process_32.o] Error 1
make[1]: *** [arch/x86/kernel] Error 2
make: *** [arch/x86] Error 2

  The bug is thus either in the compiler "gcc" or assember "as".  I
will compile 3.2.46-1 later with the "-O2" (default) option.

-- 
Bjarni I. Gislason


Reply to: