From owner-freebsd-ports@FreeBSD.ORG Thu Oct 18 23:16:51 2007 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71C7816A418 for ; Thu, 18 Oct 2007 23:16:51 +0000 (UTC) (envelope-from noackjr@alumni.rice.edu) Received: from smtp109.biz.mail.re2.yahoo.com (smtp109.biz.mail.re2.yahoo.com [206.190.53.8]) by mx1.freebsd.org (Postfix) with SMTP id 1ACB613C457 for ; Thu, 18 Oct 2007 23:16:50 +0000 (UTC) (envelope-from noackjr@alumni.rice.edu) Received: (qmail 52061 invoked from network); 18 Oct 2007 22:50:09 -0000 Received: from unknown (HELO optimator.noacks.org) (noackjr@supercrime.org@24.30.93.225 with login) by smtp109.biz.mail.re2.yahoo.com with SMTP; 18 Oct 2007 22:50:09 -0000 X-YMail-OSG: MZ0J66sVM1m5YG3zTR556KGy9LJsPsBrrCWQEozRk5_k8P0AP7q7CPKRStiIpA8uvgMKF7l6tEbnRKUUCdNDMmybQiRKISVEaPd9TWJg1vWyb59iW1c- Received: from localhost (localhost [127.0.0.1]) by optimator.noacks.org (Postfix) with ESMTP id 0A92D626E; Thu, 18 Oct 2007 18:50:09 -0400 (EDT) X-Virus-Scanned: amavisd-new at noacks.org Received: from optimator.noacks.org ([127.0.0.1]) by localhost (optimator.noacks.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id AgCcE8YFEOne; Thu, 18 Oct 2007 18:50:05 -0400 (EDT) Received: from www.noacks.org (localhost [127.0.0.1]) by optimator.noacks.org (Postfix) with ESMTP id 67BFC6202; Thu, 18 Oct 2007 18:50:05 -0400 (EDT) Received: from 67.45.62.107 (SquirrelMail authenticated user noackjr) by www.noacks.org with HTTP; Thu, 18 Oct 2007 18:50:05 -0400 (EDT) Message-ID: <12263.67.45.62.107.1192747805.squirrel@www.noacks.org> Date: Thu, 18 Oct 2007 18:50:05 -0400 (EDT) From: "Jonathan Noack" To: ports@freebsd.org User-Agent: SquirrelMail/1.4.10a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: markus@freebsd.org Subject: parallel ports build X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: noackjr@alumni.rice.edu List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Oct 2007 23:16:51 -0000 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? -Jon