Bug 13718

Summary: "libcomps: update to 0.1.12" doesn't work due to patch not applying
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Scott Branden <scott.branden>
Component: devtools / tool chainAssignee: Unassigned <unassigned>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: Medium CC: jon.richardson, meta.mr.watcher, meta.watcher, richard.purdie
Version: unspecified   
Target Milestone: 3.1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Scott Branden 2019-12-19 21:54:11 UTC
"libcomps: update to 0.1.12" commit from Alexander Kanavin doesn't work.
How was this tested and applied to the master branch of poky?

ERROR: libcomps-0.1.12-r0 do_patch: Command Error: 'quilt --quiltrc /mnt/2ndHDD/yocto/vxc/poky/build/tmp/work/core2-64-poky-linux/libcomps/0.1.12-r0/recipe-sysroot-native/etc/quiltrc push' exited with 0  Output:
Applying patch 0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
patching file libcomps/src/python/src/CMakeLists.txt
Hunk #1 FAILED at 117.
1 out of 1 hunk FAILED -- rejects in file libcomps/src/python/src/CMakeLists.txt
Patch 0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch does not apply (enforce with -f)
Comment 1 Jonathan Richardson 2019-12-19 21:58:39 UTC
It seems to be an issue with quilt. I had the same problem with pseudo and had to apply this patch locally:

commit 0e3323b123ab91c2ab76c71c955eae758a084bdc
Author: Jonathan Richardson <jonathan.richardson@broadcom.com>
Date:   Thu Nov 21 11:49:43 2019 -0800

    SOC-8238: Use git as patchtool for pseudo recipe
    
    The default patchtool quilt sometimes fails to apply the patch
    0001-configure-Prune-PIE-flags.patch even though there is nothing wrong
    with it. This causes the build to fail. Since all the patches are git
    patches, the patchtool is being changed to git to work around the issue.
    
    Change-Id: I9f48d627ae04bb0524368804597548249e3fcd7d
    Reviewed-on: http://gerrit-ccxsw.broadcom.net/107661
    Reviewed-by: Jonathan Richardson <jonathan.richardson@broadcom.com>
    Tested-by: Jonathan Richardson <jonathan.richardson@broadcom.com>

diff --git a/meta/recipes-devtools/pseudo/pseudo.inc b/meta/recipes-devtools/pseudo/pseudo.inc
index 8b34909726..8ad98b386e 100644
--- a/meta/recipes-devtools/pseudo/pseudo.inc
+++ b/meta/recipes-devtools/pseudo/pseudo.inc
@@ -153,3 +153,5 @@ do_install_append_class-nativesdk () {
 }
 
 BBCLASSEXTEND = "native nativesdk"
+
+PATCHTOOL = "git"
Comment 2 Richard Purdie 2019-12-19 23:24:57 UTC
Which host OS is this one? We test these patches on the autobuilder and haven't see this issue...
Comment 3 Scott Branden 2019-12-19 23:25:51 UTC
This is on a Ubuntu 18.04 x86-64 host
Comment 4 Scott Branden 2019-12-19 23:36:32 UTC
I just tried with the default build/conf again and problem did not happen.  Will see if I can reproduce again.
Comment 5 Jonathan Richardson 2019-12-19 23:37:47 UTC
It doesn't happen all the time. It's sporadic. But if it happens once it will again eventually.
Comment 6 Paul Eggleton 2019-12-23 03:16:54 UTC
*** Bug 13719 has been marked as a duplicate of this bug. ***
Comment 7 Richard Purdie 2020-01-09 15:38:04 UTC
We're going to struggle to help with this unless we can reproduce the problem. Is there some way we could reproduce the issue?
Comment 8 Scott Branden 2020-01-09 19:04:06 UTC
I agree it's difficult to reproduce random yocto build issues.
Especially since once it builds successfully then the output is in the yocto cache and we don't hit the issue any more.

To test this and other problems you probably need some sort of automated build system that builds with and without yocto-cache populated.  As well as some level of randomness with build thread scheduling by loading the build machine?

I haven't seen the issue since because I now use the yocto-cache.  I deleted it and tried again and wasn't able to reproduce in 3 attempts.
Comment 9 Scott Branden 2020-04-14 10:35:12 UTC
unable to reproduce at this time.  can probably close if you like as it is/was random.
Comment 10 Stephen K Jolley 2020-04-16 08:21:42 UTC
Not able to reproduce.