2007-02-05 13:48:10

by Bodo Eggert

[permalink] [raw]
Subject: 2.6.20 doesn't compile with gcc-3.2.2

Al Boldi <[email protected]> wrote:

> Doing the following results in an incomplete vmlinuz:

> # make bzlilo
>
> objcopy: arch/i386/boot/compressed/vmlinux.bin: File truncated
> make[2]: *** [arch/i386/boot/compressed/vmlinux.bin] Error 1
> make[1]: *** [arch/i386/boot/compressed/vmlinux] Error 2
> make: *** [bzlilo] Error 2

> gcc version 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk)

I just compiled using gcc 3.3.5 (debian stable). Please verify that your
disk is not full and gcc is the cause. If it is, this patch should do the
trick: :)

--- ./Documentation/Changes~ 2007-02-05 15:10:04.000000000 +0100
+++ ./Documentation/Changes 2007-02-05 15:10:04.000000000 +0100
@@ -29,5 +29,5 @@ hardware, for example, you probably need
isdn4k-utils.

-o Gnu C 3.2 # gcc --version
+o Gnu C 3.3 # gcc --version
o Gnu make 3.79.1 # make --version
o binutils 2.12 # ld -v

--
Anything you do can get you shot, including nothing.


2007-02-05 15:07:45

by Alistair John Strachan

[permalink] [raw]
Subject: Re: 2.6.20 doesn't compile with gcc-3.2.2

On Monday 05 February 2007 13:48, Bodo Eggert wrote:
> Al Boldi <[email protected]> wrote:
> > Doing the following results in an incomplete vmlinuz:
> >
> > # make bzlilo
> >
> > objcopy: arch/i386/boot/compressed/vmlinux.bin: File truncated
> > make[2]: *** [arch/i386/boot/compressed/vmlinux.bin] Error 1
> > make[1]: *** [arch/i386/boot/compressed/vmlinux] Error 2
> > make: *** [bzlilo] Error 2
> >
> > gcc version 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk)
>
> I just compiled using gcc 3.3.5 (debian stable). Please verify that your
> disk is not full and gcc is the cause. If it is, this patch should do the
> trick: :)

Not so fast.. post your config? If you've got anything referring to
relocatable kernel support, try disabling it?

--
Cheers,
Alistair.

Final year Computer Science undergraduate.
1F2 55 South Clerk Street, Edinburgh, UK.

2007-02-05 15:49:52

by Kilau, Scott

[permalink] [raw]
Subject: Re: 2.6.20 doesn't compile with gcc-3.2.2

Hi all,

> > objcopy: arch/i386/boot/compressed/vmlinux.bin: File truncated
> > make[2]: *** [arch/i386/boot/compressed/vmlinux.bin] Error 1
> > make[1]: *** [arch/i386/boot/compressed/vmlinux] Error 2
> > make: *** [bzlilo] Error 2

I got the same as well here on my box.

I am using Red Hat 9, with a lot of things upgraded.

I found other "hints" that this might be a binutils issue,
which obviously hasn't been touched in years on Red Hat 9,
so I picked up the binutils built for Fedora Core 3,
and installed them...

That solved the problem.

Scott Kilau



2007-02-05 18:13:54

by Kilau, Scott

[permalink] [raw]
Subject: RE: 2.6.20 doesn't compile with gcc-3.2.2

Hi Al,

> What was your binutils version (# ld -v) before and after the upgrade?

I was on the "last" version of binutils that Red Hat 9 had, which was:
binutils-2.13.90.0.18-9.i386


I went up to the prebuilt version of binutils from Fedora Core 3:

[root@scottk7 tmp]# ld -v
GNU ld version 2.15.92.0.2 20040927
[root@scottk7 tmp]# rpm -qa|grep binutil
binutils-2.15.92.0.2-5.1


Scott

2007-02-05 18:15:33

by Alistair John Strachan

[permalink] [raw]
Subject: Re: 2.6.20 doesn't compile with gcc-3.2.2

On Monday 05 February 2007 18:04, Al Boldi wrote:
> Alistair John Strachan wrote:
> > On Monday 05 February 2007 13:48, Bodo Eggert wrote:
> > > Al Boldi <[email protected]> wrote:
> > > > Doing the following results in an incomplete vmlinuz:
> > > >
> > > > # make bzlilo
> > > >
> > > > objcopy: arch/i386/boot/compressed/vmlinux.bin: File truncated
> > > > make[2]: *** [arch/i386/boot/compressed/vmlinux.bin] Error 1
> > > > make[1]: *** [arch/i386/boot/compressed/vmlinux] Error 2
> > > > make: *** [bzlilo] Error 2
> > > >
> > > > gcc version 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk)
> > >
> > > I just compiled using gcc 3.3.5 (debian stable). Please verify that
> > > your disk is not full and gcc is the cause. If it is, this patch should
> > > do the trick: :)
> >
> > Not so fast.. post your config? If you've got anything referring to
> > relocatable kernel support, try disabling it?
>
> No luck disabling relocatable kernel, but using a mem-split other than 3/1
> compiles fine. There is a catch though, the kernel won't boot anymore.
>
> # ld -v
> GNU ld version 2.13.90.0.18 20030121
>
> Which binutils version is now the minimum required, and why is a binutils
> upgrade necessary?

Documentation/Changes still says 2.12, and your binutils is closer to 2.14.
I can't think of a particular patch to point the finger at (looking now).

If you want an interim workaround, grab a newer binutils (probably 2.17),
install it to a prefix like $HOME/binutils, then:

export PATH=$HOME/binutils/bin:$PATH

And confirm the resulting kernel builds and works.

--
Cheers,
Alistair.

Final year Computer Science undergraduate.
1F2 55 South Clerk Street, Edinburgh, UK.

2007-02-05 18:28:58

by Alistair John Strachan

[permalink] [raw]
Subject: Re: 2.6.20 doesn't compile with gcc-3.2.2

On Monday 05 February 2007 18:04, you wrote:
> Alistair John Strachan wrote:
> > On Monday 05 February 2007 13:48, Bodo Eggert wrote:
> > > Al Boldi <[email protected]> wrote:
> > > > Doing the following results in an incomplete vmlinuz:
> > > >
> > > > # make bzlilo
> > > >
> > > > objcopy: arch/i386/boot/compressed/vmlinux.bin: File truncated
> > > > make[2]: *** [arch/i386/boot/compressed/vmlinux.bin] Error 1
> > > > make[1]: *** [arch/i386/boot/compressed/vmlinux] Error 2
> > > > make: *** [bzlilo] Error 2
> > > >
> > > > gcc version 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk)
> > >
> > > I just compiled using gcc 3.3.5 (debian stable). Please verify that
> > > your disk is not full and gcc is the cause. If it is, this patch should
> > > do the trick: :)
> >
> > Not so fast.. post your config? If you've got anything referring to
> > relocatable kernel support, try disabling it?
>
> No luck disabling relocatable kernel, but using a mem-split other than 3/1
> compiles fine. There is a catch though, the kernel won't boot anymore.
>
> # ld -v
> GNU ld version 2.13.90.0.18 20030121
>
> Which binutils version is now the minimum required, and why is a binutils
> upgrade necessary?

Another obvious question is, did -rc1/-rc2 compile correctly? If you have the
time, go through all the -rc's, that'll make a bisection easier (if you end
up having to do one).

--
Cheers,
Alistair.

Final year Computer Science undergraduate.
1F2 55 South Clerk Street, Edinburgh, UK.