Re: Parallel build results
Aurelien Jarno <email@example.com> writes:
> Russ Allbery a écrit :
>> The effect of dpkg-buildpackage -j is to set DEB_BUILD_OPTIONS. The
>> package should continue to look at DEB_BUILD_OPTIONS to determine
>> whether parallel builds should be done.
> As far as I understand, the main effect is to call debian/rules with -j,
> but it also set DEB_BUILD_OPTIONS (but I fail to see why).
It also sets MAKEFLAGS. I'm not sure that part is a good idea, since
packages that don't anticipate this can't reject the provided MAKEFLAGS in
the case that the upstream build system doesn't support parallel builds.
Basically, this means that using dpkg-buildpackage -j isn't generally
safe. It can only be used with packages that you already know support
> Anyway, if the package continue to look to DEB_BUILD_OPTIONS, as the
> make children could not communicate with the jobserver, some strange
> results may appear. On architectures that have more than one flavour,
> that just mean the number of jobs is actually (value of -j times number
> of flavours).
Ah, interesting. This is a subtlety of how make implements parallelism
that I wasn't aware of.
Russ Allbery (firstname.lastname@example.org) <http://www.eyrie.org/~eagle/>