compiling ports with more than one job

RW fbsd06 at mlists.homeunix.com
Mon Mar 5 21:21:26 UTC 2007


On Sat, 3 Mar 2007 13:55:53 +0100 (CET)
Christian Baer <christian.baer at uni-dortmund.de> wrote:

> On Wed, 28 Feb 2007 18:37:33 +0000 RW wrote:
> 
> > There are two problems here. The first is that not all of the
> > underlying builds support this. The second is that we are using
> > Make as our ports scripting language - I'm guessing that in Gentoo
> > no-one expects portage itself to be parallel.  
> 
> I don't actually *expect* anything. :-) I'm not sure why you think
> that Gentoo should be an exeption here, but that won't hold up
> forever - on any OS. 


I don't, it was an analogy. Gentoo has a portage system based on
Python that mostly builds software using Gnu make, FreeBSD has a ports
system based on BSD make that also mostly builds software using Gnu
make. Gentoo can make use of parallel processes by passing -j to gnu
make,and IMO this is how it should be done in FreeBSD. 

The fact that FreeBSD uses Make as its ports scripting language confuses
the issue, people expect to be able to type make -j in a ports
directory, but when they do that they are applying the -j to the wrong
make - it's analogous the python part of Gentoo portage. 

I don't see any good reason why the ports system *itself* should ever
support -j, there's nothing to be gained by it. All that's needed is
a better mechanism to tell  the underlying build to use multiple
processes.  


> So you mean a MAKE_ARGS= -j 4 would help?

Worth a try, a few ports already do this

> > Probably you would want to set it conditionally in make.conf, so you
> > can exclude any problematical ports.
> 
> What do you mean with that?

You wouldn't want to use it on ports that are known to fail would you?


More information about the freebsd-questions mailing list