[Buildroot] [PATCH 1/1] package/Makefile.in: set .NOTPARALLEL for MAKE1

Yann E. MORIN yann.morin.1998 at free.fr
Sun Oct 16 18:46:07 UTC 2022


James, All,

On 2022-10-16 12:53 -0400, James Hilliard spake thusly:
> On Sun, Oct 16, 2022 at 12:35 PM Yann E. MORIN <yann.morin.1998 at free.fr> wrote:
[--SNIP--]
> > > > -MAKE1 := $(HOSTMAKE) -j1
> > > > +MAKE1 := $(HOSTMAKE) --eval .NOTPARALLEL:
> > >
> > > Packages that do not build in parallel do not because their rules assume
> > > the ordering is kept.
> > >
> > > I don't see how replacing -j1 with --eval .NOTPARALLEL: would cause the
> > > ordering to be restored.
> >
> > Ah, it's in the --shuffle documentation, not in the .NOTPARALLEL one (and
> > reading .texi source is not my main ability).
> >
> > Still, I think my proposal is better, because it is more explicit.
> 
> We don't want to modify the shuffle value

In this case, yes, we do want to disable shuffling.

Packages that do not build in parallel, do not exactly because of the
build ordering. So far, we resorted to just forcing -j1 for those
packages, because -j1 hid away the build order issue.

So, shuffling them even in -j1, would cause build failures.

And as you said, and as the make manual states, .NOTPARALLEL disables
shuffling.

I.e., technically, those two lines are equivalent (assuming make 4.4):

    MAKE1 := $(HOSTMAKE) --eval .NOTPARALLEL:
    MAKE1 := $(HOSTMAKE) -j1 --shuffle=none

Except the latter is explicit about its goals: single job and no
shuffling, while the former is only explicit about not parallel (also I
do not like that --eval, it feels horribly weird, especially with the
trailing colon).

What I am saying, is that I prefer we explicitly disable shuffling,
rather than rely on the implicit behaviour of .NOTPARALLEL.

Finally, my proposal only appends --shuffle=none if it finds --shuffle
in MAKEFLAGS. If it is not present, we do not need it, either because
we are make 4.3-or-earlier, or we are make 4.4 without shuffling.

> as it's useful for
> reproducing failures,

This is irrelevant to set MAKE1, because with MAKE1 we know the build
ordering matters, and that we explicitly state that we do not want to
be bothered by it.

> although there's currently a bug which doesn't set the seed correctly:
> https://savannah.gnu.org/bugs/index.php?63215
> 
> Using .NOTPARALLEL should ensure the shuffle value is still passed down

Sorry, but .NOTPARALLEL disables shuffling, so I am lost: why would it
matter to have the seed passed down?

> so that it appears in the failure message(once that bug is fixed) while
> still disabling parallel build for the parallel incompatible package.

Parallel-incompatible packages are incompatible exactly because the
build ordering does matter to them, so we do not want to shuffle them.

> We want to be able to reproduce failures by passing the shuffle seed to the
> top level make invocation.

This is about debugging our dependency issues, not about the packages'
Makefiles.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



More information about the buildroot mailing list