<?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>9976</bug_id>
          
          <creation_ts>2016-07-19 13:56:43 +0000</creation_ts>
          <short_desc>Suggested addition to 2.3. Debugging Build Failures re. missing build-time dependencies</short_desc>
          <delta_ts>2016-07-19 18:58:35 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>9</classification_id>
          <classification>Documentation</classification>
          <product>Reference</product>
          <component>handbook</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>19 July 2016: RESOLVED</status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.2 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>ulfalizer</reporter>
          <assigned_to name="Scott Rifenbark">srifenbark</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>poky.doc.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>srifenbark</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Done (doc changes complete)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>64156</commentid>
    <comment_count>0</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-07-19 13:56:43 +0000</bug_when>
    <thetext>Hello,

I suggest adding the following overview of missing build-time dependencies to 2.3. Debugging Build Failures. It also covers the scripts/wipe-sysroot script, which currently isn&apos;t mentioned anywhere in the manuals.

  2.3.3. Checking for missing build-time dependencies
  
  A recipe might build successfully even though some of its build-time
  dependencies are missing from DEPENDS. Here are the two most common ways in
  which that can happen:
  
    1. The build-time dependency just happens to already exist in the staging
       sysroot (STAGING_DIR_HOST) by the time the recipe is built. This happens
       if the build-time dependency is built earlier, while processing other
       recipes.
  
    2. The component built by the recipe conditionally enables functionality
       depending on whether it can find the build-time dependency in the staging
       sysroot. If the build-time dependency is missing, the corresponding
       functionality is disabled. This is known as a &lt;i&gt;floating dependency&lt;/i&gt;.
  
  Dealing with the second case is more complex, so we will focus on the first
  case.
  
  The [&lt;code&gt;build-deps&lt;/code&gt;](http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#ref-classes-insane)
  QA check checks that every library the component linked against was declared as
  a build-time dependency. If this is not the case, then we must have the
  situation described in (1), and a missing build-time dependency is reported.
  
  Another, more manual, way to check a recipe for missing build-time dependencies
  of the first type is to build it with an empty staging sysroot. An easy way to
  do this is to simply remove TMPDIR (usually ${BUILDDIR}/tmp), as it includes
  the staging sysroots.
  
  Another, faster method to remove the staging sysroot is to use the
  &lt;code&gt;scripts/wipe-sysroot&lt;/code&gt; script, which removes just the staging
  sysroots and keeps everything else in TMPDIR. Note that the
  &lt;code&gt;scripts/&lt;code&gt; directory appears PATH after running
  &lt;code&gt;oe-init-build-env&lt;/code&gt; or &lt;code&gt;oe-init-build-env-memres&lt;/code&gt;,
  meaning &apos;wipe-sysroot&apos; can be run right away.

Cheers,
Ulf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64174</commentid>
    <comment_count>1</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-07-19 17:09:25 +0000</bug_when>
    <thetext>Hi Ulf, 

Here is the new 2.3.3 section - http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#checking-for-missing-build-time-dependencies. 

Check it out.

Thanks!

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64176</commentid>
    <comment_count>2</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-07-19 17:22:36 +0000</bug_when>
    <thetext>Some feedback below:

  - The comma after &quot;because&quot; looks weird to me.

  - Maybe this would be a bit clearer: &quot;If that is not the case, then
    the first situation described in the previous list exists, and
    &lt;code&gt;build-deps&lt;/code&gt; reports a missing build-time dependency.&quot;

  - There&apos;s a missing opening parenthesis in &quot;${BUILDDIR}/tmp)&quot;.

Cheers,
Ulf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64181</commentid>
    <comment_count>3</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-07-19 18:09:44 +0000</bug_when>
    <thetext>Ulf, 

Thanks... 

Change 1 is better as your wrote it.

Change 2 did not need the trailing parenthesis as the &quot;which&quot; clause covers it. 

Scott

See http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#checking-for-missing-build-time-dependencies</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64182</commentid>
    <comment_count>4</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-07-19 18:20:06 +0000</bug_when>
    <thetext>Comma after &quot;because&quot; still feels a bit weird to me, but I&apos;m fine with it.

Thanks,
Ulf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64183</commentid>
    <comment_count>5</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-07-19 18:31:58 +0000</bug_when>
    <thetext>Thought of one more thing that might be nice to add. Could the last part, before the note, be rewritten as follows?

  Another, more manual, way to check a recipe for missing build-time
  dependencies of the first type is to build with an empty staging
  sysroot. This method can also find missing build-time dependencies
  that are not in the form of libraries, which the
  &lt;code&gt;build-deps&lt;/build&gt; QA check is unable to.

  An easy way to empty the staging sysroots is to simply remove TMPDIR,
  which is usually ${BUILDDIR}/tmp, as it includes the staging sysroots.
  Another, faster method is to use the scripts/wipe-sysroot script,
  which removes just the staging sysroots and keeps everything else in
  TMPDIR.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64188</commentid>
    <comment_count>6</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-07-19 18:53:36 +0000</bug_when>
    <thetext>Ulf, 

Sorry, I completely ignored that weird comma... it is now removed as it was not supposed to be there. 

The other change is here - http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#checking-for-missing-build-time-dependencies

Let me know, 
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64189</commentid>
    <comment_count>7</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-07-19 18:56:34 +0000</bug_when>
    <thetext>LGTM

Thanks,
Ulf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64190</commentid>
    <comment_count>8</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-07-19 18:58:35 +0000</bug_when>
    <thetext>Closing... 


Scott</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>