Skip to contentSkip to conversation

grpc: upgrade 1.38.1 -> 1.41.0

PATCH In review Vyacheslav Yurkov 2 participants 3 messages Oct 12, 2021 – Oct 19, 2021 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 grpc: upgrade 1.38.1 -> 1.41.0

Drop the patch that fixes cross compilation, because it's already in 1.41.0. Add the patch for regression fix [1], which should be dropped on the recipe upgrade.

[1] https://github.com/grpc/grpc/issues/26857

---
 ...8fb0ee826e73323e06ac6166ac038ee71f6a.patch | 107 ++++++++++++++++++
 ...compilation-with-gRPC_BUILD_GRPC_CPP.patch |  55 ---------
 .../grpc/{grpc_1.38.1.bb => grpc_1.41.0.bb}   |   6 +-
 3 files changed, 110 insertions(+), 58 deletions(-)
 create mode 100644 meta-oe/recipes-devtools/grpc/grpc/0001-cmake-revert-db88fb0ee826e73323e06ac6166ac038ee71f6a.patch
 delete mode 100644 meta-oe/recipes-devtools/grpc/grpc/0002-cmake-fix-cross-compilation-with-gRPC_BUILD_GRPC_CPP.patch
 rename meta-oe/recipes-devtools/grpc/{grpc_1.38.1.bb => grpc_1.41.0.bb} (95%)
