Parallel compilation question

Asked by Jens Beyer

I could not find anything in the documentation about parallel compilation on launchpad builders.

Is this allowed? Is this recommended?
If the (virtualized) hardware provides it, it may free up the builders more quickly.

If it is allowed - what is the correct way to do it in a source package recipe?
To us it looks like dh_auto_build --parallel in the rules file seems the way Debian does it. Is this the way for launchpad builder?

Thanks.

Question information

Language:
English Edit question
Status:
Answered
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
William Grant (wgrant) said :
#1

Launchpad builds packages using the normal Debian tools, with the appropriate -j flag to dpkg-buildpackage. This will set the standard 'parallel' setting to the DEB_BUILD_OPTIONS environment variable, which tells tools such as dh how many concurrent jobs to run.

Revision history for this message
Martin Quinson (mquinson) said :
#2

To complete on William's answer, the package also has to declare its ability to build in parallel. See for example https://bugs.launchpad.net/ubuntu/+source/debhelper/+bug/1193077

So in summary, the decision of whether to build in parallel involves both the build daemon (that have to add "parallel=n" to the DEB_BUILD_OPTIONS variable, as described in the policy 4.9.1), and the package maintainer that have to pass --parallel to dh to specify that this package is known to build flawlessly in parallel (many many packages don't).

The ubuntu build daemons do their duties, but you still have to pass --parallel to dh on your side.

(as a side note, Jens asked this question because --parallel was enough in the widelands package, but that was a packaging error on my side that I've solved now. I was calling make manually from my rules file, preventing debhelper from passing the right parameters to the compilation subprocess) The widelands package will soon become a possible source of information on that point, if you need one.

Can you help with this problem?

Provide an answer of your own, or ask Jens Beyer for more information if necessary.

To post a message you must log in.