Skip to contentSkip to conversation

2.6.18-mm1 compile failure on x86_64

DISCUSSION Martin Bligh 9 participants 20 messages Sep 25, 2006 – Sep 27, 2006

lore
Share & tools
lore
#0 lore raw

http://test.kernel.org/abat/49037/debug/test.log.0

  AS      arch/x86_64/boot/bootsect.o
  LD      arch/x86_64/boot/bootsect
  AS      arch/x86_64/boot/setup.o
  LD      arch/x86_64/boot/setup
  AS      arch/x86_64/boot/compressed/head.o
  CC      arch/x86_64/boot/compressed/misc.o

OBJCOPY arch/x86_64/boot/compressed/vmlinux.bin
BFD: Warning: Writing section `.data.percpu' to huge (ie negative) file offset 0x804700c0. /usr/local/autobench/sources/x86_64-cross/gcc-3.4.0-glibc-2.3.2/bin/x86_64-unknown-linux-gnu-objcopy: arch/x86_64/boot/compressed/vmlinux.bin: File truncated make[2]: *** [arch/x86_64/boot/compressed/vmlinux.bin] Error 1
make[1]: *** [arch/x86_64/boot/compressed/vmlinux] Error 2
make: *** [bzImage] Error 2
09/25/06-09:13:48 Build the kernel. Failed rc = 2
09/25/06-09:13:49 build: kernel build Failed rc = 1

Wierd. Same box compiled 2.6.18 fine.

M.

#1 lore raw
Quoted 11 lines · Martin Bligh

http://test.kernel.org/abat/49037/debug/test.log.0

  AS      arch/x86_64/boot/bootsect.o
  LD      arch/x86_64/boot/bootsect
  AS      arch/x86_64/boot/setup.o
  LD      arch/x86_64/boot/setup
  AS      arch/x86_64/boot/compressed/head.o
  CC      arch/x86_64/boot/compressed/misc.o

OBJCOPY arch/x86_64/boot/compressed/vmlinux.bin
BFD: Warning: Writing section `.data.percpu' to huge (ie negative) file offset 0x804700c0. /usr/local/autobench/sources/x86_64-cross/gcc-3.4.0-glibc-2.3.2/bin/x86_64-unknown-linux-gnu-objcopy: arch/x86_64/boot/compressed/vmlinux.bin: File truncated

Did you run out of disk space?

Jeff

#2 lore raw
Quoted 14 lines · Jeff Garzik
Quoted 10 lines · Martin Bligh

http://test.kernel.org/abat/49037/debug/test.log.0

  AS      arch/x86_64/boot/bootsect.o
  LD      arch/x86_64/boot/bootsect
  AS      arch/x86_64/boot/setup.o
  LD      arch/x86_64/boot/setup
  AS      arch/x86_64/boot/compressed/head.o
  CC      arch/x86_64/boot/compressed/misc.o

OBJCOPY arch/x86_64/boot/compressed/vmlinux.bin
BFD: Warning: Writing section `.data.percpu' to huge (ie negative) file offset 0x804700c0. /usr/local/autobench/sources/x86_64-cross/gcc-3.4.0-glibc-2.3.2/bin/x86_64-unknown-linux-gnu-objcopy: arch/x86_64/boot/compressed/vmlinux.bin: File truncated

Quoted 1 line

Did you run out of disk space?

Possibly, though it's meant to check that before it starts. Very odd error message though.

Andy ... any chance you can poke that box and see?

M.

#3 lore raw
In reply to Martin Bligh
Quoted 11 lines · Martin Bligh

http://test.kernel.org/abat/49037/debug/test.log.0

   AS      arch/x86_64/boot/bootsect.o
   LD      arch/x86_64/boot/bootsect
   AS      arch/x86_64/boot/setup.o
   LD      arch/x86_64/boot/setup
   AS      arch/x86_64/boot/compressed/head.o
   CC      arch/x86_64/boot/compressed/misc.o

OBJCOPY arch/x86_64/boot/compressed/vmlinux.bin
BFD: Warning: Writing section `.data.percpu' to huge (ie negative) file offset 0x804700c0.

Most likely that is the problem. I don't know what patch it could be (none of mine have been merged yet). Can you bisect?

-Andi

#4 lore raw
Quoted 13 lines · On Tue, 26 Sep 2006 08:41:27 +0200 Andi Kleen <[email protected]> wrote:
Quoted 11 lines · Martin Bligh

http://test.kernel.org/abat/49037/debug/test.log.0

   AS      arch/x86_64/boot/bootsect.o
   LD      arch/x86_64/boot/bootsect
   AS      arch/x86_64/boot/setup.o
   LD      arch/x86_64/boot/setup
   AS      arch/x86_64/boot/compressed/head.o
   CC      arch/x86_64/boot/compressed/misc.o

OBJCOPY arch/x86_64/boot/compressed/vmlinux.bin
BFD: Warning: Writing section `.data.percpu' to huge (ie negative) file offset 0x804700c0.

Quoted 2 lines

Most likely that is the problem. I don't know what patch it could be (none of mine have been merged yet).

That was 2.6.18-mm1 - it has around 300 of "yours" ;)

Quoted 1 line

Can you bisect?

I was unable to reproduce it. Lack of disk space is suspected.

#5 lore raw
Quoted 16 lines · Andrew Morton
Quoted 13 lines · On Tue, 26 Sep 2006 08:41:27 +0200 Andi Kleen <[email protected]> wrote:
Quoted 11 lines · Martin Bligh

http://test.kernel.org/abat/49037/debug/test.log.0

   AS      arch/x86_64/boot/bootsect.o
   LD      arch/x86_64/boot/bootsect
   AS      arch/x86_64/boot/setup.o
   LD      arch/x86_64/boot/setup
   AS      arch/x86_64/boot/compressed/head.o
   CC      arch/x86_64/boot/compressed/misc.o

OBJCOPY arch/x86_64/boot/compressed/vmlinux.bin
BFD: Warning: Writing section `.data.percpu' to huge (ie negative) file offset 0x804700c0.

Quoted 8 lines
Quoted 2 lines

Most likely that is the problem. I don't know what patch it could be (none of mine have been merged yet).

That was 2.6.18-mm1 - it has around 300 of "yours" ;)

Quoted 1 line

Can you bisect?

I was unable to reproduce it. Lack of disk space is suspected.

I suppose the BFD warning (writing to negative file offset) will cause that. I guess it tried to write ~4GB into the executable.

Probably it's a toolchain problem of some sort then.

-Andi

#6 lore raw
In reply to Martin Bligh
Quoted 19 lines · Martin Bligh

http://test.kernel.org/abat/49037/debug/test.log.0

  AS      arch/x86_64/boot/bootsect.o
  LD      arch/x86_64/boot/bootsect
  AS      arch/x86_64/boot/setup.o
  LD      arch/x86_64/boot/setup
  AS      arch/x86_64/boot/compressed/head.o
  CC      arch/x86_64/boot/compressed/misc.o

OBJCOPY arch/x86_64/boot/compressed/vmlinux.bin
BFD: Warning: Writing section `.data.percpu' to huge (ie negative) file
offset 0x804700c0. /usr/local/autobench/sources/x86_64-cross/gcc-3.4.0-glibc-2.3.2/bin/x86_64-unknown-linux-gnu-objcopy:
arch/x86_64/boot/compressed/vmlinux.bin: File truncated
make[2]: *** [arch/x86_64/boot/compressed/vmlinux.bin] Error 1
make[1]: *** [arch/x86_64/boot/compressed/vmlinux] Error 2
make: *** [bzImage] Error 2
09/25/06-09:13:48 Build the kernel. Failed rc = 2
09/25/06-09:13:49 build: kernel build Failed rc = 1

Quoted 1 line

Wierd. Same box compiled 2.6.18 fine.

Pretty sure this isn't a space problem, as we have just checked space before the build and I've taken no action since then. Someone did mention "tool chain issue" when it was first spotted. Will check with them and see why they thought that.

-apw

#7 lore raw
Quoted 21 lines · Andy Whitcroft
Quoted 19 lines · Martin Bligh

http://test.kernel.org/abat/49037/debug/test.log.0

  AS      arch/x86_64/boot/bootsect.o
  LD      arch/x86_64/boot/bootsect
  AS      arch/x86_64/boot/setup.o
  LD      arch/x86_64/boot/setup
  AS      arch/x86_64/boot/compressed/head.o
  CC      arch/x86_64/boot/compressed/misc.o

OBJCOPY arch/x86_64/boot/compressed/vmlinux.bin
BFD: Warning: Writing section `.data.percpu' to huge (ie negative) file
offset 0x804700c0. /usr/local/autobench/sources/x86_64-cross/gcc-3.4.0-glibc-2.3.2/bin/x86_64-unknown-linux-gnu-objcopy:
arch/x86_64/boot/compressed/vmlinux.bin: File truncated
make[2]: *** [arch/x86_64/boot/compressed/vmlinux.bin] Error 1
make[1]: *** [arch/x86_64/boot/compressed/vmlinux] Error 2
make: *** [bzImage] Error 2
09/25/06-09:13:48 Build the kernel. Failed rc = 2
09/25/06-09:13:49 build: kernel build Failed rc = 1

Quoted 8 lines
Quoted 2 lines

Wierd. Same box compiled 2.6.18 fine.

Pretty sure this isn't a space problem, as we have just checked space before the build and I've taken no action since then. Someone did mention "tool chain issue" when it was first spotted. Will check with them and see why they thought that.

Does this box have an older version of binutils (2.15?)? If so, it might be getting upset over the patch "note-section" in Andi's queue. I know it has been a bit problematic, but I don't know if the problems manifest in this way.

J

#8 lore raw
Quoted 31 lines · Jeremy Fitzhardinge
Quoted 21 lines · Andy Whitcroft
Quoted 19 lines · Martin Bligh

http://test.kernel.org/abat/49037/debug/test.log.0

  AS      arch/x86_64/boot/bootsect.o
  LD      arch/x86_64/boot/bootsect
  AS      arch/x86_64/boot/setup.o
  LD      arch/x86_64/boot/setup
  AS      arch/x86_64/boot/compressed/head.o
  CC      arch/x86_64/boot/compressed/misc.o

OBJCOPY arch/x86_64/boot/compressed/vmlinux.bin
BFD: Warning: Writing section `.data.percpu' to huge (ie negative) file
offset 0x804700c0. /usr/local/autobench/sources/x86_64-cross/gcc-3.4.0-glibc-2.3.2/bin/x86_64-unknown-linux-gnu-objcopy:
arch/x86_64/boot/compressed/vmlinux.bin: File truncated
make[2]: *** [arch/x86_64/boot/compressed/vmlinux.bin] Error 1
make[1]: *** [arch/x86_64/boot/compressed/vmlinux] Error 2
make: *** [bzImage] Error 2
09/25/06-09:13:48 Build the kernel. Failed rc = 2
09/25/06-09:13:49 build: kernel build Failed rc = 1

Quoted 8 lines
Quoted 2 lines

Wierd. Same box compiled 2.6.18 fine.

Pretty sure this isn't a space problem, as we have just checked space before the build and I've taken no action since then. Someone did mention "tool chain issue" when it was first spotted. Will check with them and see why they thought that.

Quoted 4 lines

Does this box have an older version of binutils (2.15?)? If so, it might be getting upset over the patch "note-section" in Andi's queue. I know it has been a bit problematic, but I don't know if the problems manifest in this way.

I've not seen it manifest like this but it would be worth trying Jan's patch from
http://lists.xensource.com/archives/html/xen-devel/2006-08/msg01416.html
to see if it helps.

Andi removed an identical patch (from someone else) from his queue due to http://marc.theaimsgroup.com/?l=linux-kernel&m=115629369729911&w=2 We have had the patch in the Xen tree for a couple of weeks now with no reported problems.

Ian.

#10 lore raw
In reply to Jeremy Fitzhardinge
Quoted 31 lines · Jeremy Fitzhardinge
Quoted 21 lines · Andy Whitcroft
Quoted 19 lines · Martin Bligh

http://test.kernel.org/abat/49037/debug/test.log.0

  AS      arch/x86_64/boot/bootsect.o
  LD      arch/x86_64/boot/bootsect
  AS      arch/x86_64/boot/setup.o
  LD      arch/x86_64/boot/setup
  AS      arch/x86_64/boot/compressed/head.o
  CC      arch/x86_64/boot/compressed/misc.o

OBJCOPY arch/x86_64/boot/compressed/vmlinux.bin
BFD: Warning: Writing section `.data.percpu' to huge (ie negative) file
offset 0x804700c0. /usr/local/autobench/sources/x86_64-cross/gcc-3.4.0-glibc-2.3.2/bin/x86_64-unknown-linux-gnu-objcopy:

arch/x86_64/boot/compressed/vmlinux.bin: File truncated make[2]: *** [arch/x86_64/boot/compressed/vmlinux.bin] Error 1 make[1]: *** [arch/x86_64/boot/compressed/vmlinux] Error 2
make: *** [bzImage] Error 2
09/25/06-09:13:48 Build the kernel. Failed rc = 2 09/25/06-09:13:49 build: kernel build Failed rc = 1

Quoted 8 lines
Quoted 2 lines

Wierd. Same box compiled 2.6.18 fine.

Pretty sure this isn't a space problem, as we have just checked space before the build and I've taken no action since then. Someone did mention "tool chain issue" when it was first spotted. Will check with them and see why they thought that.

Quoted 4 lines

Does this box have an older version of binutils (2.15?)? If so, it might be getting upset over the patch "note-section" in Andi's queue. I know it has been a bit problematic, but I don't know if the problems manifest in this way.

Sure does:

ii binutils 2.14.90.0.7-8 The GNU assembler, linker and binary
utiliti

Thanks for the hint I'll try backing it out and see.

-apw

#11 lore raw
In reply to Jeremy Fitzhardinge
Quoted 32 lines · Jeremy Fitzhardinge
Quoted 4 lines · Andy Whitcroft
Quoted 2 lines · Martin Bligh

http://test.kernel.org/abat/49037/debug/test.log.0

Quoted 10 lines
Quoted 10 lines
  AS      arch/x86_64/boot/bootsect.o
  LD      arch/x86_64/boot/bootsect
  AS      arch/x86_64/boot/setup.o
  LD      arch/x86_64/boot/setup
  AS      arch/x86_64/boot/compressed/head.o
  CC      arch/x86_64/boot/compressed/misc.o

OBJCOPY arch/x86_64/boot/compressed/vmlinux.bin
BFD: Warning: Writing section `.data.percpu' to huge (ie negative) file offset 0x804700c0.

/usr/local/autobench/sources/x86_64-cross/gcc-3.4.0-glibc-2.3.2/bin/x86_64-unknown-linux-gnu-objcopy:

Quoted 7 lines
Quoted 7 lines

arch/x86_64/boot/compressed/vmlinux.bin: File truncated make[2]: *** [arch/x86_64/boot/compressed/vmlinux.bin] Error 1 make[1]: *** [arch/x86_64/boot/compressed/vmlinux] Error 2
make: *** [bzImage] Error 2
09/25/06-09:13:48 Build the kernel. Failed rc = 2 09/25/06-09:13:49 build: kernel build Failed rc = 1

Quoted 8 lines
Quoted 2 lines

Wierd. Same box compiled 2.6.18 fine.

Pretty sure this isn't a space problem, as we have just checked space before the build and I've taken no action since then. Someone did mention "tool chain issue" when it was first spotted. Will check with them and see why they thought that.

Quoted 3 lines

Does this box have an older version of binutils (2.15?)? If so, it might be getting upset over the patch "note-section" in Andi's queue. I know it has been a bit problematic, but I don't know if the problems manifest in this way.

I have seen this one as well, and it wasn't a space problem, but some weird toolchain issue. I solved it by upgrading my toolchain, because I wanted the dwarf unwind support and that required a newer toolchain then I had been using anyway.

My old toolchain was a cross compiler based on:
GNU ld version 2.13.90.0.4 20020814

Eric

#9 lore raw
In reply to Ian Campbell
Quoted 40 lines · Ian Campbell
Quoted 29 lines · Jeremy Fitzhardinge
Quoted 21 lines · Andy Whitcroft
Quoted 19 lines · Martin Bligh

http://test.kernel.org/abat/49037/debug/test.log.0

  AS      arch/x86_64/boot/bootsect.o
  LD      arch/x86_64/boot/bootsect
  AS      arch/x86_64/boot/setup.o
  LD      arch/x86_64/boot/setup
  AS      arch/x86_64/boot/compressed/head.o
  CC      arch/x86_64/boot/compressed/misc.o

OBJCOPY arch/x86_64/boot/compressed/vmlinux.bin
BFD: Warning: Writing section `.data.percpu' to huge (ie negative) file
offset 0x804700c0. /usr/local/autobench/sources/x86_64-cross/gcc-3.4.0-glibc-2.3.2/bin/x86_64-unknown-linux-gnu-objcopy:
arch/x86_64/boot/compressed/vmlinux.bin: File truncated
make[2]: *** [arch/x86_64/boot/compressed/vmlinux.bin] Error 1
make[1]: *** [arch/x86_64/boot/compressed/vmlinux] Error 2
make: *** [bzImage] Error 2
09/25/06-09:13:48 Build the kernel. Failed rc = 2
09/25/06-09:13:49 build: kernel build Failed rc = 1

Quoted 7 lines
Quoted 2 lines

Wierd. Same box compiled 2.6.18 fine.

Pretty sure this isn't a space problem, as we have just checked space before the build and I've taken no action since then. Someone did mention "tool chain issue" when it was first spotted. Will check with them and see why they thought that.

Quoted 4 lines

Does this box have an older version of binutils (2.15?)? If so, it might be getting upset over the patch "note-section" in Andi's queue. I know it has been a bit problematic, but I don't know if the problems manifest in this way.

I've not seen it manifest like this but it would be worth trying Jan's patch from
http://lists.xensource.com/archives/html/xen-devel/2006-08/msg01416.html
to see if it helps.

