2009-11-24 12:41:28

by Jiri Olsa

[permalink] [raw]
Subject: cannot compile linux-2.6-tip tree

hi,

I just updated 'linux-2.6-tip' and was not able to link drivers/pnp
I bisected the issue, but not sure what happened:

(git tree git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git, x86_64 arch)


[jolsa@jolsa linux-2.6-tip]$ git checkout -b test-good 2e7c0e0cafee5f04a029f06e71e22f9af69ae472~
Switched to a new branch 'test-good'
[jolsa@jolsa linux-2.6-tip]$ find drivers/pnp/ -name *.o | xargs rm
[jolsa@jolsa linux-2.6-tip]$ make drivers/pnp/
CHK include/linux/version.h
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-x86
CC arch/x86/kernel/asm-offsets.s
GEN include/asm/asm-offsets.h
CALL scripts/checksyscalls.sh
CC drivers/pnp/core.o
CC drivers/pnp/card.o
CC drivers/pnp/driver.o
CC drivers/pnp/resource.o
CC drivers/pnp/manager.o
CC drivers/pnp/support.o
CC drivers/pnp/interface.o
CC drivers/pnp/quirks.o
CC drivers/pnp/pnpacpi/core.o
CC drivers/pnp/pnpacpi/rsparser.o
LD drivers/pnp/pnpacpi/built-in.o
CC drivers/pnp/system.o
LD drivers/pnp/built-in.o
[jolsa@jolsa linux-2.6-tip]$ git checkout -b test-bad 2e7c0e0cafee5f04a029f06e71e22f9af69ae472
Switched to a new branch 'test-bad'
[jolsa@jolsa linux-2.6-tip]$ find drivers/pnp/ -name *.o | xargs rm
[jolsa@jolsa linux-2.6-tip]$ make drivers/pnp/
CHK include/linux/version.h
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-x86
CC arch/x86/kernel/asm-offsets.s
GEN include/asm/asm-offsets.h
CALL scripts/checksyscalls.sh
CC drivers/pnp/core.o
CC drivers/pnp/card.o
objdump: drivers/pnp/.tmp_card.o: File truncated
nm: drivers/pnp/card.o: File truncated
objdump: drivers/pnp/card.o: File truncated
CC drivers/pnp/driver.o
CC drivers/pnp/resource.o
CC drivers/pnp/manager.o
CC drivers/pnp/support.o
CC drivers/pnp/interface.o
CC drivers/pnp/quirks.o
CC drivers/pnp/pnpacpi/core.o
CC drivers/pnp/pnpacpi/rsparser.o
LD drivers/pnp/pnpacpi/built-in.o
CC drivers/pnp/system.o
LD drivers/pnp/built-in.o
drivers/pnp/card.o: file not recognized: File format not recognized
make[1]: *** [drivers/pnp/built-in.o] Error 1
make: *** [drivers/pnp/] Error 2
[jolsa@jolsa linux-2.6-tip]$


the bisected commit looks innocent:

[jolsa@jolsa tip-new]$ git show 2e7c0e0cafee5f04a029f06e71e22f9af69ae472
commit 2e7c0e0cafee5f04a029f06e71e22f9af69ae472
Merge: 4c96088 fd12a0d
Author: Ingo Molnar <[email protected]>
Date: Mon Nov 23 19:48:07 2009 +0100

Merge branch 'x86/mm'

diff --cc arch/x86/kernel/x86_init.c
index d11c5ff,bcc749e..e60844e
--- a/arch/x86/kernel/x86_init.c
+++ b/arch/x86/kernel/x86_init.c
@@@ -13,8 -13,8 +13,9 @@@
#include <asm/e820.h>
#include <asm/time.h>
#include <asm/irq.h>
+ #include <asm/pat.h>
#include <asm/tsc.h>
+#include <asm/iommu.h>

void __cpuinit x86_init_noop(void) { }
void __init x86_init_uint_noop(unsigned int unused) { }
[jolsa@jolsa tip-new]$


I guess I'm not alone, hopefully :)

wbr,
jirka


2009-11-24 14:52:37

by Steven Rostedt

[permalink] [raw]
Subject: Re: cannot compile linux-2.6-tip tree

On Tue, 2009-11-24 at 13:41 +0100, Jiri Olsa wrote:

> [jolsa@jolsa linux-2.6-tip]$ git checkout -b test-bad 2e7c0e0cafee5f04a029f06e71e22f9af69ae472
> Switched to a new branch 'test-bad'
> [jolsa@jolsa linux-2.6-tip]$ find drivers/pnp/ -name *.o | xargs rm
> [jolsa@jolsa linux-2.6-tip]$ make drivers/pnp/
> CHK include/linux/version.h
> CHK include/linux/utsrelease.h
> SYMLINK include/asm -> include/asm-x86
> CC arch/x86/kernel/asm-offsets.s
> GEN include/asm/asm-offsets.h
> CALL scripts/checksyscalls.sh
> CC drivers/pnp/core.o
> CC drivers/pnp/card.o
> objdump: drivers/pnp/.tmp_card.o: File truncated
> nm: drivers/pnp/card.o: File truncated
> objdump: drivers/pnp/card.o: File truncated


That's a strange error. Are you sure you didn't run out of diskspace or
something?

-- Steve

> CC drivers/pnp/driver.o
> CC drivers/pnp/resource.o
> CC drivers/pnp/manager.o
> CC drivers/pnp/support.o
> CC drivers/pnp/interface.o
> CC drivers/pnp/quirks.o
> CC drivers/pnp/pnpacpi/core.o
> CC drivers/pnp/pnpacpi/rsparser.o
> LD drivers/pnp/pnpacpi/built-in.o
> CC drivers/pnp/system.o
> LD drivers/pnp/built-in.o
> drivers/pnp/card.o: file not recognized: File format not recognized
> make[1]: *** [drivers/pnp/built-in.o] Error 1
> make: *** [drivers/pnp/] Error 2
> [jolsa@jolsa linux-2.6-tip]$
>

2009-11-24 15:05:19

by Jiri Olsa

[permalink] [raw]
Subject: Re: cannot compile linux-2.6-tip tree

On Tue, Nov 24, 2009 at 09:52:41AM -0500, Steven Rostedt wrote:
> On Tue, 2009-11-24 at 13:41 +0100, Jiri Olsa wrote:
>
> > [jolsa@jolsa linux-2.6-tip]$ git checkout -b test-bad 2e7c0e0cafee5f04a029f06e71e22f9af69ae472
> > Switched to a new branch 'test-bad'
> > [jolsa@jolsa linux-2.6-tip]$ find drivers/pnp/ -name *.o | xargs rm
> > [jolsa@jolsa linux-2.6-tip]$ make drivers/pnp/
> > CHK include/linux/version.h
> > CHK include/linux/utsrelease.h
> > SYMLINK include/asm -> include/asm-x86
> > CC arch/x86/kernel/asm-offsets.s
> > GEN include/asm/asm-offsets.h
> > CALL scripts/checksyscalls.sh
> > CC drivers/pnp/core.o
> > CC drivers/pnp/card.o
> > objdump: drivers/pnp/.tmp_card.o: File truncated
> > nm: drivers/pnp/card.o: File truncated
> > objdump: drivers/pnp/card.o: File truncated
>
>
> That's a strange error. Are you sure you didn't run out of diskspace or
> something?

you cannot reproduce, too bad :) I'll dive into and try to find out..

disk space is fine, also checkouts before the bisected commit work fine
let me know if you're interested in any debug info, I'll provide

jirka

