<?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>7141</bug_id>
          
          <creation_ts>2015-01-14 14:45:01 +0000</creation_ts>
          <short_desc>Cannot include omp.h from SDK</short_desc>
          <delta_ts>2015-02-12 14:47:19 +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>1.7</version>
          <rep_platform>All</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>1.8 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Paul Eggleton">bluelightning</reporter>
          <assigned_to name="Paul Eggleton">bluelightning</assigned_to>
          <cc>mark.hatle</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</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>47906</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-01-14 14:45:01 +0000</bug_when>
    <thetext>If libgomp-dev is installed in the SDK, omp.h is installed in /opt/poky/1.7/sysroots/core2-64-poky-linux/usr/lib/gcc/x86_64-poky-linux/4.9.1/include, however gcc complains it cannot be found:

$ $CC -fopenmp -o temp.o temp.c
temp.c:1:17: fatal error: omp.h: No such file or directory
 #include &lt;omp.h&gt;
                 ^
compilation terminated.

Indeed -Wp,-v shows that gcc doesn&apos;t look in that directory at all:

$ $CC -Wp,-v -o test5 test5.c
ignoring nonexistent directory &quot;/opt/poky/1.7/sysroots/core2-64-poky-linux/usr/local/include&quot;
ignoring nonexistent directory &quot;/opt/poky/1.7/sysroots/x86_64-pokysdk-linux/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/4.9.1/../../../../../x86_64-poky-linux/include&quot;
#include &quot;...&quot; search starts here:
#include &lt;...&gt; search starts here:
 /opt/poky/1.7/sysroots/x86_64-pokysdk-linux/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/4.9.1/include
 /opt/poky/1.7/sysroots/x86_64-pokysdk-linux/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/4.9.1/include-fixed
 /opt/poky/1.7/sysroots/core2-64-poky-linux/usr/include
End of search list.

omp.h is installed as part of the target sysroot, not nativesdk, so we need to account for this additional directory.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48015</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2015-01-16 23:37:46 +0000</bug_when>
    <thetext>I have reproduced the problem locally as well.  The fix in poky-contrib with commit ID: d3d5ec821fdf3e117ba76ad93cbff8bb7fd80727 is working for me as fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48017</commentid>
    <comment_count>2</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-01-17 10:55:45 +0000</bug_when>
    <thetext>OK, thanks. I ran that fix past Richard and he has asked me to eliminate the exposure of target_libdir to the build environment, which I think I can do by instead stripping the sysroot from libdir. I should be able to send a new patch early next week.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48160</commentid>
    <comment_count>3</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-01-21 17:26:44 +0000</bug_when>
    <thetext>I&apos;ve sent an updated patch that takes care of Richard&apos;s earlier concerns:

http://cgit.openembedded.org/openembedded-core-contrib/commit/?h=paule/gcc-omp-fix&amp;id=c452114d4c6cb205336bc729d3fc2f57fd821bab</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48407</commentid>
    <comment_count>4</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-01-29 16:20:07 +0000</bug_when>
    <thetext>Fix now merged to master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=8bef63373d605576779adef3ebd34c52f72632ef

I&apos;m assuming we&apos;d want to backport this to dizzy / daisy as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48761</commentid>
    <comment_count>5</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-02-12 14:47:19 +0000</bug_when>
    <thetext>Fix merged to dizzy as well:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=dizzy&amp;id=ceb5a66d0b378fe4898bf7ccc5945246bbe332fc

I think we can mark this one as resolved now.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>