diff mbox series

Revert "protobuf: stage protoc binary to sysroot"

Message ID 20230904161230.377450-1-ross.burton@arm.com
State Under Review
Headers show
Series Revert "protobuf: stage protoc binary to sysroot" | expand

Commit Message

Ross Burton Sept. 4, 2023, 4:12 p.m. UTC
From: Ross Burton <ross.burton@arm.com>

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 reverts commit d7f46fa816964e30edb2ccfecc57a26251cc351c.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb | 2 --
 1 file changed, 2 deletions(-)

Comments

Samuli Piippo Sept. 11, 2023, 9:50 a.m. UTC | #1
Hi Ross,

The binaries are surely not useful for execution, but unfortunately they
are needed for CMake.
With this revert, Qt is now again experiencing build failures with protobuf:

| CMake Error at
/home/qt/qt6/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-qtgrpc/6.7.0/recipe-sysroot/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/lib/cmake/protobuf/protobuf-targets.cmake:100
(message):

|   The imported target "protobuf::protoc" references the file

|

|
     "/home/qt/qt6/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-qtgrpc/6.7.0/recipe-sysroot/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/bin/protoc-3.21.12.0"

|

|   but this file does not exist.  Possible reasons include:



and in mingw builds:

| CMake Error at
/home/qt/work/build/build/tmp/work/x86_64-nativesdk-mingw32-w64-mingw32/nativesdk-qtgrpc/6.5.3/recipe-sysroot/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-w64-mingw32/usr/lib/cmake/protobuf/protobuf-targets.cmake:100
(message):
|   The imported target "protobuf::libprotobuf-lite" references the file
|
|      "/home/qt/work/build/build/tmp/work/x86_64-nativesdk-mingw32-w64-mingw32/nativesdk-qtgrpc/6.5.3/recipe-sysroot/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-w64-mingw32/usr/bin/libprotobuf-lite.dll"
|
|   but this file does not exist.  Possible reasons include:



On Mon, 4 Sept 2023 at 19:12, Ross Burton <ross.burton@arm.com> wrote:

> From: Ross Burton <ross.burton@arm.com>
>
> 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 reverts commit d7f46fa816964e30edb2ccfecc57a26251cc351c.
>
> Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---
>  meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb | 2 --
>  1 file changed, 2 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 343933033b..d95e1c20f3 100644
> --- a/meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb
> +++ b/meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb
> @@ -92,8 +92,6 @@ PACKAGE_BEFORE_PN = "${PN}-compiler ${PN}-lite"
>  FILES:${PN}-compiler = "${bindir} ${libdir}/libprotoc${SOLIBS}"
>  FILES:${PN}-lite = "${libdir}/libprotobuf-lite${SOLIBS}"
>
> -SYSROOT_DIRS += "${bindir}"
> -
>  RDEPENDS:${PN}-compiler = "${PN}"
>  RDEPENDS:${PN}-dev += "${PN}-compiler"
>  RDEPENDS:${PN}-ptest = "bash ${@bb.utils.contains('PACKAGECONFIG',
> 'python', 'python3-protobuf', '', d)}"
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#104716):
> https://lists.openembedded.org/g/openembedded-devel/message/104716
> Mute This Topic: https://lists.openembedded.org/mt/101151552/3617605
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [
> samuli.piippo@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
diff mbox series

Patch

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 343933033b..d95e1c20f3 100644
--- a/meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb
+++ b/meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb
@@ -92,8 +92,6 @@  PACKAGE_BEFORE_PN = "${PN}-compiler ${PN}-lite"
 FILES:${PN}-compiler = "${bindir} ${libdir}/libprotoc${SOLIBS}"
 FILES:${PN}-lite = "${libdir}/libprotobuf-lite${SOLIBS}"
 
-SYSROOT_DIRS += "${bindir}"
-
 RDEPENDS:${PN}-compiler = "${PN}"
 RDEPENDS:${PN}-dev += "${PN}-compiler"
 RDEPENDS:${PN}-ptest = "bash ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-protobuf', '', d)}"