>
> -- Steve
>
> > CC drivers/pnp/driver.o
> > CC drivers/pnp/resource.o
> > CC drivers/pnp/manager.o
> > CC drivers/pnp/support.o
> > CC drivers/pnp/interface.o
> > CC drivers/pnp/quirks.o
> > CC drivers/pnp/pnpacpi/core.o
> > CC drivers/pnp/pnpacpi/rsparser.o
> > LD drivers/pnp/pnpacpi/built-in.o
> > CC drivers/pnp/system.o
> > LD drivers/pnp/built-in.o
> > drivers/pnp/card.o: file not recognized: File format not recognized
> > make[1]: *** [drivers/pnp/built-in.o] Error 1
> > make: *** [drivers/pnp/] Error 2
> > [jolsa@jolsa linux-2.6-tip]$
> >
>
>

2009-11-24 15:12:08

by Steven Rostedt

[permalink] [raw]
Subject: Re: cannot compile linux-2.6-tip tree

On Tue, 2009-11-24 at 16:05 +0100, Jiri Olsa wrote:

> >
> > That's a strange error. Are you sure you didn't run out of diskspace or
> > something?
>
> you cannot reproduce, too bad :) I'll dive into and try to find out..
>
> disk space is fine, also checkouts before the bisected commit work fine
> let me know if you're interested in any debug info, I'll provide

Could you send me your config privately

Thanks,

-- Steve

2009-11-24 15:45:16

by Ingo Molnar

[permalink] [raw]
Subject: Re: cannot compile linux-2.6-tip tree


* Jiri Olsa <[email protected]> wrote:

> drivers/pnp/card.o: file not recognized: File format not recognized
> make[1]: *** [drivers/pnp/built-in.o] Error 1

that typically happens if you Ctrl-C a parallel kernel build, and GCC
leaves around an empty .o file.

It's rare but happens. 'make clean' will cure that.

Ingo

2009-11-24 17:22:40

by Jiri Olsa

[permalink] [raw]
Subject: Re: cannot compile linux-2.6-tip tree

On Tue, Nov 24, 2009 at 04:45:11PM +0100, Ingo Molnar wrote:
>
> * Jiri Olsa <[email protected]> wrote:
>
> > drivers/pnp/card.o: file not recognized: File format not recognized
> > make[1]: *** [drivers/pnp/built-in.o] Error 1
>
> that typically happens if you Ctrl-C a parallel kernel build, and GCC
> leaves around an empty .o file.
>
> It's rare but happens. 'make clean' will cure that.
>
> Ingo

I tried make clean and it did not help..

I'm not sure if I'm not overlooking something obvious or am getting
crazy, but this is what I've done so far:

I took gcc command line for drivers/pnp/card.o and drivers/pnp/core.o
from make V=1 and run it manually ending up with this:


compile:
[jolsa@jolsa linux-2.6-tip]$ gcc -Wp,-MD,drivers/pnp/.card.o.d
-nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.4.2/include
-Iinclude -I/mnt/sda5/data/upstream/linux-2.6-tip/arch/x86/include
-include include/linux/autoconf.h -D__KERNEL__ -Wall -Wundef
-Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -Wno-format-security
-fno-delete-null-pointer-checks -O2 -m64 -mtune=generic -mno-red-zone
-mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args
-DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare
-fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
-Wframe-larger-than=2048 -fno-stack-protector -fno-omit-frame-pointer
-fno-optimize-sibling-calls -g -pg -Wdeclaration-after-statement
-Wno-pointer-sign -fno-strict-overflow -fno-dwarf2-cfi-asm
-fconserve-stack -D"KBUILD_STR(s)=#s"
-D"KBUILD_BASENAME=KBUILD_STR(card)"
-D"KBUILD_MODNAME=KBUILD_STR(card)" -c -o drivers/pnp/.tmp_card.o
drivers/pnp/card.c
[jolsa@jolsa linux-2.6-tip]$ gcc -Wp,-MD,drivers/pnp/.core.o.d
-nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.4.2/include
-Iinclude -I/mnt/sda5/data/upstream/linux-2.6-tip/arch/x86/include
-include include/linux/autoconf.h -D__KERNEL__ -Wall -Wundef
-Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -Wno-format-security
-fno-delete-null-pointer-checks -O2 -m64 -mtune=generic -mno-red-zone
-mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args
-DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare
-fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
-Wframe-larger-than=2048 -fno-stack-protector -fno-omit-frame-pointer
-fno-optimize-sibling-calls -g -pg -Wdeclaration-after-statement
-Wno-pointer-sign -fno-strict-overflow -fno-dwarf2-cfi-asm
-fconserve-stack -D"KBUILD_STR(s)=#s"
-D"KBUILD_BASENAME=KBUILD_STR(core)"
-D"KBUILD_MODNAME=KBUILD_STR(core)" -c -o drivers/pnp/.tmp_core.o
drivers/pnp/core.c


