如何解决错误"do_package: ... not shipped in any package"?
How to solve the error "do_package: ... not shipped in any package"?
在工作中,我在使用 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"
当您为 nativesdk 或 native(或 multilib)构建时,${PN}
已经包含 nativesdk-
前缀(或 -native
后缀)。
实际上,您所做的是设置 FILES_nativesdk-nativesdk-<pkgname>
,显然,这与正在创建的任何包都不匹配。
您可以使用 FILES_nativesdk-<pkgname>
或者您也可以使用 FILES_${PN}_class-nativesdk
,它将 FILES_${PN}
设置为仅在为 nativesdk 构建时传递给它的内容。
在工作中,我在使用 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"
当您为 nativesdk 或 native(或 multilib)构建时,${PN}
已经包含 nativesdk-
前缀(或 -native
后缀)。
实际上,您所做的是设置 FILES_nativesdk-nativesdk-<pkgname>
,显然,这与正在创建的任何包都不匹配。
您可以使用 FILES_nativesdk-<pkgname>
或者您也可以使用 FILES_${PN}_class-nativesdk
,它将 FILES_${PN}
设置为仅在为 nativesdk 构建时传递给它的内容。