Bug 15213

Summary: Using icecream leads to error during parsing
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Matthias Schoepfer <matthias.schoepfer>
Component: coreAssignee: Richard Purdie <richard.purdie>
Status: ACCEPTED --- QA Contact:
Severity: normal    
Priority: Medium+ CC: JPEWhacker, meta.mr.watcher, meta.watcher, tgamblin
Version: 4.3.4   
Target Milestone: 6.2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
First draft patch to fix the issue
matthias.schoepfer: commit?, matthias.schoepfer: copyright-waived+, matthias.schoepfer: review?
Second draft of the patch - different approach matthias.schoepfer: commit?, matthias.schoepfer: copyright-waived+, matthias.schoepfer: review?

Description Matthias Schoepfer 2023-09-12 15:08:45 UTC
Using yocto or openembedded core on current master or mickledore *and* adding
```
INHERIT_DISTRO:append = " icecc"
ICECC_DISABLED ??= "1"
ICECC_DISABLED = ""
```
to local.conf leads to this error:

bitbake core-image-minimal
[..]
ERROR: /home/mschoepf/yocto/oe-core/openembedded-core/meta/recipes-core/meta/target-sdk-provides-dummy.bb: no-pn NULL prefix
WARNING: /home/mschoepf/yocto/oe-core/openembedded-core/meta/recipes-core/meta/target-sdk-provides-dummy.bb: Exception during build_dependencies for set_icecc_env
WARNING: /home/mschoepf/yocto/oe-core/openembedded-core/meta/recipes-core/meta/target-sdk-provides-dummy.bb: Error during finalise of /home/mschoepf/yocto/oe-core/openembedded-core/meta/recipes-core/meta/target-sdk-provides-dummy.bb
ERROR: Parsing halted due to errors, see error messages above

The expected result is though that it will parse and compile
Comment 1 Matthias Schoepfer 2023-09-14 09:46:28 UTC
I found the issue:
target-sdk-provides-dummy is in icecc.bbclass a member of ICECC_RECIPE_DISABLE. But since this commit:

---
commit 3be00ad9052de48d184c319526fa0661d83778b1
Author: Richard Purdie <richard.purdie@linuxfoundation.org>
Date:   Sat Jan 21 21:23:18 2023 +0000

    bitbake.conf: Add BB_HASH_CODEPARSER_VALS
    
    Add an initial value for the new bitbake BB_HASH_CODEPARSER_VALS support,
    which optimises the codeparser cache's size and stops it growing at every
    parse.
    
    (From OE-Core rev: 7c15e03dd30abe43d784f41e3c04c96a7bbb0d62)
    
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
    Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

---
PN is no-pn during parse and therefore, the ICECC_RECIPE_DISABLE does not match anymore. Unfortunately, setting BB_HASH_CODEPARSER_VALS in conf/local.conf does not help, one has to modify meta/conf/bitbake.conf.
Comment 2 Matthias Schoepfer 2023-09-26 06:58:56 UTC
Created attachment 4977 [details]
First draft patch to fix the issue
Comment 3 Matthias Schoepfer 2023-09-26 07:00:12 UTC
Created attachment 4978 [details]
Second draft of the patch - different approach