简体   繁体   English

无法启动 bitbake 服务器

[英]Unable to start bitbake server

I am trying to learn yocto by following the video tutorials on their main website.我正在尝试按照他们主要网站上的视频教程来学习 yocto。 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:我安装了 poky-rocko-18.0.0 并在设置构建环境后尝试使用以下命令构建 linux 图像:

bitbake core-image-minimal

However, I am getting the following error:但是,我收到以下错误:

bitbake 错误

I am unsure how to start the bitbake server and so far have not found any good references for the same.我不确定如何启动 bitbake 服务器,到目前为止还没有找到任何好的参考资料。

We also faced same issue with our bitbake server.我们的 bitbake 服务器也面临同样的问题。 It will worked after remove bitbacke.lock file.删除 bitbacke.lock 文件后它将起作用。 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% 

My problem was some missing packages on my build system.我的问题是我的构建系统上缺少一些包。

Fixed it by installing the following packages (Debian):通过安装以下软件包(Debian)修复它:

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

On my Arch system:在我的 Arch 系统上:

sudo pacman -S rpcsvc-proto chrpath texinfo cpio diffstat

Just try this in your build folder: rm -rf bitbake.lock this shoud work只需在您的构建文件夹中尝试此操作: rm -rf bitbake.lock 这应该可以工作

The reason for this is the state of the bitbake is locked during last bitbake execution.这样做的原因是在上次执行 bitbake 期间锁定了 bitbake 的状态。 Once you stop intermittently, we need to remove the bitbake.lock一旦你间歇性地停止,我们需要删除bitbake.lock

In my case it was solved with this answer from https://stackoverflow.com/a/45880855/5350353 ( Unable to connect to bitbake server ):在我的情况下,它已通过https://stackoverflow.com/a/45880855/5350353无法连接到 bitbake 服务器)的答案解决:

This is because new function findTopdir (Submitted on July 18, 2017) does not handle errors.这是因为新函数 findTopdir(2017 年 7 月 18 日提交)不处理错误。 For example, the lack of BBPATH environment variable and the inability to find conf/bblayers.conf in BBPATH.比如缺少BBPATH环境变量,无法在BBPATH中找到conf/bblayers.conf。 findTopdir just returns None in case of that errors. findTopdir 只是在出现错误时返回 None 。

Maybe caused by the absence of host application(s), like gawk, chrpath and texinfo.可能是因为缺少主机应用程序,例如 gawk、chrpath 和 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

请关闭并重新运行该 bitbake 命令,然后它将解决。

First, change local.conf , bblayers.conf to previous configuration.首先,将local.confbblayers.conf更改为之前的配置。

Then, bitbake -c cleanall recipe_name .然后, bitbake -c cleanall recipe_name

It will be all right now!马上就好了!

Like the OP stated a package was missing on the build host.就像 OP 所说的那样,构建主机上缺少一个包。 ( makeinfo in his case) To properly prepare the build host, look into the documentation for your yocto version and your Distro. (在他的例子中是 makeinfo)要正确准备构建主机,请查看您的 yocto 版本和发行版的文档。

latest 最新的

In my case some playing with devtool caused a duplicated definition in bblayers.conf:在我的情况下,一些使用 devtool 导致 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.然后我重试,问题解决了。

在我的情况下(PLNX 2018.2)我没有遇到这个问题,因为隐藏在项目根目录中的.Xil文件夹,删除它可以解决问题。

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.附加Unicode Decode Error: 'ascii' codec can't decode byte 0xe2 in position 5305: ordinal not in range(128)中。 I resolved this by checking my 'locale' setting in Ubuntu 18.04.我通过检查 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. bitbake-layers 命令在此之后完美运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM