From owner-freebsd-questions@FreeBSD.ORG Tue Jan 27 15:32:18 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC873585 for ; Tue, 27 Jan 2015 15:32:18 +0000 (UTC) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E73AB86 for ; Tue, 27 Jan 2015 15:32:18 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.9/8.14.9) with ESMTP id t0RFWFSD050060 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 27 Jan 2015 08:32:15 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.9/8.14.9/Submit) with ESMTP id t0RFWFv7050057; Tue, 27 Jan 2015 08:32:15 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Tue, 27 Jan 2015 08:32:15 -0700 (MST) From: Warren Block To: Scott Bennett Subject: Re: buildworld, buildkernel, and devel/cache In-Reply-To: <201501271240.t0RCe9GA006605@sdf.org> Message-ID: References: <201501261245.t0QCjUMD009768@sdf.org> <201501261843.t0QIhX78006200@sdf.org> <201501271240.t0RCe9GA006605@sdf.org> User-Agent: Alpine 2.11 (BSF 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Tue, 27 Jan 2015 08:32:15 -0700 (MST) Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 15:32:18 -0000 On Tue, 27 Jan 2015, Scott Bennett wrote: >> I might have missed something, so let's back up. Shell variables need >> to be set, and entries in make.conf need to be added. Both are needed. > > Yes. I guess I'm missing your point. I followed the instructions in > /usr/local/share/doc/ccache/ccache-howto-freebsd.txt, which turned out to > cause errors on the three lines in question from those instructions. I then > followed your suggestion to move them, and that was ineffective in .profile > and caused errors in .cshrc.extensions. So I don't see how those particular > shell variables are to be set. > The only other entry for /etc/make.conf is the entry that, by itself, > is sufficient to build ports using ccache, and that, as I noted originally, > was working just fine. With CCACHE_DIR set in .profile and set as an > environment variable in .cshrc.extensions, ports even get built okay with > ccache cacheing its data in the correct file system. (Yay!) > But if there are other /etc/make.conf entries needed (but undocumented?) > or other shell/environment variables needed (also undocumented?) to get > buildworld and buildkernel to use ccache, the please clarify. I just reinstalled devel/ccache to test this. The options to create links to clang and llvm were turned on in the port. My old settings in /root/.cshrc were uncommented: setenv PATH /usr/local/libexec/ccache:$PATH setenv CCACHE_PATH /usr/bin:/usr/local/bin setenv CCACHE_DIR /usr/.ccache setenv CCACHE_COMPRESS yes The last two are additions. (I found that compression helped fit more files in the same space without measurably slowing down the build.) In /etc/make.conf, I added this: .if (!empty(.CURDIR:M/usr/src*) || !empty(.CURDIR:M/usr/obj*)) .if !defined(NOCCACHE) && exists(/usr/local/libexec/ccache/world/cc) CC:=${CC:C,^cc,/usr/local/libexec/ccache/world/cc,1} CXX:=${CXX:C,^c\+\+,/usr/local/libexec/ccache/world/c++,1} .endif .endif This is on 10.1-STABLE. make(1) changed a while back, so very old versions of FreeBSD might have errors with those. I logged back in as root and started a buildworld, and see this: /usr/local/libexec/ccache/world/cc -m32 ... > And thanks, Walter, for your attention to this. You're welcome, Steve. :)