19

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.

TheMisir
  • 4,083
  • 1
  • 27
  • 37
chandana
  • 201
  • 1
  • 2
  • 6
  • Did you install all needed [packages](http://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#packages) and is your host distro [compatible](http://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#detailed-supported-distros)? – Nayfe Jan 07 '18 at 08:23
  • I was able to fix the problem by installing makeinfo tool. – chandana Jan 08 '18 at 03:52
  • 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. – Khem May 06 '19 at 20:19

11 Answers11

19

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% 
desertnaut
  • 57,590
  • 26
  • 140
  • 166
Sunil Kumar
  • 191
  • 1
  • 2
10

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
Manuel Schmitzberger
  • 5,162
  • 3
  • 36
  • 45
3

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

  • 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 better – David Thompson Jul 08 '20 at 21:23
0

In my case it was solved with this answer from https://stackoverflow.com/a/45880855/5350353 (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.

o_ndra
  • 87
  • 7
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
Zephyr
  • 6,123
  • 34
  • 33
0

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

Then, bitbake -c cleanall recipe_name.

It will be all right now!

Aksen P
  • 4,564
  • 3
  • 14
  • 27
steelpalm
  • 1
  • 3
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

Florian Berndl
  • 1,136
  • 8
  • 27
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.

Yeho S.
  • 11
  • 1
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.

afinfante
  • 61
  • 1
  • 7
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.

Chip Brommer
  • 103
  • 9
-1

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