atom feed18 messages in org.freebsd.freebsd-currentRe: "/sys/conf/kmod.mk", line 111: Ma...
FromSent OnAttachments
O. HartmannMar 3, 2012 3:48 am 
Chris ReesMar 3, 2012 5:23 am 
Dimitry AndricMar 3, 2012 6:18 am 
Florian SmeetsMar 3, 2012 6:19 am 
Dimitry AndricMar 3, 2012 6:25 am 
O. HartmannMar 3, 2012 7:42 am 
ChrisApr 15, 2012 6:03 pm 
Dimitry AndricApr 15, 2012 11:44 pm 
ChrisApr 16, 2012 3:41 pm 
Anton ShterenlikhtApr 16, 2012 4:08 pm 
Dimitry AndricApr 17, 2012 2:18 am 
Anton ShterenlikhtApr 17, 2012 2:36 am 
Dimitry AndricApr 17, 2012 2:49 am 
Anton ShterenlikhtApr 17, 2012 3:52 am 
Arno J. KlaassenApr 17, 2012 8:59 am 
Mark LinimonApr 17, 2012 9:03 am 
Kevin ObermanApr 17, 2012 12:27 pm 
Dimitry AndricApr 17, 2012 1:52 pm 
Subject:Re: "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}
From:Dimitry Andric (di@FreeBSD.org)
Date:Mar 3, 2012 6:18:44 am
List:org.freebsd.freebsd-current

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).