<?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>13022</bug_id>
          
          <creation_ts>2018-11-13 22:41:06 +0000</creation_ts>
          <short_desc>tmp/hosttools is not recreated if tmp is removed while a bitbake server is active</short_desc>
          <delta_ts>2019-04-29 09:07:21 +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>OE-Core</product>
          <component>oe-core other</component>
          <version>2.5.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</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>normal</bug_severity>
          <target_milestone>2.7 M4</target_milestone>
          
          <blocked>13023</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Peter Kjellerstedt">peter.kjellerstedt</reporter>
          <assigned_to name="Robert Yang">liezhi.yang</assigned_to>
          <cc>liezhi.yang</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>sjolley.yp.pm</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>82213</commentid>
    <comment_count>0</comment_count>
    <who name="Peter Kjellerstedt">peter.kjellerstedt</who>
    <bug_when>2018-11-13 22:41:06 +0000</bug_when>
    <thetext>If the bitbake server is active and tmp is removed/moved away, then tmp/hosttools is not recreated the next time bitbake is run (as long as the server is still active). This is because tmp/hosttools is only created due to the bb.event.ConfigParsed event, which is not fired when an active bitbake server is reused.

Steps to reproduce:

* Enable the bitbake server, e.g., by adding BB_SERVER_TIMEOUT = &quot;600&quot; to local.conf.
* Run `bitbake m4-native`.
* Move away tmp
* Run `bitbake m4-native` again.

Eventually it will fail with &quot;ERROR: Error running gcc  --version:&quot; because gcc cannot be found in $PATH.

A possible solution would be to trigger the creation of tmp/hosttools also on the bb.event.ParseStarted event.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82880</commentid>
    <comment_count>1</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2019-01-28 08:55:59 +0000</bug_when>
    <thetext>We can&apos;t use both bb.event.ConfigParsed and bb.event.ParseStarted for hosttools creation at the same time, otherwise, it would make it create twice. I will send a patch to change it to bb.event.ParseStarted.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82991</commentid>
    <comment_count>2</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2019-02-14 02:43:30 +0000</bug_when>
    <thetext>We can&apos;t use bb.event.ParseStarted to replace bb.event.ConfigParsed for hosttools since it would break fresh build:


ERROR:  OE-core&apos;s config sanity checker detected a potential misconfiguration.
    Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
    Following is the list of potential problems / advisories:

    Please install the following missing utilities: GNU make,C Compiler (gcc ),C++ Compiler (g++ ),patch,diffstat,makeinfo,git,bzip2,tar,gzip,gawk,chrpath,wget,cpio,perl,file,which


I&apos;ve sent another patch to mailing list to fix the issue:

http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/ht</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83668</commentid>
    <comment_count>3</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2019-04-29 09:07:21 +0000</bug_when>
    <thetext>Fix on master branch:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=407a02b0579405abaff5a1f9d5f190c197aaff52</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>