2008-07-30 18:48:46

by Mike Miller

[permalink] [raw]
Subject: Problems building 2.6.26 and 2.6.27-rc1

I'm getting the following error when trying to build either 2.6.26 or
2.6.27-rc1:

arch/x86/kernel/head64.c: In function ‘x86_64_start_kernel’:
arch/x86/kernel/head64.c:88: error: size of array ‘type name’ is negative

Systems I've tried are DL585 G5 with dual-core Opterons and ML370 G5 with
dual-core Intel. Both were originally installed using an x86_64 distro.

Anybody else seen this? Any workarounds?

Thanks,
mikem


2008-07-30 19:06:46

by Roland Dreier

[permalink] [raw]
Subject: Re: Problems building 2.6.26 and 2.6.27-rc1

> I'm getting the following error when trying to build either 2.6.26 or
> 2.6.27-rc1:
>
> arch/x86/kernel/head64.c: In function ‘x86_64_start_kernel’:
> arch/x86/kernel/head64.c:88: error: size of array ‘type name’ is negative

It looks like you're hitting

BUILD_BUG_ON(!(MODULES_VADDR > __START_KERNEL));

No idea why you're hitting that though. What's your .config and compiler?

- R.

2008-07-30 19:18:24

by Mike Miller

[permalink] [raw]
Subject: RE: Problems building 2.6.26 and 2.6.27-rc1



> -----Original Message-----
> From: Roland Dreier [mailto:[email protected]]
> Sent: Wednesday, July 30, 2008 2:06 PM
> To: Miller, Mike (OS Dev)
> Cc: LKML; LKML-scsi
> Subject: Re: Problems building 2.6.26 and 2.6.27-rc1
>
> > I'm getting the following error when trying to build
> either 2.6.26 or > 2.6.27-rc1:
> >
> > arch/x86/kernel/head64.c: In function 'x86_64_start_kernel':
> > arch/x86/kernel/head64.c:88: error: size of array 'type
> name' is negative
>
> It looks like you're hitting
>
> BUILD_BUG_ON(!(MODULES_VADDR > __START_KERNEL));

Same here, no idea why I'm hitting this...

>
> No idea why you're hitting that though. What's your .config
> and compiler?

Compiler is gcc 4.1.2 20070626 (Red Hat 4.1.2-14).

Config file is attached.

-- mikem


Attachments:
config.err (73.18 kB)
config.err

2008-07-30 19:24:34

by Roland Dreier

[permalink] [raw]
Subject: Re: Problems building 2.6.26 and 2.6.27-rc1

Hmm, doesn't reproduce here with your config and gcc 4.1.

No idea, sorry.

- R.

2008-07-30 19:35:36

by Mike Miller

[permalink] [raw]
Subject: RE: Problems building 2.6.26 and 2.6.27-rc1

Roland wrote:

>
> Hmm, doesn't reproduce here with your config and gcc 4.1.
>
> No idea, sorry.

Thanks for taking a look. This is perplexing. I know I've built this kernel, but sometimes I hit the build bug and sometimes I don't. I can't pinpoint any differences between working and non-working builds.

Anybody else? :)

-- mikem

2008-07-30 20:08:33

by Mike Miller

[permalink] [raw]
Subject: RE: Problems building 2.6.26 and 2.6.27-rc1

Roland wrote:

>
> > I'm getting the following error when trying to build
> either 2.6.26 or > 2.6.27-rc1:
> >
> > arch/x86/kernel/head64.c: In function 'x86_64_start_kernel':
> > arch/x86/kernel/head64.c:88: error: size of array 'type
> name' is negative
>
> It looks like you're hitting
>
> BUILD_BUG_ON(!(MODULES_VADDR > __START_KERNEL));
>
> No idea why you're hitting that though. What's your .config
> and compiler?
>
I think maybe I've figured out what's breaking my build. If use "make -jN" I hit the error. I usually set N to the number of processors (real and HT). So if /proc/cpuinfo display info about 4 processors I use -j4, etc. If I don't specify the number of jobs to run simultaneously the build completes with just the usual warnings.

Any experts on parallelism out there?

-- mikem

2008-07-30 20:17:35

by Sam Ravnborg

[permalink] [raw]
Subject: Re: Problems building 2.6.26 and 2.6.27-rc1

