From owner-freebsd-questions@FreeBSD.ORG Thu Nov 3 18:49:30 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C69E2106566B for ; Thu, 3 Nov 2011 18:49:30 +0000 (UTC) (envelope-from bonomi@mail.r-bonomi.com) Received: from mail.r-bonomi.com (mx-out.r-bonomi.com [204.87.227.120]) by mx1.freebsd.org (Postfix) with ESMTP id 797228FC14 for ; Thu, 3 Nov 2011 18:49:30 +0000 (UTC) Received: (from bonomi@localhost) by mail.r-bonomi.com (8.14.4/rdb1) id pA3ImlMT019623 for freebsd-questions@freebsd.org; Thu, 3 Nov 2011 13:48:47 -0500 (CDT) Date: Thu, 3 Nov 2011 13:48:47 -0500 (CDT) From: Robert Bonomi Message-Id: <201111031848.pA3ImlMT019623@mail.r-bonomi.com> To: freebsd-questions@freebsd.org In-Reply-To: <4EB2CF62.1070107@my.gd> Subject: Re: Is it safe to interrupt (Ctrl + C) while building a port or kernel? 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: Thu, 03 Nov 2011 18:49:30 -0000 On Thu, 03 Nov 2011 18:29:06 +0100, Damien Fleuriot On 11/3/11 6:20 PM, Robert Bonomi wrote: > >> From owner-freebsd-questions@freebsd.org Thu Nov 3 12:10:08 2011 > >> From: =?koi8-r?B?4c7Uz84g68zF09M=?= > >> To: freebsd-questions@freebsd.org > >> Date: Thu, 03 Nov 2011 21:10:19 +0400 > >> Subject: Is it safe to interrupt (Ctrl + C) while building a port or kernel? > >> > >> Sometimes, while building process of some port or system kernel are in progress, you suddenly remember that you did something wrong and have to stop, solve your mistake and start one more time. > >> > >> Is it clear to interrupt the building process just by pressing Ctrl + ? > > > > Yes. > > > >> If it's so, do I need to run "make clean" before I start "make" one more time? > > > > Authoritative answer: "It depends". > > > > On what you 'did wrong", and what it takes to fix it. > > > > e.g., if you're building a kernel the 'classial' way, that is 'configure, > > make depend, cd , make', and realize you left something out of the config > > file, after you edit the config file, you have to rerun _all_ those steps. > > > > Is it even advisable to build the kernel the "old" way ? On a slow processor, it makes a *BIG* differnence. Even more so if you build everything you need into the kernel. 'make buildkernel' always recompiles an relinks *everything*. whether or not any dependenies for the module have changed. I've tried 'make buildkernel' on a 'loaded' 486 box, and had it take close to TWENTY FOUR HOURS to complete. With one minor tweak to the config file, e.g. changing one of the 'shared memory' constants, and it is _another_ 24+ hours. *Lots* of it building loadable modules that I have no need for, nor any intention of ever useing. Using the 'old' way, a first-time kernel build was under 40 minutes, and a 'tweak' re-build was under 15. That box is long gone, but on a 733mhz PIII I can go from editing a config file to running on the new kernel in less than 5 minutes (wall clock). The largest part of that time is running 'make depend'. (Second-largest is the rebooting. :) I don't know about anybody else, but _I_ consider that speed differential a *big* advantage to the 'old way'. :) I am likely _not_ the typical user -- I run a monolithic kernel, with everything I need 'compiled in'; *no* loadable modules. Yeah, it can be a nuisance if I need something that isn't compiled in, but I don't get ny unexpected surprises. It also does wonders as far as reducing the required 'root partition' size. I run a 64mb(!!) partition, with less than 1/2 of it occupied by the system install. With the running kernel, a copy of the prior running one as a fall-back, and a GENERIC for worst-case recovery.