[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [bug #37703] job starts before dependency
From: |
Jay Lawrence |
Subject: |
RE: [bug #37703] job starts before dependency |
Date: |
Sun, 21 Jul 2013 07:03:55 -0400 |
Turned out to be a Makefile problem.
Deep in an included Makefile was a
.SECONDARY:
with no pre-requisites.
As documented, this causes chain-rules to behave differently.
I had rules that went from .c->.o->.a
Then an executable that linked a bunch of these .a's together.
The scenario I was seeing was
- build everything in parallel
- remove one of the .a files
- build from the root, and see the .a rebuild, the executable did not
relink
- invoke make again and the executable relinks
I'm still not absolutely sure why the .SECONDARY caused this behavior, but when
I removed it make behaves perfectly.
FYI, I'm reworking a serial build that takes about 2 hours into a parallel
build based on the methodology espoused in
http://www.cmcrossroads.com/article/painless-non-recursive-make. So far so
good, I have about a 20 minute hunk of it that now builds in 1 minute 30
seconds on a 24 core machine. Non-linear, but not that far off. This product
has been around for 20 years and we are a classic example of the badness of
recursive builds, and we have tried to support multiple 'make' systems with a
common set of makefiles. I've seen the light and (to quote you) am "moving to a
portable make instead of portable makefiles". I last rewrote these Makefiles in
1998, it is time for an upgrade.
Jay LAwrence
-----Original Message-----
From: Paul Smith [mailto:address@hidden
Sent: Sunday, July 21, 2013 12:18 AM
To: Jay Lawrence
Cc: 'Koen Van Hoof'; 'Martijn Vermaat'; address@hidden; address@hidden
Subject: Re: [bug #37703] job starts before dependency
On Tue, 2013-07-09 at 10:43 -0400, Jay Lawrence wrote:
> My bad, I see that patch now, please disregard...
In your comment below you mentioned you'd tried the latest source but it still
failed. I believe I fixed this bug with a commit in April. Can you reproduce
the issue with the latest source code; for example, the
RC1 source package?
> I am seeing a very similar scenario with 3.82.
>
> I have also downloaded the latest source and see the same issue.
>
> When a very complex parallel build runs, and intermediate archive is
> generated, and some executables that depend on that archive are built
> before that parallel job completes. If I immediately reinvoke make
> with the same command line, it does then relink the executables.
>
> There is no "patch" information in this bug. Can you let me know what
> the change was so that I can verify that it is in the source code
> release I am building?