You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When gRPC is built with a shared-library version of abseil (on Windows), it appears that it fetches and uses a protobuf binary not build with a shared-library abseil.
The build eventually fails with numerous link errors, the first of which is:
abseil_dll.lib(abseil_dll.dll) : error LNK2005: "public: static class absl::lts_20240116::hash_internal::MixingHashStat
e __cdecl absl::lts_20240116::hash_internal::MixingHashState::combine_contiguous(class absl::lts_20240116::hash_interna
l::MixingHashState,unsigned char const *,unsigned __int64)" (?combine_contiguous@MixingHashState@hash_internal@lts_2024
0116@absl@@SA?AV1234@V1234@PEBE_K@Z) already defined in libprotobuf.lib(descriptor.obj) [path...ConanHome\p\b\grpce4d6f131e1578\b\build\grpc_csharp_plugin.vcxproj]
The following manual steps work around the issue:
Fetch abseil with the shared-library option
Install protobuf and force the build (i.e. conan install --requires=protobuf/5.27.0 --build=protobuf/5.27.0 --profile:host ... ) so the protobuf in the cache was built against the shared-library abseil
Install grpc
Package and Environment Details
Package Name/Version: grpc/1.65.0 and protobuf/5.27.0
Operating System+version: Windows 11
Compiler+version: Visual Studio 2019, 19.29.30154 (compiler.version=192)
Conan version: Conan version 2.8.0
Python version: Python 3.7.4
Conan profile
Build profile:
[settings]
os=Windows
compiler=msvc
compiler.runtime=dynamic
# first three digits of _MSC_VER, 192 for VS 2016-2019
compiler.version=192
compiler.cppstd=17
build_type=Release
compiler.runtime_type=Release
arch=x86_64
# If the options are not the same for _dependant_ libraries, the incompatible base
# libraries tend to be found and used by conan.
[options]
abseil/*:shared=True
grpc/*:secure=True
protobuf/*:shared=False
Host profile:
[settings]
os=Windows
compiler=msvc
compiler.runtime=dynamic
# first three digits of _MSC_VER, 192 for VS 2016-2019
compiler.version=192
compiler.cppstd=17
build_type=Release
compiler.runtime_type=Release
arch=x86_64
[options]
abseil/*:shared=True
grpc/*:secure=True
protobuf/*:shared=False
It also fails if the abseil library is forced to a shared version, as the abseil bin directory apparently isn't included in the path (grpc requires building with a tool in protobuf, which uses abseil and as a result must be able to find the shared library at build time).
Description
When gRPC is built with a shared-library version of abseil (on Windows), it appears that it fetches and uses a protobuf binary not build with a shared-library abseil.
The build eventually fails with numerous link errors, the first of which is:
The following manual steps work around the issue:
abseil
with the shared-library optionprotobuf
and force the build (i.e. conan install --requires=protobuf/5.27.0 --build=protobuf/5.27.0 --profile:host ... ) so the protobuf in the cache was built against the shared-library abseilgrpc
Package and Environment Details
Conan profile
Build profile:
Host profile:
Steps to reproduce
conan install "--requires=grpc/1.65.0@#e9067573e87d3c3efc634ce0d727d7eb" "--build=grpc/1.65.0@#e9067573e87d3c3efc634ce0d727d7eb" --profile:host host_profile.txt --profile:build build_profile.txt
Logs
Log is selected portions only, all output is probably not relevant.
Click to expand log
The text was updated successfully, but these errors were encountered: