From owner-freebsd-current@FreeBSD.ORG Sat Mar 3 14:19:02 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 B082E1065674 for ; Sat, 3 Mar 2012 14:19:02 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 6D0C58FC14 for ; Sat, 3 Mar 2012 14:19:02 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:d0fa:b5e9:395b:990e] (unknown [IPv6:2001:7b8:3a7:0:d0fa:b5e9:395b:990e]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id A6E215C37; Sat, 3 Mar 2012 15:19:01 +0100 (CET) Message-ID: <4F52285B.8080609@FreeBSD.org> Date: Sat, 03 Mar 2012 15:19:07 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120216 Thunderbird/11.0 MIME-Version: 1.0 To: "O. Hartmann" References: <4F520523.90406@zedat.fu-berlin.de> In-Reply-To: <4F520523.90406@zedat.fu-berlin.de> X-Enigmail-Version: 1.4a1pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Current FreeBSD 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: Sat, 03 Mar 2012 14:19:02 -0000 On 2012-03-03 12:48, O. Hartmann wrote: > On one of my FreeBSD 10.0-CURRENT boxes I receive this morning this > error message as shown below. > > I need to add, that I compiled the shown nvidia-driver hours ago on all > FreeBSD 9.0-STABLE boxes with the same settings and I compiled the > driver just two days before the same way I tried it this morning. What's > wrong? > > Some unexpected breakage? Then this is my shout to the community. > > Message below. > > Regards and thanks in advance, > Oliver > > ===> Vulnerability check disabled, database not found > ===> License NVIDIA accepted by the user > ===> Found saved configuration for nvidia-driver-295.20 > ===> Extracting for nvidia-driver-295.20 > => SHA256 Checksum OK for NVIDIA-FreeBSD-x86_64-295.20.tar.gz. > ===> Patching for nvidia-driver-295.20 > ===> nvidia-driver-295.20 depends on file: > /usr/local/libdata/pkgconfig/xorg-server.pc - found > ===> nvidia-driver-295.20 depends on shared library: GL.1 - found > ===> Configuring for nvidia-driver-295.20 > ===> Building for nvidia-driver-295.20 > ===> src (all) > "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC} > == "no" && ${CC:T:Mclang} != "clang") > "/sys/conf/kmod.mk", line 115: if-less endif > "/sys/conf/kern.mk", line 18: Malformed conditional (${MK_CLANG_IS_CC} > != "no" || ${CC:T:Mclang} == "clang") > "/sys/conf/kern.mk", line 31: if-less endif > "/sys/conf/kern.mk", line 101: Malformed conditional (${MK_CLANG_IS_CC} > == "no" && ${CC:T:Mclang} != "clang") > "/sys/conf/kern.mk", line 109: if-less endif > make: fatal errors encountered -- cannot continue > *** [all] Error code 1 Sigh, it looks like a lot of module building scripts are broken. :( The problem is that in r232322, bsd.own.mk and bsd.sys.mk were updated, to support the new WITH_CLANG_IS_CC setting. This causes the macro MK_CLANG_IS_CC to be defined. However, this only works if Makefiles include the updated bsd.*.mk files from your source directory, not if they include the old bsd.*.mk files from /usr/share/mk. Or at least, if you didn't already run "make installworld" to update those .mk files. As I said to somebody else who reported a similar problem, I can put a workaround in kmod.mk and kern.mk, so that this incorrect way of module building seems to work. But it is still fundamentally broken. Alternatively, I can put a message in there, which tells you to either run make installworld, or use make buildenv before building the module(s).