Unable to start bitbake server
Asked Answered
K

11

20

I am trying to learn yocto by following the video tutorials on their main website. I installed the poky-rocko-18.0.0 and after setting up the build environment I tried to build the linux image using the following command:

bitbake core-image-minimal

However, I am getting the following error:

bitbake error

I am unsure how to start the bitbake server and so far have not found any good references for the same.

Kleptomania answered 6/1, 2018 at 21:25 Comment(3)
Did you install all needed packages and is your host distro compatible?Peal
I was able to fix the problem by installing makeinfo tool.Kleptomania
always look at bitbake-cookerdaemon.log in top of build directory when such errors happen, it will give you a clue or two on what could be wrong.Argolis
A
26

We also faced same issue with our bitbake server. It will worked after remove bitbacke.lock file. Use below command for solution.

rm -rf bitbake.lock

###/build$ bitbake core-image-sato
Loading cache: 100% |#########################################################################################################################################################################################################| Time: 0:00:01
Loaded 3867 entries from dependency cache.
Parsing recipes: 100% 
Aten answered 14/9, 2020 at 14:35 Comment(0)
O
11

My problem was some missing packages on my build system.

Fixed it by installing the following packages (Debian):

sudo apt-get install chrpath
sudo apt-get install texinfo

On my Arch system:

sudo pacman -S rpcsvc-proto chrpath texinfo cpio diffstat
Oxus answered 27/2, 2019 at 8:33 Comment(0)
R
5

Just try this in your build folder: rm -rf bitbake.lock this shoud work

The reason for this is the state of the bitbake is locked during last bitbake execution. Once you stop intermittently, we need to remove the bitbake.lock

Roadability answered 8/7, 2020 at 2:54 Comment(1)
Welcome to Stack Overflow! To improve the quality of your answer, a short explanation of why removing the bitbake.lock by using rm -rf file would work in this scenario, will help the original poster understand the problem betterWolsky
D
0

In my case it was solved with this answer from https://mcmap.net/q/662616/-unable-to-connect-to-bitbake-server (Unable to connect to bitbake server):

This is because new function findTopdir (Submitted on July 18, 2017) does not handle errors. For example, the lack of BBPATH environment variable and the inability to find conf/bblayers.conf in BBPATH. findTopdir just returns None in case of that errors.

Dupree answered 7/8, 2018 at 14:41 Comment(0)
E
0

Maybe caused by the absence of host application(s), like gawk, chrpath and texinfo. Below is one example.

ERROR: Unable to start bitbake server (None)
ERROR: Server log for this session (/home/zephyr/workspace/w031/openembedded-core/build/bitbake-cookerdaemon.log):
--- Starting bitbake server pid 22675 at 2019-03-16 00:28:44.447008 ---
Traceback (most recent call last):
  File "/home/zephyr/workspace/w031/bitbake/lib/bb/cookerdata.py", line 290, in parseBaseConfiguration
    bb.event.fire(bb.event.ConfigParsed(), self.data)
  File "/home/zephyr/workspace/w031/bitbake/lib/bb/event.py", line 225, in fire
    fire_class_handlers(event, d)
  File "/home/zephyr/workspace/w031/bitbake/lib/bb/event.py", line 134, in fire_class_handlers
    execute_handler(name, handler, event, d)
  File "/home/zephyr/workspace/w031/bitbake/lib/bb/event.py", line 106, in execute_handler
    ret = handler(event)
  File "/home/zephyr/workspace/w031/openembedded-core/meta/classes/base.bbclass", line 238, in base_eventhandler
    setup_hosttools_dir(d.getVar('HOSTTOOLS_DIR'), 'HOSTTOOLS', d)
  File "/home/zephyr/workspace/w031/openembedded-core/meta/classes/base.bbclass", line 142, 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/zephyr/workspace/w031/bitbake/lib/bb/__init__.py", line 120, in fatal
    raise BBHandledException()
bb.BBHandledException

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/zephyr/workspace/w031/bitbake/lib/bb/daemonize.py", line 83, in createDaemon
    function()
  File "/home/zephyr/workspace/w031/bitbake/lib/bb/server/process.py", line 469, in _startServer
    self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset)
  File "/home/zephyr/workspace/w031/bitbake/lib/bb/cooker.py", line 210, in __init__
    self.initConfigurationData()
  File "/home/zephyr/workspace/w031/bitbake/lib/bb/cooker.py", line 375, in initConfigurationData
    self.databuilder.parseBaseConfiguration()
  File "/home/zephyr/workspace/w031/bitbake/lib/bb/cookerdata.py", line 317, in parseBaseConfiguration
    raise bb.BBHandledException
bb.BBHandledException
ERROR: The following required tools (as specified by HOSTTOOLS) appear to be unavailable in PATH, please install them in order to proceed:
  gawk
Edwardedwardian answered 16/3, 2019 at 4:31 Comment(0)
R
0

First, change local.conf, bblayers.conf to previous configuration.

Then, bitbake -c cleanall recipe_name.

It will be all right now!

Reeher answered 6/11, 2019 at 7:53 Comment(0)
F
0

Like the OP stated a package was missing on the build host. ( makeinfo in his case) To properly prepare the build host, look into the documentation for your yocto version and your Distro.

latest

Fez answered 7/11, 2019 at 7:2 Comment(0)
C
0

In my case some playing with devtool caused a duplicated definition in bblayers.conf:

BBLAYERS ?= " \
  ${TOPDIR}/../meta \
  ${TOPDIR}/../meta-poky \
  ${TOPDIR}/../meta-yocto-bsp \
  ${TOPDIR}/../meta-atmel \
  ${TOPDIR}/../meta-libgpiod \
  ${TOPDIR}/../meta-libuio \
  ${TOPDIR}/../meta-lsuio \
  ${TOPDIR}/workspace \
  /home/me/yocto/poky/build/workspace \
  "

I had to manually remove one of the two last lines as follows:

BBLAYERS ?= " \
  ${TOPDIR}/../meta \
  ${TOPDIR}/../meta-poky \
  ${TOPDIR}/../meta-yocto-bsp \
  ${TOPDIR}/../meta-atmel \
  ${TOPDIR}/../meta-libgpiod \
  ${TOPDIR}/../meta-libuio \
  ${TOPDIR}/../meta-lsuio \
  ${TOPDIR}/workspace  
  "

Then I retried and the issue was resolved.

Conti answered 3/10, 2021 at 13:55 Comment(0)
B
0

In my case (PLNX 2018.2) I was not getting this problem because of the .Xil folder that was hidden in the root directory of the project, deleting it solves the problem.

Bugger answered 15/10, 2021 at 9:44 Comment(0)
K
0

I had a similar issue; with an additional Unicode Decode Error: 'ascii' codec can't decode byte 0xe2 in position 5305: ordinal not in range(128) at the bottom of the list. I resolved this by checking my 'locale' setting in Ubuntu 18.04. and running the following:

export LC_ALL="en_US.UTF-8"
export LANG="en_US.UTF-8"
export LANGUAGE="en_US.UTF-8"

bitbake-layers command worked perfectly after this.

Kanchenjunga answered 21/6, 2022 at 13:50 Comment(0)
A
-1

Please shutdown and rerun that bitbake command then it will solve.

Abc answered 11/9, 2019 at 5:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.