Skip to content

Commit

Permalink
Revert "protobuf: stage protoc binary to sysroot"
Browse files Browse the repository at this point in the history
This reverts commit a0557fe.

As said by Ross[Ø]:
"Putting the _target_ protoc into the sysroot for executation at _build_
time isn't useful because even if it has the right architecture, the
tune might be incompatible.  Recipes which want protoc should just depend
on protobuf-native."

This has been reverted recently by Samuli[1]:
"If protoc is enabled for the build, recipes using protobuf will
fail when protoc is not available in the recipe sysroot"

Be the revert is incorret as This is an issue coming from qtgrpc
other recipes that use protobuf or gRPC compiler, proplery looks for
the binary in the correct sysroot folder.

Qtgrpc recipe should fix this issue at the recipe level, for example this
is what I've done for "etcd-cpp-apiv3" recipe[2] that doesn't need this
patch to properly compile.

So keeping this hack doesn't seems to be a correct fix.

Note that qtgrpc recipe isn't available on meta-oe nor any other public
layers.

0: https://patchwork.yoctoproject.org/project/oe/patch/[email protected]/
1: https://patchwork.yoctoproject.org/project/oe/patch/[email protected]/
2: etcd-cpp-apiv3/etcd-cpp-apiv3@47f0d9e

CC: Samuli Piippo <[email protected]>
CC: Ross Burton <[email protected]>
Signed-off-by: Clément Péron <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
  • Loading branch information
clementperon authored and kraj committed Oct 3, 2023
1 parent 86db148 commit 2c8f06c
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions meta-oe/recipes-devtools/protobuf/protobuf_4.23.4.bb
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ 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)}"
Expand Down

0 comments on commit 2c8f06c

Please sign in to comment.