From b95bef4e21f610c1282cb722f0dee38d1f80f69e Mon Sep 17 00:00:00 2001 From: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> Date: Sat, 31 Aug 2024 15:07:32 +0200 Subject: [PATCH 1/2] grpc: fix transitive_libs grpc regression --- recipes/grpc/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/grpc/all/conanfile.py b/recipes/grpc/all/conanfile.py index f133e9a897253..08093179af1ae 100644 --- a/recipes/grpc/all/conanfile.py +++ b/recipes/grpc/all/conanfile.py @@ -104,9 +104,9 @@ def requirements(self): # abseil is public. See https://github.com/conan-io/conan-center-index/pull/17284#issuecomment-1526082638 if Version(self.version) >= "1.62.0": self.requires("protobuf/5.27.0", transitive_headers=True) - self.requires("abseil/[>=20240116.1 <20240117.0]", transitive_headers=True) + self.requires("abseil/[>=20240116.1 <20240117.0]", transitive_headers=True, transitive_libs=True) else: - self.requires("abseil/[>=20230125.3 <=20230802.1]", transitive_headers=True) + self.requires("abseil/[>=20230125.3 <=20230802.1]", transitive_headers=True, transitive_libs=True) self.requires("protobuf/3.21.12", transitive_headers=True) self.requires("c-ares/[>=1.19.1 <2]") self.requires("openssl/[>=1.1 <4]") From dfbdfa6cae3c2591c859dafd4925dd0f9b350fdc Mon Sep 17 00:00:00 2001 From: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> Date: Tue, 3 Sep 2024 10:04:30 +0200 Subject: [PATCH 2/2] grpc: add comments to clarify transitive_libs --- recipes/grpc/all/conanfile.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/grpc/all/conanfile.py b/recipes/grpc/all/conanfile.py index 08093179af1ae..846221d92beaf 100644 --- a/recipes/grpc/all/conanfile.py +++ b/recipes/grpc/all/conanfile.py @@ -101,7 +101,9 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - # abseil is public. See https://github.com/conan-io/conan-center-index/pull/17284#issuecomment-1526082638 + # abseil requires: + # transitive_headers=True because grpc headers include abseil headers + # transitive_libs=True because generated code (grpc_cpp_plugin) require symbols from abseil if Version(self.version) >= "1.62.0": self.requires("protobuf/5.27.0", transitive_headers=True) self.requires("abseil/[>=20240116.1 <20240117.0]", transitive_headers=True, transitive_libs=True)