Skip to contentSkip to conversation

package/grpc: bump to version 1.52.1

PATCH In review Michael Nosthoff via buildroot 1 participant 2 messages Feb 20, 2023 – Feb 21, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/grpc: bump to version 1.52.1

- alter patches 0001 and 0003 for changed paths/locations
- bump minimum gcc to 7.3, see [0]
- alter gcc dependency of dependend packages accordingly

[0] https://github.com/grpc/grpc/tree/master/src/cpp

---
 package/collectd/Config.in                    |  6 +-
 package/falcosecurity-libs/Config.in          |  2 +-
 ...the-availability-of-pthread_setname_.patch | 32 ++++++----
 .../grpc/0003-host-grpc-only-cpp-plugin.patch | 62 ++++++++++---------
 package/grpc/Config.in                        |  6 +-
 package/grpc/grpc.hash                        |  2 +-
 package/grpc/grpc.mk                          |  2 +-
 package/sysdig/Config.in                      |  6 +-
 8 files changed, 65 insertions(+), 53 deletions(-)
package/collectd/Config.in +3 -3
index a431da79f1..7f87b54645 100644
@@ -683,15 +683,15 @@ config BR2_PACKAGE_COLLECTD_GRPC
 	depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC # grpc
 	depends on BR2_INSTALL_LIBSTDCPP # grpc -> protobuf
 	depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # grpc -> protobuf
-	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # grpc -> libabseil-cpp
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # grpc
 	depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS # grpc
 	select BR2_PACKAGE_GRPC
 	help
 	  Send/receive values using the gRPC protocol.
 
-comment "grpc needs a toolchain w/ C++, gcc >= 5"
+comment "grpc needs a toolchain w/ C++, gcc >= 7.3"
 	depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC
-	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_5
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_7
 	depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
 	depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS # grpc
 
package/falcosecurity-libs/Config.in +1 -1
index f101883384..41251fb748 100644
@@ -4,7 +4,7 @@ config BR2_PACKAGE_FALCOSECURITY_LIBS
 	depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # protobuf
 	depends on BR2_LINUX_KERNEL
 	depends on BR2_INSTALL_LIBSTDCPP # jsoncpp, protobuf, tbb
-	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # grpc, gtest
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # grpc, gtest
 	depends on BR2_TOOLCHAIN_HAS_THREADS # jq, protobuf, tbb
 	depends on !BR2_STATIC_LIBS # protobuf, tbb
 	depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC # grpc
package/grpc/0001-Properly-detect-the-availability-of-pthread_setname_.patch +19 -13
index 92dc5a6c45..5abdf6600f 100644
@@ -1,4 +1,4 @@
-From 0dfb289a3b362b082ac3608d887e42f09dadc0d2 Mon Sep 17 00:00:00 2001
+From 7fddf245b63d723ffa03e9c87366e4a7673121c8 Mon Sep 17 00:00:00 2001
 From: Thomas Petazzoni <[email protected]>
 Date: Mon, 31 Dec 2018 16:22:07 +0100
 Subject: [PATCH] Properly detect the availability of pthread_setname_np()
@@ -18,17 +18,23 @@ Signed-off-by: Thomas Petazzoni <[email protected]>
   this with our cmake based workaround.
   See: https://github.com/grpc/grpc/pull/27540
 ]
+Signed-off-by: Michael Nosthoff <[email protected]>
+
+[[email protected]:
+  In 1.52.0 the path of port_platform.h changed. Alter patch accordingly.
+]
+
 Signed-off-by: Michael Nosthoff <[email protected]>
 ---
- CMakeLists.txt                            | 6 ++++++
- include/grpc/impl/codegen/port_platform.h | 2 ++
+ CMakeLists.txt                       | 6 ++++++
+ include/grpc/support/port_platform.h | 2 ++
  2 files changed, 8 insertions(+)
 
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 45c2fcb..0b2be4f 100644
+index b0299050c4..5dfc04be90 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -208,6 +208,12 @@ if (NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE)
+@@ -247,6 +247,12 @@ if (NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE)
  endif()
  list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
  
@@ -41,11 +47,11 @@ index 45c2fcb..0b2be4f 100644
  if(MSVC)
    include(cmake/msvc_static_runtime.cmake)
    add_definitions(-D_WIN32_WINNT=0x600 -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS)
-diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h
-index 4f213ff..55ecd9d 100644
---- a/include/grpc/impl/codegen/port_platform.h
-+++ b/include/grpc/impl/codegen/port_platform.h
-@@ -186,6 +186,7 @@
+diff --git a/include/grpc/support/port_platform.h b/include/grpc/support/port_platform.h
+index 9f9cac0054..29f99db7cf 100644
+--- a/include/grpc/support/port_platform.h
++++ b/include/grpc/support/port_platform.h
+@@ -181,6 +181,7 @@
  #endif /* _LP64 */
  #ifdef __GLIBC__
  #define GPR_POSIX_CRASH_HANDLER 1
@@ -53,7 +59,7 @@ index 4f213ff..55ecd9d 100644
  #ifdef __GLIBC_PREREQ
  #if __GLIBC_PREREQ(2, 12)
  #define GPR_LINUX_PTHREAD_NAME 1
