From owner-freebsd-questions@FreeBSD.ORG Wed Feb 28 18:07:27 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4BB0516A401 for ; Wed, 28 Feb 2007 18:07:27 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from mail7.sea5.speakeasy.net (mail7.sea5.speakeasy.net [69.17.117.9]) by mx1.freebsd.org (Postfix) with ESMTP id 2743013C478 for ; Wed, 28 Feb 2007 18:07:27 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: (qmail 31865 invoked from network); 28 Feb 2007 18:07:26 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail7.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 28 Feb 2007 18:07:25 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id F23D028430; Wed, 28 Feb 2007 13:07:24 -0500 (EST) To: Christian Baer References: <200702281044.16855.josh@tcbug.org> From: Lowell Gilbert Date: Wed, 28 Feb 2007 13:07:24 -0500 In-Reply-To: <200702281044.16855.josh@tcbug.org> (Josh Paetzel's message of "Wed\, 28 Feb 2007 10\:44\:16 -0600") Message-ID: <44hct617hf.fsf@be-well.ilk.org> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org Subject: Re: compiling ports with more than one job X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Feb 2007 18:07:27 -0000 Josh Paetzel writes: > On Wednesday 28 February 2007 04:32, Christian Baer wrote: >> Good morning[1], folks! >> >> I am currently setting up a Sun U60 with FreeBSD. A few amount of >> apps will be installed on it, when I'm through with it. And that is >> where it gets a little frustrating. >> >> The packages for SPARC64 aren't really up to date. That is why >> using them isn't really an option. Besides, some programs actually >> get a real boost if they are compiled with an -mcpu flag, which >> probably isn't set when the packages are compiled. So, I'm down to >> installing them over the ports collection. >> >> That isn't bad in itself. But even a U60 isn't really a fast >> machine and if you compile bigger collections (like x.org, kde, >> firefox etc.) you can watch yourself aging while the machine is at >> it. It would be a great help if I could really use both CPUs in >> this machine. But somehow that doesn't work. I have observed two >> things so far (in general): >> >> Some ports (like mc) have a menu for choosing the compile options. >> If I try to make one of those with more than one job (make -j 2) I >> can't hit any of the boxes on the list of options or even hit the >> "ok" button. It would seem that make went on to the next job >> without actually waiting for the input. >> >> The same background but with a slightly different effect is also >> true for ports without a menu. I couldn't make xorg with more than >> one job because make just ran on without waiting for the required >> things to be there and stopped with a "no such file or directory". >> That is quite a drag as on UltraSPARC II CPUs compiling isn't much >> fun even if you use all the CPU-power there is. >> >> Normally you'd think that a meta-port like xorg just hast to be >> compiled step by step. However, a far more complex system (make -j >> 4 buildworld) works just fine. >> >> Am I too thick to get the point here or is it really true that the >> ports in general will only compile correctly one job at a time? >> >> Regards >> Chris > > The issues with the config screen sounds like a bug, but one that is > unlikely to get fixed any time soon. You can avoid it by doing a > make config-recursive before building the port, but you're still > going to run in to the problem that ports are not guarranteed to > by -jX safe, some will work, some won't, and there's no way of > knowing without trying it. In general you can save yourself a lot of > headaches by not trying in the first place. Exactly right. However, you can get some parallel building by doing more than one single-threaded build at the same time. This leads to some danger of corrupting the database, though, so it's not for the squeamish. I know that portupgrade uses locking to control those problems, and I suspect some of the other port-management ports probably have similar capabilities.