<?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>12860</bug_id>
          
          <creation_ts>2018-07-20 06:36:14 +0000</creation_ts>
          <short_desc>meta-intel[rocko]: out of tree kernel module builds fail for linux-intel 4.14 after update to 4.14.27</short_desc>
          <delta_ts>2018-08-30 01:09:41 +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>BSPs</product>
          <component>bsps-meta-intel</component>
          <version>2.4.3</version>
          <rep_platform>x86</rep_platform>
          <op_sys>x86_64</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>major</bug_severity>
          <target_milestone>2.4.4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Henry Bruce">henry.bruce</reporter>
          <assigned_to name="Anuj Mittal">anuj.mittal</assigned_to>
          <cc>bruce.ashfield</cc>
    
    <cc>denis</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>Regression (Used to work)</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>81152</commentid>
    <comment_count>0</comment_count>
    <who name="Henry Bruce">henry.bruce</who>
    <bug_when>2018-07-20 06:36:14 +0000</bug_when>
    <thetext>After the update to kernel 4.14.27, out of tree module builds started failing.
I&apos;m using poky&apos;s meta-skeleton hello-mod recipe as an example.

Steps to re-create
------------------
These steps use meta-intel rt kernel 4.14.40 
$ git clone -b rocko git://git.yoctoproject.org/poky
$ git clone -b rocko git://git.yoctoproject.org/metal-intel
$ source poky/oe-init-build-env
$ bitbake-layers add-layer ../poky/meta-skeleton/
$ bitbake-layers add-layer ../meta-intel/
$ cat &lt;&lt;EOF &gt;&gt; conf/local.conf
MACHINE = &quot;intel-corei7-64&quot;
PREFERRED_PROVIDER_virtual/kernel = &quot;linux-intel-rt&quot;
PREFERRED_VERSION_linux-intel-rt = &quot;4.14%&quot;
EOF
$ bitbake hello-mod
...
| make -C /path/to/build/tmp/work-shared/intel-corei7-64/kernel-source M=/media/md126p1/yocto/hbruce/rocko/kmod-bug/build/tmp/work/intel_corei7_64-poky-linux/hello-mod/0.1-r0
| make[1]: Entering directory &apos;/path/to/build/tmp/work-shared/intel-corei7-64/kernel-source&apos;
| make[2]: Entering directory &apos;/path/to/build/tmp/work-shared/intel-corei7-64/kernel-build-artifacts&apos;
| make[3]: *** No rule to make target &apos;tools/objtool/objtool&apos;, needed by &apos;/path/to/build/tmp/work/intel_corei7_64-poky-linux/hello-mod/0.1-r0/hello.o&apos;.  Stop.
...
Summary: 1 task failed:
  /path/to/poky/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb:do_compile
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

Workaround
----------
Follow above steps but revert to kernel 4.14.24
$ cd ../meta-intel
$ git checkout 91ad013e655d56889efe9b65c1c7691dea5034c4
HEAD is now at 91ad013... linux-intel-rt_4.14: update to v4.14.24
$ cd ../build
$ bitbake hello-mod
NOTE: Tasks Summary: Attempted 527 tasks of which 493 didn&apos;t need to be rerun and all succeeded.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81159</commentid>
    <comment_count>1</comment_count>
    <who name="Henry Bruce">henry.bruce</who>
    <bug_when>2018-07-20 20:55:24 +0000</bug_when>
    <thetext>Some more details
