<tt><font size=2>Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt; wrote
on 05.08.2015 05:17:14:<br> <br>&gt; On Tue, Aug 4, 2015 at 4:41 AM, Ioan-Adrian Ratiu &lt;adrian.ratiu@ni.com&gt;
wrote:<br>&gt; &gt; The kernel configure step was broken by the sysroot poisoning
in [1].<br>&gt; <br>&gt; Can you be more precise here ? Configuration certainly works for me
.. and<br>&gt; has been working since last October.<br></font></tt><br><tt><font size=2>This works because it was fixed in linux-yocto.inc
*after* the sysroot poisoning.</font></tt><br><tt><font size=2>I've mentioned this in the next line :) But this is
not what this fix is for,</font></tt><br><tt><font size=2>this fix should have been done at the same time with
adding $TOOLCHAIN_OPTIONS</font></tt><br><tt><font size=2>to $KERNEL_CC in linux-yocto.inc.</font></tt><br><br><tt><font size=2>This bug was missed because there is NO error reporting
in yocto-kernel-tools</font></tt><br><tt><font size=2>merge_configs.sh and the build continues despite the
error. I've sent a patch to</font></tt><br><tt><font size=2>fail loudly in case merge_configs.sh fails in yocto-kernel-tools.
You know about</font></tt><br><tt><font size=2>it because you responded to that mail :) These issues
are related.</font></tt><br><tt><font size=2><br>&gt; &gt; In linux-yocto.inc this was fixed by appending $TOOLCHAIN_OPTIONS
to<br>&gt; &gt; KERNEL_CC, TOOLCHAIN_OPTIONS containing the needed --sysroot
arg.<br>&gt; &gt;<br>&gt; &gt; However, [1] also breaks the yocto configure fragment generation:<br>&gt; &gt; after parsing the fragments, when make is called on the merged
file<br>&gt; &gt; to fill in any missing symbols with default values. The call
chain is:<br>&gt; &gt;<br>&gt; &gt; do_kernel_configme() -&gt; configme -&gt; merge_config.sh<br>&gt; &gt; -&gt; make KCONFIG_ALLCONFIG=$TMP_FILE<br>&gt; &gt;<br>&gt; &gt; This issue was uncaught until now because configme redirects
all stdout<br>&gt; &gt; and stderr to merge_log.txt prior to calling merge_configs.sh
and there<br>&gt; &gt; is no return value checking, so building continues and the silent
error<br>&gt; &gt; is ignored.<br>&gt; &gt;<br>&gt; &gt; Adding $TOOLCHAIN_OPTIONS to $CFLAGS before calling configme
fixes this.<br>&gt; &gt;<br>&gt; &gt; TODO: In a future patch this kind of error should be made loud
and cause<br>&gt; &gt; the build to fail.<br>&gt; &gt;<br>&gt; <br>&gt; That won't be required, I already have a queue of patches that changes<br>&gt; things significantly.<br>&gt; <br>&gt; If you can elaborate on the type of breakage you were seeing, I'll
add<br>&gt; this to that queue.</font></tt><br><br><tt><font size=2>The error I'm seeing is caused by merge_configs.sh
from yocto-kernel-tools</font></tt><br><tt><font size=2>which calls make --alldefconfig | --allnoconfig with
a poisoned sysroot.</font></tt><br><br><tt><font size=2>The failure is caused by make not getting a --sysroot
argument and this error</font></tt><br><tt><font size=2>fails silently because of not checking the return
code in yocto-kernel-tools</font></tt><br><tt><font size=2>(again, I've sent a patch for this also, you responded
to it yesterday).</font></tt><br><br><tt><font size=2>The correct way to fix this IMO is to add the --sysroot
ARG to the environment</font></tt><br><tt><font size=2>in kernel-yocto.bbacless do_configme *before* calling
the yocto-kernel-tools,</font></tt><br><tt><font size=2>thus the tools get called with a sane sysroot.</font></tt><br><br><tt><font size=2>The exact error is this:</font></tt><br><br><tt><font size=3>Partial contents of merge_log.txt:<br>&quot;<br>HOSTCC &nbsp;scripts/basic/fixdep<br>/home/ovidiu/000/git/nilrt/build/tmp-glibc/work-shared/x64/kernel-source/scripts/basic/fixdep.c:106:23:
fatal error: sys/types.h: No such file or directory<br> #include &lt;sys/types.h&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; ^<br>compilation terminated.<br>/home/ovidiu/000/git/nilrt/build/tmp-glibc/work-shared/x64/kernel-source/scripts/basic/Makefile:21:
recipe for target 'scripts/basic/x86_64-nilrt-linux-fixdep' failed<br>make[2]: *** [scripts/basic/x86_64-nilrt-linux-fixdep] Error 1<br>/home/ovidiu/000/git/nilrt/build/tmp-glibc/work-shared/x64/kernel-source/Makefile:428:
recipe for target 'scripts_basic' failed<br>make[1]: *** [scripts_basic] Error 2<br>Makefile:133: recipe for target 'sub-make' failed<br>make: *** [sub-make] Error 2<br>&quot;<br></font></tt><br><BR>
<BR>
National Instruments Romania S.R.L.<BR>
------------------------------------------------------<BR>
B-dul 21 Decembrie 1989, nr. 77, A2<BR>
Cluj-Napoca 400604, Romania<BR>
C.I.F.: RO17961616  |  O.R.C.: J12/3337/2005<BR>
Telefon: +40 264 406428  |  Fax: +40 264 406429<BR>
E-mail: office.cluj@ni.com <BR>
Web: romania.ni.com <BR>
 <BR>
Vanzari si suport tehnic:<BR>
Telefon gratuit : 0800 070071<BR>
E-mail vanzari: ni.romania@ni.com<BR>
E-mail suport tehnic: techsupport@ni.com<BR>