Skip to content

Commit

Permalink
grpc-cpp v1.62.0 (#352)
Browse files Browse the repository at this point in the history
automerged PR by conda-forge/automerge-action
  • Loading branch information
github-actions[bot] authored Mar 6, 2024
2 parents f5058cc + 0987a1a commit e09f96a
Show file tree
Hide file tree
Showing 19 changed files with 200 additions and 79 deletions.
2 changes: 1 addition & 1 deletion .ci_support/linux_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ docker_image:
libabseil:
- '20240116'
libprotobuf:
- 4.25.2
- 4.25.3
openssl:
- '3'
pin_run_as_build:
Expand Down
2 changes: 1 addition & 1 deletion .ci_support/linux_aarch64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ docker_image:
libabseil:
- '20240116'
libprotobuf:
- 4.25.2
- 4.25.3
openssl:
- '3'
pin_run_as_build:
Expand Down
2 changes: 1 addition & 1 deletion .ci_support/linux_ppc64le_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ docker_image:
libabseil:
- '20240116'
libprotobuf:
- 4.25.2
- 4.25.3
openssl:
- '3'
pin_run_as_build:
Expand Down
24 changes: 24 additions & 0 deletions .ci_support/migrations/libgrpc162_libprotobuf4253.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
__migrator:
build_number: 1
commit_message: Rebuild for libprotobuf 4.25.3
kind: version
migration_number: 1
paused: true
exclude:
- abseil-cpp
- grpc-cpp
- libprotobuf
- protobuf
libgrpc:
- "1.62"
libprotobuf:
- 4.25.3
# keep abseil bump from libabseil20240116_libgrpc161_libprotobuf4252;
# this ensures that this migration applies also without the previous one
libabseil:
- "20240116"
# already covered by libabseil20230802_libgrpc157_libprotobuf4234,
# which we cannot delete yet, but keep for clarity
MACOSX_DEPLOYMENT_TARGET: # [osx and x86_64]
- "10.13" # [osx and x86_64]
migrator_ts: 1709522594.9193177
2 changes: 1 addition & 1 deletion .ci_support/osx_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ cxx_compiler_version:
libabseil:
- '20240116'
libprotobuf:
- 4.25.2
- 4.25.3
macos_machine:
- x86_64-apple-darwin13.4.0
openssl:
Expand Down
2 changes: 1 addition & 1 deletion .ci_support/osx_arm64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ cxx_compiler_version:
libabseil:
- '20240116'
libprotobuf:
- 4.25.2
- 4.25.3
macos_machine:
- arm64-apple-darwin20.0.0
openssl:
Expand Down
2 changes: 1 addition & 1 deletion .ci_support/win_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cxx_compiler:
libabseil:
- '20240116'
libprotobuf:
- 4.25.2
- 4.25.3
openssl:
- '3'
pin_run_as_build:
Expand Down
2 changes: 0 additions & 2 deletions recipe/build-cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ if [[ "$CONDA_BUILD_CROSS_COMPILATION" == 1 ]]; then
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=$BUILD_PREFIX \
-DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX \
-DCMAKE_POLICY_DEFAULT_CMP0074=NEW \
-DgRPC_CARES_PROVIDER="package" \
-DgRPC_PROTOBUF_PROVIDER="package" \
-DgRPC_SSL_PROVIDER="package" \
Expand Down Expand Up @@ -77,7 +76,6 @@ cmake -GNinja \
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
-DCMAKE_PREFIX_PATH=$PREFIX \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DCMAKE_POLICY_DEFAULT_CMP0074=NEW \
-DgRPC_CARES_PROVIDER="package" \
-DgRPC_PROTOBUF_PROVIDER="package" \
-DgRPC_SSL_PROVIDER="package" \
Expand Down
12 changes: 7 additions & 5 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% set version = "1.61.1" %}
{% set version = "1.62.0" %}

# core package & vendored libs use different version scheme than CPP libs, see
# https://github.com/grpc/grpc/blob/v1.48.1/CMakeLists.txt#L28-L32
Expand All @@ -19,10 +19,10 @@ package:

source:
url: https://github.com/grpc/grpc/archive/v{{ version.replace(".pre", "-pre") }}.tar.gz
sha256: 6dadc0420ad2d4b8ac49f516830f72feae3764bf83decc8d7c3a871eca1a0843
sha256: f40bde4ce2f31760f65dc49a2f50876f59077026494e67dccf23992548b1b04f
patches:
- patches/0001-windows-ssl-lib-names.patch # [win]
- patches/0002-fix-win-setup-cmds.patch # [win]
- patches/0001-windows-ssl-lib-names.patch
- patches/0002-fix-win-setup-cmds.patch
- patches/0003-Link-against-grpc.patch
- patches/0004-force-protoc-executable.patch
- patches/0005-switch-to-C-17-for-grpcio.patch
Expand All @@ -34,9 +34,11 @@ source:
- patches/0008-link-grpc-_unsecure-to-grpc.patch
# see https://github.com/grpc/grpc/issues/35794
- patches/0009-fix-missing-DLL-exports-in-vendored-upb.patch
# fix symbol visibility regression on windows
- patches/0010-for-main-targets-set-_DLL_EXPORTS-when-building-and-.patch

build:
number: 1
number: 0

outputs:
- name: libgrpc
Expand Down
8 changes: 4 additions & 4 deletions recipe/patches/0001-windows-ssl-lib-names.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 70d8f5bf4fea8ec180f7d99d0fce367f9d64a981 Mon Sep 17 00:00:00 2001
From c6556038b1e913b84bd6427fa71457b2aa2f8577 Mon Sep 17 00:00:00 2001
From: Jonathan Helmus <[email protected]>
Date: Mon, 17 Feb 2020 15:45:06 -0600
Subject: [PATCH 1/9] windows ssl lib names
Subject: [PATCH 01/10] windows ssl lib names

Co-Authored-By: Julien Schueller <[email protected]>
Co-Authored-By: Nicholas Bollweg <[email protected]>
Expand All @@ -11,10 +11,10 @@ Co-Authored-By: Marius van Niekerk <[email protected]>
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/setup.py b/setup.py
index 97c1dcec54..82de367535 100644
index 6ebfae1811..07df8358d0 100644
--- a/setup.py
+++ b/setup.py
@@ -366,10 +366,10 @@ if "win32" in sys.platform:
@@ -350,10 +350,10 @@ if "win32" in sys.platform:
"ws2_32",
)
if BUILD_WITH_SYSTEM_OPENSSL:
Expand Down
31 changes: 15 additions & 16 deletions recipe/patches/0002-fix-win-setup-cmds.patch
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
From 91b1278c6be61939d488114f145f98334415eb3e Mon Sep 17 00:00:00 2001
From ef1656b4c28aea56b64ddcbebc4d9b08f591b8d7 Mon Sep 17 00:00:00 2001
From: Mike Sarahan <[email protected]>
Date: Tue, 18 Feb 2020 13:53:05 -0600
Subject: [PATCH 2/9] fix win setup cmds
Subject: [PATCH 02/10] fix win setup cmds

