summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@gmail.com>2023-11-13 08:42:45 +0000
committerKhem Raj <raj.khem@gmail.com>2023-11-13 10:49:42 -0800
commitb1deec0de476d8f0a0c6427919f57ee5f681ea0e (patch)
tree281154ce87bf485df1ab32d190fd4ab10350e52d
parent9c348408adeefa07ad32e4e4c03424b7fff120b7 (diff)
downloadmeta-openembedded-b1deec0de476d8f0a0c6427919f57ee5f681ea0e.tar.gz
protobuf: stage protoc binary to sysroot
If protoc is enabled for the build, recipes using protobuf will fail when protoc is not available in the recipe sysroot: | The imported target "protobuf::protoc" references the file | | ".../recipe-sysroot/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/bin/protoc-3.21.5.0" | | but this file does not exist. Possible reasons include: | | * The file was deleted, renamed, or moved to another location. | | * An install or uninstall procedure did not complete successfully. | | * The installation package was faulty and contained | | ".../recipe-sysroot/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/lib/cmake/protobuf/protobuf-targets.cmake" | | but not all the files it references. Use SYSROOT_DIRS to stage the binary to sysroot so it's always available for other recipes. Signed-off-by: Samuli Piippo <samuli.piippo@qt.io> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-devtools/protobuf/protobuf_4.23.4.bb3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_4.23.4.bb b/meta-oe/recipes-devtools/protobuf/protobuf_4.23.4.bb
index 1edc21cdfc..7d37ee3d29 100644
--- a/meta-oe/recipes-devtools/protobuf/protobuf_4.23.4.bb
+++ b/meta-oe/recipes-devtools/protobuf/protobuf_4.23.4.bb
@@ -101,6 +101,9 @@ PACKAGE_BEFORE_PN = "${PN}-compiler ${PN}-lite"
101FILES:${PN}-compiler = "${bindir} ${libdir}/libprotoc${SOLIBS}" 101FILES:${PN}-compiler = "${bindir} ${libdir}/libprotoc${SOLIBS}"
102FILES:${PN}-lite = "${libdir}/libprotobuf-lite${SOLIBS}" 102FILES:${PN}-lite = "${libdir}/libprotobuf-lite${SOLIBS}"
103 103
104# CMake requires protoc binary to exist in sysroot, even if it has wrong architecture.
105SYSROOT_DIRS += "${bindir}"
106
104RDEPENDS:${PN}-compiler = "${PN}" 107RDEPENDS:${PN}-compiler = "${PN}"
105RDEPENDS:${PN}-dev += "${PN}-compiler" 108RDEPENDS:${PN}-dev += "${PN}-compiler"
106RDEPENDS:${PN}-ptest = "bash ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-protobuf', '', d)}" 109RDEPENDS:${PN}-ptest = "bash ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-protobuf', '', d)}"