Re: Parallel build results
Russ Allbery a écrit :
> Aurelien Jarno <firstname.lastname@example.org> 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
> parallel builds.
I think that is a problem. dpkg-buildpackage -j will be really usable
when *all* packages support parallel builds.
On the other hand, DEB_BUILD_OPTIONS=parallel=n was ignored by packages
that have not been validated by the maintainers, and used by packages
that have been tested by the maintainer. Also it was possible to use
only on some parts of the build. For example the make install part is
sometimes problematic, and mainly depends on I/O throughput of the
machine, and not CPU. This make some problems difficult to detect, as
they happen only in rare case on some machines.
Unfortunately dpkg-buildpackage now looks for DEB_BUILD_OPTIONS and call
debian/rules with -j and the value it founds in this environment
variable. That makes DEB_BUILD_OPTIONS=parallel=n useless, as it has the
same effect as dpkg-buildpackage -j.
I personally think that supporting DEB_BUILD_OPTIONS=parallel=n on some
packages is a first goal to achieve. Supporting this option in the 100
packages which take the longest to build would probably be a huge
improvement in build time of the whole archive, while being easier than
fixing all the packages in the archive. The most difficult part probably
being changing the policy (sigh) as some of them already support that,
but through a specific environment variable. Also a lot of packages
spend most of their time in the configure script for those using
autotools, and in installing/removing build-depends packages for the
others. Using make -j in those cases won't help.
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' email@example.com | firstname.lastname@example.org
`- people.debian.org/~aurel32 | www.aurel32.net