From owner-freebsd-current@FreeBSD.ORG Mon Apr 16 06:45:12 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 28C90106566B; Mon, 16 Apr 2012 06:45:12 +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 295688FC0A; Mon, 16 Apr 2012 06:45:09 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:1d2d:16ed:5034:ef0e] (unknown [IPv6:2001:7b8:3a7:0:1d2d:16ed:5034:ef0e]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 57D0B5C37; Mon, 16 Apr 2012 08:45:08 +0200 (CEST) Message-ID: <4F8BBFF3.50205@FreeBSD.org> Date: Mon, 16 Apr 2012 08:45:07 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120410 Thunderbird/12.0 MIME-Version: 1.0 To: Chris References: <4F520523.90406@zedat.fu-berlin.de> <4F52286E.4030608@FreeBSD.org> <4F523C1A.4060008@zedat.fu-berlin.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Chris Rees , Maxim Sobolev , Current FreeBSD , "O. Hartmann" 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: Mon, 16 Apr 2012 06:45:12 -0000 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.