<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Sep 18, 2016 at 7:32 PM, Randy MacLeod <span dir="ltr">&lt;<a href="mailto:randy.macleod@windriver.com" target="_blank">randy.macleod@windriver.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 2016-09-17 01:09 AM, Christopher Larson wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
<br>
On Fri, Sep 16, 2016 at 6:37 PM, Randy MacLeod<br></span><span class="">
&lt;<a href="mailto:Randy.MacLeod@windriver.com" target="_blank">Randy.MacLeod@windriver.com</a> &lt;mailto:<a href="mailto:Randy.MacLeod@windriver.com" target="_blank">Randy.MacLeod@windrive<wbr>r.com</a>&gt;&gt; wrote:<br>
<br>
    Without a packageconfig dependency for the file utility, there&#39;s<br>
    a very rare compile faiure caused by a race where the magic.h<br>
    header file is not found:<br>
<br>
     ../../../git/lib/support/plau<wbr>sible.c:33:19: fatal error: magic.h:<br>
    No such file or directory<br>
<br>
    This file, plausible.c, is part of libsupport.a which is used by<br>
    many binaries produced by the e2fsprogs package. plausible.c attempts<br>
    to dynamically load libmagic.so if the e2fsprogs configure detects<br>
    that magic was available. Adding the packageconfig will eliminate<br>
    the build as well as the possible configure-time race condition.<br>
<br>
    Signed-off-by: Randy MacLeod &lt;<a href="mailto:Randy.MacLeod@windriver.com" target="_blank">Randy.MacLeod@windriver.com</a><br></span>
    &lt;mailto:<a href="mailto:Randy.MacLeod@windriver.com" target="_blank">Randy.MacLeod@windrive<wbr>r.com</a>&gt;&gt;<br>
    ---<br>
     meta/recipes-devtools/e2fspro<wbr>gs/<a href="http://e2fsprogs_1.43.bb" rel="noreferrer" target="_blank">e2fsprogs_1.43.bb</a><br>
    &lt;<a href="http://e2fsprogs_1.43.bb" rel="noreferrer" target="_blank">http://e2fsprogs_1.43.bb</a>&gt; | 1 +<span class=""><br>
     1 file changed, 1 insertion(+)<br>
<br>
    diff --git a/meta/recipes-devtools/e2fspr<wbr>ogs/<a href="http://e2fsprogs_1.43.bb" rel="noreferrer" target="_blank">e2fsprogs_1.43.bb</a><br></span>
    &lt;<a href="http://e2fsprogs_1.43.bb" rel="noreferrer" target="_blank">http://e2fsprogs_1.43.bb</a>&gt;<br>
    b/meta/recipes-devtools/e2fspr<wbr>ogs/<a href="http://e2fsprogs_1.43.bb" rel="noreferrer" target="_blank">e2fsprogs_1.43.bb</a><br>
    &lt;<a href="http://e2fsprogs_1.43.bb" rel="noreferrer" target="_blank">http://e2fsprogs_1.43.bb</a>&gt;<span class=""><br>
    index f4855bc..1707cb9 100644<br>
    --- a/meta/recipes-devtools/e2fspr<wbr>ogs/<a href="http://e2fsprogs_1.43.bb" rel="noreferrer" target="_blank">e2fsprogs_1.43.bb</a><br></span>
    &lt;<a href="http://e2fsprogs_1.43.bb" rel="noreferrer" target="_blank">http://e2fsprogs_1.43.bb</a>&gt;<br>
    +++ b/meta/recipes-devtools/e2fspr<wbr>ogs/<a href="http://e2fsprogs_1.43.bb" rel="noreferrer" target="_blank">e2fsprogs_1.43.bb</a><br>
    &lt;<a href="http://e2fsprogs_1.43.bb" rel="noreferrer" target="_blank">http://e2fsprogs_1.43.bb</a>&gt;<span class=""><br>
    @@ -23,6 +23,7 @@ EXTRA_OECONF += &quot;--libdir=${base_libdir}<br>
    --sbindir=${base_sbindir} \<br>
     EXTRA_OECONF_darwin = &quot;--libdir=${base_libdir}<br>
    --sbindir=${base_sbindir} --enable-bsd-shlibs&quot;<br>
<br>
     PACKAGECONFIG ??= &quot;&quot;<br>
    +PACKAGECONFIG[file] = &#39;,,file&#39;<br>
<br>
<br>
This isn’t going to be good enough. You aren’t explicitly<br>
enabling/disabling the option, so it’ll still detect based on what’s in<br>
the sysroot, so recipe build order will result in non-deterministic<br>
behavior.<br>
</span></blockquote>
<br>
Hi Christopher,<br>
<br>
Thanks for the response but I don&#39;t understand.<br>
I&#39;m probably wrong so please explain.<br>
It seems that you&#39;re suggesting that I add:<br>
 --with[out]-magic to e2fsprogs configure, and while<br>
I could do that, it does not seem to be needed.<br>
<br>
<br>
Short response:<br>
<br>
  This change forces &#39;file&#39; to be built before e2fsprogs if &#39;file&#39;<br>
  is present in the image or world build. Then e2fsprogs will<br>
  detect magic.h,libmagic.so and  the race is eliminated.</blockquote></div><br>That’s only the case if ‘file’ is in PACKAGECONFIG, if not, it’ll still behave the way it did before, and change its deps based on build order. Our policy is to avoid floating deps period, regardless of PACKAGECONFIG. If a given packageconfig is not enabled, then explicitly disable the dependency, don’t detect and use it anyway.<br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Christopher Larson<br>clarson at kergoth dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Maintainer - Tslib<br>Senior Software Engineer, Mentor Graphics</div>
</div></div>