All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] grpc: Upgrade 1.24.3 -> 1.35.0
@ 2021-02-19 12:39 Anatol Belski
  2021-02-22 16:49 ` [oe] " Clément Péron
  0 siblings, 1 reply; 11+ messages in thread
From: Anatol Belski @ 2021-02-19 12:39 UTC (permalink / raw)
  To: openembedded-devel

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.

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
---
 ...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%)

diff --git a/meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch b/meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch
deleted file mode 100644
index 6cad533964..0000000000
--- a/meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 6d606f1101c1a172fb6d738d6f1865aa61849e68 Mon Sep 17 00:00:00 2001
-From: Alexey Firago <alexey_firago@mentor.com>
-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 <alexey_firago@mentor.com>
-Signed-off-by: Hiram Lew <lew@avast.com>
-Signed-off-by: Jan Kaisrlik <jan.kaisrlik@avast.com>
----
- 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)
diff --git a/meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch b/meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch
deleted file mode 100644
index e517355d34..0000000000
--- a/meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch
+++ /dev/null
@@ -1,177 +0,0 @@
-From 2279e30be5796e9b185545543ea54fe68633cbdd Mon Sep 17 00:00:00 2001
-From: Alexey Firago <alexey_firago@mentor.com>
-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 <alexey_firago@mentor.com>
-
----
- 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>
diff --git a/meta-oe/recipes-devtools/grpc/grpc_1.24.3.bb b/meta-oe/recipes-devtools/grpc/grpc_1.35.0.bb
similarity index 80%
rename from meta-oe/recipes-devtools/grpc/grpc_1.24.3.bb
rename to meta-oe/recipes-devtools/grpc/grpc_1.35.0.bb
index c25ce360e7..5097b2b1b8 100644
--- a/meta-oe/recipes-devtools/grpc/grpc_1.24.3.bb
+++ b/meta-oe/recipes-devtools/grpc/grpc_1.35.0.bb
@@ -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


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [oe] [meta-oe][PATCH] grpc: Upgrade 1.24.3 -> 1.35.0
  2021-02-19 12:39 [meta-oe][PATCH] grpc: Upgrade 1.24.3 -> 1.35.0 Anatol Belski
@ 2021-02-22 16:49 ` Clément Péron
  2021-03-02 13:32   ` Anatol Belski
  0 siblings, 1 reply; 11+ messages in thread
From: Clément Péron @ 2021-02-22 16:49 UTC (permalink / raw)
  To: Anatol Belski; +Cc: openembeded-devel

Hi Anatol,


On Fri, 19 Feb 2021 at 13:40, Anatol Belski
<anbelski@linux.microsoft.com> wrote:
>
> 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

>
> Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
> ---
>  ...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%)
>
> diff --git a/meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch b/meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch
> deleted file mode 100644
> index 6cad533964..0000000000
> --- a/meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch
> +++ /dev/null
> @@ -1,45 +0,0 @@
> -From 6d606f1101c1a172fb6d738d6f1865aa61849e68 Mon Sep 17 00:00:00 2001
> -From: Alexey Firago <alexey_firago@mentor.com>
> -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 <alexey_firago@mentor.com>
> -Signed-off-by: Hiram Lew <lew@avast.com>
> -Signed-off-by: Jan Kaisrlik <jan.kaisrlik@avast.com>
> ----
> - 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)
> diff --git a/meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch b/meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch
> deleted file mode 100644
> index e517355d34..0000000000
> --- a/meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch
> +++ /dev/null
> @@ -1,177 +0,0 @@
> -From 2279e30be5796e9b185545543ea54fe68633cbdd Mon Sep 17 00:00:00 2001
> -From: Alexey Firago <alexey_firago@mentor.com>
> -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 <alexey_firago@mentor.com>
> -
> ----
> - 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>
> diff --git a/meta-oe/recipes-devtools/grpc/grpc_1.24.3.bb b/meta-oe/recipes-devtools/grpc/grpc_1.35.0.bb
> similarity index 80%
> rename from meta-oe/recipes-devtools/grpc/grpc_1.24.3.bb
> rename to meta-oe/recipes-devtools/grpc/grpc_1.35.0.bb
> index c25ce360e7..5097b2b1b8 100644
> --- a/meta-oe/recipes-devtools/grpc/grpc_1.24.3.bb
> +++ b/meta-oe/recipes-devtools/grpc/grpc_1.35.0.bb
> @@ -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
>
>
> 
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [oe] [meta-oe][PATCH] grpc: Upgrade 1.24.3 -> 1.35.0
  2021-02-22 16:49 ` [oe] " Clément Péron
@ 2021-03-02 13:32   ` Anatol Belski
  2021-03-02 16:06     ` Clément Péron
  0 siblings, 1 reply; 11+ messages in thread
From: Anatol Belski @ 2021-03-02 13:32 UTC (permalink / raw)
  To: Clément Péron; +Cc: openembeded-devel

Hi Clément,

Thanks for the question.

On 2/22/2021 5:49 PM, Clément Péron wrote:
> Hi Anatol,
>
>
> On Fri, 19 Feb 2021 at 13:40, Anatol Belski
> <anbelski@linux.microsoft.com> wrote:
>> 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?

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







^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [oe] [meta-oe][PATCH] grpc: Upgrade 1.24.3 -> 1.35.0
  2021-03-02 13:32   ` Anatol Belski
@ 2021-03-02 16:06     ` Clément Péron
  2021-03-02 18:22       ` Anatol Belski
  0 siblings, 1 reply; 11+ messages in thread
From: Clément Péron @ 2021-03-02 16:06 UTC (permalink / raw)
  To: Anatol Belski; +Cc: openembeded-devel

Hi Anatol

On Tue, 2 Mar 2021 at 14:32, Anatol Belski <anbelski@linux.microsoft.com> wrote:
>
> Hi Clément,
>
> Thanks for the question.
>
> On 2/22/2021 5:49 PM, Clément Péron wrote:
> > Hi Anatol,
> >
> >
> > On Fri, 19 Feb 2021 at 13:40, Anatol Belski
> > <anbelski@linux.microsoft.com> wrote:
> >> 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?
>
> 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.

>
> $ 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 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


>
> Regards
>
> Anatol
>
>
>
>
>
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [oe] [meta-oe][PATCH] grpc: Upgrade 1.24.3 -> 1.35.0
  2021-03-02 16:06     ` Clément Péron
@ 2021-03-02 18:22       ` Anatol Belski
  2021-03-02 18:38         ` Stefan Herbrechtsmeier
  0 siblings, 1 reply; 11+ messages in thread
From: Anatol Belski @ 2021-03-02 18:22 UTC (permalink / raw)
  To: Clément Péron; +Cc: openembeded-devel


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 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.
>
>> $ 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 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

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






^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [oe] [meta-oe][PATCH] grpc: Upgrade 1.24.3 -> 1.35.0
  2021-03-02 18:22       ` Anatol Belski
@ 2021-03-02 18:38         ` Stefan Herbrechtsmeier
  2021-03-02 19:13           ` Clément Péron
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Herbrechtsmeier @ 2021-03-02 18:38 UTC (permalink / raw)
  To: Anatol Belski, Clément Péron; +Cc: openembeded-devel

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 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.
>>
>>> $ 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 target gRPC::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.

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [oe] [meta-oe][PATCH] grpc: Upgrade 1.24.3 -> 1.35.0
  2021-03-02 18:38         ` Stefan Herbrechtsmeier
@ 2021-03-02 19:13           ` Clément Péron
  2021-03-03 15:26             ` Anatol Belski
  0 siblings, 1 reply; 11+ messages in thread
From: Clément Péron @ 2021-03-02 19:13 UTC (permalink / raw)
  To: Stefan Herbrechtsmeier; +Cc: Anatol Belski, openembeded-devel

