[OE-core] [PATCH 1/4] base.bbclass: Remove invalid ccache related code

Robert Yang liezhi.yang at windriver.com
Thu Dec 13 03:41:55 UTC 2018



On 12/11/18 6:12 PM, Robert Yang wrote:
> Hi RP,
> 
> On 12/11/18 5:44 PM, richard.purdie at linuxfoundation.org wrote:
>> On Tue, 2018-12-11 at 17:24 +0800, Robert Yang wrote:

[snip]

> I did a test:
> 
> $ ln -s /usr/bin/ccache /folk/lyang1/bin/gcc
> I got errors with/without the code:
> 
> $ bitbake -p
> bb.BBHandledException
> ERROR: Error running gcc  --version:

I've sent a patch to fix/explain this problem:

[OE-core] [PATCH 0/1] lib/oe/utils: Set stderr for host_gcc_version()


// Robert

> 
> $ ls -l tmp/hosttools/gcc
> tmp/hosttools/gcc -> /folk/lyang1/bin/gcc
> 
> $ ls -l /folk/lyang1/bin/gcc
> /folk/lyang1/bin/gcc -> /usr/bin/ccache
> 
> It worked well if I run gcc --version manually:
> $ gcc --version
> gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
> Copyright (C) 2015 Free Software Foundation, Inc.
> $ echo $?
> 0
> 
> There must be something wrong in such a case. I will fix this later.
> 
> Let's get back to he code:
> 
>              srctool = bb.utils.which(path, tool, executable=True)
>              if "ccache" in srctool:
>                  srctool = bb.utils.which(path, tool, executable=True, direction=1)
>              if srctool:
>                  os.symlink(srctool, desttool)
> 
> 
> * If tool == "gcc", then srctool would be gcc, too.
> * If tool == "ccache", then srctool would be ccache, too.
> 
> So I think that the code doesn't help when gcc links to ccache ?
> 
> // Robert
> 
>>
>> Cheers,
>>
>> Richard
>>
>>
>>
>>


More information about the Openembedded-core mailing list