From owner-freebsd-questions@FreeBSD.ORG Wed Feb 28 18:37:37 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 6B56216A401 for ; Wed, 28 Feb 2007 18:37:37 +0000 (UTC) (envelope-from fbsd06@mlists.homeunix.com) Received: from mxout-03.mxes.net (mxout-03.mxes.net [216.86.168.178]) by mx1.freebsd.org (Postfix) with ESMTP id 462EB13C474 for ; Wed, 28 Feb 2007 18:37:37 +0000 (UTC) (envelope-from fbsd06@mlists.homeunix.com) Received: from gumby.homeunix.com (unknown [87.81.140.128]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTP id ECB8D519B3 for ; Wed, 28 Feb 2007 13:37:35 -0500 (EST) Date: Wed, 28 Feb 2007 18:37:33 +0000 From: RW To: freebsd-questions@freebsd.org Message-ID: <20070228183733.4f6ddfe7@gumby.homeunix.com> In-Reply-To: References: X-Mailer: Claws Mail 2.7.2 (GTK+ 2.10.9; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: compiling ports with more than one job X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Feb 2007 18:37:37 -0000 On Wed, 28 Feb 2007 11:32:57 +0100 (CET) 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. 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. Really it's only the build stage that matters. What you might try is setting the MAKE_ARGS variable, which passes extra arguments to gmake during build and install. If a port makefile sets it explicitly you'll be out of luck, but I think most either don't set it, or use +=. Probably you would want to set it conditionally in make.conf, so you can exclude any problematical ports.