-@@ -194,6 +195,7 @@
+@@ -189,6 +190,7 @@
  // musl libc & others
  #define GPR_LINUX_PTHREAD_NAME 1
  #endif
@@ -61,6 +67,6 @@ index 4f213ff..55ecd9d 100644
  #include <linux/version.h>
  #else /* musl libc */
  #define GPR_MUSL_LIBC_COMPAT 1
-
 -- 
-2.26.63
+2.34.1
+
package/grpc/0003-host-grpc-only-cpp-plugin.patch +34 -28

191 lines not on this page · raw message

package/grpc/Config.in +3 -3
index db6425819b..dffe164e3a 100644
@@ -3,7 +3,7 @@ config BR2_PACKAGE_GRPC
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HAS_THREADS # protobuf, re2
 	depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # protobuf
-	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7
 	depends on !BR2_STATIC_LIBS # protobuf, libabseil-cpp
 	depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC
 	depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS
@@ -19,9 +19,9 @@ config BR2_PACKAGE_GRPC
 
 	  http://github.com/grpc/grpc
 
-comment "grpc needs a toolchain w/ C++, threads, dynamic library, gcc >= 5"
+comment "grpc needs a toolchain w/ C++, threads, dynamic library, gcc >= 7.3"
 	depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS
 	depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS \
-		|| BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_5
+		|| BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_7
 	depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
package/grpc/grpc.hash +1 -1
index e6b76dcb5e..e53c13476f 100644
@@ -1,3 +1,3 @@
 # Locally computed
-sha256  b55696fb249669744de3e71acc54a9382bea0dce7cd5ba379b356b12b82d4229  grpc-1.51.1.tar.gz
+sha256  ec125d7fdb77ecc25b01050a0d5d32616594834d3fe163b016768e2ae42a2df6  grpc-1.52.1.tar.gz
 sha256  590198e3f305f2c347fde64d637c65492bbef554db6c8364e149cd375e3797ee  LICENSE
package/grpc/grpc.mk +1 -1
index 9125b1f9f6..fd051170fe 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-GRPC_VERSION = 1.51.1
+GRPC_VERSION = 1.52.1
 GRPC_SITE = $(call github,grpc,grpc,v$(GRPC_VERSION))
 GRPC_LICENSE = Apache-2.0, BSD-3-Clause (third_party code), MPL-2.0 (etc/roots.pem)
 GRPC_LICENSE_FILES = LICENSE
package/sysdig/Config.in +3 -3
index c0a631bd49..581d778d54 100644
@@ -4,7 +4,7 @@ config BR2_PACKAGE_SYSDIG
 	depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # falcosecurity-libs
 	depends on BR2_LINUX_KERNEL # falcosecurity-libs
 	depends on BR2_INSTALL_LIBSTDCPP
-	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # falcosecurity-libs
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # grpc
 	depends on BR2_TOOLCHAIN_HAS_THREADS # falcosecurity-libs
 	depends on !BR2_STATIC_LIBS # falcosecurity-libs
 	depends on BR2_TOOLCHAIN_USES_GLIBC # falcosecurity-libs
@@ -23,12 +23,12 @@ config BR2_PACKAGE_SYSDIG
 
 	  https://github.com/draios/sysdig/wiki
 
-comment "sysdig needs a glibc toolchain w/ C++, threads, gcc >= 5, dynamic library, a Linux kernel, and luajit or lua 5.1 to be built"
+comment "sysdig needs a glibc toolchain w/ C++, threads, gcc >= 7.3, dynamic library, a Linux kernel, and luajit or lua 5.1 to be built"
 	depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS
 	depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
 	depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC
 	depends on !BR2_LINUX_KERNEL || !BR2_INSTALL_LIBSTDCPP \
 		|| !BR2_TOOLCHAIN_HAS_THREADS \
-		|| !BR2_TOOLCHAIN_GCC_AT_LEAST_5 || BR2_STATIC_LIBS \
+		|| !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || BR2_STATIC_LIBS \
 		|| !BR2_TOOLCHAIN_USES_GLIBC \
 		|| !BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hello Michael,

Thanks for the new iteration!

Quoted 1 line · On Mon, 20 Feb 2023 13:49:45 +0100 Michael Nosthoff via buildroot…

+comment "grpc needs a toolchain w/ C++, gcc >= 7.3"

It's a bit annoying that it depends on gcc >= 7.3 and not gcc >= 7, because technically BR2_TOOLCHAIN_GCC_AT_LEAST_7 only implies >= 7.x, and not >= 7.3.

Did you check what happens with gcc 7.0, 7.1 or 7.2 ?

https://toolchains.bootlin.com/downloads/releases/toolchains/armv7-eabihf/tarballs/armv7-eabihf--glibc--bleeding-edge-2017.11-1.tar.bz2
uses gcc 7.2.0 for example. Here is a fragment to use it:
https://toolchains.bootlin.com/downloads/releases/toolchains/armv7-eabihf/fragments/armv7-eabihf--glibc--bleeding-edge-2017.11-1.frag.

I don't easily find a toolchain with gcc 7.0 or 7.1 unfortunately.

Worst case, we could make this dependency >= 8.0.

But clearly, a comment that says >= 7.3, but with a dependency on BR2_TOOLCHAIN_GCC_AT_LEAST_7 is going to be very misleading.

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot