From owner-freebsd-questions@FreeBSD.ORG Wed Jan 28 07:36:03 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67BDD6B for ; Wed, 28 Jan 2015 07:36:03 +0000 (UTC) Received: from sdf.lonestar.org (mx.sdf.org [192.94.73.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx.sdf.org", Issuer "SDF.ORG" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D4EC8B8 for ; Wed, 28 Jan 2015 07:36:02 +0000 (UTC) Received: from sdf.org (IDENT:bennett@otaku.freeshell.org [192.94.73.9]) by sdf.lonestar.org (8.14.8/8.14.5) with ESMTP id t0S7ZrJk016867 (using TLSv1/SSLv3 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits) verified NO); Wed, 28 Jan 2015 07:35:53 GMT Received: (from bennett@localhost) by sdf.org (8.14.8/8.12.8/Submit) id t0S7ZqRD021239; Wed, 28 Jan 2015 01:35:52 -0600 (CST) From: Scott Bennett Message-Id: <201501280735.t0S7ZqRD021239@sdf.org> Date: Wed, 28 Jan 2015 01:35:52 -0600 To: wblock@wonkity.com Subject: Re: buildworld, buildkernel, and devel/cache References: <201501261245.t0QCjUMD009768@sdf.org> <201501261843.t0QIhX78006200@sdf.org> <201501271240.t0RCe9GA006605@sdf.org> In-Reply-To: User-Agent: Heirloom mailx 12.5 6/20/10 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: Wed, 28 Jan 2015 07:36:03 -0000 Warren Block wrote: > 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.) Thanks for that comment. I had left compression disabled because I was worried about the time requirement. On your tip, I added the same line to .cshrc.extensions. > > In /etc/make.conf, I added this: > > .if (!empty(.CURDIR:M/usr/src*) || !empty(.CURDIR:M/usr/obj*)) Huh. The above line is not present in the installed /usr/local/share/doc/ccache/ccache-howto-freebsd.txt file on my system. Maybe I should reinstall devel/ccache to see if an updated, corrected version appears? > .if !defined(NOCCACHE) && exists(/usr/local/libexec/ccache/world/cc) In the line above, everything before the "&&" is missing in the doc file. > CC:=${CC:C,^cc,/usr/local/libexec/ccache/world/cc,1} > CXX:=${CXX:C,^c\+\+,/usr/local/libexec/ccache/world/c++,1} In the line above, the pluses are not escaped in the installed doc file. > .endif > .endif And the two .endif lines are also missing in the doc file. I replaced the three lines in my /etc/make.conf with the lines you show above, and now it all works beautifully. Thank you very, very much. > > This is on 10.1-STABLE. make(1) changed a while back, so very old > versions of FreeBSD might have errors with those. I'm running 10.1-STABLE. > > 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. :) Oh, good grief! I apologize most profusely for the typo, Warren. I don't know why I typed that, but will chalk it up to yet another of my infamous posting-hours-past-my-bedtime brain farts. Sigh. :-( Thanks again, though. Scott Bennett, Comm. ASMELG, CFIAG ********************************************************************** * Internet: bennett at sdf.org *xor* bennett at freeshell.org * *--------------------------------------------------------------------* * "A well regulated and disciplined militia, is at all times a good * * objection to the introduction of that bane of all free governments * * -- a standing army." * * -- Gov. John Hancock, New York Journal, 28 January 1790 * **********************************************************************