linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* build failure on powerpc with current -git
@ 2008-10-17 19:32 Chris Friesen
  2008-10-18  6:49 ` Grant Likely
  2008-10-21  5:33 ` Paul Mackerras
  0 siblings, 2 replies; 10+ messages in thread
From: Chris Friesen @ 2008-10-17 19:32 UTC (permalink / raw)
  To: linuxppc-dev, Linux kernel

The current -git fails to build on 64-bit powerpc (failure log below) . 
  Initially I tried using my older toolchain, when I first saw the 
problem I built a new toolchain with crosstool (gcc 4.1.2 and binutils 
2.16.1) and tried again but got the same problem.

2.6.27 doesn't show this problem.

Any ideas what's going on and how I can fix it?

Thanks,

Chris


   LD      vmlinux.o
   MODPOST vmlinux.o
WARNING: modpost: Found 4 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
   GEN     .version
   CHK     include/linux/compile.h
   UPD     include/linux/compile.h
   CC      init/version.o
   LD      init/built-in.o
   LD      .tmp_vmlinux1
/opt/crosstool/gcc-4.1.2-glibc-2.3.6/powerpc64-unknown-linux-gnu/bin/powerpc64-unknown-linux-gnu-ld: 
BFD 2.16.1 internal error, aborting at 
/home/cfriesen/crosstool-0.43/build/powerpc64-unknown-linux-gnu/gcc-4.1.2-glibc-2.3.6/binutils-2.16.1/bfd/elflink.c 
line 6419 in elf_link_output_extsym

/opt/crosstool/gcc-4.1.2-glibc-2.3.6/powerpc64-unknown-linux-gnu/bin/powerpc64-unknown-linux-gnu-ld: 
Please report this bug.

make[1]: *** [.tmp_vmlinux1] Error 1
make: *** [sub-make] Error 2

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: build failure on powerpc with current -git
  2008-10-17 19:32 build failure on powerpc with current -git Chris Friesen
@ 2008-10-18  6:49 ` Grant Likely
  2008-10-21  5:33 ` Paul Mackerras
  1 sibling, 0 replies; 10+ messages in thread
From: Grant Likely @ 2008-10-18  6:49 UTC (permalink / raw)
  To: Chris Friesen; +Cc: linuxppc-dev, Linux kernel

On Fri, Oct 17, 2008 at 01:32:59PM -0600, Chris Friesen wrote:
> The current -git fails to build on 64-bit powerpc (failure log below) .  
> Initially I tried using my older toolchain, when I first saw the problem 
> I built a new toolchain with crosstool (gcc 4.1.2 and binutils 2.16.1) 
> and tried again but got the same problem.
>
> 2.6.27 doesn't show this problem.
>
> Any ideas what's going on and how I can fix it?

This is a know bug with binutils 2.16.1.  You can work around it by
either reverting commit 549e8152de8039506f69c677a4546e5427aa6ae7 or
upgrading to a newer version of binutils.

Nobody has a fix for this problem yet.  (it's definitely a binutils bug,
but the kernel exposed it where it wasn't an issue before.  I don't know
if support for 2.16.1 is going to be depreciated due to this.  It seems
like there are still a fair few users of binutils 2.16.1)

g.

>
> Thanks,
>
> Chris
>
>
>   LD      vmlinux.o
>   MODPOST vmlinux.o
> WARNING: modpost: Found 4 section mismatch(es).
> To see full details build your kernel with:
> 'make CONFIG_DEBUG_SECTION_MISMATCH=y'
>   GEN     .version
>   CHK     include/linux/compile.h
>   UPD     include/linux/compile.h
>   CC      init/version.o
>   LD      init/built-in.o
>   LD      .tmp_vmlinux1
 
> /opt/crosstool/gcc-4.1.2-glibc-2.3.6/powerpc64-unknown-linux-gnu/bin/powerpc64-unknown-linux-gnu-ld: 
> BFD 2.16.1 internal error, aborting at  
> /home/cfriesen/crosstool-0.43/build/powerpc64-unknown-linux-gnu/gcc-4.1.2-glibc-2.3.6/binutils-2.16.1/bfd/elflink.c 
> line 6419 in elf_link_output_extsym
>
 
> /opt/crosstool/gcc-4.1.2-glibc-2.3.6/powerpc64-unknown-linux-gnu/bin/powerpc64-unknown-linux-gnu-ld: 
> Please report this bug.
>
> make[1]: *** [.tmp_vmlinux1] Error 1
> make: *** [sub-make] Error 2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: build failure on powerpc with current -git
  2008-10-17 19:32 build failure on powerpc with current -git Chris Friesen
  2008-10-18  6:49 ` Grant Likely
@ 2008-10-21  5:33 ` Paul Mackerras
  2008-10-21  8:13   ` Stephen Rothwell
  1 sibling, 1 reply; 10+ messages in thread
From: Paul Mackerras @ 2008-10-21  5:33 UTC (permalink / raw)
  To: Chris Friesen; +Cc: linuxppc-dev, Linux kernel

Chris Friesen writes:

> The current -git fails to build on 64-bit powerpc (failure log below) . 
>   Initially I tried using my older toolchain, when I first saw the 
> problem I built a new toolchain with crosstool (gcc 4.1.2 and binutils 
> 2.16.1) and tried again but got the same problem.

It's a bug in older versions of ld (including 2.16.1) that's fixed in
the current version (2.18).  However, this patch appears to work
around the problem - at least, it let me build a 32-bit kernel with a
cross-toolchain including a 2.16.1 ld.  Let me know if this gets it
working for you.

Paul.

diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index 25fe9d6..e8acee2 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -284,6 +284,8 @@ if [ -n "$dtb" ]; then
     if [ -n "$dts" ]; then
 	rm $dtb
     fi
+else
+    addsec $tmp /dev/null .kernel:dtb
 fi
 
 if [ "$platform" != "miboot" ]; then
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index b39c27e..384dca5 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -187,6 +187,7 @@ SECTIONS
 		*(.machine.desc)
 		__machine_desc_end = . ;
 	}
+#ifdef CONFIG_RELOCATABLE
 	. = ALIGN(8);
 	.dynsym : AT(ADDR(.dynsym) - LOAD_OFFSET) { *(.dynsym) }
 	.dynstr : AT(ADDR(.dynstr) - LOAD_OFFSET) { *(.dynstr) }
@@ -202,6 +203,7 @@ SECTIONS
 		__rela_dyn_start = .;
 		*(.rela*)
 	}
+#endif
 
 	/* Fake ELF header containing RPA note; for addnote */
 	.fakeelf : AT(ADDR(.fakeelf) - LOAD_OFFSET) { *(.fakeelf) }

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: build failure on powerpc with current -git
  2008-10-21  5:33 ` Paul Mackerras
@ 2008-10-21  8:13   ` Stephen Rothwell
  2008-10-22  3:58     ` Paul Mackerras
  0 siblings, 1 reply; 10+ messages in thread
From: Stephen Rothwell @ 2008-10-21  8:13 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: Linux, kernel, linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 890 bytes --]

Hi Paulus,

On Tue, 21 Oct 2008 16:33:10 +1100 Paul Mackerras <paulus@samba.org> wrote:
>
> It's a bug in older versions of ld (including 2.16.1) that's fixed in
> the current version (2.18).  However, this patch appears to work
> around the problem - at least, it let me build a 32-bit kernel with a
> cross-toolchain including a 2.16.1 ld.  Let me know if this gets it
> working for you.

With that patch applied I got these errors for a powerpc ppc64_defconfig
build (linux-next).

/usr/bin/objcopy: Warning: '/dev/null' is not an ordinary file
make[2]: *** [arch/powerpc/boot/zImage.pmac] Error 1
make[2]: *** Waiting for unfinished jobs....
/usr/bin/objcopy: Warning: '/dev/null' is not an ordinary file
make[2]: *** [arch/powerpc/boot/zImage.pseries] Error 1
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: build failure on powerpc with current -git
  2008-10-21  8:13   ` Stephen Rothwell
@ 2008-10-22  3:58     ` Paul Mackerras
  2008-10-22 15:19       ` Hollis Blanchard
                         ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Paul Mackerras @ 2008-10-22  3:58 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Linux kernel, linuxppc-dev

Stephen Rothwell writes:

> On Tue, 21 Oct 2008 16:33:10 +1100 Paul Mackerras <paulus@samba.org> wrote:
> >
> > It's a bug in older versions of ld (including 2.16.1) that's fixed in
> > the current version (2.18).  However, this patch appears to work
> > around the problem - at least, it let me build a 32-bit kernel with a
> > cross-toolchain including a 2.16.1 ld.  Let me know if this gets it
> > working for you.
> 
> With that patch applied I got these errors for a powerpc ppc64_defconfig
> build (linux-next).
> 
> /usr/bin/objcopy: Warning: '/dev/null' is not an ordinary file

Hmmm, so do I, and in fact the arch/powerpc/boot/wrapper change now
seems to be unnecessary with my cross-compile setup (which has ld
2.16.1), whereas yesterday I'm sure it got errors.  Weird.

Chris, could you try just the following change (my previous patch
without the arch/powerpc/boot/wrapper change) and let me know if it
fixes things with the ld you use?

Paul.
---
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index b39c27e..384dca5 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -187,6 +187,7 @@ SECTIONS
 		*(.machine.desc)
 		__machine_desc_end = . ;
 	}
+#ifdef CONFIG_RELOCATABLE
 	. = ALIGN(8);
 	.dynsym : AT(ADDR(.dynsym) - LOAD_OFFSET) { *(.dynsym) }
 	.dynstr : AT(ADDR(.dynstr) - LOAD_OFFSET) { *(.dynstr) }
@@ -202,6 +203,7 @@ SECTIONS
 		__rela_dyn_start = .;
 		*(.rela*)
 	}
+#endif
 
 	/* Fake ELF header containing RPA note; for addnote */
 	.fakeelf : AT(ADDR(.fakeelf) - LOAD_OFFSET) { *(.fakeelf) }

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: build failure on powerpc with current -git
  2008-10-22  3:58     ` Paul Mackerras
@ 2008-10-22 15:19       ` Hollis Blanchard
  2008-10-22 17:50         ` Chris Friesen
  2008-10-22 15:21       ` Hollis Blanchard
  2008-10-22 17:49       ` Chris Friesen
  2 siblings, 1 reply; 10+ messages in thread
From: Hollis Blanchard @ 2008-10-22 15:19 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: Stephen Rothwell, Linux kernel, linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 1203 bytes --]

On Tue, Oct 21, 2008 at 10:58 PM, Paul Mackerras <paulus@samba.org> wrote:

> Stephen Rothwell writes:
>
> > On Tue, 21 Oct 2008 16:33:10 +1100 Paul Mackerras <paulus@samba.org>
> wrote:
> > >
> > > It's a bug in older versions of ld (including 2.16.1) that's fixed in
> > > the current version (2.18).  However, this patch appears to work
> > > around the problem - at least, it let me build a 32-bit kernel with a
> > > cross-toolchain including a 2.16.1 ld.  Let me know if this gets it
> > > working for you.
> >
> > With that patch applied I got these errors for a powerpc ppc64_defconfig
> > build (linux-next).
> >
> > /usr/bin/objcopy: Warning: '/dev/null' is not an ordinary file
>
> Hmmm, so do I, and in fact the arch/powerpc/boot/wrapper change now
> seems to be unnecessary with my cross-compile setup (which has ld
> 2.16.1), whereas yesterday I'm sure it got errors.  Weird.
>
> Chris, could you try just the following change (my previous patch
> without the arch/powerpc/boot/wrapper change) and let me know if it
> fixes things with the ld you use?
>

Works for me.

binutils 2.16.1 is the most recent binutils that will build with crosstool,
so IMHO it's worth supporting. :)

-Hollis

[-- Attachment #2: Type: text/html, Size: 1704 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: build failure on powerpc with current -git
  2008-10-22  3:58     ` Paul Mackerras
  2008-10-22 15:19       ` Hollis Blanchard
@ 2008-10-22 15:21       ` Hollis Blanchard
  2008-10-22 17:49       ` Chris Friesen
  2 siblings, 0 replies; 10+ messages in thread
From: Hollis Blanchard @ 2008-10-22 15:21 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: Stephen Rothwell, Linux kernel, linuxppc-dev

(Oops, resending in plain text...)

On Tue, Oct 21, 2008 at 10:58 PM, Paul Mackerras <paulus@samba.org> wrote:
>
> Stephen Rothwell writes:
>
> > On Tue, 21 Oct 2008 16:33:10 +1100 Paul Mackerras <paulus@samba.org> wrote:
> > >
> > > It's a bug in older versions of ld (including 2.16.1) that's fixed in
> > > the current version (2.18).  However, this patch appears to work
> > > around the problem - at least, it let me build a 32-bit kernel with a
> > > cross-toolchain including a 2.16.1 ld.  Let me know if this gets it
> > > working for you.
> >
> > With that patch applied I got these errors for a powerpc ppc64_defconfig
> > build (linux-next).
> >
> > /usr/bin/objcopy: Warning: '/dev/null' is not an ordinary file
>
> Hmmm, so do I, and in fact the arch/powerpc/boot/wrapper change now
> seems to be unnecessary with my cross-compile setup (which has ld
> 2.16.1), whereas yesterday I'm sure it got errors.  Weird.
>
> Chris, could you try just the following change (my previous patch
> without the arch/powerpc/boot/wrapper change) and let me know if it
> fixes things with the ld you use?

Works for me.

binutils 2.16.1 is the most recent binutils that will build with
crosstool, so IMHO it's worth supporting. :)

-Hollis

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: build failure on powerpc with current -git
  2008-10-22  3:58     ` Paul Mackerras
  2008-10-22 15:19       ` Hollis Blanchard
  2008-10-22 15:21       ` Hollis Blanchard
@ 2008-10-22 17:49       ` Chris Friesen
  2 siblings, 0 replies; 10+ messages in thread
From: Chris Friesen @ 2008-10-22 17:49 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: Stephen Rothwell, Linux kernel, linuxppc-dev

Paul Mackerras wrote:

> Chris, could you try just the following change (my previous patch
> without the arch/powerpc/boot/wrapper change) and let me know if it
> fixes things with the ld you use?

The build completes with no errors.  Haven't actually booted it though.

Gets my vote...

Chris

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: build failure on powerpc with current -git
  2008-10-22 15:19       ` Hollis Blanchard
@ 2008-10-22 17:50         ` Chris Friesen
  2008-10-23  0:19           ` Josh Boyer
  0 siblings, 1 reply; 10+ messages in thread
From: Chris Friesen @ 2008-10-22 17:50 UTC (permalink / raw)
  To: Hollis Blanchard
  Cc: Stephen Rothwell, Paul Mackerras, Linux kernel, linuxppc-dev

Hollis Blanchard wrote:

> binutils 2.16.1 is the most recent binutils that will build with 
> crosstool, so IMHO it's worth supporting. :)

I was wondering about that....wasted a bunch of time trying to build something 
more recent.

Chris

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: build failure on powerpc with current -git
  2008-10-22 17:50         ` Chris Friesen
@ 2008-10-23  0:19           ` Josh Boyer
  0 siblings, 0 replies; 10+ messages in thread
From: Josh Boyer @ 2008-10-23  0:19 UTC (permalink / raw)
  To: Chris Friesen
  Cc: linuxppc-dev, Stephen Rothwell, Paul Mackerras, Linux kernel,
	Hollis Blanchard

On Wed, Oct 22, 2008 at 11:50:25AM -0600, Chris Friesen wrote:
> Hollis Blanchard wrote:
>
>> binutils 2.16.1 is the most recent binutils that will build with  
>> crosstool, so IMHO it's worth supporting. :)
>
> I was wondering about that....wasted a bunch of time trying to build 
> something more recent.

I built binutils 2.18 for ppc, ppc no-float, ppc64, mips, and i386
yesterday.  It worked fine...

josh

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-10-23  0:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-17 19:32 build failure on powerpc with current -git Chris Friesen
2008-10-18  6:49 ` Grant Likely
2008-10-21  5:33 ` Paul Mackerras
2008-10-21  8:13   ` Stephen Rothwell
2008-10-22  3:58     ` Paul Mackerras
2008-10-22 15:19       ` Hollis Blanchard
2008-10-22 17:50         ` Chris Friesen
2008-10-23  0:19           ` Josh Boyer
2008-10-22 15:21       ` Hollis Blanchard
2008-10-22 17:49       ` Chris Friesen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).