diff options
| author | Samuli Piippo <samuli.piippo@gmail.com> | 2023-11-13 08:42:45 +0000 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2023-11-13 10:49:42 -0800 |
| commit | b1deec0de476d8f0a0c6427919f57ee5f681ea0e (patch) | |
| tree | 281154ce87bf485df1ab32d190fd4ab10350e52d | |
| parent | 9c348408adeefa07ad32e4e4c03424b7fff120b7 (diff) | |
| download | meta-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.bb | 3 |
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" | |||
| 101 | FILES:${PN}-compiler = "${bindir} ${libdir}/libprotoc${SOLIBS}" | 101 | FILES:${PN}-compiler = "${bindir} ${libdir}/libprotoc${SOLIBS}" |
| 102 | FILES:${PN}-lite = "${libdir}/libprotobuf-lite${SOLIBS}" | 102 | FILES:${PN}-lite = "${libdir}/libprotobuf-lite${SOLIBS}" |
| 103 | 103 | ||
| 104 | # CMake requires protoc binary to exist in sysroot, even if it has wrong architecture. | ||
| 105 | SYSROOT_DIRS += "${bindir}" | ||
| 106 | |||
| 104 | RDEPENDS:${PN}-compiler = "${PN}" | 107 | RDEPENDS:${PN}-compiler = "${PN}" |
| 105 | RDEPENDS:${PN}-dev += "${PN}-compiler" | 108 | RDEPENDS:${PN}-dev += "${PN}-compiler" |
| 106 | RDEPENDS:${PN}-ptest = "bash ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-protobuf', '', d)}" | 109 | RDEPENDS:${PN}-ptest = "bash ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-protobuf', '', d)}" |
