Skip to contentSkip to conversation

package/grpc: bump to version 1.25.0

PATCH Superseded aduskett at gmail.com 2 participants 3 messages Nov 28, 2019 – Dec 3, 2019

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/grpc: bump to version 1.25.0

From: Adam Duskett <[email protected]>

Other changes:
- Remove upstream patch 0004-Fix-gettid-naming-conflict.patch
- Remove upstream patch 0005-Rename-gettid-functions.patch
- Add a check for BR2_TOOLCHAIN_GCC_AT_LEAST_5 in grpc.mk. If the selected toolchain is not at least version 5 or higher, set the GRPC_CFLAGS and GRPC_CXXFLAGS optimizations to -O0. This check prevents the following error:
error: failure memory model cannot be stronger than success memory model for '__atomic_compare_exchange'

Tested with test-pkg, all tests passed:

            br-arm-full [1/6]: OK
 br-arm-cortex-a9-glibc [2/6]: OK
  br-arm-cortex-m4-full [3/6]: SKIPPED
         br-x86-64-musl [4/6]: OK
     br-arm-full-static [5/6]: SKIPP

---
Changes v1 -> v2:
- Fix the hceck for BR2_TOOLCHAIN_GCC_AT_LEAST_5. It should have read ifneq not ifeq.

 .../0001-target-build-using-host-plugin.patch |  4 +-
 ...the-availability-of-pthread_setname_.patch |  8 +-
 .../0004-Fix-gettid-naming-conflict.patch     | 36 --------
 .../grpc/0005-Rename-gettid-functions.patch   | 83 -------------------
 package/grpc/grpc.hash                        |  2 +-
 package/grpc/grpc.mk                          | 10 ++-
 6 files changed, 16 insertions(+), 127 deletions(-)
 delete mode 100644 package/grpc/0004-Fix-gettid-naming-conflict.patch
 delete mode 100644 package/grpc/0005-Rename-gettid-functions.patch