On Wed, Jul 30, 2008 at 08:07:28PM +0000, Miller, Mike (OS Dev) wrote:
> Roland wrote:
>
> >
> > > I'm getting the following error when trying to build
> > either 2.6.26 or > 2.6.27-rc1:
> > >
> > > arch/x86/kernel/head64.c: In function 'x86_64_start_kernel':
> > > arch/x86/kernel/head64.c:88: error: size of array 'type
> > name' is negative
> >
> > It looks like you're hitting
> >
> > BUILD_BUG_ON(!(MODULES_VADDR > __START_KERNEL));
> >
> > No idea why you're hitting that though. What's your .config
> > and compiler?
> >
> I think maybe I've figured out what's breaking my build. If use "make -jN" I hit the error. I usually set N to the number of processors (real and HT). So if /proc/cpuinfo display info about 4 processors I use -j4, etc. If I don't specify the number of jobs to run simultaneously the build completes with just the usual warnings.
>
> Any experts on parallelism out there?

Can you post the output of a make -j4 V=1 run that fials and one that succeeds.
Then we can maybe spot something.

Sam

2008-07-30 20:22:19

by Mike Miller

[permalink] [raw]
Subject: RE: Problems building 2.6.26 and 2.6.27-rc1

Sam wrote:

>
> On Wed, Jul 30, 2008 at 08:07:28PM +0000, Miller, Mike (OS Dev) wrote:
> > Roland wrote:
> >
> > >
> > > > I'm getting the following error when trying to build either
> > > 2.6.26 or > 2.6.27-rc1:
> > > >
> > > > arch/x86/kernel/head64.c: In function 'x86_64_start_kernel':
> > > > arch/x86/kernel/head64.c:88: error: size of array
> 'type name' is
> > > negative
> > >
> > > It looks like you're hitting
> > >
> > > BUILD_BUG_ON(!(MODULES_VADDR > __START_KERNEL));
> > >
> > > No idea why you're hitting that though. What's your .config and
> > > compiler?
> > >
> > I think maybe I've figured out what's breaking my build. If
> use "make -jN" I hit the error. I usually set N to the number
> of processors (real and HT). So if /proc/cpuinfo display info
> about 4 processors I use -j4, etc. If I don't specify the
> number of jobs to run simultaneously the build completes with
> just the usual warnings.
> >
> > Any experts on parallelism out there?
>
> Can you post the output of a make -j4 V=1 run that fials and
> one that succeeds.
> Then we can maybe spot something.
>
> Sam
Sure. Not to be stupid, but do you want the entire output from the builds or just what would go to stderr?

-- mikem

2008-07-30 20:32:18

by Sam Ravnborg

[permalink] [raw]
Subject: Re: Problems building 2.6.26 and 2.6.27-rc1

On Wed, Jul 30, 2008 at 08:21:11PM +0000, Miller, Mike (OS Dev) wrote:
> Sam wrote:
>
> >
> > On Wed, Jul 30, 2008 at 08:07:28PM +0000, Miller, Mike (OS Dev) wrote:
> > > Roland wrote:
> > >
> > > >
> > > > > I'm getting the following error when trying to build either
> > > > 2.6.26 or > 2.6.27-rc1:
> > > > >
> > > > > arch/x86/kernel/head64.c: In function 'x86_64_start_kernel':
> > > > > arch/x86/kernel/head64.c:88: error: size of array
> > 'type name' is
> > > > negative
> > > >
> > > > It looks like you're hitting
> > > >
> > > > BUILD_BUG_ON(!(MODULES_VADDR > __START_KERNEL));
> > > >
> > > > No idea why you're hitting that though. What's your .config and
> > > > compiler?
> > > >
> > > I think maybe I've figured out what's breaking my build. If
> > use "make -jN" I hit the error. I usually set N to the number
> > of processors (real and HT). So if /proc/cpuinfo display info
> > about 4 processors I use -j4, etc. If I don't specify the
> > number of jobs to run simultaneously the build completes with
> > just the usual warnings.
> > >
> > > Any experts on parallelism out there?
> >
> > Can you post the output of a make -j4 V=1 run that fials and
> > one that succeeds.
> > Then we can maybe spot something.
> >
> > Sam
> Sure. Not to be stupid, but do you want the entire output from the builds or just what would go to stderr?

Entire output please.

Sam