<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>11120</bug_id>
          
          <creation_ts>2017-03-02 22:31:29 +0000</creation_ts>
          <short_desc>perf doesn&apos;t compile when devtool used with kernel</short_desc>
          <delta_ts>2017-05-30 15:13:12 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>kernel</component>
          <version>2.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.4 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jonathan Richardson">jon.richardson</reporter>
          <assigned_to name="Saul Wold">sgw</assigned_to>
          <cc>lixin.yao</cc>
    
    <cc>tom.zanussi</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>71057</commentid>
    <comment_count>0</comment_count>
    <who name="Jonathan Richardson">jon.richardson</who>
    <bug_when>2017-03-02 22:31:29 +0000</bug_when>
    <thetext>The perf recipe doesn&apos;t compile when the kernel is &quot;devtool&apos;d&quot;. The recipe has this line:
do_populate_lic[depends] += &quot;virtual/kernel:do_patch&quot;

When devtool is used it looks like the do_patch task is removed. When reset the do_patch task is listed again (tested using bitbake -c listtasks). 

When the line above is removed the recipe compiles fine. perf is included in the image using IMAGE_FEATURES += &quot;tools-debug tools-profile&quot;

The error is:
ERROR: Task do_unpack in ../meta/recipes-kernel/perf/perf.bb depends upon non-existent task do_patch in my-linux_0.0.0.bb
ERROR: Command execution failed: 1

The kernel recipe inherits kernel.bbclass.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71190</commentid>
    <comment_count>1</comment_count>
    <who name="Jonathan Richardson">jon.richardson</who>
    <bug_when>2017-03-10 02:22:17 +0000</bug_when>
    <thetext>Correction, the error is:

ERROR: Task do_populate_lic in /home/jonathar/work/yocto/sxc_test/poky/build/../meta/recipes-kernel/perf/perf.bb depends upon non-existent task do_patch in /home/jonathar/work/yocto/sxc_test/poky/build/../meta-brcm/common/recipes-kernel/linux/brcm-linux_0.0.0.bb

Then there is a subsequent error if I remove do_populate_lic[depends] += &quot;virtual/kernel:do_patch&quot; from perf.bb.

ERROR: Task do_unpack in ../meta/recipes-kernel/perf/perf.bb depends upon non-existent task do_patch in my-linux_0.0.0.bb
ERROR: Command execution failed: 1

This line from kernelsrc.bbclass:
do_unpack[depends] += &quot;virtual/kernel:do_patch&quot;

seems to cause the second error. Even though do_unpack is set to no_exec it&apos;s not enough to prevent the dependency error. Removing the line allows further progress but seems to cause other problems. I don&apos;t have a proper solution yet.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71532</commentid>
    <comment_count>2</comment_count>
    <who name="Jonathan Richardson">jon.richardson</who>
    <bug_when>2017-03-21 18:11:13 +0000</bug_when>
    <thetext>Here is a fix or partial fix. There are a few issues.

1. STAGING_KERNEL_DIR isn&apos;t set when devtool is run on the kernel. This is probably a devtool bug. We set it manually to our source location.

2. In perf.bb I removed the following line. I don&apos;t think it&apos;s required anymore because commit 6e36cc9c40b16a51a60a3cbbd051da9285f37bcf removed LIC_FILES_CHKSUM:
-do_populate_lic[depends] += &quot;virtual/kernel:do_patch&quot;

3. In kernelsrc.bbclass I removed this line:
-do_unpack[depends] += &quot;virtual/kernel:do_patch&quot;

Not sure why perf&apos;s do_unpack dependency is required - there is no source for perf, it&apos;s compiling the kernel&apos;s code tools/perf. If kernelsrc.bbclass is intended to compile kernel utils only then I don&apos;t think it&apos;s required. As mentioned before, do_patch task doesn&apos;t exist when you devtool the kernel. 

Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73365</commentid>
    <comment_count>3</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2017-05-18 19:04:35 +0000</bug_when>
    <thetext>*** Bug 11520 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73565</commentid>
    <comment_count>4</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2017-05-30 15:13:12 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=ab0747e7c6d93e0143cf059241ad914cf055f362</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>