Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Oct 2017 16:35:58 -0700
From:      Pete Wright <pete@nomadlogic.org>
To:        Matt Joras <mjoras@FreeBSD.org>, freebsd-current@freebsd.org
Subject:   Re: building world via ccache broken?
Message-ID:  <aa78eaa4-fe74-cc7c-aaa1-8d43e2430ace@nomadlogic.org>
In-Reply-To: <fe4ce7e9-f97e-c538-6f6f-410b48bc2648@FreeBSD.org>
References:  <0e4e8110-9b79-2010-852c-3815885d3523@nomadlogic.org> <df6fc4ca-1266-cc33-dbc8-6b4de21f659b@nomadlogic.org> <fe4ce7e9-f97e-c538-6f6f-410b48bc2648@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help


On 10/02/2017 16:33, Matt Joras wrote:
> On 10/02/2017 15:23, Pete Wright wrote:
>>
>> On 10/02/2017 13:07, Pete Wright wrote:
>>> hey there,
>>> i've been unable to buildworld using ccache for a while. initially i
>>> assumed it was due to some incompatibilities on the drm-next branch
>>> which i was running, but i've since cut over to CURRENT and am still
>>> having issues.  running "make buildworld" i am running into this
>>> exception:
>>>
>>> /usr/home/pwright/git/freebsd/lib/libufs/cgroup.c:217:11: error: no
>>> member named 'fs_metackhash' in 'struct fs'
>>>          if ((fs->fs_metackhash & CK_CYLGRP) != 0) {
>>>               ~~  ^
>>>
>>>
>>> full exception here:
>>> https://gist.github.com/nomadlogic/30771aacd05d6dbb1c0cbebfb2ef6b61
>>>
>>> I am going to re-run this w/o ccache - to verify that this is a
>>> ccache related issue.  I guess my first question - is anyone else
>>> using ccache successfully?
>>>
>> fwiw building the world without ccache works as expected.  perhaps my
>> make.conf is not correctly configured?
>>
>> $ cat /etc/make.conf
>> .if !defined(NO_CCACHE)
>>    CC= /usr/local/libexec/ccache/world/cc
>>    CXX= /usr/local/libexec/ccache/world/c++
>> .endif
>>
>> cheers,
>> -pete
>>
> Someone can correct me if I'm wrong but I believe the current "correct"
> way to get ccache builds is WITH_CCACHE_BUILD set in src.conf.
> src.conf(5) seems to indicate as much as well. To answer your question,
> yes, I am I'm sure many others are building world on HEAD with ccache
> without issue.

thanks, i had another person point me in this direction - and after 
reading the man page it does indeed clearly state as much :)

what had tripped me up is that the ccache portfile installs:
/usr/local/share/doc/ccache/ccache-howto-freebsd.txt

which does not mention src.conf, but states:

<snip>
To use ccache for base add the following to /etc/make.conf.
You can replace cc and c++ with the compilers of your choice.
(remember that only GCC and Clang can build world and kernel)

.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
</snip>

if i'm able to successfully build my world and kernel via src.conf i'll 
file a PR against the ccache port.

cheers!
-pete

-- 
Pete Wright
pete@nomadlogic.org
@nomadlogicLA




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?aa78eaa4-fe74-cc7c-aaa1-8d43e2430ace>