buildworld, buildkernel, and devel/cache
Scott Bennett
bennett at sdf.org
Wed Jan 28 07:36:03 UTC 2015
Warren Block <wblock at wonkity.com> 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 *
**********************************************************************
More information about the freebsd-questions
mailing list