meta-oe/recipes-devtools/grpc/grpc/0001-cmake-revert-db88fb0ee826e73323e06ac6166ac038ee71f6a.patch new file +107 -0
new file mode 100644
index 000000000..d9cfa009f
@@ -0,0 +1,107 @@
+From 50d54458324c1a19eefb9968e4cb556dbd34b875 Mon Sep 17 00:00:00 2001
+From: Vyacheslav Yurkov <[email protected]>
+Date: Tue, 12 Oct 2021 19:11:40 +0200
+Subject: [PATCH] cmake: revert db88fb0ee826e73323e06ac6166ac038ee71f6a
+ (#27626)
+
+Fix regression introduced by previous commit. Original problem that
+commit was trying to fix was solved by modification of grpc recipe in
+meta-openembedded project repository
+
+Fixes #26857
+
+Signed-off-by: Vyacheslav Yurkov <[email protected]>
+---
+ CMakeLists.txt                    | 16 ++++++++--------
+ templates/CMakeLists.txt.template |  2 --
+ 2 files changed, 8 insertions(+), 10 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0e8fbdee8b..02cd48bee4 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -3828,7 +3828,7 @@ foreach(_hdr
+ endforeach()
+ 
+ 
+-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING)
++if(gRPC_INSTALL)
+   install(TARGETS grpc_plugin_support EXPORT gRPCTargets
+     RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+     LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+@@ -11679,7 +11679,7 @@ target_link_libraries(grpc_cpp_plugin
+ 
+ 
+ 
+-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING)
++if(gRPC_INSTALL)
+   install(TARGETS grpc_cpp_plugin EXPORT gRPCTargets
+     RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+     LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+@@ -11718,7 +11718,7 @@ target_link_libraries(grpc_csharp_plugin
+ 
+ 
+ 
+-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING)
++if(gRPC_INSTALL)
+   install(TARGETS grpc_csharp_plugin EXPORT gRPCTargets
+     RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+     LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+@@ -11757,7 +11757,7 @@ target_link_libraries(grpc_node_plugin
+ 
+ 
+ 
+-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING)
++if(gRPC_INSTALL)
+   install(TARGETS grpc_node_plugin EXPORT gRPCTargets
+     RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+     LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+@@ -11796,7 +11796,7 @@ target_link_libraries(grpc_objective_c_plugin
+ 
+ 
+ 
+-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING)
++if(gRPC_INSTALL)
+   install(TARGETS grpc_objective_c_plugin EXPORT gRPCTargets
+     RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+     LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+@@ -11835,7 +11835,7 @@ target_link_libraries(grpc_php_plugin
+ 
+ 
+ 
+-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING)
++if(gRPC_INSTALL)
+   install(TARGETS grpc_php_plugin EXPORT gRPCTargets
+     RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+     LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+@@ -11874,7 +11874,7 @@ target_link_libraries(grpc_python_plugin
+ 
+ 
+ 
+-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING)
++if(gRPC_INSTALL)
+   install(TARGETS grpc_python_plugin EXPORT gRPCTargets
+     RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+     LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+@@ -11913,7 +11913,7 @@ target_link_libraries(grpc_ruby_plugin
+ 
+ 
+ 
+-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING)
++if(gRPC_INSTALL)
+   install(TARGETS grpc_ruby_plugin EXPORT gRPCTargets
+     RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+     LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template
+index 0f0883e09c..b9a5bc4144 100644
+--- a/templates/CMakeLists.txt.template
++++ b/templates/CMakeLists.txt.template
+@@ -695,8 +695,6 @@
+   # grpcpp_channelz doesn't build with protobuf-lite, so no install required
+   # See https://github.com/grpc/grpc/issues/22826
+   if(gRPC_INSTALL AND NOT gRPC_USE_PROTO_LITE)
+-  % elif tgt.build == 'protoc':
+-  if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING)
+   % else:
+   if(gRPC_INSTALL)
+   % endif
meta-oe/recipes-devtools/grpc/grpc/0002-cmake-fix-cross-compilation-with-gRPC_BUILD_GRPC_CPP.patch deleted +0 -55

55 lines not on this page · raw message

meta-oe/recipes-devtools/grpc/grpc_1.41.0.bb renamed from meta-oe/recipes-devtools/grpc/grpc_1.38.1.bb +3 -3
similarity index 95%
rename from meta-oe/recipes-devtools/grpc/grpc_1.38.1.bb
rename to meta-oe/recipes-devtools/grpc/grpc_1.41.0.bb
index dfb44b819..3385e2ada 100644
@@ -20,10 +20,10 @@ RDEPENDS:${PN}-dev:class_native += "${PN}-compiler"
 # RDEPENDS:${PN}-dev += "${PN}-compiler"
 
 S = "${WORKDIR}/git"
-SRCREV_grpc = "96b73272eadc01afb5fb45b92b408c47e4387274"
-BRANCH = "v1.38.x"
+SRCREV_grpc = "fc662b7964384b701af5bd3ce6994d2180080eb4"
+BRANCH = "v1.41.x"
 SRC_URI = "git://github.com/grpc/grpc.git;protocol=https;name=grpc;branch=${BRANCH} \
-           file://0002-cmake-fix-cross-compilation-with-gRPC_BUILD_GRPC_CPP.patch \
+           file://0001-cmake-revert-db88fb0ee826e73323e06ac6166ac038ee71f6a.patch \
            "
 # Fixes build with older compilers 4.8 especially on ubuntu 14.04
 CXXFLAGS:append:class-native = " -Wl,--no-as-needed"
Signature · 1 line
2.28.0
#1 lore raw

With this upgrade I see 2 recipes failing with:

/usr/include/grpcpp/impl/codegen/completion_queue.h:119: error: undefined reference to 'absl::lts_20210324::Mutex::~Mutex()' CMakeFiles/googleAssistant_sample.dir/src/googleAssistant.cpp.o:googleAssistant.cpp:function non-virtual thunk to grpc::ClientReaderWriter<google::assistant::embedded::v1alpha2::AssistRequest, google::assistant::embedded::v1alpha2::AssistResponse>::~ClientReaderWriter():
error: undefined reference to 'absl::lts_20210324::Mutex::~Mutex()' /usr/include/grpcpp/impl/codegen/completion_queue.h:119: error: undefined reference to 'absl::lts_20210324::Mutex::~Mutex()' /usr/include/grpcpp/impl/codegen/grpc_library.h:57: error: undefined reference to 'absl::lts_20210324::Mutex::~Mutex()' /usr/include/absl/synchronization/mutex.h:526: error: undefined reference
to 'absl::lts_20210324::Mutex::Lock()' /usr/include/absl/synchronization/mutex.h:543: error: undefined reference
to 'absl::lts_20210324::Mutex::Unlock()' /usr/include/absl/synchronization/mutex.h:543: error: undefined reference
to 'absl::lts_20210324::Mutex::Unlock()' /usr/include/absl/synchronization/mutex.h:526: error: undefined reference
to 'absl::lts_20210324::Mutex::Lock()' /usr/include/absl/synchronization/mutex.h:543: error: undefined reference
to 'absl::lts_20210324::Mutex::Unlock()' /usr/include/absl/synchronization/mutex.h:543: error: undefined reference
to 'absl::lts_20210324::Mutex::Unlock()' /usr/include/absl/synchronization/mutex.h:526: error: undefined reference
to 'absl::lts_20210324::Mutex::Lock()' /usr/include/absl/synchronization/mutex.h:526: error: undefined reference
to 'absl::lts_20210324::Mutex::Lock()'
collect2: error: ld returned 1 exit status

and other with:

/usr/include/grpcpp/impl/codegen/completion_queue.h:119: error: undefined reference to 'absl::lts_20210324::Mutex::~Mutex()' /usr/include/grpcpp/impl/codegen/completion_queue.h:253: error: undefined reference to 'absl::lts_20210324::Mutex::~Mutex()' /usr/include/grpcpp/impl/codegen/completion_queue.h:119: error: undefined reference to 'absl::lts_20210324::Mutex::~Mutex()' /usr/include/grpcpp/impl/codegen/completion_queue.h:119: error: undefined reference to 'absl::lts_20210324::Mutex::~Mutex()'
collect2: error: ld returned 1 exit status

anyone else seeing this (before I start checking which grpc change caused this)? I'm also using gold instead of bfd

Quoted 249 lines · Vyacheslav Yurkov

Drop the patch that fixes cross compilation, because it's already in 1.41.0. Add the patch for regression fix [1], which should be dropped on the recipe upgrade.

[1] https://github.com/grpc/grpc/issues/26857

---
 ...8fb0ee826e73323e06ac6166ac038ee71f6a.patch | 107 ++++++++++++++++++
 ...compilation-with-gRPC_BUILD_GRPC_CPP.patch |  55 ---------
 .../grpc/{grpc_1.38.1.bb => grpc_1.41.0.bb}   |   6 +-
 3 files changed, 110 insertions(+), 58 deletions(-)
 create mode 100644
meta-oe/recipes-devtools/grpc/grpc/0001-cmake-revert-db88fb0ee826e73323e06ac6166ac038ee71f6a.patch
 delete mode 100644
meta-oe/recipes-devtools/grpc/grpc/0002-cmake-fix-cross-compilation-with-gRPC_BUILD_GRPC_CPP.patch
 rename meta-oe/recipes-devtools/grpc/{grpc_1.38.1.bb => grpc_1.41.0.bb}

(95%)

diff --git a/meta-oe/recipes-devtools/grpc/grpc/0001-cmake-revert-db88fb0ee826e73323e06ac6166ac038ee71f6a.patch b/meta-oe/recipes-devtools/grpc/grpc/0001-cmake-revert-db88fb0ee826e73323e06ac6166ac038ee71f6a.patch new file mode 100644
index 000000000..d9cfa009f
--- /dev/null
+++
b/meta-oe/recipes-devtools/grpc/grpc/0001-cmake-revert-db88fb0ee826e73323e06ac6166ac038ee71f6a.patch

meta-oe/recipes-devtools/grpc/grpc/0001-cmake-revert-db88fb0ee826e73323e06ac6166ac038ee71f6a.patch new file +95 -0
@@ -0,0 +1,107 @@
+From 50d54458324c1a19eefb9968e4cb556dbd34b875 Mon Sep 17 00:00:00 2001
+From: Vyacheslav Yurkov <[email protected]>
+Date: Tue, 12 Oct 2021 19:11:40 +0200
+Subject: [PATCH] cmake: revert db88fb0ee826e73323e06ac6166ac038ee71f6a
+ (#27626)
+
+Fix regression introduced by previous commit. Original problem that
+commit was trying to fix was solved by modification of grpc recipe in
+meta-openembedded project repository
+
+Fixes #26857
+
+Signed-off-by: Vyacheslav Yurkov <[email protected]>
+---
+ CMakeLists.txt                    | 16 ++++++++--------
+ templates/CMakeLists.txt.template |  2 --
+ 2 files changed, 8 insertions(+), 10 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0e8fbdee8b..02cd48bee4 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -3828,7 +3828,7 @@ foreach(_hdr
+ endforeach()
+
+
+-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING)
++if(gRPC_INSTALL)
+   install(TARGETS grpc_plugin_support EXPORT gRPCTargets
+     RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+     LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+@@ -11679,7 +11679,7 @@ target_link_libraries(grpc_cpp_plugin
+
+
+
+-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING)
++if(gRPC_INSTALL)
+   install(TARGETS grpc_cpp_plugin EXPORT gRPCTargets
+     RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+     LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+@@ -11718,7 +11718,7 @@ target_link_libraries(grpc_csharp_plugin
+
+
+
+-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING)
++if(gRPC_INSTALL)
+   install(TARGETS grpc_csharp_plugin EXPORT gRPCTargets
+     RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+     LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+@@ -11757,7 +11757,7 @@ target_link_libraries(grpc_node_plugin
+
+
+
+-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING)
++if(gRPC_INSTALL)
+   install(TARGETS grpc_node_plugin EXPORT gRPCTargets
+     RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+     LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+@@ -11796,7 +11796,7 @@ target_link_libraries(grpc_objective_c_plugin
+
+
+
+-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING)
++if(gRPC_INSTALL)
+   install(TARGETS grpc_objective_c_plugin EXPORT gRPCTargets
+     RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+     LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+@@ -11835,7 +11835,7 @@ target_link_libraries(grpc_php_plugin
+
+
+
+-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING)
++if(gRPC_INSTALL)
+   install(TARGETS grpc_php_plugin EXPORT gRPCTargets
+     RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+     LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+@@ -11874,7 +11874,7 @@ target_link_libraries(grpc_python_plugin
+
+
+
+-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING)
++if(gRPC_INSTALL)
+   install(TARGETS grpc_python_plugin EXPORT gRPCTargets
+     RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+     LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+@@ -11913,7 +11913,7 @@ target_link_libraries(grpc_ruby_plugin
+
+
+
+-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING)
++if(gRPC_INSTALL)
+   install(TARGETS grpc_ruby_plugin EXPORT gRPCTargets
+     RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+     LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+diff --git a/templates/CMakeLists.txt.template

b/templates/CMakeLists.txt.template

meta-oe/recipes-devtools/grpc/grpc/0001-cmake-revert-db88fb0ee826e73323e06ac6166ac038ee71f6a.patch new file +5 -0
+index 0f0883e09c..b9a5bc4144 100644
+--- a/templates/CMakeLists.txt.template
++++ b/templates/CMakeLists.txt.template
+@@ -695,8 +695,6 @@
+   # grpcpp_channelz doesn't build with protobuf-lite, so no install

required

meta-oe/recipes-devtools/grpc/grpc/0001-cmake-revert-db88fb0ee826e73323e06ac6166ac038ee71f6a.patch new file +7 -0
+   # See https://github.com/grpc/grpc/issues/22826
+   if(gRPC_INSTALL AND NOT gRPC_USE_PROTO_LITE)
+-  % elif tgt.build == 'protoc':
+-  if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING)
+   % else:
+   if(gRPC_INSTALL)
+   % endif

diff --git a/meta-oe/recipes-devtools/grpc/grpc/0002-cmake-fix-cross-compilation-with-gRPC_BUILD_GRPC_CPP.patch b/meta-oe/recipes-devtools/grpc/grpc/0002-cmake-fix-cross-compilation-with-gRPC_BUILD_GRPC_CPP.patch deleted file mode 100644
index ce660f5cc..000000000
---
a/meta-oe/recipes-devtools/grpc/grpc/0002-cmake-fix-cross-compilation-with-gRPC_BUILD_GRPC_CPP.patch +++ /dev/null

meta-oe/recipes-devtools/grpc/grpc/0002-cmake-fix-cross-compilation-with-gRPC_BUILD_GRPC_CPP.patch deleted +0 -16
@@ -1,55 +0,0 @@
-From 83a66aa45d63d79cbccc47a65998723a7d2d7637 Mon Sep 17 00:00:00 2001
-From: Thomas De Schampheleire <[email protected]>
-Date: Wed, 23 Jun 2021 14:22:59 +0200
-Subject: [PATCH] cmake: fix cross-compilation with
- gRPC_BUILD_GRPC_CPP_PLUGIN=OFF (#26292)
-
-* cmake: fix cross-compilation with gRPC_BUILD_GRPC_CPP_PLUGIN=OFF
-
-When cross-compiling gRPC, a _native_ version of 'grpc_cpp_plugin' is
-searched in the environment. For most use cases, a _cross_ version of this
-file is not needed and gRPC_BUILD_GRPC_CPP_PLUGIN can be set to OFF.
-
-However, when cross-building with -DgRPC_BUILD_GRPC_CPP_PLUGIN=OFF, there
-are some build errors, for example:
-
-make[3]: *** No rule to make target 'grpc_cpp_plugin', needed by

'gens/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.cc'. Stop.

meta-oe/recipes-devtools/grpc/grpc/0002-cmake-fix-cross-compilation-with-gRPC_BUILD_GRPC_CPP.patch deleted +0 -5
-
-This is because there is still a hard dependency on 'grpc_cpp_plugin' for
-these targets, not taking into account the cross-compilation case.
-
-Fix by depending on the variable gRPC_CPP_PLUGIN, which is set correctly

for

meta-oe/recipes-devtools/grpc/grpc/0002-cmake-fix-cross-compilation-with-gRPC_BUILD_GRPC_CPP.patch deleted +0 -22
-either cross or native case.
-
-* regenerate projects
----
- CMakeLists.txt                    | 2 +-
- templates/CMakeLists.txt.template | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index eeaf0b43c7..c60a64917a 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -319,7 +319,7 @@ function(protobuf_generate_grpc_cpp)
-            --plugin=protoc-gen-grpc=${_gRPC_CPP_PLUGIN}
-            ${_protobuf_include_path}
-            ${REL_FIL}
--      DEPENDS ${ABS_FIL} ${_gRPC_PROTOBUF_PROTOC} grpc_cpp_plugin
-+      DEPENDS ${ABS_FIL} ${_gRPC_PROTOBUF_PROTOC} ${_gRPC_CPP_PLUGIN}
-       WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-       COMMENT "Running gRPC C++ protocol buffer compiler on ${FIL}"
-       VERBATIM)
-diff --git a/templates/CMakeLists.txt.template

b/templates/CMakeLists.txt.template

meta-oe/recipes-devtools/grpc/grpc/0002-cmake-fix-cross-compilation-with-gRPC_BUILD_GRPC_CPP.patch deleted +0 -8
-index cef2534cbd..f0afe5108e 100644
---- a/templates/CMakeLists.txt.template
-+++ b/templates/CMakeLists.txt.template
-@@ -389,7 +389,7 @@
-              --plugin=protoc-gen-grpc=<%text>${_gRPC_CPP_PLUGIN}</%text>
-              <%text>${_protobuf_include_path}</%text>
-              <%text>${REL_FIL}</%text>
--        DEPENDS <%text>${ABS_FIL}</%text>

<%text>${_gRPC_PROTOBUF_PROTOC}</%text> grpc_cpp_plugin
-+ DEPENDS <%text>${ABS_FIL}</%text>
<%text>${_gRPC_PROTOBUF_PROTOC}</%text> <%text>${_gRPC_CPP_PLUGIN}</%text>

(quoted diff) +0 -2
-         WORKING_DIRECTORY <%text>${CMAKE_CURRENT_SOURCE_DIR}</%text>
-         COMMENT "Running gRPC C++ protocol buffer compiler on

<%text>${FIL}</%text>"

(quoted diff) +0 -1
-         VERBATIM)
meta-oe/recipes-devtools/grpc/grpc_1.41.0.bb renamed from meta-oe/recipes-devtools/grpc/grpc_1.38.1.bb +2 -2
similarity index 95%
rename from meta-oe/recipes-devtools/grpc/grpc_1.38.1.bb
rename to meta-oe/recipes-devtools/grpc/grpc_1.41.0.bb
index dfb44b819..3385e2ada 100644
@@ -20,10 +20,10 @@ RDEPENDS:${PN}-dev:class_native += "${PN}-compiler"
 # RDEPENDS:${PN}-dev += "${PN}-compiler"
 
 S = "${WORKDIR}/git"
-SRCREV_grpc = "96b73272eadc01afb5fb45b92b408c47e4387274"
-BRANCH = "v1.38.x"
+SRCREV_grpc = "fc662b7964384b701af5bd3ce6994d2180080eb4"
+BRANCH = "v1.41.x"
 SRC_URI = "git://
 github.com/grpc/grpc.git;protocol=https;name=grpc;branch=${BRANCH}

<http://github.com/grpc/grpc.git;protocol=https;name=grpc;branch=$%7BBRANCH%7D>
\

meta-oe/recipes-devtools/grpc/grpc_1.41.0.bb renamed from meta-oe/recipes-devtools/grpc/grpc_1.38.1.bb +1 -2
-
 file://0002-cmake-fix-cross-compilation-with-gRPC_BUILD_GRPC_CPP.patch \
+
 file://0001-cmake-revert-db88fb0ee826e73323e06ac6166ac038ee71f6a.patch \
            "
 # Fixes build with older compilers 4.8 especially on ubuntu 14.04
 CXXFLAGS:append:class-native = " -Wl,--no-as-needed"
--

2.28.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#93256):
https://lists.openembedded.org/g/openembedded-devel/message/93256
Mute This Topic: https://lists.openembedded.org/mt/86268966/3617156
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#3 lore raw
In reply to a message not in the archive

Looks like the https://github.com/grpc/grpc/pull/25681 is the root cause, it's also reproducible with sysdig recipe in meta-oe.

I'll send revert of this commit.

Quoted 302 lines · Martin Jansa via lists.openembedded.org

With this upgrade I see 2 recipes failing with:

/usr/include/grpcpp/impl/codegen/completion_queue.h:119: error: undefined reference to 'absl::lts_20210324::Mutex::~Mutex()' CMakeFiles/googleAssistant_sample.dir/src/googleAssistant.cpp.o:googleAssistant.cpp:function non-virtual thunk to grpc::ClientReaderWriter<google::assistant::embedded::v1alpha2::AssistRequest, google::assistant::embedded::v1alpha2::AssistResponse>::~ClientReaderWriter():
error: undefined reference to 'absl::lts_20210324::Mutex::~Mutex()' /usr/include/grpcpp/impl/codegen/completion_queue.h:119: error: undefined reference to 'absl::lts_20210324::Mutex::~Mutex()' /usr/include/grpcpp/impl/codegen/grpc_library.h:57: error: undefined reference to 'absl::lts_20210324::Mutex::~Mutex()' /usr/include/absl/synchronization/mutex.h:526: error: undefined reference
to 'absl::lts_20210324::Mutex::Lock()' /usr/include/absl/synchronization/mutex.h:543: error: undefined reference
to 'absl::lts_20210324::Mutex::Unlock()' /usr/include/absl/synchronization/mutex.h:543: error: undefined reference
to 'absl::lts_20210324::Mutex::Unlock()' /usr/include/absl/synchronization/mutex.h:526: error: undefined reference
to 'absl::lts_20210324::Mutex::Lock()' /usr/include/absl/synchronization/mutex.h:543: error: undefined reference
to 'absl::lts_20210324::Mutex::Unlock()' /usr/include/absl/synchronization/mutex.h:543: error: undefined reference
to 'absl::lts_20210324::Mutex::Unlock()' /usr/include/absl/synchronization/mutex.h:526: error: undefined reference
to 'absl::lts_20210324::Mutex::Lock()' /usr/include/absl/synchronization/mutex.h:526: error: undefined reference
to 'absl::lts_20210324::Mutex::Lock()'
collect2: error: ld returned 1 exit status

and other with:

/usr/include/grpcpp/impl/codegen/completion_queue.h:119: error: undefined reference to 'absl::lts_20210324::Mutex::~Mutex()' /usr/include/grpcpp/impl/codegen/completion_queue.h:253: error: undefined reference to 'absl::lts_20210324::Mutex::~Mutex()' /usr/include/grpcpp/impl/codegen/completion_queue.h:119: error: undefined reference to 'absl::lts_20210324::Mutex::~Mutex()' /usr/include/grpcpp/impl/codegen/completion_queue.h:119: error: undefined reference to 'absl::lts_20210324::Mutex::~Mutex()'
collect2: error: ld returned 1 exit status

anyone else seeing this (before I start checking which grpc change caused this)? I'm also using gold instead of bfd

Quoted 236 lines · Vyacheslav Yurkov

Drop the patch that fixes cross compilation, because it's already in 1.41.0. Add the patch for regression fix [1], which should be dropped on the recipe upgrade.

[1] https://github.com/grpc/grpc/issues/26857

---
 ...8fb0ee826e73323e06ac6166ac038ee71f6a.patch | 107 ++++++++++++++++++
 ...compilation-with-gRPC_BUILD_GRPC_CPP.patch |  55 ---------
 .../grpc/{grpc_1.38.1.bb => grpc_1.41.0.bb}   |   6 +-
 3 files changed, 110 insertions(+), 58 deletions(-)
 create mode 100644
meta-oe/recipes-devtools/grpc/grpc/0001-cmake-revert-db88fb0ee826e73323e06ac6166ac038ee71f6a.patch
 delete mode 100644
meta-oe/recipes-devtools/grpc/grpc/0002-cmake-fix-cross-compilation-with-gRPC_BUILD_GRPC_CPP.patch
 rename meta-oe/recipes-devtools/grpc/{grpc_1.38.1.bb => grpc_1.41.0.bb}

(95%)

diff --git a/meta-oe/recipes-devtools/grpc/grpc/0001-cmake-revert-db88fb0ee826e73323e06ac6166ac038ee71f6a.patch b/meta-oe/recipes-devtools/grpc/grpc/0001-cmake-revert-db88fb0ee826e73323e06ac6166ac038ee71f6a.patch new file mode 100644
index 000000000..d9cfa009f
--- /dev/null
+++
b/meta-oe/recipes-devtools/grpc/grpc/0001-cmake-revert-db88fb0ee826e73323e06ac6166ac038ee71f6a.patch

meta-oe/recipes-devtools/grpc/grpc/0001-cmake-revert-db88fb0ee826e73323e06ac6166ac038ee71f6a.patch new file +95 -0
@@ -0,0 +1,107 @@
+From 50d54458324c1a19eefb9968e4cb556dbd34b875 Mon Sep 17 00:00:00 2001
+From: Vyacheslav Yurkov <[email protected]>
+Date: Tue, 12 Oct 2021 19:11:40 +0200
+Subject: [PATCH] cmake: revert db88fb0ee826e73323e06ac6166ac038ee71f6a
+ (#27626)
+
+Fix regression introduced by previous commit. Original problem that
+commit was trying to fix was solved by modification of grpc recipe in
+meta-openembedded project repository
+
+Fixes #26857
+
+Signed-off-by: Vyacheslav Yurkov <[email protected]>
+---
+ CMakeLists.txt                    | 16 ++++++++--------
+ templates/CMakeLists.txt.template |  2 --
+ 2 files changed, 8 insertions(+), 10 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0e8fbdee8b..02cd48bee4 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -3828,7 +3828,7 @@ foreach(_hdr
+ endforeach()
+
+
+-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING)
++if(gRPC_INSTALL)
+   install(TARGETS grpc_plugin_support EXPORT gRPCTargets
+     RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+     LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+@@ -11679,7 +11679,7 @@ target_link_libraries(grpc_cpp_plugin
+
+
+
+-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING)
++if(gRPC_INSTALL)
+   install(TARGETS grpc_cpp_plugin EXPORT gRPCTargets
+     RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+     LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+@@ -11718,7 +11718,7 @@ target_link_libraries(grpc_csharp_plugin
+
+
+
+-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING)
++if(gRPC_INSTALL)
+   install(TARGETS grpc_csharp_plugin EXPORT gRPCTargets
+     RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+     LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+@@ -11757,7 +11757,7 @@ target_link_libraries(grpc_node_plugin
+
+
+
+-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING)
++if(gRPC_INSTALL)
+   install(TARGETS grpc_node_plugin EXPORT gRPCTargets
+     RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+     LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+@@ -11796,7 +11796,7 @@ target_link_libraries(grpc_objective_c_plugin
+
+
+
+-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING)
++if(gRPC_INSTALL)
+   install(TARGETS grpc_objective_c_plugin EXPORT gRPCTargets
+     RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+     LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+@@ -11835,7 +11835,7 @@ target_link_libraries(grpc_php_plugin
+
+
+
+-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING)
++if(gRPC_INSTALL)
+   install(TARGETS grpc_php_plugin EXPORT gRPCTargets
+     RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+     LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+@@ -11874,7 +11874,7 @@ target_link_libraries(grpc_python_plugin
+
+
+
+-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING)
++if(gRPC_INSTALL)
+   install(TARGETS grpc_python_plugin EXPORT gRPCTargets
+     RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+     LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+@@ -11913,7 +11913,7 @@ target_link_libraries(grpc_ruby_plugin
+
+
+
+-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING)
++if(gRPC_INSTALL)
+   install(TARGETS grpc_ruby_plugin EXPORT gRPCTargets
+     RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+     LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+diff --git a/templates/CMakeLists.txt.template

b/templates/CMakeLists.txt.template

meta-oe/recipes-devtools/grpc/grpc/0001-cmake-revert-db88fb0ee826e73323e06ac6166ac038ee71f6a.patch new file +5 -0
+index 0f0883e09c..b9a5bc4144 100644
+--- a/templates/CMakeLists.txt.template
++++ b/templates/CMakeLists.txt.template
+@@ -695,8 +695,6 @@
+   # grpcpp_channelz doesn't build with protobuf-lite, so no install

required

meta-oe/recipes-devtools/grpc/grpc/0001-cmake-revert-db88fb0ee826e73323e06ac6166ac038ee71f6a.patch new file +7 -0
+   # See https://github.com/grpc/grpc/issues/22826
+   if(gRPC_INSTALL AND NOT gRPC_USE_PROTO_LITE)
+-  % elif tgt.build == 'protoc':
+-  if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING)
+   % else:
+   if(gRPC_INSTALL)
+   % endif

diff --git a/meta-oe/recipes-devtools/grpc/grpc/0002-cmake-fix-cross-compilation-with-gRPC_BUILD_GRPC_CPP.patch b/meta-oe/recipes-devtools/grpc/grpc/0002-cmake-fix-cross-compilation-with-gRPC_BUILD_GRPC_CPP.patch deleted file mode 100644
index ce660f5cc..000000000
---
a/meta-oe/recipes-devtools/grpc/grpc/0002-cmake-fix-cross-compilation-with-gRPC_BUILD_GRPC_CPP.patch +++ /dev/null

meta-oe/recipes-devtools/grpc/grpc/0002-cmake-fix-cross-compilation-with-gRPC_BUILD_GRPC_CPP.patch deleted +0 -10
@@ -1,55 +0,0 @@
-From 83a66aa45d63d79cbccc47a65998723a7d2d7637 Mon Sep 17 00:00:00 2001
-From: Thomas De Schampheleire <[email protected]>
-Date: Wed, 23 Jun 2021 14:22:59 +0200
-Subject: [PATCH] cmake: fix cross-compilation with
- gRPC_BUILD_GRPC_CPP_PLUGIN=OFF (#26292)
-
-* cmake: fix cross-compilation with gRPC_BUILD_GRPC_CPP_PLUGIN=OFF
-
-When cross-compiling gRPC, a _native_ version of 'grpc_cpp_plugin' is
-searched in the environment. For most use cases, a _cross_ version of

this

meta-oe/recipes-devtools/grpc/grpc/0002-cmake-fix-cross-compilation-with-gRPC_BUILD_GRPC_CPP.patch deleted +0 -6
-file is not needed and gRPC_BUILD_GRPC_CPP_PLUGIN can be set to OFF.
-
-However, when cross-building with -DgRPC_BUILD_GRPC_CPP_PLUGIN=OFF, there
-are some build errors, for example:
-
-make[3]: *** No rule to make target 'grpc_cpp_plugin', needed by

'gens/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.cc'. Stop.

meta-oe/recipes-devtools/grpc/grpc/0002-cmake-fix-cross-compilation-with-gRPC_BUILD_GRPC_CPP.patch deleted +0 -5
-
-This is because there is still a hard dependency on 'grpc_cpp_plugin' for
-these targets, not taking into account the cross-compilation case.
-
-Fix by depending on the variable gRPC_CPP_PLUGIN, which is set correctly

for

meta-oe/recipes-devtools/grpc/grpc/0002-cmake-fix-cross-compilation-with-gRPC_BUILD_GRPC_CPP.patch deleted +0 -22
-either cross or native case.
-
-* regenerate projects
----
- CMakeLists.txt                    | 2 +-
- templates/CMakeLists.txt.template | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index eeaf0b43c7..c60a64917a 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -319,7 +319,7 @@ function(protobuf_generate_grpc_cpp)
-            --plugin=protoc-gen-grpc=${_gRPC_CPP_PLUGIN}
-            ${_protobuf_include_path}
-            ${REL_FIL}
--      DEPENDS ${ABS_FIL} ${_gRPC_PROTOBUF_PROTOC} grpc_cpp_plugin
-+      DEPENDS ${ABS_FIL} ${_gRPC_PROTOBUF_PROTOC} ${_gRPC_CPP_PLUGIN}
-       WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-       COMMENT "Running gRPC C++ protocol buffer compiler on ${FIL}"
-       VERBATIM)
-diff --git a/templates/CMakeLists.txt.template

b/templates/CMakeLists.txt.template

meta-oe/recipes-devtools/grpc/grpc/0002-cmake-fix-cross-compilation-with-gRPC_BUILD_GRPC_CPP.patch deleted +0 -8
-index cef2534cbd..f0afe5108e 100644
---- a/templates/CMakeLists.txt.template
-+++ b/templates/CMakeLists.txt.template
-@@ -389,7 +389,7 @@
-              --plugin=protoc-gen-grpc=<%text>${_gRPC_CPP_PLUGIN}</%text>
-              <%text>${_protobuf_include_path}</%text>
-              <%text>${REL_FIL}</%text>
--        DEPENDS <%text>${ABS_FIL}</%text>

<%text>${_gRPC_PROTOBUF_PROTOC}</%text> grpc_cpp_plugin
-+ DEPENDS <%text>${ABS_FIL}</%text>
<%text>${_gRPC_PROTOBUF_PROTOC}</%text> <%text>${_gRPC_CPP_PLUGIN}</%text>

(quoted diff) +0 -2
-         WORKING_DIRECTORY <%text>${CMAKE_CURRENT_SOURCE_DIR}</%text>
-         COMMENT "Running gRPC C++ protocol buffer compiler on

<%text>${FIL}</%text>"

(quoted diff) +0 -1
-         VERBATIM)
meta-oe/recipes-devtools/grpc/grpc_1.41.0.bb renamed from meta-oe/recipes-devtools/grpc/grpc_1.38.1.bb +2 -2
similarity index 95%
rename from meta-oe/recipes-devtools/grpc/grpc_1.38.1.bb
rename to meta-oe/recipes-devtools/grpc/grpc_1.41.0.bb
index dfb44b819..3385e2ada 100644
@@ -20,10 +20,10 @@ RDEPENDS:${PN}-dev:class_native += "${PN}-compiler"
 # RDEPENDS:${PN}-dev += "${PN}-compiler"
 
 S = "${WORKDIR}/git"
-SRCREV_grpc = "96b73272eadc01afb5fb45b92b408c47e4387274"
-BRANCH = "v1.38.x"
+SRCREV_grpc = "fc662b7964384b701af5bd3ce6994d2180080eb4"
+BRANCH = "v1.41.x"
 SRC_URI = "git://
 github.com/grpc/grpc.git;protocol=https;name=grpc;branch=${BRANCH}

<http://github.com/grpc/grpc.git;protocol=https;name=grpc;branch=$%7BBRANCH%7D>
\

meta-oe/recipes-devtools/grpc/grpc_1.41.0.bb renamed from meta-oe/recipes-devtools/grpc/grpc_1.38.1.bb +1 -2
-
 file://0002-cmake-fix-cross-compilation-with-gRPC_BUILD_GRPC_CPP.patch \
+
 file://0001-cmake-revert-db88fb0ee826e73323e06ac6166ac038ee71f6a.patch \
            "
 # Fixes build with older compilers 4.8 especially on ubuntu 14.04
 CXXFLAGS:append:class-native = " -Wl,--no-as-needed"
--
Quoted 6 lines

2.28.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#93465):
https://lists.openembedded.org/g/openembedded-devel/message/93465
Mute This Topic: https://lists.openembedded.org/mt/86268966/3617156
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-