1. Build fails in the same way with linux-intel kernel (i.e. bug is not specific to rt config)
2. Build succeeds with linux-intel-4.9.81 so bug is specific to 4.14
3. california.l.sullivan@intel.com thought bug might be fixed by https://git.yoctoproject.org/cgit/cgit.cgi/yocto-kernel-cache/commit/?h=yocto-4.14&amp;id=b6b5ac8d6d4854a2fc8394c40879bffbafc08578, but this patch is already applied
4. backport-iwlwifi also fails to build
| make[8]: *** No rule to make target &apos;/path/to/build/tmp/work/corei7-64-intel-common-poky-linux/backport-iwlwifi/30-r0/git/net/mac80211/main.o&apos;, needed by &apos;/path/to/build/tmp/work/corei7-64-intel-common-poky-linux/backport-iwlwifi/30-r0/git/net/mac80211/mac80211.o&apos;.  Stop.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81175</commentid>
    <comment_count>2</comment_count>
    <who name="Henry Bruce">henry.bruce</who>
    <bug_when>2018-07-24 21:43:11 +0000</bug_when>
    <thetext>I am building on Fedora 26. Package elfutils-libelf-devel-0.170-4.fc26.x86_64 is installed.

Build is successful on sumo, so this is a rocko specific bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81176</commentid>
    <comment_count>3</comment_count>
    <who name="Anuj Mittal">anuj.mittal</who>
    <bug_when>2018-07-25 05:23:00 +0000</bug_when>
    <thetext>OE-core rocko has the highest kernel version of 4.12 so that is probably why this issue isn&apos;t seen on YP autobuilder. 

This would need these commits backported to be able to support 4.14+ kernels with OE-core rocko:

https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit?id=0f85563eacf5138d98b826343cdfc3833d1c5c8e

https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit?id=dfb9ffbafddd76e30e891c5d597b7c547d6f3aa5

These should not have any impact as mentioned by Bruce on the compilation of older kernels present in OE-core and will also ensure that we support layers that build their own custom kernel based on 4.14 and newer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81206</commentid>
    <comment_count>4</comment_count>
    <who name="Henry Bruce">henry.bruce</who>
    <bug_when>2018-07-30 16:30:16 +0000</bug_when>
    <thetext>Looking forward to seeing these fixes backport to rocko. Please update bug when this happens. Do you have a schedule estimate?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81209</commentid>
    <comment_count>5</comment_count>
    <who name="Anuj Mittal">anuj.mittal</who>
    <bug_when>2018-07-30 23:05:37 +0000</bug_when>
    <thetext>Armin has pulled this in his branch so it should get merged soon. If you&apos;d like to test, it&apos;s here:

https://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=stable/rocko-nmut</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81357</commentid>
    <comment_count>6</comment_count>
    <who name="Anuj Mittal">anuj.mittal</who>
    <bug_when>2018-08-15 10:50:05 +0000</bug_when>
    <thetext>Merged in rocko:

https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=rocko&amp;id=51b315fc972e9e0f2630936aade85e1f17a0f275

https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=rocko&amp;id=9e83976054925a49196f4c5be7eb4b4b9cc1e041</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81366</commentid>
    <comment_count>7</comment_count>
    <who name="Denys Dmytriyenko">denis</who>
    <bug_when>2018-08-16 00:43:31 +0000</bug_when>
    <thetext>Great, now it breaks out-of-tree modules for other BSPs... :(
http://lists.openembedded.org/pipermail/openembedded-core/2018-August/154189.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81451</commentid>
    <comment_count>8</comment_count>
    <who name="Denys Dmytriyenko">denis</who>
    <bug_when>2018-08-29 20:14:20 +0000</bug_when>
    <thetext>The fix got merged in:
http://cgit.openembedded.org/openembedded-core/commit/?h=rocko&amp;id=eb3eaa6970bb8c3647187593df23e2784dd26935</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81452</commentid>
    <comment_count>9</comment_count>
    <who name="Anuj Mittal">anuj.mittal</who>
    <bug_when>2018-08-30 01:09:41 +0000</bug_when>
    <thetext>(In reply to comment #8)
&gt; The fix got merged in:
&gt; http://cgit.openembedded.org/openembedded-core/commit/
&gt; ?h=rocko&amp;id=eb3eaa6970bb8c3647187593df23e2784dd26935

Closing this now, thanks!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>