无法启动bitbake服务器

19

我正尝试通过在yocto的主网站上跟随视频教程来学习它。我安装了poky-rocko-18.0.0,在设置构建环境后,我尝试使用以下命令构建Linux镜像:

bitbake core-image-minimal

但是,我遇到了以下错误:

bitbake error

我不确定如何启动bitbake服务器,到目前为止还没有找到任何好的参考资料。


你是否安装了所有必要的软件包,并且你的主机发行版是兼容的 - Nayfe
我通过安装makeinfo工具成功解决了这个问题。 - chandana
当出现这种错误时,始终查看构建目录顶部的 bitbake-cookerdaemon.log,它会给您一两个线索,帮助您确定问题所在。 - Khem
11个回答

19
我们的bitbake服务器也遇到了同样的问题。在移除bitbake.lock文件后,它将会正常工作。使用以下命令进行解决。
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% 

11

我的问题是构建系统中缺少一些包。

通过安装以下软件包(Debian)来解决它:

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

在我的Arch系统上:

sudo pacman -S rpcsvc-proto chrpath texinfo cpio diffstat

3

只需在您的构建文件夹中尝试以下操作: rm -rf bitbake.lock 这应该有效

原因是在上次bitbake执行期间,bitbake的状态被锁定。一旦您不时地停止,我们需要删除bitbake.lock。


欢迎来到 Stack Overflow!为了提高您的回答质量,在这种场景下通过使用 rm -rf 文件删除 bitbake.lock 的简短解释,将帮助原始帖子作者更好地理解问题。 - David Thompson

0
我曾经遇到过类似的问题;在列表底部还出现了一个额外的Unicode Decode Error: 'ascii' codec can't decode byte 0xe2 in position 5305: ordinal not in range(128)。 我通过检查我的Ubuntu 18.04中的“locale”设置并运行以下命令来解决这个问题:
export LC_ALL="en_US.UTF-8"
export LANG="en_US.UTF-8"
export LANGUAGE="en_US.UTF-8"

在此之后,bitbake-layers 命令完美运行。


0
在我的情况下,使用开发工具进行一些操作导致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 \
  "

我不得不手动删除其中一行,具体操作如下:
BBLAYERS ?= " \
  ${TOPDIR}/../meta \
  ${TOPDIR}/../meta-poky \
  ${TOPDIR}/../meta-yocto-bsp \
  ${TOPDIR}/../meta-atmel \
  ${TOPDIR}/../meta-libgpiod \
  ${TOPDIR}/../meta-libuio \
  ${TOPDIR}/../meta-lsuio \
  ${TOPDIR}/workspace  
  "

然后我重试了一下,问题得到了解决。


0

可能是由于缺少主机应用程序,例如gawk、chrpath和texinfo等引起的。 以下是一个例子。

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

0

首先,将local.confbblayers.conf更改为之前的配置。

然后,运行bitbake -c cleanall recipe_name

现在就没问题了!


0

正如楼主所述,构建主机上缺少一个软件包(在他的情况下是makeinfo)。 为了正确准备构建主机,请查阅您的Yocto版本和发行版的文档。

latest


0

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

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接