All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] autogen-native 5.12: fix ccache issue
@ 2012-06-21 10:04 Robert Yang
  2012-06-21 10:04 ` [PATCH 1/1] " Robert Yang
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Yang @ 2012-06-21 10:04 UTC (permalink / raw)
  To: openembedded-core; +Cc: Zhenfeng.Zhao

The following changes since commit e0a70547069fe7e8a2d6bdaffc985fb172d46c31:

  perl: Allow perl to cross build and native build in a directory named "t" (2012-06-18 17:33:04 +0100)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib robert/autogen
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/autogen

Robert Yang (1):
  autogen-native 5.12: fix ccache issue

 .../autogen/autogen-native_5.12.bb                 |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/1] autogen-native 5.12: fix ccache issue
  2012-06-21 10:04 [PATCH 0/1] autogen-native 5.12: fix ccache issue Robert Yang
@ 2012-06-21 10:04 ` Robert Yang
  2012-06-21 10:49   ` Richard Purdie
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Yang @ 2012-06-21 10:04 UTC (permalink / raw)
  To: openembedded-core; +Cc: Zhenfeng.Zhao

The autogen-native built error on FC17:

ccache: failed to create /dev/null/.ccache

This is because the gcc of FC17 is a symlink to ccache, so the ccache
will always be used regardless to the user's setting, ccache uses
$HOME/.ccache as the CCACHE_DIR if it has not been set, and autogen set
HOME=/dev/null.

Assign CCACHE_DIR the default value to preven it uses $HOME/.ccache
would fix the error.

[YOCTO #2554]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 .../autogen/autogen-native_5.12.bb                 |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-devtools/autogen/autogen-native_5.12.bb b/meta/recipes-devtools/autogen/autogen-native_5.12.bb
index eb3721d..e80d555 100644
--- a/meta/recipes-devtools/autogen/autogen-native_5.12.bb
+++ b/meta/recipes-devtools/autogen/autogen-native_5.12.bb
@@ -28,6 +28,26 @@ inherit autotools native
 export GUILE_LOAD_PATH = "${STAGING_DATADIR_NATIVE}/guile/2.0"
 export GUILE_LOAD_COMPILED_PATH = "${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache"
 
+#
+# The do_compile_prepend is used for fixing a build error on FC17, the
+# gcc of FC17 is a symlink to ccache, if we don't set the CCACHE_DIR,
+# there would be an error:
+#
+# ccache: failed to create /dev/null/.ccache
+#
+# This is because ccache uses $HOME/.ccache as the CCACHE_DIR if it has
+# not been set, and autogen set HOME=/dev/null.
+#
+# Assign CCACHE_DIR the default value so that it would not use
+# $HOME/.ccache would fix the error.
+#
+do_compile_prepend() {
+	if [ "${CCACHE_DIR}" = "" ]; then
+		export CCACHE_DISABLE=true
+		export CCACHE_DIR=$HOME
+	fi
+}
+
 do_install_append () {
 	create_wrapper ${D}/${bindir}/autogen \
 		GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \
-- 
1.7.1




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] autogen-native 5.12: fix ccache issue
  2012-06-21 10:04 ` [PATCH 1/1] " Robert Yang
@ 2012-06-21 10:49   ` Richard Purdie
  2012-06-23  2:49     ` Robert Yang
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2012-06-21 10:49 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Zhenfeng.Zhao

