* linux-next: build failure after merge of the tip tree
@ 2011-01-31 4:42 Stephen Rothwell
2011-02-17 3:47 ` Stephen Rothwell
0 siblings, 1 reply; 9+ messages in thread
From: Stephen Rothwell @ 2011-01-31 4:42 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra
Cc: linux-next, linux-kernel, Fenghua Yu, Michal Marek
[-- Attachment #1: Type: text/plain, Size: 608 bytes --]
Hi all,
After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
failed like this:
x86_64-linux-gcc: arch/x86/lib/memmove_64.c: No such file or directory
Caused by commit 9599ec0471deae24044241e2173090d2cbc0e899 ("x86-64, mem:
Convert memmove() to assembly file and fix return value bug") interacting
with our build system.
After removing arch/x86/lib/.memmove_64.o.cmd (left over from the build
before merging the tip tree) from my object tree, it built correctly.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: linux-next: build failure after merge of the tip tree
2011-01-31 4:42 linux-next: build failure after merge of the tip tree Stephen Rothwell
@ 2011-02-17 3:47 ` Stephen Rothwell
2011-02-17 12:43 ` [kbuild] " Ingo Molnar
2011-02-17 13:18 ` Michal Marek
0 siblings, 2 replies; 9+ messages in thread
From: Stephen Rothwell @ 2011-02-17 3:47 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra
Cc: linux-next, linux-kernel, Fenghua Yu, Michal Marek
[-- Attachment #1: Type: text/plain, Size: 966 bytes --]
Hi all,
On Mon, 31 Jan 2011 15:42:59 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
>
> x86_64-linux-gcc: arch/x86/lib/memmove_64.c: No such file or directory
>
> Caused by commit 9599ec0471deae24044241e2173090d2cbc0e899 ("x86-64, mem:
> Convert memmove() to assembly file and fix return value bug") interacting
> with our build system.
>
> After removing arch/x86/lib/.memmove_64.o.cmd (left over from the build
> before merging the tip tree) from my object tree, it built correctly.
I am still getting this (of course).
Michal, is there anything that the kbuild system can do for us here?
Basically we have changed from using a .c file to generate a .o to using
a .S but the build system does not regenerate the .cmd file.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [kbuild] Re: linux-next: build failure after merge of the tip tree
2011-02-17 3:47 ` Stephen Rothwell
@ 2011-02-17 12:43 ` Ingo Molnar
2011-02-17 12:45 ` Peter Zijlstra
2011-02-17 13:18 ` Michal Marek
1 sibling, 1 reply; 9+ messages in thread
From: Ingo Molnar @ 2011-02-17 12:43 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Thomas Gleixner, H. Peter Anvin, Peter Zijlstra, linux-next,
linux-kernel, Fenghua Yu, Michal Marek
* Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi all,
>
> On Mon, 31 Jan 2011 15:42:59 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
> > failed like this:
> >
> > x86_64-linux-gcc: arch/x86/lib/memmove_64.c: No such file or directory
> >
> > Caused by commit 9599ec0471deae24044241e2173090d2cbc0e899 ("x86-64, mem:
> > Convert memmove() to assembly file and fix return value bug") interacting
> > with our build system.
> >
> > After removing arch/x86/lib/.memmove_64.o.cmd (left over from the build
> > before merging the tip tree) from my object tree, it built correctly.
>
> I am still getting this (of course).
You reported this as a -tip build failure - but it appears to be some sort of kbuild
bug/artifact, right? There was a leftover .memmove_64.o.cmd file from an old tree.
When jumping between kernel versions via git checkout a 'make mrproper' is generally
needed. In most cases 'make' will figure things out but it's not always guaranteed.
So for example there are version transitions where a stale include/asm links could
cause build problems.
Thanks,
Ingo
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [kbuild] Re: linux-next: build failure after merge of the tip tree
2011-02-17 12:43 ` [kbuild] " Ingo Molnar
@ 2011-02-17 12:45 ` Peter Zijlstra
0 siblings, 0 replies; 9+ messages in thread
From: Peter Zijlstra @ 2011-02-17 12:45 UTC (permalink / raw)
To: Ingo Molnar
Cc: Stephen Rothwell, Thomas Gleixner, H. Peter Anvin, linux-next,
linux-kernel, Fenghua Yu, Michal Marek
On Thu, 2011-02-17 at 13:43 +0100, Ingo Molnar wrote:
> * Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> > Hi all,
> >
> > On Mon, 31 Jan 2011 15:42:59 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > >
> > > After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
> > > failed like this:
> > >
> > > x86_64-linux-gcc: arch/x86/lib/memmove_64.c: No such file or directory
> > >
> > > Caused by commit 9599ec0471deae24044241e2173090d2cbc0e899 ("x86-64, mem:
> > > Convert memmove() to assembly file and fix return value bug") interacting
> > > with our build system.
> > >
> > > After removing arch/x86/lib/.memmove_64.o.cmd (left over from the build
> > > before merging the tip tree) from my object tree, it built correctly.
> >
> > I am still getting this (of course).
>
> You reported this as a -tip build failure - but it appears to be some sort of kbuild
> bug/artifact, right? There was a leftover .memmove_64.o.cmd file from an old tree.
>
> When jumping between kernel versions via git checkout a 'make mrproper' is generally
> needed. In most cases 'make' will figure things out but it's not always guaranteed.
>
> So for example there are version transitions where a stale include/asm links could
> cause build problems.
Yeah, I run into this problem once every few days, totally annoying. A
make clean does fix it so I couldn't be arsed to actually submit myself
to Kbuild voodoo, but if someone who knows about that stuff could come
up with a fix I'd be most obliged.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: linux-next: build failure after merge of the tip tree
2011-02-17 3:47 ` Stephen Rothwell
2011-02-17 12:43 ` [kbuild] " Ingo Molnar
@ 2011-02-17 13:18 ` Michal Marek
2011-02-17 15:02 ` Michal Marek
1 sibling, 1 reply; 9+ messages in thread
From: Michal Marek @ 2011-02-17 13:18 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
linux-next, linux-kernel, Fenghua Yu
On 17.2.2011 04:47, Stephen Rothwell wrote:
> Hi all,
>
> On Mon, 31 Jan 2011 15:42:59 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>>
>> After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
>> failed like this:
>>
>> x86_64-linux-gcc: arch/x86/lib/memmove_64.c: No such file or directory
>>
>> Caused by commit 9599ec0471deae24044241e2173090d2cbc0e899 ("x86-64, mem:
>> Convert memmove() to assembly file and fix return value bug") interacting
>> with our build system.
>>
>> After removing arch/x86/lib/.memmove_64.o.cmd (left over from the build
>> before merging the tip tree) from my object tree, it built correctly.
>
> I am still getting this (of course).
>
> Michal, is there anything that the kbuild system can do for us here?
> Basically we have changed from using a .c file to generate a .o to using
> a .S but the build system does not regenerate the .cmd file.
_Maybe_ we could work around it by letting fixdep remove the actual
source file from the list of dependencies in the .cmd file. The
dependency on the .c / .S / whatever file is given by the Makefiles, the
.cmd file is only needed for additional dependencies on headers. Let's
see what else breaks then ;).
Michal
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: linux-next: build failure after merge of the tip tree
2011-02-17 13:18 ` Michal Marek
@ 2011-02-17 15:02 ` Michal Marek
2011-02-17 17:11 ` Ingo Molnar
2011-02-17 22:47 ` Stephen Rothwell
0 siblings, 2 replies; 9+ messages in thread
From: Michal Marek @ 2011-02-17 15:02 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
linux-next, linux-kernel, Fenghua Yu
On Thu, Feb 17, 2011 at 02:18:18PM +0100, Michal Marek wrote:
> On 17.2.2011 04:47, Stephen Rothwell wrote:
> > Hi all,
> >
> > On Mon, 31 Jan 2011 15:42:59 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >>
> >> After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
> >> failed like this:
> >>
> >> x86_64-linux-gcc: arch/x86/lib/memmove_64.c: No such file or directory
> >>
> >> Caused by commit 9599ec0471deae24044241e2173090d2cbc0e899 ("x86-64, mem:
> >> Convert memmove() to assembly file and fix return value bug") interacting
> >> with our build system.
> >>
> >> After removing arch/x86/lib/.memmove_64.o.cmd (left over from the build
> >> before merging the tip tree) from my object tree, it built correctly.
> >
> > I am still getting this (of course).
> >
> > Michal, is there anything that the kbuild system can do for us here?
> > Basically we have changed from using a .c file to generate a .o to using
> > a .S but the build system does not regenerate the .cmd file.
>
> _Maybe_ we could work around it by letting fixdep remove the actual
> source file from the list of dependencies in the .cmd file. The
> dependency on the .c / .S / whatever file is given by the Makefiles, the
> .cmd file is only needed for additional dependencies on headers. Let's
> see what else breaks then ;).
It seems to work for me. Can you try the patch below? It needs to be
applied before merging 9599ec0 to have any effect.
Michal
From: Michal Marek <mmarek@suse.cz>
Subject: [PATCH] fixdep: Do not record dependency on the source file itself
The dependency is already expressed by the Makefiles, storing it in the
.cmd file breaks build if a .c file is replaced by .S or vice versa,
because the .cmd file contains
foo/bar.o: foo/bar.c ...
foo/bar.c ... :
so the foo/bar.c -> foo/bar.o rule triggers even if there is no
foo/bar.c anymore.
Signed-off-by: Michal Marek <mmarek@suse.cz>
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index c9a16ab..9264725 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -315,6 +315,7 @@ static void parse_dep_file(void *map, size_t len)
char *end = m + len;
char *p;
char s[PATH_MAX];
+ int first;
p = strchr(m, ':');
if (!p) {
@@ -327,6 +328,7 @@ static void parse_dep_file(void *map, size_t len)
clear_config();
+ first = 1;
while (m < end) {
while (m < end && (*m == ' ' || *m == '\\' || *m == '\n'))
m++;
@@ -340,9 +342,16 @@ static void parse_dep_file(void *map, size_t len)
if (strrcmp(s, "include/generated/autoconf.h") &&
strrcmp(s, "arch/um/include/uml-config.h") &&
strrcmp(s, ".ver")) {
- printf(" %s \\\n", s);
+ /* Do not output the first dependency (the
+ * source file), so that kbuild is not confused
+ * if a .c file is rewritten into .S or vice
+ * versa.
+ */
+ if (!first)
+ printf(" %s \\\n", s);
do_config_file(s);
}
+ first = 0;
m = p + 1;
}
printf("\n%s: $(deps_%s)\n\n", target, target);
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: linux-next: build failure after merge of the tip tree
2011-02-17 15:02 ` Michal Marek
@ 2011-02-17 17:11 ` Ingo Molnar
2011-02-17 22:47 ` Stephen Rothwell
1 sibling, 0 replies; 9+ messages in thread
From: Ingo Molnar @ 2011-02-17 17:11 UTC (permalink / raw)
To: Michal Marek
Cc: Stephen Rothwell, Thomas Gleixner, H. Peter Anvin,
Peter Zijlstra, linux-next, linux-kernel, Fenghua Yu
* Michal Marek <mmarek@suse.cz> wrote:
> @@ -340,9 +342,16 @@ static void parse_dep_file(void *map, size_t len)
> if (strrcmp(s, "include/generated/autoconf.h") &&
> strrcmp(s, "arch/um/include/uml-config.h") &&
> strrcmp(s, ".ver")) {
> - printf(" %s \\\n", s);
> + /* Do not output the first dependency (the
> + * source file), so that kbuild is not confused
> + * if a .c file is rewritten into .S or vice
> + * versa.
> + */
Just a really minor nitpick, please use the standard comment style:
/*
* Comment .....
* ...... goes here.
*/
specified in Documentation/CodingStyle.
Thanks,
Ingo
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: linux-next: build failure after merge of the tip tree
2011-02-17 15:02 ` Michal Marek
2011-02-17 17:11 ` Ingo Molnar
@ 2011-02-17 22:47 ` Stephen Rothwell
2011-02-18 3:54 ` Stephen Rothwell
1 sibling, 1 reply; 9+ messages in thread
From: Stephen Rothwell @ 2011-02-17 22:47 UTC (permalink / raw)
To: Michal Marek
Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
linux-next, linux-kernel, Fenghua Yu
[-- Attachment #1: Type: text/plain, Size: 872 bytes --]
Hi Michal,
On Thu, 17 Feb 2011 16:02:00 +0100 Michal Marek <mmarek@suse.cz> wrote:
>
> > _Maybe_ we could work around it by letting fixdep remove the actual
> > source file from the list of dependencies in the .cmd file. The
> > dependency on the .c / .S / whatever file is given by the Makefiles, the
> > .cmd file is only needed for additional dependencies on headers. Let's
> > see what else breaks then ;).
>
> It seems to work for me. Can you try the patch below? It needs to be
> applied before merging 9599ec0 to have any effect.
Thanks, I will apply this as a fix on top of Linus' tree before I merge
anything else. It looks simple enough that Linus may take it as a fix
right now. Better to convince ourselves first, though, right?
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: linux-next: build failure after merge of the tip tree
2011-02-17 22:47 ` Stephen Rothwell
@ 2011-02-18 3:54 ` Stephen Rothwell
0 siblings, 0 replies; 9+ messages in thread
From: Stephen Rothwell @ 2011-02-18 3:54 UTC (permalink / raw)
To: Michal Marek
Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
linux-next, linux-kernel, Fenghua Yu
[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]
Hi Michal,
On Fri, 18 Feb 2011 09:47:54 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Thu, 17 Feb 2011 16:02:00 +0100 Michal Marek <mmarek@suse.cz> wrote:
> >
> > > _Maybe_ we could work around it by letting fixdep remove the actual
> > > source file from the list of dependencies in the .cmd file. The
> > > dependency on the .c / .S / whatever file is given by the Makefiles, the
> > > .cmd file is only needed for additional dependencies on headers. Let's
> > > see what else breaks then ;).
> >
> > It seems to work for me. Can you try the patch below? It needs to be
> > applied before merging 9599ec0 to have any effect.
>
> Thanks, I will apply this as a fix on top of Linus' tree before I merge
> anything else. It looks simple enough that Linus may take it as a fix
> right now. Better to convince ourselves first, though, right?
That patch fixed the problem for me and has caused no obvious problems.
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-02-18 3:54 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-31 4:42 linux-next: build failure after merge of the tip tree Stephen Rothwell
2011-02-17 3:47 ` Stephen Rothwell
2011-02-17 12:43 ` [kbuild] " Ingo Molnar
2011-02-17 12:45 ` Peter Zijlstra
2011-02-17 13:18 ` Michal Marek
2011-02-17 15:02 ` Michal Marek
2011-02-17 17:11 ` Ingo Molnar
2011-02-17 22:47 ` Stephen Rothwell
2011-02-18 3:54 ` Stephen Rothwell
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).