[PATCH] fix parallel make problem
- From
- Michael 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