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.
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.
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
Fix on master branch: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=407a02b0579405abaff5a1f9d5f190c197aaff52