parallel ports build

Benjamin Lutz mail at maxlor.com
Tue Nov 6 06:43:20 PST 2007


Jonathan Noack wrote:
> With most modern systems having 2+ cores, I was wondering if the ports
> system could make use of more than one of them.  I briefly searched the
> web and list archives and found several short discussions and the
> following page (cced author markus@):
> http://www.brueffer.de/parallel_ports_build.html
> 
> The bsd.port.mk patch on that page is dated March 2004 (!) but looks
> pretty simple.  A port must set "SUPPORTS_PARALLEL_BUILD=yes" to allow a
> parallel build.  If it does, the BUILD_JOBS knob is used (either read from
> /etc/make.conf, env, or defaults to 0) and "-j${BUILD_JOBS}" is passed to
> make.  As a bonus, the patch includes CC/CXX wrapper support for
> ccache/distcc/etc.
> 
> Given that not all ports successfully build in parallel, the opt-in
> approach seems reasonable.  It allows port maintainers to test their ports
> and update them if everything works well.  Even a simple pass through the
> ports tree focusing on the heavy-hitters (X, KDE, Gnome, Apache, PHP,
> MySQL, Postgres, OpenOffice, etc.) and their dependencies could make a
> significant dent in build time.  This would be most evident for new
> installs and upgrades where you are basically starting from scratch.
> 
> I am far from an expert in this area so I wanted to see what others
> thought.  Is this a good approach or is there a better one?

There is an open PR for this feature in GNATS, submitted by me
(shameless plug :) ), PR# is 113132. Last I heard from Kris, he liked
it, but wanted to add some modifications of his own to the patch.
Nothing has happened since, but oh well, I'm sure it'll eventually get done.

Btw, the patch behind that link above is the 4th such patch I've seen :)
So it's probably safe to say that there is sufficient interest in this
feature that it won't be forgotten. The only problem is that FreeBSD is
a very conservative project, and the ports are very easy to break.

We'll see what happens after the upcoming releases.

Cheers
Benjamin


More information about the freebsd-ports mailing list