From owner-freebsd-current@FreeBSD.ORG Wed Sep 12 12:15:33 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 92982106564A for ; Wed, 12 Sep 2012 12:15:33 +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 4CAB48FC14 for ; Wed, 12 Sep 2012 12:15:33 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:d8a:6180:883f:1cf5] (unknown [IPv6:2001:7b8:3a7:0:d8a:6180:883f:1cf5]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 6EEAD5C37; Wed, 12 Sep 2012 14:15:32 +0200 (CEST) Message-ID: <50507CE6.6060803@FreeBSD.org> Date: Wed, 12 Sep 2012 14:15:34 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20120905 Thunderbird/16.0 MIME-Version: 1.0 To: Edward Meewis References: <5050680C.4020402@extraordinarymachine.nl> <50506D6E.3040905@FreeBSD.org> <505075C3.7010504@extraordinarymachine.nl> In-Reply-To: <505075C3.7010504@extraordinarymachine.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: Building world with clang ToT 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: Wed, 12 Sep 2012 12:15:33 -0000 On 2012-09-12 13:45, Edward Meewis wrote: ... > I added the following lines to each individual Makefile it stumbled on: > > CFLAGS+= -I/usr/obj/usr/home/emeewis/src/FreeBSD-HEAD/tmp/usr/include > > LDADD+=-L/usr/obj/usr/home/emeewis/src/FreeBSD-HEAD/tmp/usr/lib > or: > LDFLAGS+=-L/usr/obj/usr/home/emeewis/src/FreeBSD-HEAD/tmp/usr/lib > > I hope to find a better place to set those, but it will do for now. Normally this should never be done, but it could work in theory. ... >> There must be a certain setting on your system which causes this. Most >> likely, it is again using your existing system headers, instead of those >> in /usr/obj. > > I suppose so, but where? ... > /etc/make.conf: > ---------------------- > # > # Clang > # > USE_CLANG?=no > # > .if ${USE_CLANG} == "yes" > .if !defined(CC) || ${CC} == "cc" > CC=/usr/local/bin/clang Don't use absolute paths here, it will not work for buildworld. This has been discussed recently in another thread. (Not an issue with clang or gcc, but with the way buildworld bootstraps its compiler in general.) ... > /etc/src.conf > ------------------ > # src.conf - Source build options > > #WITHOUT_TOOLCHAINS="yes" > > WITHOUT_ATM="yes" > WITHOUT_BLUETOOTH="yes" > WITHOUT_BSNMP="yes" > WITHOUT_CDDL="yes" > WITHOUT_CLANG="yes" > WITHOUT_CTM="yes" > WITHOUT_CVS="yes" > WITHOUT_GCC="yes" I don't think buildworld can ever work correctly, if you have both WITHOUT_CLANG and WITHOUT_GCC defined, at least not with how it is currently implemented. At least, certainly not for a -CURRENT build on -STABLE, that is. If you'd build this on a fully installed -CURRENT box, it might complete, but again, no guarantees. Try building with gcc, while removing the WITHOUT_GCC line, or building with clang, while removing the WITHOUT_CLANG line.