<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:Consolas;}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:Consolas;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Below, is the error and a heavily edited log file.&nbsp; For those in Wind River, the issue is LIN10-858.&nbsp; Btw, there is duplicate script building code in my patch
 because I forgot to take it out of do_compile_kernelmodules() which is where I first moved it to.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Joe<o:p></o:p></span></p>
<div style="mso-element:para-border-div;border:none;border-bottom:double windowtext 2.25pt;padding:0in 0in 1.0pt 0in">
<p class="MsoNormal" style="border:none;padding:0in"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoPlainText"><span style="font-family:&quot;Courier New&quot;">&nbsp; LD /home/wrlbuild/builds/builds-c23c9015-5785-4a83-8075-2a2fa9401ba3/wrlinux-std-sato_intel-skylake-avx512-64_world_10/tmp/work/intel_skylake_avx512_64-wrs-linux/hello-mod/0.1-r0/built-in.o
<br>
&nbsp;&nbsp; CC [M] /home/wrlbuild/builds/builds-c23c9015-5785-4a83-8075-2a2fa9401ba3/wrlinux-std-sato_intel-skylake-avx512-64_world_10/tmp/work/intel_skylake_avx512_64-wrs-linux/hello-mod/0.1-r0/hello.o
<br>
&nbsp;&nbsp; Building modules, stage 2. <br>
&nbsp;&nbsp; MODPOST 1 modules <br>
&nbsp;/bin/sh: scripts/mod/modpost: Permission denied <br>
&nbsp;make <br>
&nbsp;[3]: *** [/home/wrlbuild/builds/builds-c23c9015-5785-4a83-8075-2a2fa9401ba3/wrlinux-std-sato_intel-skylake-avx512-64_world_10/tmp/work-shared/intel-skylake-avx512-64/kernel-source/scripts/Makefile.modpost:91: __modpost] Error 126
<br>
&nbsp;make[2]: *** [/home/wrlbuild/builds/builds-c23c9015-5785-4a83-8075-2a2fa9401ba3/wrlinux-std-sato_intel-skylake-avx512-64_world_10/tmp/work-shared/intel-skylake-avx512-64/kernel-source/Makefile:1475: modules] Error 2
<br>
&nbsp;<br>
(modpost is under work-shared)<br>
&nbsp;<br>
&nbsp;<br>
&nbsp;<br>
&nbsp;<br>
<br>
&nbsp;[2017-07-13 21:02:39.512674040-07:00] NOTE: recipe hello-mod-0.1-r0: task do_make_scripts: Started<br>
&nbsp;<br>
&nbsp;[2017-07-13 21:02:39.648216523-07:00] NOTE: recipe module-debug-example-0.99-r0: task do_make_scripts: Started<br>
&nbsp;<br>
&nbsp;[2017-07-13 21:02:44.190642236-07:00] NOTE: recipe hello-mod-0.1-r0: task do_configure: Started<br>
&nbsp;<br>
&nbsp;[2017-07-13 21:02:44.308167085-07:00] NOTE: recipe hello-mod-0.1-r0: task do_configure: Succeeded<br>
&nbsp;<br>
&nbsp;[2017-07-13 21:02:45.074545820-07:00] NOTE: recipe module-debug-example-0.99-r0: task do_configure: Started<br>
&nbsp;<br>
&nbsp;[2017-07-13 21:02:45.077889943-07:00] NOTE: recipe module-debug-example-0.99-r0: task do_configure: Succeeded<br>
&nbsp;<br>
&nbsp;[2017-07-13 21:02:59.371609194-07:00] NOTE: recipe hello-mod-0.1-r0: task do_make_scripts: Succeeded<br>
&nbsp;<br>
&nbsp;[2017-07-13 21:03:00.149468691-07:00] NOTE: recipe hello-mod-0.1-r0: task do_compile: Started<br>
&nbsp;<br>
&nbsp;[2017-07-13 21:03:02.840652134-07:00] ERROR: hello-mod-0.1-r0 do_compile: oe_runmake failed<br>
&nbsp;[2017-07-13 21:03:04.406712693-07:00] ERROR: hello-mod-0.1-r0 do_compile: Function failed: do_compile (log file is located at /home/wrlbuild/builds/builds-c23c9015-5785-4a83-8075-2a2fa9401ba3/wrlinux-std-sato_intel-skylake-avx512-64_world_10/tmp/work/intel_skylake_avx512_64-wrs-linux/hello-mod/0.1-r0/temp/log.do_compile.110776)<br>
<br>
&nbsp;[2017-07-13 21:03:04.407703129-07:00] NOTE: recipe module-debug-example-0.99-r0: task do_make_scripts: Succeeded<br>
&nbsp;<br>
&nbsp;<br>
&nbsp;<br>
<o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> Bruce Ashfield [mailto:bruce.ashfield@gmail.com]
<br>
<b>Sent:</b> Friday, July 21, 2017 10:30 AM<br>
<b>To:</b> Slater, Joseph<br>
<b>Cc:</b> Patches and discussions about the oe-core layer<br>
<b>Subject:</b> Re: [OE-core] [oe-core][PATCH 1/1] modules: move creation of some module related tools<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">On Fri, Jul 21, 2017 at 1:13 PM, Joe Slater &lt;<a href="mailto:jslater@windriver.com" target="_blank">jslater@windriver.com</a>&gt; wrote:<o:p></o:p></p>
<p class="MsoNormal">Move creation of tools needed by module building recipes into<br>
kernel.bbclass but invoke the task only from the module recipes.<br>
Without this change, one module recipe can fail trying to use the<br>
tools while another is (re-)building them.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">You are changing some core code that has been protecting our builds for<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">quite some time .. yet, you have no example of the errors that are being<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">seen, and no proof that this actually fixes the problem (and that it doesn't<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">introduce other issues).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">i.e. how are the lock files no protecting this in whatever is breaking for you ?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Looking at the change, I'm not convinced it is the right thing to do.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">i.e. putting something in kernel.bbclass that is only used by the modules<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">is less than ideal, without some sort of justification.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Bruce<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal"><br>
Signed-off-by: Joe Slater &lt;<a href="mailto:jslater@windriver.com">jslater@windriver.com</a>&gt;<br>
---<br>
&nbsp;meta/classes/kernel.bbclass&nbsp; &nbsp; &nbsp; | 15 &#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;<br>
&nbsp;meta/classes/module-base.bbclass | 10 &#43;&#43;--------<br>
&nbsp;meta/classes/module.bbclass&nbsp; &nbsp; &nbsp; |&nbsp; 4 ----<br>
&nbsp;3 files changed, 17 insertions(&#43;), 12 deletions(-)<br>
<br>
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass<br>
index 7670c71..131387e 100644<br>
--- a/meta/classes/kernel.bbclass<br>
&#43;&#43;&#43; b/meta/classes/kernel.bbclass<br>
@@ -280,6 &#43;280,11 @@ kernel_do_compile() {<br>
<br>
&nbsp;do_compile_kernelmodules() {<br>
&nbsp; &nbsp; &nbsp; &nbsp; unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE<br>
&#43;<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;# build modpost, etc<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;make CC=&quot;${KERNEL_CC}&quot; LD=&quot;${KERNEL_LD}&quot; AR=&quot;${KERNEL_AR}&quot; \<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} scripts<br>
&#43;<br>
&nbsp; &nbsp; &nbsp; &nbsp; if (grep -q -i -e '^CONFIG_MODULES=y$' ${B}/.config); then<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oe_runmake -C ${B} ${PARALLEL_MAKE} modules CC=&quot;${KERNEL_CC}&quot; LD=&quot;${KERNEL_LD}&quot; ${KERNEL_EXTRA_ARGS}<br>
<br>
@@ -296,6 &#43;301,16 @@ do_compile_kernelmodules() {<br>
&nbsp;}<br>
&nbsp;addtask compile_kernelmodules after do_compile before do_strip<br>
<br>
&#43;# Task to ensure the kernel scripts are created. Expected to be invoked<br>
&#43;# only by module building recipes. See module.bbclass for an example.<br>
&#43;do_make_scripts() {<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;make CC=&quot;${KERNEL_CC}&quot; LD=&quot;${KERNEL_LD}&quot; AR=&quot;${KERNEL_AR}&quot; \<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} scripts<br>
&#43;}<br>
&#43;addtask make_scripts after do_compile_kernelmodules<br>
&#43;do_make_scripts[lockfiles] = &quot;${TMPDIR}/kernel-scripts.lock&quot;<br>
&#43;<br>
&nbsp;kernel_do_install() {<br>
&nbsp; &nbsp; &nbsp; &nbsp; #<br>
&nbsp; &nbsp; &nbsp; &nbsp; # First install the modules<br>
diff --git a/meta/classes/module-base.bbclass b/meta/classes/module-base.bbclass<br>
index 6fe77c0..c1fe191 100644<br>
--- a/meta/classes/module-base.bbclass<br>
&#43;&#43;&#43; b/meta/classes/module-base.bbclass<br>
@@ -1,7 &#43;1,8 @@<br>
&nbsp;inherit kernel-arch<br>
<br>
&nbsp;# This is instead of DEPENDS = &quot;virtual/kernel&quot;<br>
-do_configure[depends] &#43;= &quot;virtual/kernel:do_compile_kernelmodules&quot;<br>
&#43;# do_make_scripts() used to be in here, but is now in kernel.bbclass<br>
&#43;do_configure[depends] &#43;= &quot;virtual/kernel:do_make_scripts&quot;<br>
<br>
&nbsp;export OS = &quot;${TARGET_OS}&quot;<br>
&nbsp;export CROSS_COMPILE = &quot;${TARGET_PREFIX}&quot;<br>
@@ -18,10 &#43;19,3 @@ KERNEL_OBJECT_SUFFIX = &quot;.ko&quot;<br>
&nbsp;# kernel modules are generally machine specific<br>
&nbsp;PACKAGE_ARCH = &quot;${MACHINE_ARCH}&quot;<br>
<br>
-# Function to ensure the kernel scripts are created. Expected to<br>
-# be called before do_compile. See module.bbclass for an example.<br>
-do_make_scripts() {<br>
-&nbsp; &nbsp; &nbsp; &nbsp;unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS<br>
-&nbsp; &nbsp; &nbsp; &nbsp;make CC=&quot;${KERNEL_CC}&quot; LD=&quot;${KERNEL_LD}&quot; AR=&quot;${KERNEL_AR}&quot; \<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} scripts<br>
-}<br>
diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass<br>
index 391776d..e344960 100644<br>
--- a/meta/classes/module.bbclass<br>
&#43;&#43;&#43; b/meta/classes/module.bbclass<br>
@@ -1,9 &#43;1,5 @@<br>
&nbsp;inherit module-base kernel-module-split pkgconfig<br>
<br>
-addtask make_scripts after do_prepare_recipe_sysroot before do_compile<br>
-do_make_scripts[lockfiles] = &quot;${TMPDIR}/kernel-scripts.lock&quot;<br>
-do_make_scripts[depends] &#43;= &quot;virtual/kernel:do_shared_workdir&quot;<br>
-<br>
&nbsp;EXTRA_OEMAKE &#43;= &quot;KERNEL_SRC=${STAGING_KERNEL_DIR}&quot;<br>
<br>
&nbsp;MODULES_INSTALL_TARGET ?= &quot;modules_install&quot;<br>
<span class="hoenzb"><span style="color:#888888">--</span></span><span style="color:#888888"><br>
<span class="hoenzb">2.7.4</span><br>
<br>
<span class="hoenzb">--</span><br>
<span class="hoenzb">_______________________________________________</span><br>
<span class="hoenzb">Openembedded-core mailing list</span><br>
<span class="hoenzb"><a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.openembedded.org</a></span><br>
<span class="hoenzb"><a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a></span></span><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<p class="MsoNormal">&quot;Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end&quot;<o:p></o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>