bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #57575] --load-average changes order or jobs


From: Paul D. Smith
Subject: [bug #57575] --load-average changes order or jobs
Date: Fri, 10 Jan 2020 12:34:03 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36

Update of bug #57575 (project make):

                  Status:                    None => Not A Bug              
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #1:

It's not the -l option that causes this, it's the -j option.  If you ran with
-j8 without -l you'd still see this.

It's also not that make changes the order of jobs: make always walks the graph
of prerequisites in the same order, regardless of whether -j is provided or
not.

However, by introducing parallelism some underlying assumptions that people
were making in their makefiles no longer hold.  Without -j, if a rule says
"foo: bar baz" then you could assume that "bar" would be completed before
"baz" was started.

That makefile is not "correct", because if the target "bar" requires "baz" to
be completed it should list that as a prerequisite: "bar: baz".

But many makefile authors (especially those who work with versions of make
that don't support parallel builds) don't bother with defining explicit
ordering, and just rely on the implicit ordering.

Parallel builds cannot work in this situation and there's no way to make them
work, without defeating the entire purpose of parallelism.  If make has to
ensure that each target finishes before the next one starts then obviously you
cannot have parallel builds.

So your only option is to either fix the makefile, or not use -j.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57575>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]