【问题标题】:How to solve the error "do_package: ... not shipped in any package"?如何解决错误“do_package: ... not shipping in any package”?
【发布时间】:2021-04-23 16:56:38
【问题描述】:

在工作中,我在使用 krogoth 分支构建面向 x86 架构的内部机器的 SDK 构建过程中遇到了一个错误,以下描述对其进行了总结:

ERROR: nativesdk-flatbuffers-1.12.0-r0 do_package: QA Issue: nativesdk-flatbuffers: Files/directories were installed but not shipped in any package:
  /opt/art/3.0.52.2/sysroots/x86_64-artsdk-linux/usr/lib/cmake
  /opt/art/3.0.52.2/sysroots/x86_64-artsdk-linux/usr/lib/cmake/flatbuffers
  /opt/art/3.0.52.2/sysroots/x86_64-artsdk-linux/usr/lib/cmake/flatbuffers/FlatbuffersTargets.cmake
  /opt/art/3.0.52.2/sysroots/x86_64-artsdk-linux/usr/lib/cmake/flatbuffers/FlatbuffersSharedTargets.cmake
  /opt/art/3.0.52.2/sysroots/x86_64-artsdk-linux/usr/lib/cmake/flatbuffers/FlatbuffersConfig.cmake
  /opt/art/3.0.52.2/sysroots/x86_64-artsdk-linux/usr/lib/cmake/flatbuffers/FlatbuffersTargets-release.cmake
  /opt/art/3.0.52.2/sysroots/x86_64-artsdk-linux/usr/lib/cmake/flatbuffers/FlatbuffersConfigVersion.cmake
  /opt/art/3.0.52.2/sysroots/x86_64-artsdk-linux/usr/lib/cmake/flatbuffers/FlatcTargets-release.cmake
  /opt/art/3.0.52.2/sysroots/x86_64-artsdk-linux/usr/lib/cmake/flatbuffers/FlatcTargets.cmake
  /opt/art/3.0.52.2/sysroots/x86_64-artsdk-linux/usr/lib/cmake/flatbuffers/FlatbuffersSharedTargets-release.cmake
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
nativesdk-flatbuffers: 10 installed and not shipped files. [installed-vs-shipped]
ERROR: nativesdk-flatbuffers-1.12.0-r0 do_package: Fatal QA errors found, failing task.
ERROR: nativesdk-flatbuffers-1.12.0-r0 do_package: Function failed: do_package
ERROR: Logfile of failure stored in: /data/opt/art-shell/users/andre.machoski/krogoth/build/hmi-x86/tmp/work/x86_64-nativesdk-artsdk-linux/nativesdk-flatbuffers/1.12.0-r0/temp/log.do_package.2296
ERROR: Task 2782 (virtual:nativesdk:/data/opt/art-shell/users/andre.machoski/krogoth/poky/meta-art-apps/recipes-3rd/flatbuffers/flatbuffers_1.12.0.bb, do_package) failed with exit code '1'
ERROR: hmiapp-belgrano-1.0-r0 do_compile: oe_runmake failed
ERROR: hmiapp-belgrano-1.0-r0 do_compile: Function failed: do_compile (log file is located at /data/opt/art-shell/users/andre.machoski/krogoth/build/hmi-x86/tmp/work/core2-32-art-linux/hmiapp-belgrano/1.0-r0/temp/log.do_compile.2255)
ERROR: Logfile of failure stored in: /data/opt/art-shell/users/andre.machoski/krogoth/build/hmi-x86/tmp/work/core2-32-art-linux/hmiapp-belgrano/1.0-r0/temp/log.do_compile.2255

我向一位同事寻求帮助,他指示我在食谱中填写以下内容:

