Subject: Re: pkgsrc on SMP machines
To: Hubert Feyrer <>
From: Geert Hendrickx <>
List: tech-pkg
Date: 12/15/2005 23:43:15
On Thu, Dec 15, 2005 at 11:30:21PM +0100, Geert Hendrickx wrote:
> On Thu, Dec 15, 2005 at 10:55:24PM +0100, Geert Hendrickx wrote:
> > On Thu, Dec 15, 2005 at 10:46:58PM +0100, Hubert Feyrer wrote:
> > > My guess (hope) is that things work mostly well with automake, actually.
> > > After all, I doubt pkgsrc is the only place where this is an issue.
> > 
> > IIRC Gentoo Linux supports (and promotes) the use of -j via their "portage"
> > system, we could look into their framework to see how they did it.  
> I looked it up: the user can set something like MAKEOPTS="-j4" in his
> /etc/make.conf to enable parallel builds, which is then used by default
> for all packages.  Only some some individual packages ("ebuilds"), like
> mozilla, disable this (when they are known to break otherwise).  
            \-> by explicitly invoking "make -j1"

I asked #gentoo about it.  They told me most packages are thread-safe.  

We could mark tested packages with THREAD_SAFE=(yes|no), and have those
built with -j${THREADS}, where THREADS is user-settable.  THREAD_SAFE would
default to "no" (for unverified packages), at least in the beginning.  When
it turns out that this works fine, we could change this default to yes (but
THREADS would anyway default to 1).  

Just brain-storming here.