grpc: Upgrade 1.24.3 -> 1.35.0
PATCH 1/1 grpc: Upgrade 1.24.3 -> 1.35.0
This is a really huge jump in versions, but this package has been not upgraded for quite some time. The previous patches are not necessary anymore, they're integrated upstream.
---
...ix-grpc_cpp_plugin-path-during-cross.patch | 45 -----
...Fix-libraries-installation-for-Linux.patch | 177 ------------------
.../grpc/{grpc_1.24.3.bb => grpc_1.35.0.bb} | 15 +-
3 files changed, 5 insertions(+), 232 deletions(-)
delete mode 100644 meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch
delete mode 100644 meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch
rename meta-oe/recipes-devtools/grpc/{grpc_1.24.3.bb => grpc_1.35.0.bb} (80%)meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch deleted +0 -45
@@ -1,45 +0,0 @@ -From 6d606f1101c1a172fb6d738d6f1865aa61849e68 Mon Sep 17 00:00:00 2001 -From: Alexey Firago <[email protected]> -Date: Fri, 20 Oct 2017 00:04:19 +0300 -Subject: [PATCH] CMakeLists.txt: Fix grpc_cpp_plugin path during cross-compiling or native build - -Signed-off-by: Alexey Firago <[email protected]> -Signed-off-by: Hiram Lew <[email protected]> -Signed-off-by: Jan Kaisrlik <[email protected]> ---- - CMakeLists.txt | 9 ++++++++- - templates/CMakeLists.txt.template | 9 ++++++++- - 2 files changed, 16 insertions(+), 2 deletions(-) - ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -193,6 +193,13 @@ function(protobuf_generate_grpc_cpp) - return() - endif() - -+ #if cross-compiling or nativesdk, find host plugin -+ if(CMAKE_CROSSCOMPILING) -+ find_program(gRPC_CPP_PLUGIN grpc_cpp_plugin) -+ else() -+ set(gRPC_CPP_PLUGIN $<TARGET_FILE:grpc_cpp_plugin>) -+ endif() -+ - set(_protobuf_include_path -I . -I ${_gRPC_PROTOBUF_WELLKNOWN_INCLUDE_DIR}) - foreach(FIL ${ARGN}) - get_filename_component(ABS_FIL ${FIL} ABSOLUTE) ---- a/templates/CMakeLists.txt.template -+++ b/templates/CMakeLists.txt.template -@@ -233,6 +233,13 @@ - return() - endif() - -+ #if cross-compiling or nativesdk, find host plugin -+ if(CMAKE_CROSSCOMPILING) -+ find_program(gRPC_CPP_PLUGIN grpc_cpp_plugin) -+ else() -+ set(gRPC_CPP_PLUGIN $<TARGET_FILE:grpc_cpp_plugin>) -+ endif() -+ - set(_protobuf_include_path -I . -I <%text>${_gRPC_PROTOBUF_WELLKNOWN_INCLUDE_DIR}</%text>) - foreach(FIL <%text>${ARGN}</%text>) - get_filename_component(ABS_FIL <%text>${FIL}</%text> ABSOLUTE)
meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch deleted +0 -177
177 lines not on this page · raw message
meta-oe/recipes-devtools/grpc/grpc_1.35.0.bb renamed from meta-oe/recipes-devtools/grpc/grpc_1.24.3.bb +5 -10
@@ -6,22 +6,15 @@ SECTION = "libs" LICENSE = "Apache-2" LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" -DEPENDS = "gflags c-ares protobuf protobuf-native protobuf-c protobuf-c-native openssl libnsl2" +DEPENDS = "gflags c-ares protobuf protobuf-native protobuf-c protobuf-c-native openssl libnsl2 abseil-cpp re2" DEPENDS_append_class-target = " googletest grpc-native " DEPENDS_append_class-nativesdk = " grpc-native " S = "${WORKDIR}/git" -SRCREV_grpc = "2de2e8dd8921e1f7d043e01faf7fe8a291fbb072" -SRCREV_upb = "9effcbcb27f0a665f9f345030188c0b291e32482" -BRANCH = "v1.24.x" +SRCREV_grpc = "627a22541a1836ce00cdc40a3977aa8928de98bc" +BRANCH = "v1.35.x" SRC_URI = "git://github.com/grpc/grpc.git;protocol=https;name=grpc;branch=${BRANCH} \ - git://github.com/protocolbuffers/upb;name=upb;destsuffix=git/third_party/upb \ - file://0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch \ " -SRC_URI_append_class-target = " file://0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch \ - " -SRC_URI_append_class-nativesdk = " file://0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch" - # Fixes build with older compilers 4.8 especially on ubuntu 14.04 CXXFLAGS_append_class-native = " -Wl,--no-as-needed"
@@ -33,6 +26,8 @@ EXTRA_OECMAKE = " \ -DgRPC_SSL_PROVIDER=package \ -DgRPC_PROTOBUF_PROVIDER=package \ -DgRPC_GFLAGS_PROVIDER=package \ + -DgRPC_ABSL_PROVIDER=package \ + -DgRPC_RE2_PROVIDER=package \ -DgRPC_INSTALL=ON \ -DCMAKE_CROSSCOMPILING=ON \ -DBUILD_SHARED_LIBS=ON \
Signature · 1 line
2.17.1
Hi Anatol,
Quoted 4 lines · Anatol Belski
This is a really huge jump in versions, but this package has been not upgraded for quite some time. The previous patches are not necessary anymore, they're integrated upstream.
This version of gRPC generate a new CMake gRPCTargets.cmake recipe-sysroot/usr/lib/cmake/grpc/gRPCTargets.cmake
This generate an error in my build:
Because this CMake declare a
recipe-sysroot/usr/bin/grpc_cpp_plugin
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
In my project i'm using the CMake example from gRPC
https://github.com/grpc/grpc/blob/master/examples/cpp/cmake/common.cmake#L114
This error is triggered by:find_package(gRPC 1.35.0 CONFIG REQUIRED)
FYI My recipes depends on grpc and grpc-native PACKAGECONFIG[grpc] = "-DCONFIG_GRPC=ON,-DCONFIG_GRPC=OFF,grpc grpc-native"
Do you have an example of a gRPC recipe?
Thanks,
Clement
Quoted 293 lines
Signed-off-by Anatol Belski <[email protected]>--- ...ix-grpc_cpp_plugin-path-during-cross.patch | 45 ----- ...Fix-libraries-installation-for-Linux.patch | 177 ------------------ .../grpc/{grpc_1.24.3.bb => grpc_1.35.0.bb} | 15 +- 3 files changed, 5 insertions(+), 232 deletions(-) delete mode 100644 meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch delete mode 100644 meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch rename meta-oe/recipes-devtools/grpc/{grpc_1.24.3.bb => grpc_1.35.0.bb} (80%)meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch deleted +0
-45@@ -1,45 +0,0 @@ -From 6d606f1101c1a172fb6d738d6f1865aa61849e68 Mon Sep 17 00:00:00 2001 -From: Alexey Firago <[email protected]> -Date: Fri, 20 Oct 2017 00:04:19 +0300 -Subject: [PATCH] CMakeLists.txt: Fix grpc_cpp_plugin path during cross-compiling or native build - -Signed-off-by: Alexey Firago <[email protected]> -Signed-off-by: Hiram Lew <[email protected]> -Signed-off-by: Jan Kaisrlik <[email protected]> ---- - CMakeLists.txt | 9 ++++++++- - templates/CMakeLists.txt.template | 9 ++++++++- - 2 files changed, 16 insertions(+), 2 deletions(-) - ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -193,6 +193,13 @@ function(protobuf_generate_grpc_cpp) - return() - endif() - -+ #if cross-compiling or nativesdk, find host plugin -+ if(CMAKE_CROSSCOMPILING) -+ find_program(gRPC_CPP_PLUGIN grpc_cpp_plugin) -+ else() -+ set(gRPC_CPP_PLUGIN $<TARGET_FILE:grpc_cpp_plugin>) -+ endif() -+ - set(_protobuf_include_path -I . -I ${_gRPC_PROTOBUF_WELLKNOWN_INCLUDE_DIR}) - foreach(FIL ${ARGN}) - get_filename_component(ABS_FIL ${FIL} ABSOLUTE) ---- a/templates/CMakeLists.txt.template -+++ b/templates/CMakeLists.txt.template -@@ -233,6 +233,13 @@ - return() - endif() - -+ #if cross-compiling or nativesdk, find host plugin -+ if(CMAKE_CROSSCOMPILING) -+ find_program(gRPC_CPP_PLUGIN grpc_cpp_plugin) -+ else() -+ set(gRPC_CPP_PLUGIN $<TARGET_FILE:grpc_cpp_plugin>) -+ endif() -+ - set(_protobuf_include_path -I . -I <%text>${_gRPC_PROTOBUF_WELLKNOWN_INCLUDE_DIR}</%text>) - foreach(FIL <%text>${ARGN}</%text>) - get_filename_component(ABS_FIL <%text>${FIL}</%text> ABSOLUTE)meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch deleted +0
-177@@ -1,177 +0,0 @@ -From 2279e30be5796e9b185545543ea54fe68633cbdd Mon Sep 17 00:00:00 2001 -From: Alexey Firago <[email protected]> -Date: Mon, 30 Oct 2017 23:24:49 +0300 -Subject: [PATCH] CMakeLists.txt: Fix libraries installation for Linux - -* Set libs versions as in Makefile - -Signed-off-by: Alexey Firago <[email protected]> - ---- - CMakeLists.txt | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 59 insertions(+) - ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -30,6 +30,15 @@ set(PACKAGE_TARNAME "${PACKAGE_NAME}-$ - set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/") - project(${PACKAGE_NAME} C CXX) - -+set (CORE_VERSION_MAJOR "6") -+set (CORE_VERSION "6.0.0") -+ -+set (CPP_VERSION_MAJOR "1") -+set (CPP_VERSION "${PACKAGE_VERSION}") -+ -+set (CSHARP_VERSION_MAJOR "1") -+set (CSHARP_VERSION "${PACKAGE_VERSION}") -+ - set(gRPC_INSTALL_BINDIR "bin" CACHE STRING "Installation directory for executables") - set(gRPC_INSTALL_LIBDIR "lib" CACHE STRING "Installation directory for libraries") - set(gRPC_INSTALL_INCLUDEDIR "include" CACHE STRING "Installation directory for headers") -@@ -777,6 +786,10 @@ if(WIN32 AND MSVC) - endif() - endif() - -+if(_gRPC_PLATFORM_LINUX) -+ set_property(TARGET address_sorting PROPERTY VERSION ${CORE_VERSION}) -+ set_property(TARGET address_sorting PROPERTY SOVERSION ${CORE_VERSION_MAJOR}) -+endif() - - target_include_directories(address_sorting - PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> -@@ -903,6 +916,10 @@ if(WIN32 AND MSVC) - endif() - endif() - -+if(_gRPC_PLATFORM_LINUX) -+ set_property(TARGET gpr PROPERTY VERSION ${CORE_VERSION}) -+ set_property(TARGET gpr PROPERTY SOVERSION ${CORE_VERSION_MAJOR}) -+endif() - - target_include_directories(gpr - PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> -@@ -1367,6 +1384,10 @@ if(WIN32 AND MSVC) - endif() - endif() - -+if(_gRPC_PLATFORM_LINUX) -+ set_property(TARGET grpc PROPERTY VERSION ${CORE_VERSION}) -+ set_property(TARGET grpc PROPERTY SOVERSION ${CORE_VERSION_MAJOR}) -+endif() - - target_include_directories(grpc - PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> -@@ -1782,6 +1803,10 @@ if(WIN32 AND MSVC) - endif() - endif() - -+if(_gRPC_PLATFORM_LINUX) -+ set_property(TARGET grpc_cronet PROPERTY VERSION ${CORE_VERSION}) -+ set_property(TARGET grpc_cronet PROPERTY SOVERSION ${CORE_VERSION_MAJOR}) -+endif() - - target_include_directories(grpc_cronet - PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> -@@ -2869,6 +2894,10 @@ if(WIN32 AND MSVC) - endif() - endif() - -+if(_gRPC_PLATFORM_LINUX) -+ set_property(TARGET grpc_unsecure PROPERTY VERSION ${CORE_VERSION}) -+ set_property(TARGET grpc_unsecure PROPERTY SOVERSION ${CORE_VERSION_MAJOR}) -+endif() - - target_include_directories(grpc_unsecure - PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> -@@ -3206,6 +3235,10 @@ if(WIN32 AND MSVC) - endif() - endif() - -+if(_gRPC_PLATFORM_LINUX) -+ set_property(TARGET grpc++ PROPERTY VERSION ${CPP_VERSION}) -+ set_property(TARGET grpc++ PROPERTY SOVERSION ${CPP_VERSION_MAJOR}) -+endif() - - target_include_directories(grpc++ - PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> -@@ -3589,6 +3622,11 @@ protobuf_generate_grpc_cpp( - src/proto/grpc/status/status.proto - ) - -+if(_gRPC_PLATFORM_LINUX) -+ set_property(TARGET grpc++_error_details PROPERTY VERSION ${CPP_VERSION}) -+ set_property(TARGET grpc++_error_details PROPERTY SOVERSION ${CPP_VERSION_MAJOR}) -+endif() -+ - target_include_directories(grpc++_error_details - PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} -@@ -3727,6 +3765,11 @@ protobuf_generate_grpc_cpp( - src/proto/grpc/reflection/v1alpha/reflection.proto - ) - -+if(_gRPC_PLATFORM_LINUX) -+ set_property(TARGET grpc++_reflection PROPERTY VERSION ${CPP_VERSION}) -+ set_property(TARGET grpc++_reflection PROPERTY SOVERSION ${CPP_VERSION_MAJOR}) -+endif() -+ - target_include_directories(grpc++_reflection - PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} -@@ -3816,6 +3859,10 @@ target_link_libraries(grpc++_test_config - ${_gRPC_GFLAGS_LIBRARIES} - ) - -+if(_gRPC_PLATFORM_LINUX) -+ set_property(TARGET grpc++_cronet PROPERTY VERSION ${CPP_VERSION}) -+ set_property(TARGET grpc++_cronet PROPERTY SOVERSION ${CPP_VERSION_MAJOR}) -+endif() - - endif (gRPC_BUILD_TESTS) - if (gRPC_BUILD_TESTS) -@@ -4307,6 +4354,10 @@ if(WIN32 AND MSVC) - endif() - endif() - -+if(_gRPC_PLATFORM_LINUX) -+ set_property(TARGET grpc++_unsecure PROPERTY VERSION ${CPP_VERSION}) -+ set_property(TARGET grpc++_unsecure PROPERTY SOVERSION ${CPP_VERSION_MAJOR}) -+endif() - - target_include_directories(grpc++_unsecure - PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> -@@ -4745,6 +4796,10 @@ if(WIN32 AND MSVC) - endif() - endif() - -+if(_gRPC_PLATFORM_LINUX) -+ set_property(TARGET grpc_plugin_support PROPERTY VERSION ${CORE_VERSION}) -+ set_property(TARGET grpc_plugin_support PROPERTY SOVERSION ${CORE_VERSION_MAJOR}) -+endif() - - target_include_directories(grpc_plugin_support - PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> -@@ -4813,6 +4868,11 @@ protobuf_generate_grpc_cpp( - src/proto/grpc/channelz/channelz.proto - ) - -+if(_gRPC_PLATFORM_LINUX) -+ set_property(TARGET grpcpp_channelz PROPERTY VERSION ${CPP_VERSION}) -+ set_property(TARGET grpcpp_channelz PROPERTY SOVERSION ${CPP_VERSION_MAJOR}) -+endif() -+ - target_include_directories(grpcpp_channelz - PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} -@@ -5367,6 +5427,10 @@ if(WIN32 AND MSVC) - endif() - endif() - -+if(_gRPC_PLATFORM_LINUX) -+ set_property(TARGET grpc_csharp_ext PROPERTY VERSION ${CSHARP_VERSION}) -+ set_property(TARGET grpc_csharp_ext PROPERTY SOVERSION ${CSHARP_VERSION_MAJOR}) -+endif() - - target_include_directories(grpc_csharp_ext - PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>meta-oe/recipes-devtools/grpc/grpc_1.35.0.bb renamed from meta-oe/recipes-devtools/grpc/grpc_1.24.3.bb +5
-11@@ -6,22 +6,15 @@ SECTION = "libs" LICENSE = "Apache-2" LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" -DEPENDS = "gflags c-ares protobuf protobuf-native protobuf-c protobuf-c-native openssl libnsl2" +DEPENDS = "gflags c-ares protobuf protobuf-native protobuf-c protobuf-c-native openssl libnsl2 abseil-cpp re2" DEPENDS_append_class-target = " googletest grpc-native " DEPENDS_append_class-nativesdk = " grpc-native " S = "${WORKDIR}/git" -SRCREV_grpc = "2de2e8dd8921e1f7d043e01faf7fe8a291fbb072" -SRCREV_upb = "9effcbcb27f0a665f9f345030188c0b291e32482" -BRANCH = "v1.24.x" +SRCREV_grpc = "627a22541a1836ce00cdc40a3977aa8928de98bc" +BRANCH = "v1.35.x" SRC_URI = "git://github.com/grpc/grpc.git;protocol=https;name=grpc;branch=${BRANCH} \ - git://github.com/protocolbuffers/upb;name=upb;destsuffix=git/third_party/upb \ - file://0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch \ " -SRC_URI_append_class-target = " file://0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch \ - " -SRC_URI_append_class-nativesdk = " file://0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch" - # Fixes build with older compilers 4.8 especially on ubuntu 14.04 CXXFLAGS_append_class-native = " -Wl,--no-as-needed"@@ -33,6 +26,8 @@ EXTRA_OECMAKE = " \ -DgRPC_SSL_PROVIDER=package \ -DgRPC_PROTOBUF_PROVIDER=package \ -DgRPC_GFLAGS_PROVIDER=package \ + -DgRPC_ABSL_PROVIDER=package \ + -DgRPC_RE2_PROVIDER=package \ -DgRPC_INSTALL=ON \ -DCMAKE_CROSSCOMPILING=ON \ -DBUILD_SHARED_LIBS=ON \ --2.17.1
Hi Clément,
Thanks for the question.
Quoted 26 lines · Clément Péron
Hi Anatol,
Quoted 3 lines · Anatol Belski
This is a really huge jump in versions, but this package has been not upgraded for quite some time. The previous patches are not necessary anymore, they're integrated upstream.
This version of gRPC generate a new CMake gRPCTargets.cmake recipe-sysroot/usr/lib/cmake/grpc/gRPCTargets.cmake
This generate an error in my build:
Because this CMake declare a
recipe-sysroot/usr/bin/grpc_cpp_pluginbut 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 containedIn my project i'm using the CMake example from gRPC
https://github.com/grpc/grpc/blob/master/examples/cpp/cmake/common.cmake#L114
Quoted 7 lines
This error is triggered by:
find_package(gRPC 1.35.0 CONFIG REQUIRED)FYI My recipes depends on grpc and grpc-native PACKAGECONFIG[grpc] = "-DCONFIG_GRPC=ON,-DCONFIG_GRPC=OFF,grpc grpc-native"
Do you have an example of a gRPC recipe?
I don't use this feature from the grpc package, only linking against the libs. However I don't see why this should be an issue, as all the *.cmake files are packaged. I see that in the RPMs but also in a recipe of a dependent packgae like this
$ ls -l ./tmp/work/*/*/*/recipe-sysroot/usr/lib/cmake/grpc/*.cmake
Or use recipe-sysroot-native depending on the consuming recipe.
Just a wild guess here - does your recipe put 'grpc' into DEPENDS or RDEPENDS, etc. Also, do you inherit cmake in your recipe? It seems to me that it's more about how to use cmake files in a recipe, as the particularly mentioned files are packaged and pulled in a consuming recipe.
Regards
Anatol
Hi Anatol
Quoted 38 lines · Anatol Belski
Hi Clément,
Thanks for the question.
Quoted 32 lines · Clément Péron
Hi Anatol,
Quoted 3 lines · Anatol Belski
This is a really huge jump in versions, but this package has been not upgraded for quite some time. The previous patches are not necessary anymore, they're integrated upstream.
This version of gRPC generate a new CMake gRPCTargets.cmake recipe-sysroot/usr/lib/cmake/grpc/gRPCTargets.cmake
This generate an error in my build:
Because this CMake declare a
recipe-sysroot/usr/bin/grpc_cpp_pluginbut 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 containedIn my project i'm using the CMake example from gRPC
https://github.com/grpc/grpc/blob/master/examples/cpp/cmake/common.cmake#L114This error is triggered by:
find_package(gRPC 1.35.0 CONFIG REQUIRED)FYI My recipes depends on grpc and grpc-native PACKAGECONFIG[grpc] = "-DCONFIG_GRPC=ON,-DCONFIG_GRPC=OFF,grpc grpc-native"
Quoted 6 lines
Quoted 1 line
Do you have an example of a gRPC recipe?
I don't use this feature from the grpc package, only linking against the libs. However I don't see why this should be an issue, as all the *.cmake files are packaged. I see that in the RPMs but also in a recipe of a dependent packgae like this
Yes the cmake file is found but not the grpc_cpp_plugin.
This is due to cmake looking for the grpc_cpp_plugin in the target sysroot instead of the native/host sysroot.
Quoted 7 lines
$ ls -l ./tmp/work/*/*/*/recipe-sysroot/usr/lib/cmake/grpc/*.cmakeOr use recipe-sysroot-native depending on the consuming recipe.
Just a wild guess here - does your recipe put 'grpc' into DEPENDS or RDEPENDS, etc.
In my recipe I put 'grpc' and 'grpc-native' into DEPENDS using PACKAGECONFIG PACKAGECONFIG[grpc] = "-DCONFIG_GRPC=ON,-DCONFIG_GRPC=OFF,grpc grpc-native"
Quoted 1 line
Also, do you inherit cmake in your recipe?
Yes i am indeed inheriting cmake and also systemd in my recipe
Quoted 3 lines
It seems to me
that it's more about how to use cmake files in a recipe, as the particularly mentioned files are packaged and pulled in a consuming recipe.
When I look in the files packaged the cmake file is indeed here. The issue is coming from the gRPCTargets.cmake (https://pastebin.com/bZay7cew)
Line 159:
# Create imported target gRPC::grpc_cpp_plugin add_executable(gRPC::grpc_cpp_plugin IMPORTED)
gRPC is trying to add the grpc_cpp_plugin for the Target which is not present in the final package.
dpkg -c ./build/tmp/deploy/ipk/aarch64/grpc_1.35.0-r0_aarch64.ipk
drwxr-xr-x root/root 0 2021-02-22 17:43 ./usr/ drwxr-xr-x root/root 0 2021-02-22 17:43 ./usr/lib/ lrwxrwxrwx root/root 0 2021-02-22 17:43
./usr/lib/libaddress_sorting.so.14 -> libaddress_sorting.so.14.0.0
-rwxr-xr-x root/root 10000 2021-02-22 17:43./usr/lib/libaddress_sorting.so.14.0.0
lrwxrwxrwx root/root 0 2021-02-22 17:43 ./usr/lib/libgpr.so.14
-> libgpr.so.14.0.0
-rwxr-xr-x root/root 59616 2021-02-22 17:43 ./usr/lib/libgpr.so.14.0.0
lrwxrwxrwx root/root 0 2021-02-22 17:43./usr/lib/libgrpc++.so.1 -> libgrpc++.so.1.35.0
-rwxr-xr-x root/root 501680 2021-02-22 17:43 ./usr/lib/libgrpc++.so.1.35.0
lrwxrwxrwx root/root 0 2021-02-22 17:43./usr/lib/libgrpc++_alts.so.1 -> libgrpc++_alts.so.1.35.0
-rwxr-xr-x root/root 22368 2021-02-22 17:43./usr/lib/libgrpc++_alts.so.1.35.0
lrwxrwxrwx root/root 0 2021-02-22 17:43./usr/lib/libgrpc++_error_details.so.1 -> libgrpc++_error_details.so.1.35.0
-rwxr-xr-x root/root 34896 2021-02-22 17:43./usr/lib/libgrpc++_error_details.so.1.35.0
lrwxrwxrwx root/root 0 2021-02-22 17:43./usr/lib/libgrpc++_reflection.so.1 -> libgrpc++_reflection.so.1.35.0
-rwxr-xr-x root/root 284960 2021-02-22 17:43./usr/lib/libgrpc++_reflection.so.1.35.0
lrwxrwxrwx root/root 0 2021-02-22 17:43./usr/lib/libgrpc++_unsecure.so.1 -> libgrpc++_unsecure.so.1.35.0
-rwxr-xr-x root/root 415672 2021-02-22 17:43./usr/lib/libgrpc++_unsecure.so.1.35.0
lrwxrwxrwx root/root 0 2021-02-22 17:43./usr/lib/libgrpc.so.14 -> libgrpc.so.14.0.0
-rwxr-xr-x root/root 3505864 2021-02-22 17:43 ./usr/lib/libgrpc.so.14.0.0
lrwxrwxrwx root/root 0 2021-02-22 17:43./usr/lib/libgrpc_plugin_support.so.1 -> libgrpc_plugin_support.so.1.35.0
-rwxr-xr-x root/root 440528 2021-02-22 17:43./usr/lib/libgrpc_plugin_support.so.1.35.0
lrwxrwxrwx root/root 0 2021-02-22 17:43./usr/lib/libgrpc_unsecure.so.14 -> libgrpc_unsecure.so.14.0.0
-rwxr-xr-x root/root 1939384 2021-02-22 17:43./usr/lib/libgrpc_unsecure.so.14.0.0
lrwxrwxrwx root/root 0 2021-02-22 17:43./usr/lib/libgrpcpp_channelz.so.1 -> libgrpcpp_channelz.so.1.35.0
-rwxr-xr-x root/root 617784 2021-02-22 17:43./usr/lib/libgrpcpp_channelz.so.1.35.0
lrwxrwxrwx root/root 0 2021-02-22 17:43 ./usr/lib/libupb.so.14
-> libupb.so.14.0.0
-rwxr-xr-x root/root 141768 2021-02-22 17:43 ./usr/lib/libupb.so.14.0.0
drwxr-xr-x root/root 0 2021-02-22 17:43 ./usr/share/
drwxr-xr-x root/root 0 2021-02-22 17:43 ./usr/share/grpc/
-rw-r--r-- root/root 263903 2021-02-22 17:38 ./usr/share/grpc/roots.pem
Regards,
Clement
Quoted 10 lines
Regards
Anatol
Quoted 76 lines · Clément Péron
Quoted 4 lines
I don't use this feature from the grpc package, only linking against the libs. However I don't see why this should be an issue, as all the *.cmake files are packaged. I see that in the RPMs but also in a recipe of a dependent packgae like this
Yes the cmake file is found but not the
grpc_cpp_plugin.This is due to cmake looking for the
grpc_cpp_pluginin the target sysroot instead of the native/host sysroot.Quoted 6 lines
$ ls -l ./tmp/work/*/*/*/recipe-sysroot/usr/lib/cmake/grpc/*.cmakeOr use recipe-sysroot-native depending on the consuming recipe.
Just a wild guess here - does your recipe put 'grpc' into DEPENDS or RDEPENDS, etc.
In my recipe I put 'grpc' and 'grpc-native' into DEPENDS using PACKAGECONFIG PACKAGECONFIG[grpc] = "-DCONFIG_GRPC=ON,-DCONFIG_GRPC=OFF,grpc grpc-native"
Quoted 1 line
Also, do you inherit cmake in your recipe?
Yes i am indeed inheriting cmake and also systemd in my recipe
Quoted 3 lines
It seems to me
that it's more about how to use cmake files in a recipe, as the particularly mentioned files are packaged and pulled in a consuming recipe.When I look in the files packaged the cmake file is indeed here. The issue is coming from the gRPCTargets.cmake (https://pastebin.com/bZay7cew)
Line 159:
# Create imported targetgRPC::grpc_cpp_pluginadd_executable(gRPC::grpc_cpp_plugin IMPORTED)gRPC is trying to add the
grpc_cpp_pluginfor the Target which is not present in the final package.
dpkg -c ./build/tmp/deploy/ipk/aarch64/grpc_1.35.0-r0_aarch64.ipkdrwxr-xr-x root/root 0 2021-02-22 17:43 ./usr/ drwxr-xr-x root/root 0 2021-02-22 17:43 ./usr/lib/ lrwxrwxrwx root/root 0 2021-02-22 17:43
./usr/lib/libaddress_sorting.so.14-> libaddress_sorting.so.14.0.0
-rwxr-xr-x root/root 10000 2021-02-22 17:43./usr/lib/libaddress_sorting.so.14.0.0
lrwxrwxrwx root/root 0 2021-02-22 17:43./usr/lib/libgpr.so.14
-> libgpr.so.14.0.0
-rwxr-xr-x root/root 59616 2021-02-22 17:43./usr/lib/libgpr.so.14.0.0
lrwxrwxrwx root/root 0 2021-02-22 17:43./usr/lib/libgrpc++.so.1-> libgrpc++.so.1.35.0
-rwxr-xr-x root/root 501680 2021-02-22 17:43./usr/lib/libgrpc++.so.1.35.0
lrwxrwxrwx root/root 0 2021-02-22 17:43./usr/lib/libgrpc++_alts.so.1-> libgrpc++_alts.so.1.35.0
-rwxr-xr-x root/root 22368 2021-02-22 17:43./usr/lib/libgrpc++_alts.so.1.35.0
lrwxrwxrwx root/root 0 2021-02-22 17:43./usr/lib/libgrpc++_error_details.so.1-> libgrpc++_error_details.so.1.35.0
-rwxr-xr-x root/root 34896 2021-02-22 17:43./usr/lib/libgrpc++_error_details.so.1.35.0
lrwxrwxrwx root/root 0 2021-02-22 17:43./usr/lib/libgrpc++_reflection.so.1-> libgrpc++_reflection.so.1.35.0
-rwxr-xr-x root/root 284960 2021-02-22 17:43./usr/lib/libgrpc++_reflection.so.1.35.0
lrwxrwxrwx root/root 0 2021-02-22 17:43./usr/lib/libgrpc++_unsecure.so.1-> libgrpc++_unsecure.so.1.35.0
-rwxr-xr-x root/root 415672 2021-02-22 17:43./usr/lib/libgrpc++_unsecure.so.1.35.0
lrwxrwxrwx root/root 0 2021-02-22 17:43./usr/lib/libgrpc.so.14-> libgrpc.so.14.0.0
-rwxr-xr-x root/root 3505864 2021-02-22 17:43./usr/lib/libgrpc.so.14.0.0
lrwxrwxrwx root/root 0 2021-02-22 17:43./usr/lib/libgrpc_plugin_support.so.1-> libgrpc_plugin_support.so.1.35.0
-rwxr-xr-x root/root 440528 2021-02-22 17:43./usr/lib/libgrpc_plugin_support.so.1.35.0
lrwxrwxrwx root/root 0 2021-02-22 17:43./usr/lib/libgrpc_unsecure.so.14-> libgrpc_unsecure.so.14.0.0
-rwxr-xr-x root/root 1939384 2021-02-22 17:43./usr/lib/libgrpc_unsecure.so.14.0.0
lrwxrwxrwx root/root 0 2021-02-22 17:43./usr/lib/libgrpcpp_channelz.so.1-> libgrpcpp_channelz.so.1.35.0
Quoted 8 lines
-rwxr-xr-x root/root 617784 2021-02-22 17:43
./usr/lib/libgrpcpp_channelz.so.1.35.0
lrwxrwxrwx root/root 0 2021-02-22 17:43./usr/lib/libupb.so.14
-> libupb.so.14.0.0
-rwxr-xr-x root/root 141768 2021-02-22 17:43./usr/lib/libupb.so.14.0.0
drwxr-xr-x root/root 0 2021-02-22 17:43./usr/share/
drwxr-xr-x root/root 0 2021-02-22 17:43./usr/share/grpc/
-rw-r--r-- root/root 263903 2021-02-22 17:38./usr/share/grpc/roots.pem
The bins are packaged into -dev. In the rpm version, i see it packaged
$ rpm -qlp ./tmp/deploy/rpm/aarch64/grpc-dev-1.35.0-r0.aarch64.rpm | grep grpc_cpp_plugin /usr/bin/grpc_cpp_plugin
And same way they're to see
ls -l ./tmp/work/*/*/*/recipe-sysroot-native/usr/bin/*grpc*
The executables seem only be useful for dev and thus only as native. At this point it seems it's about going deep into debugging your recipe, as seems there's no solution laying on the surface.
Regards
Anatol
Hi,
Am 02.03.21 um 19:22 schrieb Anatol Belski:
Quoted 32 lines · Clément Péron
Quoted 30 lines
Quoted 4 lines
I don't use this feature from the grpc package, only linking against the libs. However I don't see why this should be an issue, as all the *.cmake files are packaged. I see that in the RPMs but also in a recipe of a dependent packgae like this
Yes the cmake file is found but not the
grpc_cpp_plugin.This is due to cmake looking for the
grpc_cpp_pluginin the target sysroot instead of the native/host sysroot.Quoted 6 lines
$ ls -l ./tmp/work/*/*/*/recipe-sysroot/usr/lib/cmake/grpc/*.cmakeOr use recipe-sysroot-native depending on the consuming recipe.
Just a wild guess here - does your recipe put 'grpc' into DEPENDS or RDEPENDS, etc.
In my recipe I put 'grpc' and 'grpc-native' into DEPENDS using PACKAGECONFIG PACKAGECONFIG[grpc] = "-DCONFIG_GRPC=ON,-DCONFIG_GRPC=OFF,grpc grpc-native"
Quoted 1 line
Also, do you inherit cmake in your recipe?
Yes i am indeed inheriting cmake and also systemd in my recipe
Quoted 3 lines
It seems to me
that it's more about how to use cmake files in a recipe, as the particularly mentioned files are packaged and pulled in a consuming recipe.When I look in the files packaged the cmake file is indeed here. The issue is coming from the gRPCTargets.cmake (https://pastebin.com/bZay7cew)
Line 159:
# Create imported targetgRPC::grpc_cpp_pluginadd_executable(gRPC::grpc_cpp_plugin IMPORTED)
[snip]
Quoted 1 line
The executables seem only be useful for dev and thus only as native. At this point it seems it's about going deep into debugging your recipe, as seems there's no solution laying on the surface.
This is a knowing issue and I have try to fix grpc but yocto is not a platform grpc officially support:
https://github.com/grpc/grpc/pull/22498
The cmake package only works if you install the binaries but yocto doesn't install binaries for the target because otherwise cmake couldn't find the native binaries.
Regards
Stefan
Hi Stefan,
Quoted 43 lines · Stefan Herbrechtsmeier
Hi,
Am 02.03.21 um 19:22 schrieb Anatol Belski:
Quoted 3 lines · Clément Péron
Quoted 1 line
Quoted 1 line
I don't use this feature from the grpc package, only linking against
the
Quoted 33 lines
Quoted 33 lines
Quoted 3 lines
libs. However I don't see why this should be an issue, as all the *.cmake files are packaged. I see that in the RPMs but also in a recipe of a dependent packgae like this
Yes the cmake file is found but not the
grpc_cpp_plugin.This is due to cmake looking for the
grpc_cpp_pluginin the target sysroot instead of the native/host sysroot.Quoted 6 lines
$ ls -l ./tmp/work/*/*/*/recipe-sysroot/usr/lib/cmake/grpc/*.cmakeOr use recipe-sysroot-native depending on the consuming recipe.
Just a wild guess here - does your recipe put 'grpc' into DEPENDS or RDEPENDS, etc.
In my recipe I put 'grpc' and 'grpc-native' into DEPENDS using PACKAGECONFIG
PACKAGECONFIG[grpc] = "-DCONFIG_GRPC=ON,-DCONFIG_GRPC=OFF,grpc grpc-native"Quoted 1 line
Also, do you inherit cmake in your recipe?
Yes i am indeed inheriting cmake and also systemd in my recipe
Quoted 4 lines
It seems to me
that it's more about how to use cmake files in a recipe, as the particularly mentioned files are packaged and pulled in a consuming recipe.When I look in the files packaged the cmake file is indeed here. The issue is coming from the gRPCTargets.cmake
(https://pastebin.com/bZay7cew)
Line 159:
# Create imported targetgRPC::grpc_cpp_pluginadd_executable(gRPC::grpc_cpp_plugin IMPORTED)[snip]
Quoted 7 lines
Quoted 3 lines
The executables seem only be useful for dev and thus only as native. At this point it seems it's about going deep into debugging your recipe, as seems there's no solution laying on the surface.
This is a knowing issue and I have try to fix grpc but yocto is not a platform grpc officially support:
https://github.com/grpc/grpc/pull/22498
This patch makes sense to me
Can't we include it in meta-oe ?
I will apply it locally anyway.
Thanks for your help
Clement
Quoted 8 lines
The cmake package only works if you install the binaries but yocto doesn't install binaries for the target because otherwise cmake couldn't find the native binaries.
Regards
Stefan
Hi,
Quoted 56 lines · Clément Péron
Hi Stefan,
Le mar. 2 mars 2021 à 19:38, Stefan Herbrechtsmeier <[email protected] <mailto:[email protected]>> a écrit :
Hi,
Am 02.03.21 um 19:22 schrieb Anatol Belski:
>
> On 3/2/2021 5:06 PM, Clément Péron wrote:
>>> I don't use this feature from the grpc package, only linking against the
>>> libs. However I don't see why this should be an issue, as all the >>> *.cmake files are packaged. I see that in the RPMs but also in a recipe
>>> of a dependent packgae like this
>> Yes the cmake file is found but not thegrpc_cpp_plugin. >>
>> This is due to cmake looking for thegrpc_cpp_pluginin the target >> sysroot instead of the native/host sysroot.
>>
>>> $ ls -l ./tmp/work/*/*/*/recipe-sysroot/usr/lib/cmake/grpc/*.cmake >>>
>>> Or use recipe-sysroot-native depending on the consuming recipe. >>>
>>> Just a wild guess here - does your recipe put 'grpc' into DEPENDS or
>>> RDEPENDS, etc.
>> In my recipe I put 'grpc' and 'grpc-native' into DEPENDS using >> PACKAGECONFIG
>> PACKAGECONFIG[grpc] = "-DCONFIG_GRPC=ON,-DCONFIG_GRPC=OFF,grpc >> grpc-native"
>>
>>> Also, do you inherit cmake in your recipe?
>> Yes i am indeed inheriting cmake and also systemd in my recipe >>
>>> It seems to me
>>> that it's more about how to use cmake files in a recipe, as the >>> particularly mentioned files are packaged and pulled in a consuming
>>> recipe.
>> When I look in the files packaged the cmake file is indeed here. >> The issue is coming from the gRPCTargets.cmake
>> (https://pastebin.com/bZay7cew)
>> Line 159:
>> # Create imported targetgRPC::grpc_cpp_plugin
>>add_executable(gRPC::grpc_cpp_plugin IMPORTED)
>>[snip]
> The executables seem only be useful for dev and thus only as native. At
> this point it seems it's about going deep into debugging your recipe, as
> seems there's no solution laying on the surface.
Quoted 5 lines
This is a knowing issue and I have try to fix grpc but yocto is not a platform grpc officially support:
https://github.com/grpc/grpc/pull/22498
thanks for chiming in, Stefan. So this is a known issue and upstream has refused the patch.
Quoted 5 lines
his patch makes sense to me
Can't we include it in meta-oe ?
I will apply it locally anyway.
Clément, is it so far confirmed that your issue is fixed by teh patch?
I could note from my side, that carrying a patch to CMake scripts in general is a pain, as the syntax is not very patch friendly. For GRPC - the CMake script is also huge. But also, i've no use for the pattern so couldn't tell how urgent this scenario would be.
Thanks
Anatol
Hi Anatol, Stefan,
Quoted 62 lines · Anatol Belski
Hi,
On 3/2/2021 8:13 PM, Clément Péron wrote:
Hi Stefan,
Quoted 43 lines · Stefan Herbrechtsmeier
Hi,
Am 02.03.21 um 19:22 schrieb Anatol Belski:
Quoted 36 lines · Clément Péron
Quoted 34 lines
Quoted 4 lines
I don't use this feature from the grpc package, only linking against the libs. However I don't see why this should be an issue, as all the *.cmake files are packaged. I see that in the RPMs but also in a recipe of a dependent packgae like this
Yes the cmake file is found but not the
grpc_cpp_plugin.This is due to cmake looking for the
grpc_cpp_pluginin the target sysroot instead of the native/host sysroot.Quoted 6 lines
$ ls -l ./tmp/work/*/*/*/recipe-sysroot/usr/lib/cmake/grpc/*.cmakeOr use recipe-sysroot-native depending on the consuming recipe.
Just a wild guess here - does your recipe put 'grpc' into DEPENDS or RDEPENDS, etc.
In my recipe I put 'grpc' and 'grpc-native' into DEPENDS using PACKAGECONFIG
PACKAGECONFIG[grpc] = "-DCONFIG_GRPC=ON,-DCONFIG_GRPC=OFF,grpc grpc-native"Quoted 1 line
Also, do you inherit cmake in your recipe?
Yes i am indeed inheriting cmake and also systemd in my recipe
Quoted 4 lines
It seems to me
that it's more about how to use cmake files in a recipe, as the particularly mentioned files are packaged and pulled in a consuming recipe.When I look in the files packaged the cmake file is indeed here. The issue is coming from the gRPCTargets.cmake
(https://pastebin.com/bZay7cew)
Line 159:
# Create imported targetgRPC::grpc_cpp_pluginadd_executable(gRPC::grpc_cpp_plugin IMPORTED)[snip]
Quoted 7 lines
Quoted 3 lines
The executables seem only be useful for dev and thus only as native. At this point it seems it's about going deep into debugging your recipe, as seems there's no solution laying on the surface.
This is a knowing issue and I have try to fix grpc but yocto is not a platform grpc officially support:
https://github.com/grpc/grpc/pull/22498thanks for chiming in, Stefan. So this is a known issue and upstream has refused the patch.
Quoted 7 lines
his patch makes sense to me
Can't we include it in meta-oe ?
I will apply it locally anyway.
Clément, is it so far confirmed that your issue is fixed by teh patch?
Yes it is,
Building my recipe just by adding the CMake patch.
Just a question: is it normal that grpc_cpp_plugin host is not installed in the nativesdk automatically?
Maybe we should separate in the recipe the gRPC compiler/plugins and gRPC libs no ? Like it's done by protobuf:
http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-devtools/protobuf/protobuf_3.15.2.bb#n74
Regards,
Clement
Quoted 12 lines
I could note from my side, that carrying a patch to CMake scripts in general is a pain, as the syntax is not very patch friendly. For GRPC - the CMake script is also huge. But also, i've no use for the pattern so couldn't tell how urgent this scenario would be.
Thanks
Anatol
Hi Clément,
Quoted 68 lines · Clément Péron
Hi Anatol, Stefan,
Quoted 56 lines · Anatol Belski
Hi,
On 3/2/2021 8:13 PM, Clément Péron wrote:
Hi Stefan,
Quoted 38 lines · Stefan Herbrechtsmeier
Hi,
Am 02.03.21 um 19:22 schrieb Anatol Belski:
Quoted 28 lines · Clément Péron
Quoted 27 lines
Quoted 4 lines
I don't use this feature from the grpc package, only linking against the libs. However I don't see why this should be an issue, as all the *.cmake files are packaged. I see that in the RPMs but also in a recipe of a dependent packgae like this
Yes the cmake file is found but not the
grpc_cpp_plugin.This is due to cmake looking for the
grpc_cpp_pluginin the target sysroot instead of the native/host sysroot.Quoted 6 lines
$ ls -l ./tmp/work/*/*/*/recipe-sysroot/usr/lib/cmake/grpc/*.cmakeOr use recipe-sysroot-native depending on the consuming recipe.
Just a wild guess here - does your recipe put 'grpc' into DEPENDS or RDEPENDS, etc.
In my recipe I put 'grpc' and 'grpc-native' into DEPENDS using PACKAGECONFIG
PACKAGECONFIG[grpc] = "-DCONFIG_GRPC=ON,-DCONFIG_GRPC=OFF,grpc grpc-native"Quoted 1 line
Also, do you inherit cmake in your recipe?
Yes i am indeed inheriting cmake and also systemd in my recipe
Quoted 4 lines
It seems to me
that it's more about how to use cmake files in a recipe, as the particularly mentioned files are packaged and pulled in a consuming recipe.Quoted 7 lines
Quoted 7 lines
When I look in the files packaged the cmake file is indeed here. The issue is coming from the gRPCTargets.cmake
(https://pastebin.com/bZay7cew)
Line 159:
# Create imported targetgRPC::grpc_cpp_pluginadd_executable(gRPC::grpc_cpp_plugin IMPORTED)Quoted 8 lines
[snip]
Quoted 3 lines
The executables seem only be useful for dev and thus only as native. At this point it seems it's about going deep into debugging your recipe, as seems there's no solution laying on the surface.
This is a knowing issue and I have try to fix grpc but yocto is not a platform grpc officially support:
https://github.com/grpc/grpc/pull/22498thanks for chiming in, Stefan. So this is a known issue and upstream has refused the patch.
Quoted 7 lines
his patch makes sense to me
Can't we include it in meta-oe ?
I will apply it locally anyway.
Clément, is it so far confirmed that your issue is fixed by teh patch?
Yes it is,
Quoted 8 lines
Building my recipe just by adding the CMake patch.
Just a question: is it normal that
grpc_cpp_pluginhost is not installed in the nativesdk automatically?Maybe we should separate in the recipe the gRPC compiler/plugins and gRPC libs no ? Like it's done by protobuf:
http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-devtools/protobuf/protobuf_3.15.2.bb#n74
I wouldn't know a reason why it doesn't go into the nativesdk, sysroots/<target>/usr/bin has quite some executables in it. Perhaps the logs would tell something, if that's intentional in the cross-canadian.bbclass or somewhere else.
Regards
Anatol
Hi Anatol,
Quoted 77 lines · Anatol Belski
Hi Clément,
Quoted 73 lines · Clément Péron
Hi Anatol, Stefan,
Quoted 56 lines · Anatol Belski
Hi,
On 3/2/2021 8:13 PM, Clément Péron wrote:
Hi Stefan,
Quoted 38 lines · Stefan Herbrechtsmeier
Hi,
Am 02.03.21 um 19:22 schrieb Anatol Belski:
Quoted 28 lines · Clément Péron
Quoted 27 lines
Quoted 4 lines
I don't use this feature from the grpc package, only linking against the libs. However I don't see why this should be an issue, as all the *.cmake files are packaged. I see that in the RPMs but also in a recipe of a dependent packgae like this
Yes the cmake file is found but not the
grpc_cpp_plugin.This is due to cmake looking for the
grpc_cpp_pluginin the target sysroot instead of the native/host sysroot.Quoted 6 lines
$ ls -l ./tmp/work/*/*/*/recipe-sysroot/usr/lib/cmake/grpc/*.cmakeOr use recipe-sysroot-native depending on the consuming recipe.
Just a wild guess here - does your recipe put 'grpc' into DEPENDS or RDEPENDS, etc.
In my recipe I put 'grpc' and 'grpc-native' into DEPENDS using PACKAGECONFIG
PACKAGECONFIG[grpc] = "-DCONFIG_GRPC=ON,-DCONFIG_GRPC=OFF,grpc grpc-native"Quoted 1 line
Also, do you inherit cmake in your recipe?
Yes i am indeed inheriting cmake and also systemd in my recipe
Quoted 4 lines
It seems to me
that it's more about how to use cmake files in a recipe, as the particularly mentioned files are packaged and pulled in a consuming recipe.Quoted 7 lines
Quoted 7 lines
When I look in the files packaged the cmake file is indeed here. The issue is coming from the gRPCTargets.cmake
(https://pastebin.com/bZay7cew)
Line 159:
# Create imported targetgRPC::grpc_cpp_pluginadd_executable(gRPC::grpc_cpp_plugin IMPORTED)Quoted 8 lines
[snip]
Quoted 3 lines
The executables seem only be useful for dev and thus only as native. At this point it seems it's about going deep into debugging your recipe, as seems there's no solution laying on the surface.
This is a knowing issue and I have try to fix grpc but yocto is not a platform grpc officially support:
https://github.com/grpc/grpc/pull/22498thanks for chiming in, Stefan. So this is a known issue and upstream has refused the patch.
Quoted 7 lines
his patch makes sense to me
Can't we include it in meta-oe ?
I will apply it locally anyway.
Clément, is it so far confirmed that your issue is fixed by teh patch?
Yes it is,
Building my recipe just by adding the CMake patch.
Just a question: is it normal that
grpc_cpp_pluginhost is not installed in the nativesdk automatically?
Quoted 8 lines
Quoted 3 lines
Maybe we should separate in the recipe the gRPC compiler/plugins and gRPC libs no ? Like it's done by protobuf:
http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-devtools/protobuf/protobuf_3.15.2.bb#n74I wouldn't know a reason why it doesn't go into the nativesdk, sysroots/<target>/usr/bin has quite some executables in it. Perhaps the logs would tell something, if that's intentional in the cross-canadian.bbclass or somewhere else.
I have explicitly renamed the -dev to -compiler.
And added theTOOLCHAIN_HOST_TASK_append = " nativesdk-grpc-compiler"
now i have both :
./sysroots/x86_64-augmentedlidarsdk-linux/usr/bin/grpc_cpp_plugin ./sysroots/aarch64-poky-linux/usr/bin/grpc_cpp_plugin
Cool :)
Regards,
Clement
Quoted 5 lines
Regards
Anatol