Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Apr 2012 18:41:44 -0400
From:      Chris <behrnetworks@gmail.com>
To:        Dimitry Andric <dim@freebsd.org>
Cc:        Chris Rees <crees@freebsd.org>, Current FreeBSD <freebsd-current@freebsd.org>, "O. Hartmann" <ohartman@zedat.fu-berlin.de>
Subject:   Re: "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}
Message-ID:  <CAFYLaXNfYD0E6UbXHO9gBYY0x3eNACQDstubaPZSL_6x4tMzSw@mail.gmail.com>
In-Reply-To: <4F8BBFF3.50205@FreeBSD.org>
References:  <4F520523.90406@zedat.fu-berlin.de> <CADLo838ZKXXS4mVcjG3cnRp=aQdx5Cpas6DLiSsGQO1acqHnwQ@mail.gmail.com> <4F52286E.4030608@FreeBSD.org> <4F523C1A.4060008@zedat.fu-berlin.de> <CAFYLaXPveMM0RCoHSLpG8i2-i6cStWSPrf4FkzZu63Eg--UE%2Bw@mail.gmail.com> <4F8BBFF3.50205@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Apr 16, 2012 at 2:45 AM, Dimitry Andric <dim@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:
>
> =A0http://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!

Chris



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFYLaXNfYD0E6UbXHO9gBYY0x3eNACQDstubaPZSL_6x4tMzSw>