Bug 14033

Summary: bitbake-layers gives a timeout instead of reporting that tools are missing
Product: [Build System, Metadata & Runtime] BitBake Reporter: sorear
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Undecided CC: poky.bs.watcher, poky.watcher
Version: unspecified   
Target Milestone: ---   
Hardware: x86   
OS: x86_64   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description sorear 2020-09-01 03:01:25 UTC
I am attempting to set up meta-riscv in a nixos shell with
the default development tools.  bitbake-layers fails opaquely:

$ bitbake-layers 
NOTE: Starting bitbake server...                    
NOTE: No reply from server in 30s                  
Timeout while waiting for a reply from the bitbake server (60s)

bitbake provides a slightly more useful error, but note that the
list of tools is missing:

$ bitbake                   
Traceback (most recent call last):             
  File "/home/wrk_other/meta_riscv/openembedded-core/bitbake/bin/bitbake", line 36, in <module>
    cookerdata.CookerConfiguration()))                  
  File "/home/wrk_other/meta_riscv/openembedded-core/bitbake/lib/bb/main.py", line 383, in bitbake_main
    configParams)                        
  File "/home/wrk_other/meta_riscv/openembedded-core/bitbake/lib/bb/ui/knotty.py", line 386, in main
    params.updateToServer(server, os.environ.copy())
  File "/home/wrk_other/meta_riscv/openembedded-core/bitbake/lib/bb/cookerdata.py", line 75, in updateToServer
    raise Exception("Unable to update the server configuration with local parameters: %s" % error)
Exception: Unable to update the server configuration with local parameters: Traceback (most recent call last):
  File "/home/wrk_other/meta_riscv/openembedded-core/bitbake/lib/bb/cookerdata.py", line 274, in parseBaseConfiguration
    bb.event.fire(bb.event.ConfigParsed(), self.data)
  File "/home/wrk_other/meta_riscv/openembedded-core/bitbake/lib/bb/event.py", line 214, in fire
    fire_class_handlers(event, d)
  File "/home/wrk_other/meta_riscv/openembedded-core/bitbake/lib/bb/event.py", line 121, in fire_class_handlers
    execute_handler(name, handler, event, d)
  File "/home/wrk_other/meta_riscv/openembedded-core/bitbake/lib/bb/event.py", line 93, in execute_handler
    ret = handler(event)
  File "/home/wrk_other/meta_riscv/openembedded-core/meta/classes/base.bbclass", line 242, in base_eventhandler
    setup_hosttools_dir(d.getVar('HOSTTOOLS_DIR'), 'HOSTTOOLS', d)
  File "/home/wrk_other/meta_riscv/openembedded-core/meta/classes/base.bbclass", line 146, in setup_hosttools_dir
    bb.fatal("The following required tools (as specified by HOSTTOOLS) appear to be unavailable in PATH, please install them in order to proceed:\n  %s" % " ".join(notfound))
  File "/home/wrk_other/meta_riscv/openembedded-core/bitbake/lib/bb/__init__.py", line 156, in fatal
    raise BBHandledException()
bb.BBHandledException

During handling of the above exception, another exception occurred: 

Traceback (most recent call last):
  File "/home/wrk_other/meta_riscv/openembedded-core/bitbake/lib/bb/command.py", line 81, in runCommand
    result = command_method(self, commandline)
  File "/home/wrk_other/meta_riscv/openembedded-core/bitbake/lib/bb/command.py", line 272, in updateConfig
    command.cooker.updateConfigOpts(options, environment, cmdline)
  File "/home/wrk_other/meta_riscv/openembedded-core/bitbake/lib/bb/cooker.py", line 488, in updateConfigOpts
    self.reset()
  File "/home/wrk_other/meta_riscv/openembedded-core/bitbake/lib/bb/cooker.py", line 1696, in reset
    self.initConfigurationData()
  File "/home/wrk_other/meta_riscv/openembedded-core/bitbake/lib/bb/cooker.py", line 358, in initConfigurationData
    self.databuilder.parseBaseConfiguration()
  File "/home/wrk_other/meta_riscv/openembedded-core/bitbake/lib/bb/cookerdata.py", line 303, in parseBaseConfiguration
    raise bb.BBHandledException
bb.BBHandledException

After strace -f'ing the bitbake-layers command, the following error message is
written to the socket by the server and read by the client, but not displayed
on the terminal:

The following required tools (as specified by HOSTTOOLS) appear to be unavailable in PATH, please install them in order to proceed:\n  chrpath diffstat file wgetq

openembedded-core is git version 09f4db415fb6a1398e9e9b359630043c833f6118.

After adding those four tools to the PATH, bitbake-layers works normally.