run objdump:
[jolsa@jolsa linux-2.6-tip]$ objdump -R drivers/pnp/.tmp_core.o

drivers/pnp/.tmp_core.o: file format elf64-x86-64

objdump: drivers/pnp/.tmp_core.o: not a dynamic object
objdump: drivers/pnp/.tmp_core.o: Invalid operation
[jolsa@jolsa linux-2.6-tip]$ objdump -R drivers/pnp/.tmp_card.o
objdump: drivers/pnp/.tmp_card.o: File truncated


run file:
[jolsa@jolsa linux-2.6-tip]$ file drivers/pnp/.tmp_card.o
drivers/pnp/.tmp_card.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), stripped
[jolsa@jolsa linux-2.6-tip]$ file drivers/pnp/.tmp_core.o
drivers/pnp/.tmp_core.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped


I checked other objects in drivers/pnp/ and for some reason the file command shows
card.o (the object which is failing) as "stripped" and others as "not stripped" ... no idea why :)


I'm probably going to clone new tree... :)

jirka

2009-11-24 22:27:14

by Bernd Petrovitsch

[permalink] [raw]
Subject: Re: cannot compile linux-2.6-tip tree

On Die, 2009-11-24 at 18:22 +0100, Jiri Olsa wrote:
> On Tue, Nov 24, 2009 at 04:45:11PM +0100, Ingo Molnar wrote:
[...]
> > It's rare but happens. 'make clean' will cure that.
Apart from disk full, hitting quota limits may give similar errors.

[...]
> I tried make clean and it did not help..

- Did you change the architecture without `make mrproper` in between?
Yes, `make clean` should cure that but ....
- Did some cross-gcc, cross-objdump, ... get in the PATH?

Save .config, `make mrproper`, put .config back, `make` and see it it
persists.

Bernd
--
Firmix Software GmbH http://www.firmix.at/
mobil: +43 664 4416156 fax: +43 1 7890849-55
Embedded Linux Development and Services

2009-11-25 04:55:26

by Steven Rostedt

[permalink] [raw]
Subject: Re: cannot compile linux-2.6-tip tree

On Tue, 2009-11-24 at 23:27 +0100, Bernd Petrovitsch wrote:
> On Die, 2009-11-24 at 18:22 +0100, Jiri Olsa wrote:
> > On Tue, Nov 24, 2009 at 04:45:11PM +0100, Ingo Molnar wrote:
> [...]
> > > It's rare but happens. 'make clean' will cure that.
> Apart from disk full, hitting quota limits may give similar errors.

Yeah, the box I tested your config on filled up before finishing. But it
made it to the linking of the vmlinux before it died.

I did a:

$ cd linux.git
$ git checkout 2e7c0e0cafee # what you showed was the problem
$ mkdir ../tmp
$ cp ~/olsa-config ../tmp/.config
$ make O=../tmp


When it died, tmp was 7964.05 MB in size!

-- Steve

2009-11-25 09:00:32

by Jiri Olsa

[permalink] [raw]
Subject: Re: cannot compile linux-2.6-tip tree