[-- Attachment #1: Type: text/plain, Size: 2468 bytes --]

Hi Stefan,

Le mar. 2 mars 2021 à 19:38, Stefan Herbrechtsmeier <
stefan@herbrechtsmeier.net> 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 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.
> >>
> >>> $ 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 target gRPC::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.
>
> 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



>
> 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
>

[-- Attachment #2: Type: text/html, Size: 3801 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [oe] [meta-oe][PATCH] grpc: Upgrade 1.24.3 -> 1.35.0
  2021-03-02 19:13           ` Clément Péron
@ 2021-03-03 15:26             ` Anatol Belski
  2021-03-04 10:05               ` Clément Péron
  0 siblings, 1 reply; 11+ messages in thread
From: Anatol Belski @ 2021-03-03 15:26 UTC (permalink / raw)
  To: Clément Péron, Stefan Herbrechtsmeier; +Cc: openembeded-devel

[-- Attachment #1: Type: text/plain, Size: 3022 bytes --]

Hi,

On 3/2/2021 8:13 PM, Clément Péron wrote:
> Hi Stefan,
>
> Le mar. 2 mars 2021 à 19:38, Stefan Herbrechtsmeier 
> <stefan@herbrechtsmeier.net <mailto:stefan@herbrechtsmeier.net>> 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 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.
>     >>
>     >>> $ 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 target gRPC::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.
>
>     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.

> 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






[-- Attachment #2: Type: text/html, Size: 5781 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [oe] [meta-oe][PATCH] grpc: Upgrade 1.24.3 -> 1.35.0
  2021-03-03 15:26             ` Anatol Belski
@ 2021-03-04 10:05               ` Clément Péron
  2021-03-04 17:28                 ` Anatol Belski
  0 siblings, 1 reply; 11+ messages in thread
From: Clément Péron @ 2021-03-04 10:05 UTC (permalink / raw)
  To: Anatol Belski, Stefan Herbrechtsmeier; +Cc: openembeded-devel

Hi Anatol, Stefan,

On Wed, 3 Mar 2021 at 16:27, Anatol Belski <anbelski@linux.microsoft.com> wrote:
>
> Hi,
>
> On 3/2/2021 8:13 PM, Clément Péron wrote:
>
> Hi Stefan,
>
> Le mar. 2 mars 2021 à 19:38, Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net> 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 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.
>> >>
>> >>> $ 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 target gRPC::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.
>>
>> 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.
>
> 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


>
> 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
>
>
>
>
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [oe] [meta-oe][PATCH] grpc: Upgrade 1.24.3 -> 1.35.0
  2021-03-04 10:05               ` Clément Péron
@ 2021-03-04 17:28                 ` Anatol Belski
  2021-03-05  9:35                   ` Clément Péron
  0 siblings, 1 reply; 11+ messages in thread
From: Anatol Belski @ 2021-03-04 17:28 UTC (permalink / raw)
  To: Clément Péron, Stefan Herbrechtsmeier; +Cc: openembeded-devel

Hi Clément,

On 3/4/2021 11:05 AM, Clément Péron wrote:
> Hi Anatol, Stefan,
>
> On Wed, 3 Mar 2021 at 16:27, Anatol Belski <anbelski@linux.microsoft.com> wrote:
>> Hi,
>>
>> On 3/2/2021 8:13 PM, Clément Péron wrote:
>>
>> Hi Stefan,
>>
>> Le mar. 2 mars 2021 à 19:38, Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net> 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 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.
>>>>>
>>>>>> $ 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 target gRPC::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.
>>> 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.
>>
>> 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

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [oe] [meta-oe][PATCH] grpc: Upgrade 1.24.3 -> 1.35.0
  2021-03-04 17:28                 ` Anatol Belski
@ 2021-03-05  9:35                   ` Clément Péron
  0 siblings, 0 replies; 11+ messages in thread
From: Clément Péron @ 2021-03-05  9:35 UTC (permalink / raw)
  To: Anatol Belski; +Cc: Stefan Herbrechtsmeier, openembeded-devel

Hi Anatol,

On Thu, 4 Mar 2021 at 18:28, Anatol Belski <anbelski@linux.microsoft.com> wrote:
>
> Hi Clément,
>
> On 3/4/2021 11:05 AM, Clément Péron wrote:
> > Hi Anatol, Stefan,
> >
> > On Wed, 3 Mar 2021 at 16:27, Anatol Belski <anbelski@linux.microsoft.com> wrote:
> >> Hi,
> >>
> >> On 3/2/2021 8:13 PM, Clément Péron wrote:
> >>
> >> Hi Stefan,
> >>
> >> Le mar. 2 mars 2021 à 19:38, Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net> 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 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.
> >>>>>
> >>>>>> $ 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 target gRPC::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.
> >>> 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.
> >>
> >> 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
>
> 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.

I have explicitly renamed the -dev to -compiler.

And added the
TOOLCHAIN_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


>
> Regards
>
> Anatol
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-03-05  9:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-19 12:39 [meta-oe][PATCH] grpc: Upgrade 1.24.3 -> 1.35.0 Anatol Belski
2021-02-22 16:49 ` [oe] " Clément Péron
2021-03-02 13:32   ` Anatol Belski
2021-03-02 16:06     ` Clément Péron
2021-03-02 18:22       ` Anatol Belski
2021-03-02 18:38         ` Stefan Herbrechtsmeier
2021-03-02 19:13           ` Clément Péron
2021-03-03 15:26             ` Anatol Belski
2021-03-04 10:05               ` Clément Péron
2021-03-04 17:28                 ` Anatol Belski
2021-03-05  9:35                   ` Clément Péron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.