RE: freebsd-current compile with clang & ccache

From: M&S - Krasznai András <Krasznai.Andras_at_mands.hu>
Date: Thu, 26 Nov 2015 09:01:13 +0100
Hi

I am now reading the manual pages for src.conf. 

Src.conf should only be used to specify variables for make, e.g. WITHOUT_PROFILE, or WITH_CCACHE_BUILD. Man src.conf does not say much more about ccache, but ccache-howto-freebsd says that WITH_CCACHE_BUILD is only for building ports with ccache; for world and kernel you should set CC and CXX variables within make.conf following the advice in ccache-howto 

("To use ccache for ports, just add WITH_CCACHE_BUILD=yes to /etc/make.conf.

To use ccache for base add the following to /etc/make.conf:

.if (!empty(.CURDIR:M/usr/src*) || !empty(.CURDIR:M/usr/obj*))
.if !defined(NOCCACHE) && exists(/usr/local/libexec/ccache/world/cc)
CC:=${CC...
....
")

I do not copy here the full howto

My problem is that after a successful compile of base - world and kernel - using ccache I run make installkernel correctly, but after reboot and mergemaster -p I got a lot of ccache error messages during make installworld. They complain ebout not finding compiler cc in path although cc -v gives the clang version number, so cc IS on the path.

Best regards

András Krasznai





-----Original Message-----
From: owner-freebsd-current_at_freebsd.org [mailto:owner-freebsd-current_at_freebsd.org] On Behalf Of Rainer Hurling
Sent: 2015. november 25. 20:48
To: Bryan Drewery; FreeBSD-Current
Subject: Re: freebsd-current compile with clang & ccache

Am 25.11.15 um 20:37 schrieb Bryan Drewery:
> On 11/25/2015 11:34 AM, Rainer Hurling wrote:
>> Am 25.11.15 um 19:50 schrieb Bryan Drewery:
>>> On 11/25/2015 10:09 AM, Juan Molina wrote:
>>>>> On 11/24/2015 1:31 AM, M&S - Krasznai András wrote:
>>>>>> /What can I do to eliminate the ccache error during installworld
>>>>> apart from not using ccache? /
>>>>> I would recommend not setting CC or CCACHE_PATH in make.conf and 
>>>>> using the new WITH_CCACHE_BUILD=yes option instead.
>>>>>
>>>>> --
>>>>> Regards,
>>>>> Bryan Drewery
>>>>
>>>> Hi.
>>>>
>>>> I'm seeing the same ccache errors and I do not have CC or 
>>>> CCACHE_PATH defined anywhere. Only WITH_CCACHE_BUILD and WITH_FAST_DEPEND in src.conf.
>>>>
>>>
>>> WITH_FAST_DEPEND is not related.
>>>
>>> Are you building and installing as a different user? Using a 
>>> different MAKEOBJDIRPREFIX in build and install?
>>>
>>> Do you have CCACHE_PATH in your environment?
>>>
>>> Run 'make ccache-print-options|grep path'. It should have no value.
>>>
>>
>> Is there any possibility to redirect the .ccache directory, something 
>> like CCACHE_PATH for userland?
>>
>> I am asking, because in my attempts to build base with 
>> WITH_CCACHE_BUILD and WITH_FAST_DEPEND enabled, it breaks with error 
>> message 'file system full'. My root partition has only 1GB and ccache 
>> itself seems to need more than 800MB in /root/.ccache.
>>
> 
> You want to modify CCACHE_DIR. You can do this in make.conf or the 
> environment.
> 
> I tend to just symlink /root/.ccache to somewhere else though and let 
> the default work via the symlink.
> 
> Also see 'man src.conf' (WITH_CCACHE_BUILD section) and 'man ccache'.
> 

Oops, I should have looked into man src.conf before asking here, sorry.

And many thanks for the quick and helpful answer.
_______________________________________________
freebsd-current_at_freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
Received on Thu Nov 26 2015 - 07:01:19 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:01 UTC