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:Chris (behr@gmail.com)
Date:Apr 16, 2012 3:41:21 pm
List:org.freebsd.freebsd-current

On Mon, Apr 16, 2012 at 2:45 AM, Dimitry Andric <di@freebsd.org> wrote:

On 2012-04-16 03:03, Chris wrote:

I recently updated my system from 8.2-STABLE to 9.0-STABLE and I'm seeing a similar error when trying to build the VirtualBox kernel module:

*** Building 'vboxdrv' module *** "/usr/share/mk/bsd.own.mk", line 476: MK_CLANG_IS_CC can't be set by a user. *** Error code 1

I tried the tips from all the previous posters with no luck. Any suggestions would greatly be appreciated!

It looks like this was caused by Maxim Sobolev's workaround here:

 http://lists.freebsd.org/pipermail/cvs-ports/2012-April/240000.html

He attempts to set MK_ variables by hand, but that is obviously not allowed.

As has been said before, it is indeed possible to put a workaround for compiling with the wrong source directory in bsd.own.mk, but that would really help people to shoot themselves in the foot.

It looks like the virtualbox-ose-kmod port sets a SRC_BASE variable to the appropriate source directory, but it should probably also set the MAKESYSPATH environment variable to ${SRC_BASE}/share/mk before invoking make.

Note this is still not 100% safe, as you would really need to build using a toolchain corresponding to your kernel sources, but it's better than nothing.

As a quick-n-dirty workaround, I deleted the three patch files mentioned in Maxim Sobolev's posting and the port compiles with no problems. It may be that the version of bsd.own.mk that I have fixes any compilation issues with clang.

Thanks for the help!