* Re: [Yocto] The design document for ccache-native
2011-06-09 22:40 ` [Yocto] The design document for ccache-native Saul Wold
@ 2011-06-09 22:51 ` Richard Purdie
2011-06-09 23:51 ` Tom Rini
2011-06-10 1:46 ` wenzong fan
2 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2011-06-09 22:51 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer; +Cc: wenzong fan
On Thu, 2011-06-09 at 15:40 -0700, Saul Wold wrote:
> On 06/02/2011 08:11 PM, wenzong fan wrote:
> > Hi Folks,
> >
> > Please help me to review the design document for ccache-native, and
> > I also have two questions about it, any answers or suggestions are
> > appreciated.
> >
> > * Feature name: ccache-native
> > Priority: P3; M2
> > Owner: Wenzong Fan
> > Summary: Integrate ccache-native to yocto
> >
> > * Description:
> > Bitbake supports the 'CCACHE Mechanism', but 'ccache' hasn't been
> > included by poky/yocto, just add it as a native tool.
> >
> > * Usage:
> > Build ccache as a native tool by default and enable it for speeding
> > target packages build.
> >
> > * Implementation:
> > 1) Copy bb file from OE upstream to:
> > meta/recipes-devtools/ccache/
> >
> > 2) Update bb file to get the latest ccache_3.1.5 and split the single
> > bb file to:
> > 'ccache_3.1.5.bb', 'ccache.inc'
> >
> > 3) Enable ccache in the native tools building.
> >
> You will need to have it be a dependency pretty early on in the build.
> Additionally, this is a bit a new part to this task, we want to have the
> default CCACHE_DIR for the build default to a directory in TMPDIR
> instead of the user's home directory. This will mean setting an
> environment variable somewhere early also.
There is a little more detail on:
https://wiki.yoctoproject.org/wiki/Yocto_1.1_Schedule
Specifically, "c) Set CCACHE on a per recipe basis. need to figure out
whether ccache data can be shared and under what circumstances."
so something like adding:
export CCACHE_DIR = "${TMPDIR}/ccache/${TARGET_SYS}/${PN}"
to bitbake.conf with a bit more thought into working out the right
components to add to the variable.
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [Yocto] The design document for ccache-native
2011-06-09 22:40 ` [Yocto] The design document for ccache-native Saul Wold
2011-06-09 22:51 ` Richard Purdie
@ 2011-06-09 23:51 ` Tom Rini
2011-06-10 2:54 ` Khem Raj
2011-06-10 1:46 ` wenzong fan
2 siblings, 1 reply; 6+ messages in thread
From: Tom Rini @ 2011-06-09 23:51 UTC (permalink / raw)
To: openembedded-core
On 06/09/2011 03:40 PM, Saul Wold wrote:
> On 06/02/2011 08:11 PM, wenzong fan wrote:
>> Hi Folks,
>>
>> Please help me to review the design document for ccache-native, and
>> I also have two questions about it, any answers or suggestions are
>> appreciated.
>>
>> * Feature name: ccache-native
>> Priority: P3; M2
>> Owner: Wenzong Fan
>> Summary: Integrate ccache-native to yocto
>>
>> * Description:
>> Bitbake supports the 'CCACHE Mechanism', but 'ccache' hasn't been
>> included by poky/yocto, just add it as a native tool.
>>
>> * Usage:
>> Build ccache as a native tool by default and enable it for speeding
>> target packages build.
>>
>> * Implementation:
>> 1) Copy bb file from OE upstream to:
>> meta/recipes-devtools/ccache/
>>
>> 2) Update bb file to get the latest ccache_3.1.5 and split the single
>> bb file to:
>> 'ccache_3.1.5.bb', 'ccache.inc'
>>
>> 3) Enable ccache in the native tools building.
>>
> You will need to have it be a dependency pretty early on in the build.
> Additionally, this is a bit a new part to this task, we want to have the
> default CCACHE_DIR for the build default to a directory in TMPDIR
> instead of the user's home directory. This will mean setting an
> environment variable somewhere early also.
Can we instead veto ccache and remove it from the bitbake docs? I can't
count the number of times I've run into what I can only imagine are
ccache conflicts to explain why a random build failure with ccache in use.
--
Tom Rini
Mentor Graphics Corporation
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Yocto] The design document for ccache-native
2011-06-09 23:51 ` Tom Rini
@ 2011-06-10 2:54 ` Khem Raj
2011-06-10 14:34 ` Tom Rini
0 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2011-06-10 2:54 UTC (permalink / raw)
To: openembedded-core
On 06/09/2011 04:51 PM, Tom Rini wrote:
> On 06/09/2011 03:40 PM, Saul Wold wrote:
>> On 06/02/2011 08:11 PM, wenzong fan wrote:
>>> Hi Folks,
>>>
>>> Please help me to review the design document for ccache-native, and
>>> I also have two questions about it, any answers or suggestions are
>>> appreciated.
>>>
>>> * Feature name: ccache-native
>>> Priority: P3; M2
>>> Owner: Wenzong Fan
>>> Summary: Integrate ccache-native to yocto
>>>
>>> * Description:
>>> Bitbake supports the 'CCACHE Mechanism', but 'ccache' hasn't been
>>> included by poky/yocto, just add it as a native tool.
>>>
>>> * Usage:
>>> Build ccache as a native tool by default and enable it for speeding
>>> target packages build.
>>>
>>> * Implementation:
>>> 1) Copy bb file from OE upstream to:
>>> meta/recipes-devtools/ccache/
>>>
>>> 2) Update bb file to get the latest ccache_3.1.5 and split the single
>>> bb file to:
>>> 'ccache_3.1.5.bb', 'ccache.inc'
>>>
>>> 3) Enable ccache in the native tools building.
>>>
>> You will need to have it be a dependency pretty early on in the build.
>> Additionally, this is a bit a new part to this task, we want to have the
>> default CCACHE_DIR for the build default to a directory in TMPDIR
>> instead of the user's home directory. This will mean setting an
>> environment variable somewhere early also.
>
> Can we instead veto ccache and remove it from the bitbake docs? I can't
> count the number of times I've run into what I can only imagine are
> ccache conflicts to explain why a random build failure with ccache in use.
>
It works on some hosts somewhat reliably and is unpredictable on some as
you say. I think keeping it optional is probably the right thing but
making it default may not be a good thing.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Yocto] The design document for ccache-native
2011-06-10 2:54 ` Khem Raj
@ 2011-06-10 14:34 ` Tom Rini
0 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2011-06-10 14:34 UTC (permalink / raw)
To: openembedded-core
On 06/09/2011 07:54 PM, Khem Raj wrote:
> On 06/09/2011 04:51 PM, Tom Rini wrote:
>> On 06/09/2011 03:40 PM, Saul Wold wrote:
>>> On 06/02/2011 08:11 PM, wenzong fan wrote:
>>>> Hi Folks,
>>>>
>>>> Please help me to review the design document for ccache-native, and
>>>> I also have two questions about it, any answers or suggestions are
>>>> appreciated.
>>>>
>>>> * Feature name: ccache-native
>>>> Priority: P3; M2
>>>> Owner: Wenzong Fan
>>>> Summary: Integrate ccache-native to yocto
>>>>
>>>> * Description:
>>>> Bitbake supports the 'CCACHE Mechanism', but 'ccache' hasn't been
>>>> included by poky/yocto, just add it as a native tool.
>>>>
>>>> * Usage:
>>>> Build ccache as a native tool by default and enable it for speeding
>>>> target packages build.
>>>>
>>>> * Implementation:
>>>> 1) Copy bb file from OE upstream to:
>>>> meta/recipes-devtools/ccache/
>>>>
>>>> 2) Update bb file to get the latest ccache_3.1.5 and split the single
>>>> bb file to:
>>>> 'ccache_3.1.5.bb', 'ccache.inc'
>>>>
>>>> 3) Enable ccache in the native tools building.
>>>>
>>> You will need to have it be a dependency pretty early on in the build.
>>> Additionally, this is a bit a new part to this task, we want to have the
>>> default CCACHE_DIR for the build default to a directory in TMPDIR
>>> instead of the user's home directory. This will mean setting an
>>> environment variable somewhere early also.
>>
>> Can we instead veto ccache and remove it from the bitbake docs? I can't
>> count the number of times I've run into what I can only imagine are
>> ccache conflicts to explain why a random build failure with ccache in
>> use.
>
> It works on some hosts somewhat reliably and is unpredictable on some as
> you say. I think keeping it optional is probably the right thing but
> making it default may not be a good thing.
I'm pretty sure it's not reliable so much as lucky, but shoving the
cache somewhere else and making it per-recipe makes me less worried.
--
Tom Rini
Mentor Graphics Corporation
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Yocto] The design document for ccache-native
2011-06-09 22:40 ` [Yocto] The design document for ccache-native Saul Wold
2011-06-09 22:51 ` Richard Purdie
2011-06-09 23:51 ` Tom Rini
@ 2011-06-10 1:46 ` wenzong fan
2 siblings, 0 replies; 6+ messages in thread
From: wenzong fan @ 2011-06-10 1:46 UTC (permalink / raw)
To: Saul Wold
Cc: Purdie, Richard,
'Patches and discussions about the oe-core layer'
On 06/10/2011 06:40 AM, Saul Wold wrote:
> On 06/02/2011 08:11 PM, wenzong fan wrote:
>> Hi Folks,
>>
>> Please help me to review the design document for ccache-native, and
>> I also have two questions about it, any answers or suggestions are
>> appreciated.
>>
>> * Feature name: ccache-native
>> Priority: P3; M2
>> Owner: Wenzong Fan
>> Summary: Integrate ccache-native to yocto
>>
>> * Description:
>> Bitbake supports the 'CCACHE Mechanism', but 'ccache' hasn't been
>> included by poky/yocto, just add it as a native tool.
>>
>> * Usage:
>> Build ccache as a native tool by default and enable it for speeding
>> target packages build.
>>
>> * Implementation:
>> 1) Copy bb file from OE upstream to:
>> meta/recipes-devtools/ccache/
>>
>> 2) Update bb file to get the latest ccache_3.1.5 and split the single
>> bb file to:
>> 'ccache_3.1.5.bb', 'ccache.inc'
>>
>> 3) Enable ccache in the native tools building.
>>
> You will need to have it be a dependency pretty early on in the build.
> Additionally, this is a bit a new part to this task, we want to have
> the default CCACHE_DIR for the build default to a directory in TMPDIR
> instead of the user's home directory. This will mean setting an
> environment variable somewhere early also.
>
>
>> * Questions:
>> 1) Do we want to add it as a target package? And which images should
>> include it?
> Yes, it should be included as part of any SDK image, to do this you
> would add it to the task-core-sdk list.
>
>> 2) How to add it into native tools build list and build it by default?
>>
> You use BBCLASSEXTEND = "native" in the recipe, that will give you the
> native for free.
Sorry for the confusions, actually I want to know how can I enable the
ccache in native tools build, I think you have given the answers in
'Implementation #3'.
Thanks a lot.
Wenzong
>
>>
>> Thanks
>> Wenzong
>>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread