使用 bitbake 构建时,Yocto do_package_write_rpm 失败,退出代码为“1”

问题描述 投票:0回答:1

我正在尝试在 Yocto 上学习和构建一个系统,但经过长时间尝试调试其他问题后(我相信)我最终陷入了这个错误。我猜这是关于包装的,但我找不到任何有关如何解决这种情况的信息。

Loading cache: 100% |####################################################################################| Time: 0:00:00
Loaded 1642 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "2.0.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "x86_64-poky-linux"
MACHINE              = "qemux86-64"
DISTRO               = "poky"
DISTRO_VERSION       = "4.0.5"
TUNE_FEATURES        = "m64 core2"
TARGET_FPU           = ""
meta                 
meta-poky            
meta-yocto-bsp       = "heads/kirkstone-4.0.5:2e79b199114b25d81bfaa029ccfb17676946d20d"

Initialising tasks: 100% |###############################################################################| Time: 0:00:00
Sstate summary: Wanted 1 Local 0 Mirrors 0 Missed 1 Current 162 (0% match, 99% complete)
NOTE: Executing Tasks
ERROR: ninvaders-0.1.1-r0 do_package_write_rpm: ExecutionError('/home/user/yocto-labs/poky/build/tmp/work/core2-64-poky-linux/ninvaders/0.1.1-r0/temp/run.BUILDSPEC.1399817', 1, None, None)
ERROR: Logfile of failure stored in: /home/user/yocto-labs/poky/build/tmp/work/core2-64-poky-linux/ninvaders/0.1.1-r0/temp/log.do_package_write_rpm.1399817
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are ['virtual:native:/home/user/yocto-labs/poky/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot', 'virtual:native:/home/user/yocto-labs/poky/meta/recipes-devtools/rpm/rpm_4.17.1.bb:do_populate_sysroot']
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: ['pseudo-native', 'rpm-native', 'libtool-native', 'gettext-minimal-native', 'sqlite3-native', 'bzip2-native', 'elfutils-native', 'file-native', 'popt-native', 'python3-native', 'lua-native', 'libgcrypt-native', 'zstd-native', 'xz-native', 'texinfo-dummy-native', 'zlib-native', 'libmicrohttpd-native', 'curl-native', 'libarchive-native', 'util-linux-libuuid-native', 'libtirpc-native', 'openssl-native', 'readline-native', 'libffi-native', 'gdbm-native', 'libnsl2-native', 'ncurses-native', 'libgpg-error-native', 'libcap-native', 'gnutls-native', 'lzo-native', 'perl-native', 'libunistring-native', 'gmp-native', 'nettle-native', 'libidn2-native', 'make-native']
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing python function sstate_task_prefunc
| DEBUG: Python function sstate_task_prefunc finished
| DEBUG: Executing python function do_package_write_rpm
| DEBUG: Executing python function read_subpackage_metadata
| DEBUG: Python function read_subpackage_metadata finished
| DEBUG: Executing python function do_package_rpm
| DEBUG: Executing python function write_specfile
| NOTE: Creating RPM package for ninvaders-src
| NOTE: libc6-dbg rprovides glibc-dbg, not replacing the latter
| NOTE: Creating RPM package for ninvaders-dbg
| NOTE: Not creating empty RPM package for ninvaders-staticdev
| NOTE: libc6-dev rprovides glibc-dev, not replacing the latter
| NOTE: Creating empty RPM package for ninvaders-dev
| NOTE: Not creating empty RPM package for ninvaders-doc
| NOTE: Not creating empty RPM package for ninvaders-locale
| NOTE: package name mapping done: glibc -> libc6
| NOTE: package name mapping done: ncurses-libncurses -> libncurses5
| NOTE: package name mapping done: ncurses-libtinfo -> libtinfo5
| NOTE: Creating RPM package for ninvaders
| DEBUG: Python function write_specfile finished
| DEBUG: PKGWRITEDIR: /home/user/yocto-labs/poky/build/tmp/work/core2-64-poky-linux/ninvaders/0.1.1-r0/deploy-rpms/core2_64
| DEBUG: Executing shell function BUILDSPEC
| error: line 5: Empty tag: License:
| Building target platforms: core2_64-poky-linux
| Building for target core2_64-poky-linux
| WARNING: /home/user/yocto-labs/poky/build/tmp/work/core2-64-poky-linux/ninvaders/0.1.1-r0/temp/run.BUILDSPEC.1399817:146 exit 1 from 'rpmbuild --noclean --nodeps --short-circuit --target core2_64-poky-linux --buildroot /home/user/yocto-labs/poky/build/tmp/work/core2-64-poky-linux/ninvaders/0.1.1-r0/package --define '_topdir /home/user/yocto-labs/poky/build/tmp/work/core2-64-poky-linux/ninvaders/0.1.1-r0' --define '_rpmdir /home/user/yocto-labs/poky/build/tmp/work/core2-64-poky-linux/ninvaders/0.1.1-r0/deploy-rpms/core2_64' --define '_builddir /home/user/yocto-labs/poky/build/tmp/work/core2-64-poky-linux/ninvaders/0.1.1-r0/ninvaders-0.1.1' --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' --define '_use_internal_dependency_generator 0' --define '_binaries_in_noarch_packages_terminate_build 0' --define '_build_id_links none' --define '_binary_payload w19T12.zstdio' --define '_source_payload w19T12.zstdio' --define 'clamp_mtime_to_source_date_epoch 1' --define 'use_source_date_epoch_as_buildtime 1' --define '_buildhost reproducible' --define '__font_provides %{nil}' --define '__find_requires %{nil}' --define '__find_provides %{nil}' --define '_unpackaged_files_terminate_build 0' --define 'debug_package %{nil}' --define '_tmppath /home/user/yocto-labs/poky/build/tmp/work/core2-64-poky-linux/ninvaders/0.1.1-r0' -bb /home/user/yocto-labs/poky/build/tmp/work/core2-64-poky-linux/ninvaders/0.1.1-r0/ninvaders.spec'
| WARNING: Backtrace (BB generated script):
|   #1: BUILDSPEC, /home/user/yocto-labs/poky/build/tmp/work/core2-64-poky-linux/ninvaders/0.1.1-r0/temp/run.BUILDSPEC.1399817, line 146
|   #2: main, /home/user/yocto-labs/poky/build/tmp/work/core2-64-poky-linux/ninvaders/0.1.1-r0/temp/run.BUILDSPEC.1399817, line 150
| DEBUG: Python function do_package_rpm finished
| DEBUG: Python function do_package_write_rpm finished
ERROR: Task (/home/user/yocto-labs/poky/meta/recipes-extended/ninvaders/ninvaders_0.1.1.bb:do_package_write_rpm) failed with exit code '1'
NOTE: Tasks Summary: Attempted 667 tasks of which 666 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/user/yocto-labs/poky/meta/recipes-extended/ninvaders/ninvaders_0.1.1.bb:do_package_write_rpm
Summary: There was 1 ERROR message, returning a non-zero exit code.

我阅读了为 yocto 准备操作系统的文档,我相信已经安装了所需的工具。你能帮我一下吗?

embedded-linux yocto bitbake yocto-recipe
1个回答
0
投票

错误消息指出,

error: line 5: Empty tag: License:

请阅读:https://docs.yoctoproject.org/next/singleindex.html#term-LICENSE

简而言之,您必须为您的配方中的许可证文件提供许可证和相应的校验和。请检查您的软件包是否有正确的许可证。

例如:

LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=dfc67e5b1fa10ebb4b70eb0c0ca67bea"
© www.soinside.com 2019 - 2024. All rights reserved.