On Thu, 2012-06-21 at 18:04 +0800, Robert Yang wrote:
> The autogen-native built error on FC17:
> 
> ccache: failed to create /dev/null/.ccache
> 
> This is because the gcc of FC17 is a symlink to ccache, so the ccache
> will always be used regardless to the user's setting, ccache uses
> $HOME/.ccache as the CCACHE_DIR if it has not been set, and autogen set
> HOME=/dev/null.
> 
> Assign CCACHE_DIR the default value to preven it uses $HOME/.ccache
> would fix the error.
> 
> [YOCTO #2554]
> 
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
>  .../autogen/autogen-native_5.12.bb                 |   20 ++++++++++++++++++++
>  1 files changed, 20 insertions(+), 0 deletions(-)
> 
> diff --git a/meta/recipes-devtools/autogen/autogen-native_5.12.bb b/meta/recipes-devtools/autogen/autogen-native_5.12.bb
> index eb3721d..e80d555 100644
> --- a/meta/recipes-devtools/autogen/autogen-native_5.12.bb
> +++ b/meta/recipes-devtools/autogen/autogen-native_5.12.bb
> @@ -28,6 +28,26 @@ inherit autotools native
>  export GUILE_LOAD_PATH = "${STAGING_DATADIR_NATIVE}/guile/2.0"
>  export GUILE_LOAD_COMPILED_PATH = "${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache"
>  
> +#
> +# The do_compile_prepend is used for fixing a build error on FC17, the
> +# gcc of FC17 is a symlink to ccache, if we don't set the CCACHE_DIR,
> +# there would be an error:
> +#
> +# ccache: failed to create /dev/null/.ccache
> +#
> +# This is because ccache uses $HOME/.ccache as the CCACHE_DIR if it has
> +# not been set, and autogen set HOME=/dev/null.
> +#
> +# Assign CCACHE_DIR the default value so that it would not use
> +# $HOME/.ccache would fix the error.
> +#
> +do_compile_prepend() {
> +	if [ "${CCACHE_DIR}" = "" ]; then
> +		export CCACHE_DISABLE=true
> +		export CCACHE_DIR=$HOME
> +	fi
> +}
> +
>  do_install_append () {
>  	create_wrapper ${D}/${bindir}/autogen \
>  		GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \

Could we just set CCACHE_DISABLE ?

In fact could we just set that globally?

I'm afraid I don't like fixing this on a per recipe basis...

Cheers,

Richard




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] autogen-native 5.12: fix ccache issue
  2012-06-21 10:49   ` Richard Purdie
@ 2012-06-23  2:49     ` Robert Yang
  0 siblings, 0 replies; 4+ messages in thread
From: Robert Yang @ 2012-06-23  2:49 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Zhenfeng.Zhao


On 06/21/2012 06:49 PM, Richard Purdie wrote:
> On Thu, 2012-06-21 at 18:04 +0800, Robert Yang wrote:
>> The autogen-native built error on FC17:
>>
>> ccache: failed to create /dev/null/.ccache
>>
>> This is because the gcc of FC17 is a symlink to ccache, so the ccache
>> will always be used regardless to the user's setting, ccache uses
>> $HOME/.ccache as the CCACHE_DIR if it has not been set, and autogen set
>> HOME=/dev/null.
>>
>> Assign CCACHE_DIR the default value to preven it uses $HOME/.ccache
>> would fix the error.
>>
>> [YOCTO #2554]
>>
>> Signed-off-by: Robert Yang<liezhi.yang@windriver.com>
>> ---
>>   .../autogen/autogen-native_5.12.bb                 |   20 ++++++++++++++++++++
>>   1 files changed, 20 insertions(+), 0 deletions(-)
>>
>> diff --git a/meta/recipes-devtools/autogen/autogen-native_5.12.bb b/meta/recipes-devtools/autogen/autogen-native_5.12.bb
>> index eb3721d..e80d555 100644
>> --- a/meta/recipes-devtools/autogen/autogen-native_5.12.bb
>> +++ b/meta/recipes-devtools/autogen/autogen-native_5.12.bb
>> @@ -28,6 +28,26 @@ inherit autotools native
>>   export GUILE_LOAD_PATH = "${STAGING_DATADIR_NATIVE}/guile/2.0"
>>   export GUILE_LOAD_COMPILED_PATH = "${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache"
>>
>> +#
>> +# The do_compile_prepend is used for fixing a build error on FC17, the
>> +# gcc of FC17 is a symlink to ccache, if we don't set the CCACHE_DIR,
>> +# there would be an error:
>> +#
>> +# ccache: failed to create /dev/null/.ccache
>> +#
>> +# This is because ccache uses $HOME/.ccache as the CCACHE_DIR if it has
>> +# not been set, and autogen set HOME=/dev/null.
>> +#
>> +# Assign CCACHE_DIR the default value so that it would not use
>> +# $HOME/.ccache would fix the error.
>> +#
>> +do_compile_prepend() {
>> +	if [ "${CCACHE_DIR}" = "" ]; then
>> +		export CCACHE_DISABLE=true
>> +		export CCACHE_DIR=$HOME
>> +	fi
>> +}
>> +
>>   do_install_append () {
>>   	create_wrapper ${D}/${bindir}/autogen \
>>   		GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \
>
> Could we just set CCACHE_DISABLE ?
>

I'm afraid not, it still has the same error if we just set CCACHE_DISABLE,
this is a bug of ccache 3.1.7, it may be fixed in ccache 3.2.

> In fact could we just set that globally?
>
> I'm afraid I don't like fixing this on a per recipe basis...
>

I think that this is only needed by the recipe which set HOME=/dev/null,
the autogen-native is the only one as far as I know, yes, fix it globally
would be better (disable it explicitly if it is not enabled), I will send a V2.

// Robert

> Cheers,
>
> Richard
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
>



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-06-23  3:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-21 10:04 [PATCH 0/1] autogen-native 5.12: fix ccache issue Robert Yang
2012-06-21 10:04 ` [PATCH 1/1] " Robert Yang
2012-06-21 10:49   ` Richard Purdie
2012-06-23  2:49     ` Robert Yang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.