Quoted 4 lines

Andi removed an identical patch (from someone else) from his queue due to http://marc.theaimsgroup.com/?l=linux-kernel&m=115629369729911&w=2 We have had the patch in the Xen tree for a couple of weeks now with no reported problems.

Ok. To confirm, this seems to be a tool chain age issue. This seems to be triggered by the, x86_64-mm-note-section patch. Reverting that patch and installing the replacement as at the above URL seems to get us a built kernel.

Not that it works yet ... but one step forward.

-apw

#12 lore raw
In reply to Eric W. Biederman
Quoted 1 line · Eric W. Biederman

I have seen this one as well,

Me too. Current linus git tree, x86_64 SMP, gcc-3.3.5, GNU ld version 2.15, binutils 2.15-6, Debian.

Andre

Signature · 1 line
The only person who always got his work done by Friday was Robinson Crusoe
#13 lore raw
Quoted 5 lines · Andre Noll
Quoted 1 line · Eric W. Biederman

I have seen this one as well,

Me too. Current linus git tree, x86_64 SMP, gcc-3.3.5, GNU ld version 2.15, binutils 2.15-6, Debian.

We can probably revert the notes patch for now, since it is only needed for Xen which isn't even merged yet.

Ian, do you think you can do the notes in some different way that still works with old binutils?

-Andi

#14 lore raw
Quoted 6 lines · Andi Kleen
Quoted 4 lines · Andre Noll
Quoted 1 line · Eric W. Biederman

I have seen this one as well,

Me too. Current linus git tree, x86_64 SMP, gcc-3.3.5, GNU ld version 2.15, binutils 2.15-6, Debian.

Quoted 7 lines

We can probably revert the notes patch for now, since it is only needed for Xen which isn't even merged yet.

Ian, do you think you can do the notes in some different way that still works with old binutils?

-Andi

In my testing, backing out the old patch and putting the one mentioned in the following message seems to work:

http://lists.xensource.com/archives/html/xen-devel/2006-08/msg01416.html

-apw

#16 lore raw
In reply to Andi Kleen
Quoted 2 lines · Andi Kleen

We can probably revert the notes patch for now, since it is only needed for Xen which isn't even merged yet.

We could apply the fix which moves the .bss after the .data sections. The bug report after you originally applied that patch looked to me like it was an existing bug which was exposed so it would probably be worth tracking down the root cause of that one rather than rejecting that patch as a possible solution.

The xen-unstable tree has had the .bss movement patch in for a couple of weeks now with no reported bugs. We are frozen for the release 3.0.3 so at least in theory people should be testing it pretty hard ;-)

Quoted 2 lines

Ian, do you think you can do the notes in some different way that still works with old binutils?

I'm not sure. I think the notes themselves are generated fine the
problem lies in the change to the linker script to gather all the .notes.* sections into the same PT_NOTES segment, that is something Jeremy did for i386 and I just copied.

Do the notes really need to be gathered together? I we could make Xen look for .notes.* sections as well as the PT_NOTES segment but I would prefer to use the segment if possible...

Ian.

#17 lore raw
In reply to Ian Campbell
Quoted 4 lines

The xen-unstable tree has had the .bss movement patch in for a couple of weeks now with no reported bugs. We are frozen for the release 3.0.3 so at least in theory people should be testing it pretty hard ;-)

Ok maybe we should retry it. The BSS movement patch makes sense by itself after all and in theory really shouldn't break anything. I'll reenable it.

-Andi

#18 lore raw
Quoted 7 lines · Andi Kleen
Quoted 3 lines

The xen-unstable tree has had the .bss movement patch in for a couple of weeks now with no reported bugs. We are frozen for the release 3.0.3 so at least in theory people should be testing it pretty hard ;-)

Ok maybe we should retry it. The BSS movement patch makes sense by itself after all and in theory really shouldn't break anything. I'll reenable it.

I think some part of the relocatable kernel or kexec on panic work had problems with the bss in the middle as well.

Eric

#19 lore raw
In reply to Andi Kleen
Quoted 7 lines · Andi Kleen
Quoted 3 lines

The xen-unstable tree has had the .bss movement patch in for a couple of weeks now with no reported bugs. We are frozen for the release 3.0.3 so at least in theory people should be testing it pretty hard ;-)

Ok maybe we should retry it. The BSS movement patch makes sense by itself after all and in theory really shouldn't break anything. I'll reenable it.

This change seems to have just hit mainline in 2.6.18-git7. Perhaps we need to expedite the fix to mainline.

-apw