On Tue, Nov 24, 2009 at 11:27:12PM +0100, Bernd Petrovitsch wrote:
> On Die, 2009-11-24 at 18:22 +0100, Jiri Olsa wrote:
> > On Tue, Nov 24, 2009 at 04:45:11PM +0100, Ingo Molnar wrote:
> [...]
> > > It's rare but happens. 'make clean' will cure that.
> Apart from disk full, hitting quota limits may give similar errors.
no quota..

>
> [...]
> > I tried make clean and it did not help..
>
> - Did you change the architecture without `make mrproper` in between?
> Yes, `make clean` should cure that but ....
it did not :) new tree clone did

> - Did some cross-gcc, cross-objdump, ... get in the PATH?
nope

>
> Save .config, `make mrproper`, put .config back, `make` and see it it
> persists.
I did "git clean -xdf" to wipe all out and hit the same issue

thanks,
jirka
>
> Bernd
> --
> Firmix Software GmbH http://www.firmix.at/
> mobil: +43 664 4416156 fax: +43 1 7890849-55
> Embedded Linux Development and Services
>

2009-11-25 09:02:40

by Jiri Olsa

[permalink] [raw]
Subject: Re: cannot compile linux-2.6-tip tree

On Tue, Nov 24, 2009 at 11:55:29PM -0500, Steven Rostedt wrote:
> On Tue, 2009-11-24 at 23:27 +0100, Bernd Petrovitsch wrote:
> > On Die, 2009-11-24 at 18:22 +0100, Jiri Olsa wrote:
> > > On Tue, Nov 24, 2009 at 04:45:11PM +0100, Ingo Molnar wrote:
> > [...]
> > > > It's rare but happens. 'make clean' will cure that.
> > Apart from disk full, hitting quota limits may give similar errors.
>
> Yeah, the box I tested your config on filled up before finishing. But it
> made it to the linking of the vmlinux before it died.
>
> I did a:
>
> $ cd linux.git
> $ git checkout 2e7c0e0cafee # what you showed was the problem
> $ mkdir ../tmp
> $ cp ~/olsa-config ../tmp/.config
> $ make O=../tmp
>
>
> When it died, tmp was 7964.05 MB in size!

wow :) new tree clone with the same config works for me

jirka

>
> -- Steve
>
>

2009-11-25 11:44:28

by Bernd Petrovitsch

[permalink] [raw]
Subject: Re: cannot compile linux-2.6-tip tree

On Wed, 2009-11-25 at 10:00 +0100, Jiri Olsa wrote:
> On Tue, Nov 24, 2009 at 11:27:12PM +0100, Bernd Petrovitsch wrote:
[...]
> > Save .config, `make mrproper`, put .config back, `make` and see it it
> > persists.
> I did "git clean -xdf" to wipe all out and hit the same issue
Just to be curious: What is that equivalent to `make mrproper`?
Doing (on x86_64, current mainline-tip or so)
---- snip ----
{2}make -C git-vanilla mrproper
[...]
{3}make -C git-vanilla allmodconfig
[...]
{4}make -C git-vanilla
[...]
{5}cp -a git-vanilla git-vanilla-2
{6}make -C git-vanilla mrproper
[...]
{7}(cd git-vanilla-2 && git clean -xdf)
[...]
{8}diff -qr git-vanilla git-vanilla-2
Only in git-vanilla/drivers/gpu/drm/radeon: r100_reg_safe.h
Only in git-vanilla/drivers/gpu/drm/radeon: r200_reg_safe.h
Only in git-vanilla/drivers/gpu/drm/radeon: r300_reg_safe.h
Only in git-vanilla/drivers/gpu/drm/radeon: rn50_reg_safe.h
Only in git-vanilla/drivers/gpu/drm/radeon: rs600_reg_safe.h
Only in git-vanilla/drivers/gpu/drm/radeon: rv515_reg_safe.h
Only in git-vanilla/include: asm-x86
---- snip ----
I don't know if that could make a significant difference.

Bernd
--
Firmix Software GmbH http://www.firmix.at/
mobil: +43 664 4416156 fax: +43 1 7890849-55
Embedded Linux Development and Services