运行 bitbake 时出现异常

exception while running bitbake

使用 this guide 在 BitBake 中迈出我的第一步,设置工作正常,直到我 运行 bitbake world,我得到这个 -

    WARNING: python should use 4 spaces indentation, but found tabs in base.bbclass, line 41
....
    WARNING: python should use 4 spaces indentation, but found tabs in base.bbclass, line 64
    Parsing recipes: 100% |###########################################################################################################################################################################| Time: 0:00:00
    Parsing of 1 .bb files complete (0 cached, 1 parsed). 1 targets, 0 skipped, 0 masked, 0 errors.
    NOTE: Resolving any missing task queue dependencies
    ERROR: An uncaught exception occurred in runqueue###################################################                                                                                              | ETA:  0:00:00
    Traceback (most recent call last):
      File "/home/ubuntu/bitbake/lib/bb/runqueue.py", line 1508, in RunQueue.execute_runqueue():
                 try:
        >            return self._execute_runqueue()
                 except bb.runqueue.TaskFailure:
      File "/home/ubuntu/bitbake/lib/bb/runqueue.py", line 1428, in RunQueue._execute_runqueue():
                                                                     [43, 967, 4, 3, 1, 5, 3, 7, 13, 1, 2, 1, 1, 246, 35, 1, 38, 1, 35, 2, 338, 204, 142, 3, 3, 37, 244])
        >            if self.rqdata.prepare() == 0:
                         self.state = runQueueComplete
      File "/home/ubuntu/bitbake/lib/bb/runqueue.py", line 1164, in RunQueueData.prepare():
                             todeal.remove(tid)
        >                    self.prepare_task_hash(tid)

      File "/home/ubuntu/bitbake/lib/bb/runqueue.py", line 1177, in RunQueueData.prepare_task_hash(tid='/home/ubuntu/Poky/poky/meta-tutorial/recipes-tutorial/first/first_0.1.bb:do_build'):
                 self.runtaskentries[tid].hash = bb.parse.siggen.get_taskhash(taskfn, taskname, procdep, self.dataCaches[mc])
        >        self.runtaskentries[tid].unihash = bb.parse.siggen.get_unihash(taskfn + "." + taskname)

      File "/home/ubuntu/bitbake/lib/bb/siggen.py", line 45, in SignatureGenerator.get_unihash(task='/home/ubuntu/Poky/poky/meta-tutorial/recipes-tutorial/first/first_0.1.bb.do_build'):
             def get_unihash(self, task):
        >        return self.taskhash[task]

    KeyError: '/home/ubuntu/Poky/poky/meta-tutorial/recipes-tutorial/first/first_0.1.bb.do_build'


    Summary: There were 13 WARNING messages shown.
    Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

是的 - 我从 github:

中提取了最新的 BitBake
bitbake --version
BitBake Build Tool Core version 1.40.0

我的 python 代码有什么问题?

教程代码已损坏。 bitbake.conf 存储在

ch04/meta-tutorial/conf/bitbake.conf

但它属于

ch04/build/conf/bitbake.conf 

将文件移到那里即可工作

我打开了一个问题:https://bitbucket.org/a4z/bitbakeguide/issues/17/bitbakeconf-stored-in-the-wrong-place

我遇到了完全相同的问题,由于 bitbake 版本终于找到了。

如果您 git 从 https://github.com/openembedded/bitbake 克隆 bitbake,您可以签出早期版本:

git 结帐 tags/1.26.0 -b 1.26.0

那么问题就解决了

https://www.yoctoproject.org/docs/2.1/bitbake-user-manual/bitbake-user-manual.html#var-BB_SIGNATURE_HANDLER

似乎使用 BB_SIGNATURE_HANDLER noop(默认)

我通过在 meta-tutorial/conf/bitbake.conf

中添加 BB_SIGNATURE_HANDLER 定义来修复此错误
BB_SIGNATURE_HANDLER ?= "basichash"