package/grpc/0001-target-build-using-host-plugin.patch +2 -2
index 5993987bc8..2da657762f 100644
@@ -20,7 +20,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
 index fc76cf5..7a22b08 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -13108,6 +13108,18 @@ target_link_libraries(grpc_cli
+@@ -13420,6 +13420,18 @@ target_link_libraries(grpc_cli
  endif (gRPC_BUILD_TESTS)
  if (gRPC_BUILD_CODEGEN)
  
@@ -39,7 +39,7 @@ index fc76cf5..7a22b08 100644
  add_executable(grpc_cpp_plugin
    src/compiler/cpp_plugin.cc
  )
-@@ -13143,6 +13155,7 @@ if (gRPC_INSTALL)
+@@ -13457,6 +13469,7 @@ if (gRPC_INSTALL)
      ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
    )
  endif()
package/grpc/0002-Properly-detect-the-availability-of-pthread_setname_.patch +4 -4
index 14807999b8..86586d850b 100644
@@ -20,7 +20,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
 index 89e834b..c7bd2ad 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -94,6 +94,12 @@ endif()
+@@ -97,6 +97,12 @@ endif()
  
  set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
  
@@ -30,14 +30,14 @@ index 89e834b..c7bd2ad 100644
 +  add_definitions(-DHAVE_PTHREAD_SETNAME_NP)
 +endif ()
 +
- add_definitions(-DPB_FIELD_32BIT)
- 
  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 031c0c3..a29a9dc 100644
 --- a/include/grpc/impl/codegen/port_platform.h
 +++ b/include/grpc/impl/codegen/port_platform.h
-@@ -173,7 +173,9 @@
+@@ -181,7 +181,9 @@
  #endif /* _LP64 */
  #ifdef __GLIBC__
  #define GPR_POSIX_CRASH_HANDLER 1
package/grpc/0004-Fix-gettid-naming-conflict.patch deleted +0 -36
deleted file mode 100644
index 05b9f2fd5b..0000000000
@@ -1,36 +0,0 @@
-From de6255941a5e1c2fb2d50e57f84e38c09f45023d Mon Sep 17 00:00:00 2001
-From: Juanli Shen <[email protected]>
-Date: Fri, 23 Aug 2019 08:46:09 -0700
-Subject: [PATCH] Fix gettid() naming conflict
-
-[Retrieved from:
-https://github.com/grpc/grpc/commit/de6255941a5e1c2fb2d50e57f84e38c09f45023d]
-Signed-off-by: Fabrice Fontaine <[email protected]>
----
- src/core/lib/gpr/log_linux.cc | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/src/core/lib/gpr/log_linux.cc b/src/core/lib/gpr/log_linux.cc
-index 561276f0c20..81026e5689b 100644
---- a/src/core/lib/gpr/log_linux.cc
-+++ b/src/core/lib/gpr/log_linux.cc
-@@ -40,7 +40,9 @@
- #include <time.h>
- #include <unistd.h>
- 
--static long gettid(void) { return syscall(__NR_gettid); }
-+// Not naming it as gettid() to avoid duplicate declarations when complied with
-+// GCC 9.1.
-+static long local_gettid(void) { return syscall(__NR_gettid); }
- 
- void gpr_log(const char* file, int line, gpr_log_severity severity,
-              const char* format, ...) {
-@@ -70,7 +72,7 @@ void gpr_default_log(gpr_log_func_args* args) {
-   gpr_timespec now = gpr_now(GPR_CLOCK_REALTIME);
-   struct tm tm;
-   static __thread long tid = 0;
--  if (tid == 0) tid = gettid();
-+  if (tid == 0) tid = local_gettid();
- 
-   timer = static_cast<time_t>(now.tv_sec);
-   final_slash = strrchr(args->file, '/');
package/grpc/0005-Rename-gettid-functions.patch deleted +0 -83

83 lines not on this page · raw message

package/grpc/grpc.hash +1 -1
index 58f32c6b54..5201f72106 100644
@@ -1,3 +1,3 @@
 # Locally computed
-sha256 f56ced18740895b943418fa29575a65cc2396ccfa3159fa40d318ef5f59471f9 grpc-1.23.0.tar.gz
+sha256 ffbe61269160ea745e487f79b0fd06b6edd3d50c6d9123f053b5634737cf2f69 grpc-1.25.0.tar.gz
 sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE
package/grpc/grpc.mk +9 -1
index 569db12089..bc0bee10b1 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-GRPC_VERSION = 1.23.0
+GRPC_VERSION = 1.25.0
 GRPC_SITE = $(call github,grpc,grpc,v$(GRPC_VERSION))
 GRPC_LICENSE = Apache-2.0
 GRPC_LICENSE_FILES = LICENSE
@@ -43,11 +43,19 @@ GRPC_CFLAGS += -DGPR_DISABLE_WRAPPED_MEMCPY
 GRPC_CXXFLAGS += -DGPR_DISABLE_WRAPPED_MEMCPY
 endif
 
+# Toolchains older than gcc5 will fail to compile with -0s due to:
+# error: failure memory model cannot be stronger than success memory model for
+# '__atomic_compare_exchange'
 ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
 GRPC_CFLAGS += -O0
 GRPC_CXXFLAGS += -O0
 endif
 
+ifneq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_5),y)
+GRPC_CFLAGS += -O0
+GRPC_CXXFLAGS += -O0
+endif
+
 GRPC_CONF_OPTS += \
 	-DCMAKE_C_FLAGS="$(GRPC_CFLAGS)" \
 	-DCMAKE_CXX_FLAGS="$(GRPC_CXXFLAGS)"
Signature · 1 line
2.23.0
#1 lore raw

PATCH v2 1/1 package/grpc: bump to version 1.25.0

Adam, All,

On 2019-11-28 15:18 -0800, aduskett at gmail.com spake thusly:

Quoted 10 lines

From: Adam Duskett <[email protected]>

Other changes:
- Remove upstream patch 0004-Fix-gettid-naming-conflict.patch
- Remove upstream patch 0005-Rename-gettid-functions.patch
- Add a check for BR2_TOOLCHAIN_GCC_AT_LEAST_5 in grpc.mk. If the selected toolchain is not at least version 5 or higher, set the GRPC_CFLAGS and GRPC_CXXFLAGS optimizations to -O0. This check prevents the following error:
error: failure memory model cannot be stronger than success memory model for '__atomic_compare_exchange'

Also:

- since 1.24.0, gRPC now requires C++ for tiself, not only as inherited from protobuf

[--SNIP--]

Quoted 14 lines
package/grpc/grpc.mk +1 -1
index 569db12089..bc0bee10b1 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-GRPC_VERSION = 1.23.0
+GRPC_VERSION = 1.25.0
 GRPC_SITE = $(call github,grpc,grpc,v$(GRPC_VERSION))
 GRPC_LICENSE = Apache-2.0
 GRPC_LICENSE_FILES = LICENSE

package/grpc/grpc.mk GRPC_CFLAGS += -DGPR_DISABLE_WRAPPED_MEMCPY · line 48

Quoted 6 lines
package/grpc/grpc.mk +3 -0
@@ -43,11 +43,19 @@ GRPC_CFLAGS += -DGPR_DISABLE_WRAPPED_MEMCPY
 GRPC_CXXFLAGS += -DGPR_DISABLE_WRAPPED_MEMCPY
 endif
 
+# Toolchains older than gcc5 will fail to compile with -0s due to:
+# error: failure memory model cannot be stronger than success memory model for
+# '__atomic_compare_exchange'

This comment should got below, along with the gc-at-least condition, I guess, no?

I've spawned a few tests to see if that bump could fix all the failures I encounter on my autobuilder. I'll report back later.

Regards,
Yann E. MORIN.

Quoted 20 lines
package/grpc/grpc.mk +5 -0
 ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
 GRPC_CFLAGS += -O0
 GRPC_CXXFLAGS += -O0
 endif
 
+ifneq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_5),y)
+GRPC_CFLAGS += -O0
+GRPC_CXXFLAGS += -O0
+endif
+
 GRPC_CONF_OPTS += \
 	-DCMAKE_C_FLAGS="$(GRPC_CFLAGS)" \
 	-DCMAKE_CXX_FLAGS="$(GRPC_CXXFLAGS)"
Signature · 6 lines
2.23.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH v2 1/1 package/grpc: bump to version 1.25.0

Adam, All,

On 2019-12-03 22:56 +0100, Yann E. MORIN spake thusly:

Quoted 2 lines

On 2019-11-28 15:18 -0800, aduskett at gmail.com spake thusly:

Quoted 1 line

From: Adam Duskett <[email protected]>

[--SNIP--]

Quoted 4 lines

package/grpc/grpc.mk line 7

Quoted 2 lines
package/grpc/grpc.mk +1 -1
-GRPC_VERSION = 1.23.0
+GRPC_VERSION = 1.25.0

I've spawned a few tests to see if that bump could fix all the failures I encounter on my autobuilder. I'll report back later.

Alas, to not avail. The build is still broken on my autobuilder... :-(

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'