Co-Authored-By: Julien Schueller <[email protected]>
Co-Authored-By: Nicholas Bollweg <[email protected]>
Co-Authored-By: Marius van Niekerk <[email protected]>
Co-Authored-By: H. Vetinari <[email protected]>
---
setup.py | 7 +++----
setup.py | 6 +++---
src/python/grpcio/commands.py | 2 ++
2 files changed, 5 insertions(+), 4 deletions(-)
2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/setup.py b/setup.py
index 82de367535..47e1f25d7f 100644
index 07df8358d0..dfe4c9caa7 100644
--- a/setup.py
+++ b/setup.py
@@ -214,6 +214,9 @@ ENABLE_DOCUMENTATION_BUILD = _env_bool_value(
@@ -208,6 +208,9 @@ ENABLE_DOCUMENTATION_BUILD = _env_bool_value(


def check_linker_need_libatomic():
Expand All @@ -26,17 +26,16 @@ index 82de367535..47e1f25d7f 100644
"""Test if linker on system needs libatomic."""
code_test = (
b"#include <atomic>\n"
@@ -268,10 +271,6 @@ if EXTRA_ENV_COMPILE_ARGS is None:
EXTRA_ENV_COMPILE_ARGS += (
" -D_ftime=_ftime64 -D_timeb=__timeb64"
)
- else:
- # We need to statically link the C++ Runtime, only the C runtime is
- # available dynamically
- EXTRA_ENV_COMPILE_ARGS += " /MT"
@@ -249,9 +252,6 @@ if EXTRA_ENV_COMPILE_ARGS is None:
if "win32" in sys.platform:
# MSVC by defaults uses C++14 so C11 needs to be specified.
EXTRA_ENV_COMPILE_ARGS += " /std:c11"
- # We need to statically link the C++ Runtime, only the C runtime is
- # available dynamically
- EXTRA_ENV_COMPILE_ARGS += " /MT"
elif "linux" in sys.platform:
EXTRA_ENV_COMPILE_ARGS += (
" -fvisibility=hidden -fno-wrapv -fno-exceptions"
# GCC by defaults uses C17 so only C++14 needs to be specified.
EXTRA_ENV_COMPILE_ARGS += " -std=c++14"
diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py
index 98324c955f..484aef0d8b 100644
--- a/src/python/grpcio/commands.py
Expand Down
12 changes: 6 additions & 6 deletions recipe/patches/0003-Link-against-grpc.patch
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
From f401f5fdc9afe592f7ff232c6466f8c36c7e58e7 Mon Sep 17 00:00:00 2001
From 5957c91f83b93c550266761cedfbcd747bf9dc18 Mon Sep 17 00:00:00 2001
From: Marius van Niekerk <[email protected]>
Date: Mon, 13 Jun 2022 17:13:07 -0400
Subject: [PATCH 3/9] Link against grpc
Subject: [PATCH 03/10] Link against grpc

Co-Authored-By: H. Vetinari <[email protected]>
---
setup.py | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/setup.py b/setup.py
index 47e1f25d7f..00dfd3419a 100644
index dfe4c9caa7..d410af9006 100644
--- a/setup.py
+++ b/setup.py
@@ -179,6 +179,8 @@ BUILD_WITH_STATIC_LIBSTDCXX = _env_bool_value(
Expand All @@ -21,20 +21,20 @@ index 47e1f25d7f..00dfd3419a 100644
# For local development use only: This skips building gRPC Core and its
# dependencies, including protobuf and boringssl. This allows "incremental"
# compilation by first building gRPC Core using make, then building only the
@@ -379,6 +381,12 @@ if BUILD_WITH_SYSTEM_ABSL:
@@ -364,6 +366,12 @@ if BUILD_WITH_SYSTEM_ABSL:
EXTENSION_LIBRARIES += tuple(
lib.stem[3:] for lib in pathlib.Path("/usr").glob("lib*/libabsl_*.so")
)
+if BUILD_WITH_SYSTEM_GRPC_CORE:
+ EXTENSION_LIBRARIES += ('gpr', 'grpc', )
+ if "win32" in sys.platform:
+ EXTENSION_LIBRARIES += ('libprotoc', 'libprotobuf', 'libprotobuf-lite', 'address_sorting',)
+ EXTENSION_LIBRARIES += ('libprotoc', 'libprotobuf', 'address_sorting',)
+ EXTENSION_LIBRARIES += tuple(f'upb_{x}_lib' for x in ["base", "json", "mem", "message", "textformat"])
+ EXTENSION_LIBRARIES += tuple(lib.stem for lib in pathlib.Path(os.environ['LIBRARY_LIB']).glob('absl_*.lib'))

DEFINE_MACROS = (("_WIN32_WINNT", 0x600),)
asm_files = []
@@ -504,6 +512,9 @@ def cython_extensions_and_necessity():
@@ -486,6 +494,9 @@ def cython_extensions_and_necessity():
prefix + "libgrpc.a",
]
core_c_files = []
Expand Down
4 changes: 2 additions & 2 deletions recipe/patches/0004-force-protoc-executable.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From dab5f8bf11094b43a411b1e55f0a1ed1d486dc9e Mon Sep 17 00:00:00 2001
From 63db0bf5d058836da172ff9c3c7fc113e1bfd52c Mon Sep 17 00:00:00 2001
From: "Uwe L. Korn" <[email protected]>
Date: Fri, 11 Sep 2020 14:20:04 +0200
Subject: [PATCH 4/9] force protoc executable
Subject: [PATCH 04/10] force protoc executable

---
cmake/protobuf.cmake | 17 ++---------------
Expand Down
43 changes: 26 additions & 17 deletions recipe/patches/0005-switch-to-C-17-for-grpcio.patch
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
From b1a1503ac5730c13f1783d29b0951c82a2dea0d6 Mon Sep 17 00:00:00 2001
From 80df2ca96a075552360b17ad4bc007be26f89d50 Mon Sep 17 00:00:00 2001
From: "H. Vetinari" <[email protected]>
Date: Sat, 3 Sep 2022 19:23:15 +0200
Subject: [PATCH 5/9] switch to C++17 for grpcio
Subject: [PATCH 05/10] switch to C++17 for grpcio

---
setup.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
setup.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/setup.py b/setup.py
index 00dfd3419a..c0b391ea2c 100644
index d410af9006..62084b7800 100644
--- a/setup.py
+++ b/setup.py
@@ -226,7 +226,7 @@ def check_linker_need_libatomic():
@@ -220,7 +220,7 @@ def check_linker_need_libatomic():
)
cxx = shlex.split(os.environ.get("CXX", "c++"))
cpp_test = subprocess.Popen(
Expand All @@ -20,7 +20,7 @@ index 00dfd3419a..c0b391ea2c 100644
stdin=PIPE,
stdout=PIPE,
stderr=PIPE,
@@ -237,7 +237,7 @@ def check_linker_need_libatomic():
@@ -231,7 +231,7 @@ def check_linker_need_libatomic():
# Double-check to see if -latomic actually can solve the problem.
# https://github.com/grpc/grpc/issues/22491
cpp_test = subprocess.Popen(
Expand All @@ -29,14 +29,23 @@ index 00dfd3419a..c0b391ea2c 100644
stdin=PIPE,
stdout=PIPE,
stderr=PIPE,
@@ -256,8 +256,9 @@ def check_linker_need_libatomic():
EXTRA_ENV_COMPILE_ARGS = os.environ.get("GRPC_PYTHON_CFLAGS", None)
EXTRA_ENV_LINK_ARGS = os.environ.get("GRPC_PYTHON_LDFLAGS", None)
if EXTRA_ENV_COMPILE_ARGS is None:
- EXTRA_ENV_COMPILE_ARGS = " -std=c++14"
+ EXTRA_ENV_COMPILE_ARGS = ' -std=c++17'
@@ -253,16 +253,16 @@ if EXTRA_ENV_COMPILE_ARGS is None:
EXTRA_ENV_COMPILE_ARGS = ""
if "win32" in sys.platform:
+ EXTRA_ENV_COMPILE_ARGS = ' /std:c++17'
if sys.version_info < (3, 5):
EXTRA_ENV_COMPILE_ARGS += " -D_hypot=hypot"
# We use define flags here and don't directly add to DEFINE_MACROS below to
# MSVC by defaults uses C++14 so C11 needs to be specified.
- EXTRA_ENV_COMPILE_ARGS += " /std:c11"
+ EXTRA_ENV_COMPILE_ARGS += " /std:c11 /std:c++17"
elif "linux" in sys.platform:
# GCC by defaults uses C17 so only C++14 needs to be specified.
- EXTRA_ENV_COMPILE_ARGS += " -std=c++14"
+ EXTRA_ENV_COMPILE_ARGS += " -std=c++17"
EXTRA_ENV_COMPILE_ARGS += (
" -fvisibility=hidden -fno-wrapv -fno-exceptions"
)
elif "darwin" in sys.platform:
# AppleClang by defaults uses C17 so only C++14 needs to be specified.
- EXTRA_ENV_COMPILE_ARGS += " -std=c++14"
+ EXTRA_ENV_COMPILE_ARGS += " -std=c++17"
EXTRA_ENV_COMPILE_ARGS += (
" -stdlib=libc++ -fvisibility=hidden -fno-wrapv -fno-exceptions"
" -DHAVE_UNISTD_H"
10 changes: 5 additions & 5 deletions recipe/patches/0006-fix-abseil-setup.patch
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
From 990eda453f1a79a9ccbd7d32077fa92ac8dd6855 Mon Sep 17 00:00:00 2001
From 3cd2e79d2963d5b351a3c2e1a0291eac59db9e87 Mon Sep 17 00:00:00 2001
From: "H. Vetinari" <[email protected]>
Date: Sun, 4 Sep 2022 14:34:52 +0200
Subject: [PATCH 6/9] fix abseil setup
Subject: [PATCH 06/10] fix abseil setup

---
setup.py | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/setup.py b/setup.py
index c0b391ea2c..e898b58f54 100644
index 62084b7800..aa70b88cf9 100644
--- a/setup.py
+++ b/setup.py
@@ -379,15 +379,22 @@ if BUILD_WITH_SYSTEM_CARES:
@@ -363,15 +363,22 @@ if BUILD_WITH_SYSTEM_CARES:
if BUILD_WITH_SYSTEM_RE2:
EXTENSION_LIBRARIES += ("re2",)
if BUILD_WITH_SYSTEM_ABSL:
Expand All @@ -32,7 +32,7 @@ index c0b391ea2c..e898b58f54 100644
if BUILD_WITH_SYSTEM_GRPC_CORE:
EXTENSION_LIBRARIES += ('gpr', 'grpc', )
if "win32" in sys.platform:
EXTENSION_LIBRARIES += ('libprotoc', 'libprotobuf', 'libprotobuf-lite', 'address_sorting',)
EXTENSION_LIBRARIES += ('libprotoc', 'libprotobuf', 'address_sorting',)
EXTENSION_LIBRARIES += tuple(f'upb_{x}_lib' for x in ["base", "json", "mem", "message", "textformat"])
- EXTENSION_LIBRARIES += tuple(lib.stem for lib in pathlib.Path(os.environ['LIBRARY_LIB']).glob('absl_*.lib'))

Expand Down
Loading

0 comments on commit e09f96a

Please sign in to comment.