FILES_nativesdk-${PN} = " ${libdir}/cmake \
                        ${libdir}/cmake/flatbuffers \
                        ${libdir}/cmake/flatbuffers/FlatbuffersTargets.cmake \
                        ${libdir}/cmake/flatbuffers/FlatbuffersSharedTargets.cmake \
                        ${libdir}/cmake/flatbuffers/FlatbuffersConfig.cmake \
                        ${libdir}/cmake/flatbuffers/FlatbuffersTargets-release.cmake \
                        ${libdir}/cmake/flatbuffers/FlatbuffersConfigVersion.cmake \
                        ${libdir}/cmake/flatbuffers/FlatcTargets-release.cmake \
                        ${libdir}/cmake/flatbuffers/FlatcTargets.cmake \
                        ${libdir}/cmake/flatbuffers/FlatbuffersSharedTargets-release.cmake"

但它没有用。我该如何解决这个问题?

以下是完整的配方(flatbuffers_1.12.0.bb):

SUMMARY = "Memory Efficient Serialization Library"
HOMEPAGE = "https://github.com/google/flatbuffers"
SECTION = "console/tools"
LICENSE = "Apache-2.0"

PACKAGE_BEFORE_PN = "${PN}-compiler"

RDEPENDS_${PN}-compiler = "${PN}"
RDEPENDS_${PN}-dev += "${PN}-compiler"

LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"

SRCREV = "6df40a2471737b27271bdd9b900ab5f3aec746c7"

SRC_URI = "git://github.com/google/flatbuffers.git"

# Make sure C++11 is used, required for example for GCC 4.9
CXXFLAGS += "-std=c++11 -fPIC"
BUILD_CXXFLAGS += "-std=gnu++11 -fPIC"

CXXFLAGS_append_class-nativesdk += "-std=c++11 -fPIC"

# BUILD_TYPE=Release is required, otherwise flatc is not installed
EXTRA_OECMAKE += "\
    -DCMAKE_BUILD_TYPE=Release \
    -DFLATBUFFERS_BUILD_TESTS=OFF \
    -DFLATBUFFERS_BUILD_SHAREDLIB=ON \
"

inherit cmake

S = "${WORKDIR}/git"

FILES_${PN}-compiler = "${bindir}"

BBCLASSEXTEND = "native nativesdk"

FILES_nativesdk-${PN} = " ${libdir}/cmake \
                        ${libdir}/cmake/flatbuffers \
                        ${libdir}/cmake/flatbuffers/FlatbuffersTargets.cmake \
                        ${libdir}/cmake/flatbuffers/FlatbuffersSharedTargets.cmake \
                        ${libdir}/cmake/flatbuffers/FlatbuffersConfig.cmake \
                        ${libdir}/cmake/flatbuffers/FlatbuffersTargets-release.cmake \
                        ${libdir}/cmake/flatbuffers/FlatbuffersConfigVersion.cmake \
                        ${libdir}/cmake/flatbuffers/FlatcTargets-release.cmake \
                        ${libdir}/cmake/flatbuffers/FlatcTargets.cmake \
                        ${libdir}/cmake/flatbuffers/FlatbuffersSharedTargets-release.cmake"

【问题讨论】:

    标签: linux build embedded yocto


    【解决方案1】:

    当您为 nativesdk 或 native(或 multilib)构建时,${PN} 已经包含 nativesdk- 前缀(或 -native 后缀)。

    实际上,您正在做的是设置FILES_nativesdk-nativesdk-<pkgname>,显然,这与正在创建的任何包都不匹配。

    您可以使用FILES_nativesdk-<pkgname>,也可以使用FILES_${PN}_class-nativesdk,这将设置FILES_${PN},仅在为nativesdk 构建时传递给它的内容。

    【讨论】:

    • 我做了指示的修改,但我仍然有同样的问题。
    • 您能否检查nativesdk-flatbuffers${WORKDIR}/image flatbuffers 目录在哪里,并提供相对于${WORKDIR}/image 的路径?
    • 对不起,我弄错了,你是对的,问题是“nativesdk-”
    猜你喜欢
    • 2022-01-02
    • 2020-05-14
    • 1970-01-01
    • 1970-01-01
    • 2022-09-22
    • 2016-05-23
    • 1970-01-01
    • 2019-06-26
    • 2012-04-14
    相关资源
    最近更新 更多