From owner-freebsd-current@FreeBSD.ORG Tue Apr 17 10:52:34 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B473106566C; Tue, 17 Apr 2012 10:52:34 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirj.bris.ac.uk (dirj.bris.ac.uk [137.222.10.78]) by mx1.freebsd.org (Postfix) with ESMTP id AB0068FC16; Tue, 17 Apr 2012 10:52:33 +0000 (UTC) Received: from ncsd.bris.ac.uk ([137.222.10.59] helo=ncs.bris.ac.uk) by dirj.bris.ac.uk with esmtp (Exim 4.72) (envelope-from ) id 1SK61L-0002Op-93; Tue, 17 Apr 2012 11:52:27 +0100 Received: from mech-cluster241.men.bris.ac.uk ([137.222.187.241]) by ncs.bris.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1SK61L-0000S7-1f; Tue, 17 Apr 2012 11:52:27 +0100 Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.5/8.14.5) with ESMTP id q3HAqQmL029527; Tue, 17 Apr 2012 11:52:26 +0100 (BST) (envelope-from mexas@bris.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.5/8.14.5/Submit) id q3HAqQqs029526; Tue, 17 Apr 2012 11:52:26 +0100 (BST) (envelope-from mexas@bris.ac.uk) X-Authentication-Warning: mech-cluster241.men.bris.ac.uk: mexas set sender to mexas@bris.ac.uk using -f Date: Tue, 17 Apr 2012 11:52:26 +0100 From: Anton Shterenlikht To: Dimitry Andric Message-ID: <20120417105226.GA29511@mech-cluster241.men.bris.ac.uk> Mail-Followup-To: Dimitry Andric , Chris , Chris Rees , Current FreeBSD , "O. Hartmann" , Doug Barton References: <4F52286E.4030608@FreeBSD.org> <4F523C1A.4060008@zedat.fu-berlin.de> <4F8BBFF3.50205@FreeBSD.org> <20120416230857.GA26957@mech-cluster241.men.bris.ac.uk> <4F8D3565.2020803@FreeBSD.org> <20120417093652.GA29091@mech-cluster241.men.bris.ac.uk> <4F8D3CB8.5090907@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F8D3CB8.5090907@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: Chris Rees , Chris , Current FreeBSD , "O. Hartmann" , Doug Barton Subject: Re: "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC} X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Apr 2012 10:52:34 -0000 On Tue, Apr 17, 2012 at 11:49:44AM +0200, Dimitry Andric wrote: > On 2012-04-17 11:36, Anton Shterenlikht wrote: > >On Tue, Apr 17, 2012 at 11:18:29AM +0200, Dimitry Andric wrote: > ... > >>That said, i think it may be time to bow to the pressure, and just put a > >>fixup for this issue in kmod.mk, and the other .mk files, like I > >>initially did in r232473, but with a BIG FAT WARNING printed, so you at > >>least know you are attempting to shoot your extremities. :) > > > >No, I wouldn't want that. > >It's just that I thought the ports system > >never uses anything from /usr/src. > > Well, only the ports that build kernel modules need it, as far as I > know. This is because in FreeBSD we do not install the 'full' kernel > headers anywhere during installworld. > > Maybe we could adopt the Linux solution and dump them somewhere in a > versioned directory. :) > > > >Perhaps the ports which do use /sys should > >print a warning to the user. Something like > >"before building this port, make sure your > >installed world version matches the version > >of your FreeBSD sources." > > > >By the way, what would happen if I try > >to build those ports with no /sys at all? > > It would hopefully error out. If you look in /usr/share/mk/bsd.kmod.mk, > you will see this at the bottom: > > .if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \ > !exists(${SYSDIR}/conf/kmod.mk) > .error Unable to locate the kernel source tree. Set SYSDIR to override. > .endif > > So, setting SYSDIR to the correct directory is also a possible solution. Ah.. I get it now. So the ports that build kernel modules invoke /usr/share/mk/bsd.kmod.mk, right? So how about adding a warning to the user (that /sys version must match the installed world version) at the beginning of this file? Who maintains this file, @ports or @head? -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423