linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3.7-rc8] lib/Makefile: Fix oid_registry build dependency
@ 2012-12-04 19:52 Tim Gardner
  2012-12-05 10:34 ` David Howells
  2012-12-06  7:02 ` [PULL] (Was Re: [PATCH 3.7-rc8] lib/Makefile: Fix oid_registry build dependency) Rusty Russell
  0 siblings, 2 replies; 3+ messages in thread
From: Tim Gardner @ 2012-12-04 19:52 UTC (permalink / raw)
  To: linux-kernel
  Cc: Tim Gardner, Andrew Morton, Akinobu Mita, Michel Lespinasse,
	David Howells, David S. Miller

It is $(obj)/oid_registry.o that is dependent on $(obj)/oid_registry_data.c.
The object file cannot be built until $(obj)/oid_registry_data.c has been
generated.

A periodic and hard to reproduce parallel build failure is due to
this incorrect lib/Makefile dependency. The compile error is completely
disingenuous.

  GEN     lib/oid_registry_data.c
Compiling 49 OIDs
  CC      lib/oid_registry.o
gcc: error: lib/oid_registry.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
make[3]: *** [lib/oid_registry.o] Error 4

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Michel Lespinasse <walken@google.com>
Cc: David Howells <dhowells@redhat.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---

I've only ever been able to reproduce this build failure on an Ubuntu PPA, 
and then only infrequently. Restarting the build generally succeeds.
I beleive the root of the issue to be an incorrect dependency, though
I'm not sure why it doesn't fail more often. Its never failed when run by hand,
even on large N-way systems. Commit a77ad6ea0b0bb1f9d1f52ed494bd72a5fdde208e
which introduced this change came in with 3.7-rc1, so this patch is not
applicable for stable.

 lib/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Makefile b/lib/Makefile
index 821a162..a08b791 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -163,7 +163,7 @@ $(obj)/crc32table.h: $(obj)/gen_crc32table
 #
 obj-$(CONFIG_OID_REGISTRY) += oid_registry.o
 
-$(obj)/oid_registry.c: $(obj)/oid_registry_data.c
+$(obj)/oid_registry.o: $(obj)/oid_registry_data.c
 
 $(obj)/oid_registry_data.c: $(srctree)/include/linux/oid_registry.h \
 			    $(src)/build_OID_registry
-- 
1.7.9.5


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

* Re: [PATCH 3.7-rc8] lib/Makefile: Fix oid_registry build dependency
  2012-12-04 19:52 [PATCH 3.7-rc8] lib/Makefile: Fix oid_registry build dependency Tim Gardner
@ 2012-12-05 10:34 ` David Howells
  2012-12-06  7:02 ` [PULL] (Was Re: [PATCH 3.7-rc8] lib/Makefile: Fix oid_registry build dependency) Rusty Russell
  1 sibling, 0 replies; 3+ messages in thread
From: David Howells @ 2012-12-05 10:34 UTC (permalink / raw)
  To: Tim Gardner, Rusty Russell
  Cc: dhowells, linux-kernel, Andrew Morton, Akinobu Mita,
	Michel Lespinasse, David S. Miller

Tim Gardner <tim.gardner@canonical.com> wrote:

> It is $(obj)/oid_registry.o that is dependent on $(obj)/oid_registry_data.c.
> The object file cannot be built until $(obj)/oid_registry_data.c has been
> generated.
> 
> A periodic and hard to reproduce parallel build failure is due to
> this incorrect lib/Makefile dependency. The compile error is completely
> disingenuous.

Good catch.  This patch could go via Rusty's module signing tree.

Acked-by: David Howells <dhowells@redhat.com>

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

* [PULL] (Was Re: [PATCH 3.7-rc8] lib/Makefile: Fix oid_registry build dependency)
  2012-12-04 19:52 [PATCH 3.7-rc8] lib/Makefile: Fix oid_registry build dependency Tim Gardner
  2012-12-05 10:34 ` David Howells
@ 2012-12-06  7:02 ` Rusty Russell
  1 sibling, 0 replies; 3+ messages in thread
From: Rusty Russell @ 2012-12-06  7:02 UTC (permalink / raw)
  To: Tim Gardner, linux-kernel
  Cc: Tim Gardner, Andrew Morton, Akinobu Mita, Michel Lespinasse,
	David Howells, David S. Miller, Linus Torvalds

Tim Gardner <tim.gardner@canonical.com> writes:
> It is $(obj)/oid_registry.o that is dependent on $(obj)/oid_registry_data.c.
> The object file cannot be built until $(obj)/oid_registry_data.c has been
> generated.
>
> A periodic and hard to reproduce parallel build failure is due to
> this incorrect lib/Makefile dependency. The compile error is completely
> disingenuous.
>
>   GEN     lib/oid_registry_data.c
> Compiling 49 OIDs
>   CC      lib/oid_registry.o
> gcc: error: lib/oid_registry.c: No such file or directory
> gcc: fatal error: no input files
> compilation terminated.
> make[3]: *** [lib/oid_registry.o] Error 4

I can't reproduce it either.  It's completely weird; nothing ever
removes lib/oid_registry.c, so either gcc is giving the wrong message or
it's a weird fs with a very odd race.

But your version is definitely more correct than the previous one, so...

Linus, please pull my 'more-fixes' branch:

git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux.git more-fixes

Thanks,
Rusty.

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

end of thread, other threads:[~2012-12-06  7:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-04 19:52 [PATCH 3.7-rc8] lib/Makefile: Fix oid_registry build dependency Tim Gardner
2012-12-05 10:34 ` David Howells
2012-12-06  7:02 ` [PULL] (Was Re: [PATCH 3.7-rc8] lib/Makefile: Fix oid_registry build dependency) Rusty Russell

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).