bugmake - Bugs: bug #51462, Double-colon dependencies are...


bug #51462: Double-colon dependencies are built serially with parallel make

Submitted by:  None
Submitted on:  Thu 13 Jul 2017 09:29:18 PM UTC  
Severity: 3 - NormalItem Group: Bug
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Component Version: SCMOperating System: None
Fixed Release: NoneTriage Status: None

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Thu 13 Jul 2017 10:13:54 PM UTC, comment #2:


I suspect that the fix referred to in 47995 is:


(it even starts with "[SV 47995]").

However, no, unfortunately it doesn't fix the problem I described.

Robert Morell <rmorell>
Thu 13 Jul 2017 10:07:26 PM UTC, comment #1:

A google for that hash finds:


... in which a reversion of that commit is suggested. It's marked as a duplicate of:


... which is marked as fixed in 4.2.1, which is the version in which you had the problem. So that's odd, then. Don't you wish that the commits posted to the bug tracker, so that you could trivially see what was done to fix the bug?

Martin Dorey <mdorey>
Thu 13 Jul 2017 09:29:18 PM UTC, original submission:

I noticed that some builds are significantly slower after switching from make 4.0 to 4.2.1. I tracked it down to what seems to be a parallel make problem with double-colon prerequisites. In particular, when there are multiple double-colon prereqs for a target, each of those prereqs seems to be considered serially, although their dependencies are built in parallel. It may be easier to explain with an example.

Test makefile:

With GNU make 4.0 the output of 'time make -j' after 'make clean' is:

Note that all 'fileN' recipes begin at the same time, and the dependent 'targetN' recipes begin as soon as their respective prereqs are complete.

The same with GNU make 4.2.1:

Note how the prereqs for target1 are built, then once that's complete the prereqs for target2, and then finally target3. Each set doesn't start until the previous has completed.

I bisected the GNU make repository and found that this is caused by the commit:
[SV 44742] Fix double-colon rules plus parallel builds.
(9bb994e8319c2b153cd3d6d61e2c2882895e7c3a in the git repo).

The 4.2.1 behavior also occurs at the latest commit from source control (e2ebea35f11059e in the git repo).



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by rmorell (Posted a comment)
  • -unavailable- added by mdorey (Posted a comment)
  • -unavailable- added by rmorell

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 13 Jul 2017 09:50:17 PM UTCrmorellCarbon-Copy-=>Added rmorell

    Back to the top

    Powered by Savane 3.1-cleanup1