<?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>1505</bug_id>
          
          <creation_ts>2011-09-21 03:46:03 +0000</creation_ts>
          <short_desc>cmake.bbclass sets invalid sysroot for native recipes</short_desc>
          <delta_ts>2012-03-22 01:54:14 +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>devtools / tool chain</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>2124</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Paul Eggleton">bluelightning</reporter>
          <assigned_to name="Nitin Kamble">nitin.a.kamble</assigned_to>
          <cc>jessica.zhang</cc>
    
    <cc>liezhi.yang</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>sgw</cc>
    
    <cc>stephan.binner</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>16352</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2011-09-21 03:46:03 +0000</bug_when>
    <thetext>cmake.bbclass sets OECMAKE_C_FLAGS and OECMAKE_C_FLAGS to include ${TOOLCHAIN_OPTIONS}, and TOOLCHAIN_OPTIONS is set to &quot;--sysroot=${STAGING_DIR_TARGET}&quot;; however for a native recipe STAGING_DIR_TARGET is not valid and is in fact empty, so the option passed to the compiler is &quot;--sysroot=&quot; which causes builds to fail due to not being able to find standard headers.

Clearing TOOLCHAIN_OPTIONS within the recipe works, however ideally this would be handled within the cmake recipe (in a way that does not break non-native builds).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16353</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2011-09-21 03:48:56 +0000</bug_when>
    <thetext>Sorry that should have been OECMAKE_CXX_FLAGS rather than OECMAKE_C_FLAGS in the second instance above.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16359</commentid>
    <comment_count>2</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2011-09-21 10:40:55 +0000</bug_when>
    <thetext>Paul,
  how to reproduce this issue ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16454</commentid>
    <comment_count>3</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2011-09-23 13:56:35 +0000</bug_when>
    <thetext> Paul, I am not able to reproduce this issue. so please send steps to reproduce this issue.

Thanks,
Nitin</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17930</commentid>
    <comment_count>4</comment_count>
    <who name="Jessica">jessica.zhang</who>
    <bug_when>2012-01-03 10:33:04 +0000</bug_when>
    <thetext>Paul, Nitin is waiting for your inputs</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17940</commentid>
    <comment_count>5</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2012-01-03 14:41:09 +0000</bug_when>
    <thetext>FYI I emailed Nitin some information on this over the holidays - basically it needs an additional layer to reproduce which I have uploaded to a contrib git layer on yoctoproject.org.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19318</commentid>
    <comment_count>6</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2012-03-22 01:54:14 +0000</bug_when>
    <thetext>Duplicated to 2124

*** This bug has been marked as a duplicate of bug 2124 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>