aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/protobuf
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@gmail.com>2023-09-27 05:11:01 +0000
committerKhem Raj <raj.khem@gmail.com>2023-09-27 12:05:45 -0700
commita0557fe5433620717eeb00d3b16801711337b1a4 (patch)
tree729ef4f24ccfee576f80f56f25aec391d539f11e /meta-oe/recipes-devtools/protobuf
parent02914b8b645700a3255b724ef4f60d46b314bd19 (diff)
downloadmeta-openembedded-contrib-a0557fe5433620717eeb00d3b16801711337b1a4.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>
Diffstat (limited to 'meta-oe/recipes-devtools/protobuf')
-rw-r--r--meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb b/meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb
index d95e1c20f3..06b21a0d6c 100644
--- a/meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb
+++ b/meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb
@@ -92,6 +92,9 @@ PACKAGE_BEFORE_PN = "${PN}-compiler ${PN}-lite"
FILES:${PN}-compiler = "${bindir} ${libdir}/libprotoc${SOLIBS}"
FILES:${PN}-lite = "${libdir}/libprotobuf-lite${SOLIBS}"
+# CMake requires binaries to exist in sysroot, even if they have wrong architecture.
+SYSROOT_DIRS += "${bindir}"
+
RDEPENDS:${PN}-compiler = "${PN}"
RDEPENDS:${PN}-dev += "${PN}-compiler"
RDEPENDS:${PN}-ptest = "bash ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-protobuf', '', d)}"