<?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>6216</bug_id>
          
          <creation_ts>2014-04-23 16:25:45 +0000</creation_ts>
          <short_desc>Building modules outside the kernel uses linux-libc-headers not actual kernel headers (hello-mod)</short_desc>
          <delta_ts>2015-01-13 02:13:39 +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>Other YP Layers</product>
          <component>layers</component>
          <version>1.5</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</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</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Peverley">pev</reporter>
          <assigned_to name="David Peverley">pev</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>42924</commentid>
    <comment_count>0</comment_count>
    <who name="David Peverley">pev</who>
    <bug_when>2014-04-23 16:25:45 +0000</bug_when>
    <thetext>When you build a kernel module out of tree (e.g. as with the hello-mod example) the build system uses the linux-libc-headers instead of the headers of your preferred kernel. If you&apos;re depending on the changes then this is a significant problem...

In my case I can show the search path to be :
  bitbake linux-imx -c devshell
... devshell ...
  `arm-oe-linux-gnueabi-gcc -print-prog-name=cc1` -v
  ignoring nonexistent directory &quot;/workdrive/projects/vibe/src/fsl-community-bsp/build/tmp-eglibc/sysroots/pevmachine/usr/local/include&quot;
  ignoring nonexistent directory &quot;/workdrive/projects/vibe/src/fsl-community-bsp/build/tmp-eglibc/sysroots/x86_64-linux/usr/lib/cortexa9hf-vfp-neon-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.8.1/../../../../../arm-oe-linux-gnueabi/include&quot;
  #include &quot;...&quot; search starts here:
  #include &lt;...&gt; search starts here:
   /workdrive/projects/vibe/src/fsl-community-bsp/build/tmp-eglibc/sysroots/x86_64-linux/usr/lib/cortexa9hf-vfp-neon-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.8.1/include
   /workdrive/projects/vibe/src/fsl-community-bsp/build/tmp-eglibc/sysroots/x86_64-linux/usr/lib/cortexa9hf-vfp-neon-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.8.1/include-fixed
   /workdrive/projects/vibe/src/fsl-community-bsp/build/tmp-eglibc/sysroots/pevmachine/usr/include
  End of search list.

So this means it picks up the includes from sysrootfs i.e. the linux-libc-headers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47035</commentid>
    <comment_count>1</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2014-11-14 18:48:40 +0000</bug_when>
    <thetext>Bruce, I&apos;m going to toss this one over to you - at least for your initial thoughts.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47037</commentid>
    <comment_count>2</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2014-11-14 19:06:58 +0000</bug_when>
    <thetext>When you actually build the module, it will use the kernel build system, which sets its own include paths and hence will find
the sysroot/kernel source headers first.

Do you have a specific build problem, or another test that shows this without devshell ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47810</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-01-08 16:00:38 +0000</bug_when>
    <thetext>The hello-mod recipe uses module.bbclass and does not use linux-libc-headers. If you do things from the devshell, you will hit issues like this. I you have a proper recipe which doesn&apos;t work and more info, please reopen, otherwise I can&apos;t see the issue here.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>