Bug 13022 - tmp/hosttools is not recreated if tmp is removed while a bitbake server is active
Summary: tmp/hosttools is not recreated if tmp is removed while a bitbake server is ac...
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: oe-core other (show other bugs)
Version: 2.5.2
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.7 M4
Assignee: Robert Yang
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks: 13023
  Show dependency tree
 
Reported: 2018-11-13 22:41 UTC by Peter Kjellerstedt
Modified: 2019-04-29 09:07 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Kjellerstedt 2018-11-13 22:41:06 UTC
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 = "600" to local.conf.
* Run `bitbake m4-native`.
* Move away tmp
* Run `bitbake m4-native` again.

Eventually it will fail with "ERROR: Error running gcc  --version:" 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.
Comment 1 Robert Yang 2019-01-28 08:55:59 UTC
We can'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.
Comment 2 Robert Yang 2019-02-14 02:43:30 UTC
We can't use bb.event.ParseStarted to replace bb.event.ConfigParsed for hosttools since it would break fresh build:


ERROR:  OE-core'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've sent another patch to mailing list to fix the issue:

http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/ht