[Top][All Lists]

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

Re: parallel make problem with our Texinfo manual

From: G. Branden Robinson
Subject: Re: parallel make problem with our Texinfo manual
Date: Sat, 22 May 2021 22:59:44 +1000
User-agent: NeoMutt/20180716

Hi, Bertrand and Ingo!  Thanks to you both for your help.

At 2021-05-21T18:23:56+0200, Ingo Schwarze wrote:
> Not very surprisingly, i didn't instantly manage to reproduce your
> problem on a different machine and operating system.  That's typical 
> for races, they depend on a lot of details.
> In my tests, i'm using "make -j 4 all check" because without
> specifying the maximum number of parallel jobs an an argument "4" to
> the "-j" option, i get nothing but
>    $ make -j all check
>   make: illegal argument to -j option -- all -- invalid

I reckon what's happening here is that you're not using GNU Make.

> Parallel builds can be useful, not only for wasting less time waiting
> for builds to finish but also for finding bugs in dependency
> specifications in Makefiles.  More often than not, build failures
> that only happen with -j indicate Makefile bugs, for example bugs
> in dependency specifications, and sometimes other bugs, too.

Yup.  I was prepared to put these very arguments forward in case you
discouraged -j usage.  :D

Incidentally, for those suspicious of parallel make, I have bad
news--POSIX is standardizing it for the next "Issue" of the standard.
The committee has been working constructively with Paul Smith (GNU Make
maintainer), and as usual Jörg Schilling is trying to ensure that POSIX
standardizes whatever is in Solaris and excludes everything that isn't.

[much snippage]

At 2021-05-22T02:00:07+0200, Bertrand Garrigues wrote:
> The generated Makefile use recursive make for both 'all' and 'check'
> targets:
>    all: $(BUILT_SOURCES)
>       $(MAKE) $(AM_MAKEFLAGS) all-am
>    [...]
>    check: $(BUILT_SOURCES)
>       $(MAKE) $(AM_MAKEFLAGS) check-am
> That's why there is no dependency tracking (the jobs generated by the
> 'all' target are not aware of the jobs from the 'check' target).  Also
> 'make check' implies 'make all' as we have:
>   check-am: all-am
> So it's a bit like if you've done 'make all & make all'.  You don't
> need to do (and should not do) 'make -j all check' just do 'make -j
> check'.

Yup.  A classic PEBKAC: "Problem Exists Between Keyboard and Chair".  :P

At some point the other day I blearily decided I didn't trust the
"check" target to depend on everything being built, the bad formulation
got into my shell history, and I just kept using it.  Everything was
fine until I went back to making modifications to the Texinfo manual...

Thanks again!  :)


Attachment: signature.asc
Description: PGP signature

reply via email to

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