From owner-freebsd-current@FreeBSD.ORG Tue Apr 17 09:38:13 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0D11F1065673; Tue, 17 Apr 2012 09:38:13 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirg.bris.ac.uk (dirg.bris.ac.uk [137.222.10.102]) by mx1.freebsd.org (Postfix) with ESMTP id A99598FC0C; Tue, 17 Apr 2012 09:38:12 +0000 (UTC) Received: from ncsd.bris.ac.uk ([137.222.10.59] helo=ncs.bris.ac.uk) by dirg.bris.ac.uk with esmtp (Exim 4.72) (envelope-from ) id 1SK4r1-0006kf-Cg; Tue, 17 Apr 2012 10:37:49 +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 1SK4qC-0004AP-KF; Tue, 17 Apr 2012 10:36:52 +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 q3H9aqxs029118; Tue, 17 Apr 2012 10:36:52 +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 q3H9aqrT029117; Tue, 17 Apr 2012 10:36:52 +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 10:36:52 +0100 From: Anton Shterenlikht To: Dimitry Andric Message-ID: <20120417093652.GA29091@mech-cluster241.men.bris.ac.uk> Mail-Followup-To: Dimitry Andric , Chris , Chris Rees , Current FreeBSD , "O. Hartmann" , Doug Barton References: <4F520523.90406@zedat.fu-berlin.de> <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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F8D3565.2020803@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 09:38:13 -0000 On Tue, Apr 17, 2012 at 11:18:29AM +0200, Dimitry Andric wrote: > On 2012-04-17 01:08, Anton Shterenlikht wrote: > ... > >Just to say that I stumbled upon this issue as well: > > > >http://lists.freebsd.org/pipermail/freebsd-ports/2012-April/074409.html > > > >Subject: net/bwi-firmware-kmod "/sys/conf/kmod.mk", line 111: Malformed > >conditional (${MK_CLANG_IS_CC} == "no"&& ${CC:T:Mclang} != "clang") > > The root cause is still that your kernel sources (in /sys) do not match > your installed world. The kernel module build process uses bsd.own.mk > from /usr/share/mk, which should define MK_CLANG_IS_CC. If it doesn't, > but your kernel source references it, there is a mismatch. > > In some cases, you could fix it by setting MAKESYSPATH to the share/mk > dir under your source tree. There is still no guarantee your module > will build or load correctly. > > As Doug Barton said in reply to r232473: "Building ports where the > sources and the installed kernel differ is not a supported > configuration. The fact that it happens to work most of the time is a > bonus." Yes, my bad, just checked and my /usr/src doesn't match the kernel. Thank you for the explanation. > > 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. 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? -- 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