我在使用yocto构建图像时出错(眩晕):

ERROR: Creation of tar /mnt/workspace/build/tmp/deploy/tar/xev-dbg-1.2.1-r0.tar.gz failed.

bitbake命令失败,并显示以下报告:
No currently running tasks (6291 of 6292)
NOTE: Tasks Summary: Attempted 6292 tasks of which 18 didn't need to be rerun and all succeeded.
Summary: There were 13 WARNING messages shown.
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.

如果我检查文件xev-dbg-1.2.1-r0.tar.gz,就会得到:
$ file  /mnt/workspace/build/tmp/deploy/tar/xev-dbg-1.2.1-r0.tar.gz
/mnt/workspace/build/tmp/deploy/tar/xev-dbg-1.2.1-r0.tar.gz: gzip compressed data, from Unix, last modified: Mon Mar 27 20:19:55 201

剩下的两个错误也是这样。
我很困惑:
如果出现错误,为什么要报告所有任务都成功了?
如果文件已成功创建,为什么bitbake退出具有非零值?

最佳答案

Bitbake没有返回0退出代码。这意味着在bitbake过程中存在错误。
尝试创建tar文件时出现3个错误,如图所示。
压缩文件已存在,但尚未完成。就像你如何下载一个文件并中断它,而下载文件仍然在那里一样。所以我们通常使用md5sum或某种散列数来检查文件的完整性。
更好的理解可能是:bitbake试图运行6292任务。其中18个不需要重新运行。Bitbake尝试重新运行其余的6274(6292-18),并成功地重新运行它们。这并不意味着所有的代码都被成功编译。在重新运行它们的过程中,出现了13个警告和3个错误。由于3个错误,BITBAKE以非零退出代码返回。

No currently running tasks (6291 of 6292)
NOTE: Tasks Summary: Attempted 6292 tasks of which 18 didn't need to be rerun and all succeeded.
Summary: There were 13 WARNING messages shown.
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.

关于linux - Yocto:Bitbake退出代码困惑,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/43063159/

10-10 02:49