Re: Parallel build results
On Wed, 2008-01-02 at 14:23:01 +0100, Lucas Nussbaum wrote:
> On 01/01/08 at 18:23 -0800, Russ Allbery wrote:
> > Aurelien Jarno <firstname.lastname@example.org> writes:
> > > 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.
Well on my part I think I've made all my packages to properly build in
parallel but didn't add the explicit parsing on the rules file.
> > > 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.
No, there's build systems out there that are not make based, those
would still need to parse DEB_BUILD_OPTIONS and activate parallelism
if supported by those systems.
> > > 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.
> > I agree with this analysis. I think the MAKEFLAGS setting in
> > dpkg-buildpackage should be removed and instead calling dpkg-buildpackage
> > with the -j option should just set the parallel=n flag in
> > DEB_BUILD_OPTIONS. From there, we can leave it to package maintainers to
> > decide how to implement this.
> I filed bug #458589 against dpkg-dev about this. I think that both
> following solutions are fine:
> - dpkg-buildpackage must not consider DEB_BUILD_OPTIONS=parallel=n as
> the same thing as calling dpkg-buildpackage -j n.
Ok, I've just commited a change for dpkg-buildpackage not to automatically
behave as if -j had been passed as argument if DEB_BUILD_OPTIONS contains
> - dpkg-buildpackage -j must not set MAKEFLAGS. But if this is choosen,
> dpkg-buildpackage -j will simply become another way of doing 'export
> DEB_BUILD_OPTIONS="parallel=n"'. Is it really worth keeping in this
> > If someone *really* wants to try forcing make to do a parallel build, they
> > can always set MAKEFLAGS themselves directly.
> True ; maybe dpkg-buildpackage -j is completely useless, actually.
It's as useless as dpkg-buildpackage itself, you can also directly
call debian/rules ...