Skip to contentSkip to conversation

Strange linux-next build error

DISCUSSION Daniel Hazelton 4 participants 8 messages May 3, 2008 – May 4, 2008

lore
Share & tools
lore
#0 lore raw

After updating my local tree to the latest linux-next and starting a clean build I see this error *ONLY* the first time I start a "make bzImage"

CC arch/x86/kernel/acpi/sleep.o
LDS arch/x86/kernel/acpi/realmode/wakeup.lds
cc1: fatal error: opening output file arch/x86/kernel/acpi/realmode/wakeup.lds: Permission denied compilation terminated.
make[4]: *** [arch/x86/kernel/acpi/realmode/wakeup.lds] Error 1 make[3]: *** [arch/x86/kernel/acpi/realmode/wakeup.bin] Error 2 make[2]: *** [arch/x86/kernel/acpi] Error 2
make[1]: *** [arch/x86/kernel] Error 2
make: *** [bzImage] Error 2

Restarting the build brings it through to completion. I've checked and there is no reason that this error should occur.

madman@strider:~/linux/linux-git/Documentation$ gcc --version
gcc (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

(I'll be booting this kernel tomorrow to test it - previous -next kernels have all faulted during boot)

DRH

Signature · 1 line
Dialup is like pissing through a pipette. Slow and excruciatingly painful.
#1 lore raw

Just adding some cc's ... it is worth cc'ing linux-next for bugs in linux-next (instead, or as well, as me personally) since people who are interested are probably subscribed there.

Quoted 28 lines · On Sat, 3 May 2008 01:21:38 -0400 Daniel Hazelton <[email protected]> wrote:

After updating my local tree to the latest linux-next and starting a clean build I see this error *ONLY* the first time I start a "make bzImage"

CC arch/x86/kernel/acpi/sleep.o
LDS arch/x86/kernel/acpi/realmode/wakeup.lds
cc1: fatal error: opening output file arch/x86/kernel/acpi/realmode/wakeup.lds: Permission denied compilation terminated.
make[4]: *** [arch/x86/kernel/acpi/realmode/wakeup.lds] Error 1 make[3]: *** [arch/x86/kernel/acpi/realmode/wakeup.bin] Error 2 make[2]: *** [arch/x86/kernel/acpi] Error 2
make[1]: *** [arch/x86/kernel] Error 2
make: *** [bzImage] Error 2

Restarting the build brings it through to completion. I've checked and there is no reason that this error should occur.

madman@strider:~/linux/linux-git/Documentation$ gcc --version
gcc (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

(I'll be booting this kernel tomorrow to test it - previous -next kernels have all faulted during boot)

DRH

Signature · 3 lines
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/
#2 lore raw
Quoted 4 lines · Stephen Rothwell

Just adding some cc's ... it is worth cc'ing linux-next for bugs in linux-next (instead, or as well, as me personally) since people who are interested are probably subscribed there.

Quoted 15 lines
Quoted 14 lines · On Sat, 3 May 2008 01:21:38 -0400 Daniel Hazelton <[email protected]> wrote:

After updating my local tree to the latest linux-next and starting a clean build I see this error *ONLY* the first time I start a "make bzImage"

CC arch/x86/kernel/acpi/sleep.o
LDS arch/x86/kernel/acpi/realmode/wakeup.lds
cc1: fatal error: opening output file arch/x86/kernel/acpi/realmode/wakeup.lds: Permission denied compilation terminated.
make[4]: *** [arch/x86/kernel/acpi/realmode/wakeup.lds] Error 1 make[3]: *** [arch/x86/kernel/acpi/realmode/wakeup.bin] Error 2 make[2]: *** [arch/x86/kernel/acpi] Error 2
make[1]: *** [arch/x86/kernel] Error 2
make: *** [bzImage] Error 2

Hi Daniel.

It looks like we visit arch/x86/kernel/acpi/realmode/Makefile twice in parallel as we have both make[4] and make[3] in play here. Or maybe we have a dependency bug in the Makefile.

Can you try to do a:
make V=1 and post the output a few screen fulls before and until the bug triggers.
They I will see if I can work out what is happening.

Thanks,
Sam

#3 lore raw
Quoted 4 lines · On Saturday 03 May 2008 02:40:57 Sam Ravnborg wrote:
Quoted 3 lines · Stephen Rothwell

Just adding some cc's ... it is worth cc'ing linux-next for bugs in linux-next (instead, or as well, as me personally) since people who are interested are probably subscribed there.

Ah, yes - I'm not very good at remembering fine details like that :)

Quoted 1 line
Quoted 1 line

On Sat, 3 May 2008 01:21:38 -0400 Daniel Hazelton <[email protected]>

Quoted 21 lines · wrote:
Quoted 4 lines
Quoted 4 lines

After updating my local tree to the latest linux-next and starting a clean build I see this error *ONLY* the first time I start a "make bzImage"

Quoted 10 lines
Quoted 10 lines

CC arch/x86/kernel/acpi/sleep.o
LDS arch/x86/kernel/acpi/realmode/wakeup.lds
cc1: fatal error: opening output file arch/x86/kernel/acpi/realmode/wakeup.lds: Permission denied compilation terminated.
make[4]: *** [arch/x86/kernel/acpi/realmode/wakeup.lds] Error 1 make[3]: *** [arch/x86/kernel/acpi/realmode/wakeup.bin] Error 2 make[2]: *** [arch/x86/kernel/acpi] Error 2
make[1]: *** [arch/x86/kernel] Error 2
make: *** [bzImage] Error 2

Hi Daniel.

It looks like we visit arch/x86/kernel/acpi/realmode/Makefile twice in parallel as we have both make[4] and make[3] in play here. Or maybe we have a dependency bug in the Makefile.

Quoted 7 lines

Can you try to do a:
make V=1 and post the output a few screen fulls before and until the bug triggers.
They I will see if I can work out what is happening.

Thanks,
Sam

Will do. I'll run a "make mrproper" and then rebuild the kernel with V=1

DRH

Signature · 1 line
Dialup is like pissing through a pipette. Slow and excruciatingly painful.
#4 lore raw
In reply to Sam Ravnborg
Quoted 6 lines · On Saturday 03 May 2008 02:40:57 Sam Ravnborg wrote:
Quoted 5 lines · Stephen Rothwell

Just adding some cc's ... it is worth cc'ing linux-next for bugs in linux-next (instead, or as well, as me personally) since people who are interested are probably subscribed there.

On Sat, 3 May 2008 01:21:38 -0400 Daniel Hazelton <[email protected]>

Quoted 21 lines · wrote:
Quoted 4 lines
Quoted 4 lines

After updating my local tree to the latest linux-next and starting a clean build I see this error *ONLY* the first time I start a "make bzImage"

Quoted 10 lines
Quoted 10 lines

CC arch/x86/kernel/acpi/sleep.o
LDS arch/x86/kernel/acpi/realmode/wakeup.lds
cc1: fatal error: opening output file arch/x86/kernel/acpi/realmode/wakeup.lds: Permission denied compilation terminated.
make[4]: *** [arch/x86/kernel/acpi/realmode/wakeup.lds] Error 1 make[3]: *** [arch/x86/kernel/acpi/realmode/wakeup.bin] Error 2 make[2]: *** [arch/x86/kernel/acpi] Error 2
make[1]: *** [arch/x86/kernel] Error 2
make: *** [bzImage] Error 2

Hi Daniel.

It looks like we visit arch/x86/kernel/acpi/realmode/Makefile twice in parallel as we have both make[4] and make[3] in play here. Or maybe we have a dependency bug in the Makefile.

Quoted 7 lines

Can you try to do a:
make V=1 and post the output a few screen fulls before and until the bug triggers.
They I will see if I can work out what is happening.

Thanks,
Sam

I've been unable to trigger it with "make V=1 bzImage" - does the verbosity change, somehow, the default number of makes that get run ?

If it does, I could try adding -j2 or similar to see if that causes it to trigger.

DRH

Signature · 1 line
Dialup is like pissing through a pipette. Slow and excruciatingly painful.
#5 lore raw
Quoted 5 lines · Daniel Hazelton
Quoted 5 lines

Can you try to do a:
make V=1 and post the output a few screen fulls before and until the bug triggers.
They I will see if I can work out what is happening.

Quoted 8 lines
Quoted 2 lines

Thanks,
Sam

I've been unable to trigger it with "make V=1 bzImage" - does the verbosity change, somehow, the default number of makes that get run ?

If it does, I could try adding -j2 or similar to see if that causes it to trigger.

try something like:

make -j2 V=1 bzImage >log.txt 2>&1

and see whether the error shows up in log.txt. Console output caused by the increased verbosity (especially if it's a slower console like an xterm) can hide build races.

Ingo

#6 lore raw
Quoted 17 lines · On Saturday 03 May 2008 18:40:18 Ingo Molnar wrote:
Quoted 5 lines · Daniel Hazelton
Quoted 5 lines

Can you try to do a:
make V=1 and post the output a few screen fulls before and until the bug triggers.
They I will see if I can work out what is happening.

Quoted 8 lines
Quoted 2 lines

Thanks,
Sam

I've been unable to trigger it with "make V=1 bzImage" - does the verbosity change, somehow, the default number of makes that get run ?

If it does, I could try adding -j2 or similar to see if that causes it to trigger.

try something like:

Quoted 7 lines
   make -j2 V=1 bzImage >log.txt 2>&1

and see whether the error shows up in log.txt. Console output caused by the increased verbosity (especially if it's a slower console like an xterm) can hide build races.

Ingo

And this appears to have been a false alarm. For the tests I did a clean pull of the tree and started the build. When I kept *NOT* getting a build error on the clean tree I started checking permissions and, while the files that this error was happening for (and the containing directory) all had good permissions, the correct ownerand all that - so I didn't look deeper. On doing a deeper look it seems that there were some files and directories that belonged to "root" and had 0644 for permissions.

After doing "make mrproper" and the reconfiguration I reset the owner/group on the entire tree of files to be non-root and the build (at -j4) has finished without a problem.

Sorry about that.

DRH

Signature · 1 line
Dialup is like pissing through a pipette. Slow and excruciatingly painful.
#7 lore raw
Quoted 34 lines · Daniel Hazelton
Quoted 17 lines · On Saturday 03 May 2008 18:40:18 Ingo Molnar wrote:
Quoted 5 lines · Daniel Hazelton
Quoted 5 lines

Can you try to do a:
make V=1 and post the output a few screen fulls before and until the bug triggers.
They I will see if I can work out what is happening.

Quoted 8 lines
Quoted 2 lines

Thanks,
Sam

I've been unable to trigger it with "make V=1 bzImage" - does the verbosity change, somehow, the default number of makes that get run ?

If it does, I could try adding -j2 or similar to see if that causes it to trigger.

try something like:

Quoted 7 lines
   make -j2 V=1 bzImage >log.txt 2>&1

and see whether the error shows up in log.txt. Console output caused by the increased verbosity (especially if it's a slower console like an xterm) can hide build races.

Ingo

And this appears to have been a false alarm. For the tests I did a clean pull of the tree and started the build. When I kept *NOT* getting a build error on the clean tree I started checking permissions and, while the files that this error was happening for (and the containing directory) all had good permissions, the correct ownerand all that - so I didn't look deeper. On doing a deeper look it seems that there were some files and directories that belonged to "root" and had 0644 for permissions.

Quoted 5 lines

After doing "make mrproper" and the reconfiguration I reset the owner/group on the entire tree of files to be non-root and the build (at -j4) has finished without a problem.

Sorry about that.

But this makes sense. We have/had a problem where we always rebuilded wakeup.lds. So if you by accident have done "make bzImage" as root this file would have been generated and thus belonging to root. x86.git has the fix for this so we no longer do the wakeup.lds rebuild for each kernel build and I expect it to hit both -next and -lins soon.

And I am very happy to nail down why - because having to much unexplained issues with the build system will decrease the trust in it. And there I do not want to go with kbuild - it helps no one.

Thanks for your feedback!

Sam