From owner-freebsd-ports@FreeBSD.ORG Mon Dec 24 20:35:17 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A883AFE6 for ; Mon, 24 Dec 2012 20:35:17 +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 66A618FC13 for ; Mon, 24 Dec 2012 20:35:17 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:e8f8:3644:6741:6f04] (unknown [IPv6:2001:7b8:3a7:0:e8f8:3644:6741:6f04]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id E5D485C5A; Mon, 24 Dec 2012 21:35:15 +0100 (CET) Message-ID: <50D8BC7F.2070207@FreeBSD.org> Date: Mon, 24 Dec 2012 21:35:11 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20121128 Thunderbird/18.0 MIME-Version: 1.0 To: "O. Hartmann" Subject: Re: clang/llvm: /usr/local/include in port base system not standard? (port devel/freeocl) References: <50D88C9C.6030308@zedat.fu-berlin.de> In-Reply-To: <50D88C9C.6030308@zedat.fu-berlin.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: Ports FreeBSD X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Dec 2012 20:35:17 -0000 On 2012-12-24 18:10, O. Hartmann wrote: > Some ports (devel/freeocl for instance) won't compile easily with CLANG. > I fugured out that sometimes CLANG is not by default including > /usr/local/include into the CPP search path - obviously gcc/gcc46 does! Eh, that is incorrect. The version of gcc in base does *not* have /usr/local/include in its default include path, and our version of clang in base mimics that behaviour. I know this has been a point of much discussion, but I don't want to repeat any of it here; just stating the facts. I don't know precisely what the port versions of gcc and clang do, however. It is a Linuxism to always have /usr/local/include in the default path, so it may well be that the port versions do this too. > Well, I feel a bit confused, since I do not know how to manage the > intransparent port framework (intransparent to me) to force the port's > Makefile to include via "-I/usr/local/include" the path in question. Like it is done in most ports, try adding: CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib > By the way, the build backend is cmake which I'm completely unfamiliar > with. Can someone give a hint? CMake has its own logic for searching headers, but I am not sure what the correct solution is for your specific project.