git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] fix parallel make problem

From
MTMichael S. Tsirkin <mst@dev.mellanox.co.il>
Date
Aug 30, 2007, 07:27 UTC
Message-ID
<20070830072748.GF16312@mellanox.co.il>
In-Reply-To
<7v7inda5ar.fsf@gitster.siamese.dyndns.org>
There seems to be a bug in parallel build with GNU Make 3.81beta4
which ships with Ubuntu Dapper:
$touch revision.c
$make -j 4
fails with
	LINK test-chmtime
	gcc: test-chmtime.o: No such file or directory
	make: *** [test-chmtime] Error 1

Even though test-chmtime depends on test-chmtime.o Work around this by building test-* executables directly from the appropriate .c file.

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
---
Show 13 quoted lines
> Quoting Junio C Hamano <gitster@pobox.com>:
> Subject: Re: parallel make problem with git
> 
> "Michael S. Tsirkin" <mst@dev.mellanox.co.il> writes:
> 
> >     LINK test-chmtime
> > gcc: test-chmtime.o: No such file or directory
> > make: *** [test-chmtime] Error 1
> > make: *** Waiting for unfinished jobs....
> >
> > Any ideas?
> 
> Some missing dependencies, apparently.

Looks more like bug in make, to me: test-chmtime.o should have been built by implicit rule, but isn't.

> make --version
GNU Make 3.81beta4
The following patch helps by building the test directly from .c file:
diff --git a/Makefile b/Makefile
index 4eb4637..d6b38b5 100644
--- a/Makefile
+++ b/Makefile
@@ -969,8 +969,8 @@ test-date$X: date.o ctype.o
 
 test-delta$X: diff-delta.o patch-delta.o
 
-test-%$X: test-%.o $(GITLIBS)
-	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
+test-%$X: test-%.c $(GITLIBS) GIT-CFLAGS
+	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.c,$^) $(LIBS)
 
 check-sha1:: test-sha1$X
 	./test-sha1.sh
-- 
MST
Previous: Michael S. TsirkinNext: Junio C Hamano
Message 4 of 26 in “parallel make problem with git”
  1. Michael S. TsirkinAug 30, 2007
  2. Junio C HamanoAug 30, 2007
  3. Michael S. TsirkinAug 30, 2007
  4. fix parallel make problemMichael S. Tsirkin, Aug 30, 2007
  5. Junio C HamanoAug 31, 2007
  6. Michael S. TsirkinAug 31, 2007
  7. Junio C HamanoAug 31, 2007
  8. Michael S. TsirkinAug 31, 2007
  9. Junio C HamanoAug 31, 2007
  10. Michael S. TsirkinAug 31, 2007
  11. Junio C HamanoAug 31, 2007
  12. Michael S. TsirkinAug 31, 2007
  13. Johannes SchindelinAug 31, 2007
  14. Junio C HamanoAug 31, 2007
  15. Jeff KingAug 31, 2007
  16. diff: resurrect the traditional empty "diff --git" behaviourJunio C Hamano, Aug 31, 2007
  17. Jeff KingAug 31, 2007
  18. Johannes SchindelinAug 31, 2007
  19. Junio C HamanoAug 31, 2007
  20. Johannes SchindelinAug 31, 2007
  21. David KastrupAug 31, 2007
  22. Alex RiesenAug 31, 2007
  23. Steven GrimmAug 31, 2007
  24. Junio C HamanoSep 1, 2007
  25. Matthieu MoySep 3, 2007
  26. Junio C HamanoSep 3, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.