Re: "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}

From: Anton Shterenlikht <mexas_at_bristol.ac.uk>
Date: Tue, 17 Apr 2012 10:36:52 +0100
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
Received on Tue Apr 17 2012 - 07:38:13 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:26 UTC