Open gmcdorman-opentext opened 1 month ago
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
``` ======== Input profiles ======== Profile host: [settings] arch=x86_64 build_type=Release compiler=msvc compiler.cppstd=17 compiler.runtime=dynamic compiler.runtime_type=Release compiler.version=192 os=Windows [options] abseil/*:shared=True boost/*:shared=True boost/*:without_log=True boost/*:without_stacktrace=True boost/*:without_type_erasure=True grpc/*:secure=True openssl/*:shared=True Profile build: [settings] arch=x86_64 build_type=Release compiler=msvc compiler.cppstd=17 compiler.runtime=dynamic compiler.runtime_type=Release compiler.version=192 os=Windows [options] abseil/*:shared=True grpc/*:secure=True protobuf/*:shared=False ======== Computing dependency graph ======== Graph root cli Requirements abseil/20240116.2#54f81a20ccd26a6558e18d57059847e2 - Cache c-ares/1.33.1#99a35827eebc984885f60362660ea232 - Cache grpc/1.65.0#e9067573e87d3c3efc634ce0d727d7eb - Cache openssl/1.1.1w#8bcd54a23717978bd94ab320e377ea93 - Cache protobuf/5.27.0#ccce9aa25886556c6d66c77b2be4d806 - Cache re2/20230301#4482314b6488e5d71e9944f5bedb730d - Cache zlib/1.3.1#f52e03ae3d251dec704634230cd806a2 - Cache Build requirements abseil/20240116.2#54f81a20ccd26a6558e18d57059847e2 - Cache nasm/2.15.05#058c93b2214a49ca1cfe9f8f26205568 - Cache protobuf/5.27.0#ccce9aa25886556c6d66c77b2be4d806 - Cache strawberryperl/5.32.1.1#8f83d05a60363a422f9033e52d106b47 - Cache zlib/1.3.1#f52e03ae3d251dec704634230cd806a2 - Cache Resolved version ranges c-ares/[>=1.19.1 <2]: c-ares/1.33.1 openssl/[>=1.1 <4]: openssl/1.1.1w zlib/[>=1.2.11 <2]: zlib/1.3.1 ======== Computing necessary packages ======== abseil/20240116.2: Main binary package 'a60be37676823331e6c4ba6bb1dd4938e81fb17a' missing abseil/20240116.2: Checking 2 compatible configurations abseil/20240116.2: Found compatible package '18ff13b488eb6ad8b3de7e4298eee0e6b9445eb2': compiler.cppstd=14 re2/20230301: Main binary package '3d0c3e6a0cd870340e1bf684e393bf3a496f22ed' missing re2/20230301: Checking 2 compatible configurations re2/20230301: Found compatible package 'fc89aa49e93bcd637519a084d5e03531cd818cab': compiler.cppstd=14 protobuf/5.27.0: Main binary package '35dbcd9886fc85b5675bbb06ea830085cd100f97' missing protobuf/5.27.0: Checking 2 compatible configurations protobuf/5.27.0: Found compatible package '86f42f196182773c27b3bd36514d50184ba17fdf': compiler.cppstd=14 grpc/1.65.0: Forced build from source Requirements abseil/20240116.2#54f81a20ccd26a6558e18d57059847e2:18ff13b488eb6ad8b3de7e4298eee0e6b9445eb2#4de31e2174293e3c28c177102d2fb25e - Cache c-ares/1.33.1#99a35827eebc984885f60362660ea232:ab0271e66c032798a15a6278934903a31510d3d8#81139b9909dae037b12132b612f03d2a - Cache grpc/1.65.0#e9067573e87d3c3efc634ce0d727d7eb:339cda98e1bc42747bf60f343bbcb84276e9a380 - Build openssl/1.1.1w#8bcd54a23717978bd94ab320e377ea93:e89ca6746c4f30111911a8a029b20219591413cc#9faaf21a51cc19c11e164ec1ef1262ff - Cache protobuf/5.27.0#ccce9aa25886556c6d66c77b2be4d806:86f42f196182773c27b3bd36514d50184ba17fdf#f517cf00ccd4d2999d7840131a66598b - Cache re2/20230301#4482314b6488e5d71e9944f5bedb730d:fc89aa49e93bcd637519a084d5e03531cd818cab#e44d52f25da29b5662cd8ee0cefd2f68 - Cache zlib/1.3.1#f52e03ae3d251dec704634230cd806a2:41ad450120fdab2266b1185a967d298f7ae52595#6513303f73b00a3c69312b4bf7cdcd9e - Cache Build requirements abseil/20240116.2#54f81a20ccd26a6558e18d57059847e2:18ff13b488eb6ad8b3de7e4298eee0e6b9445eb2#4de31e2174293e3c28c177102d2fb25e - Cache protobuf/5.27.0#ccce9aa25886556c6d66c77b2be4d806:86f42f196182773c27b3bd36514d50184ba17fdf#f517cf00ccd4d2999d7840131a66598b - Cache Skipped binaries nasm/2.15.05, strawberryperl/5.32.1.1, zlib/1.3.1 ======== Installing packages ======== abseil/20240116.2: Already installed! (1 of 7) c-ares/1.33.1: Already installed! (2 of 7) re2/20230301: Already installed! (3 of 7) zlib/1.3.1: Already installed! (4 of 7) openssl/1.1.1w: Already installed! (5 of 7) protobuf/5.27.0: Already installed! (6 of 7) -------- Installing package grpc/1.65.0 (7 of 7) -------- grpc/1.65.0: Building from source grpc/1.65.0: Package grpc/1.65.0:339cda98e1bc42747bf60f343bbcb84276e9a380 grpc/1.65.0: Copying sources to build folder grpc/1.65.0: Building your package in C:\Users\gmcdorman\git\CRSB.Conan2-Build-ThirdParty\build\ConanHome\p\b\grpce06250e8d935c\b grpc/1.65.0: Calling generate() grpc/1.65.0: Generators folder: C:\Users\gmcdorman\git\CRSB.Conan2-Build-ThirdParty\build\ConanHome\p\b\grpce06250e8d935c\b\build\generators grpc/1.65.0: CMakeToolchain generated: conan_toolchain.cmake grpc/1.65.0: CMakeToolchain generated: C:\Users\gmcdorman\git\CRSB.Conan2-Build-ThirdParty\build\ConanHome\p\b\grpce06250e8d935c\b\build\generators\CMakePresets.json grpc/1.65.0: CMakeToolchain generated: C:\Users\gmcdorman\git\CRSB.Conan2-Build-ThirdParty\build\ConanHome\p\b\grpce06250e8d935c\b\src\CMakeUserPresets.json grpc/1.65.0: CMakeDeps necessary find_package() and targets for your CMakeLists.txt find_package(protobuf) find_package(absl) find_package(c-ares) find_package(OpenSSL) find_package(re2) find_package(ZLIB) target_link_libraries(... protobuf::protobuf abseil::abseil c-ares::cares openssl::openssl re2::re2 ZLIB::ZLIB) grpc/1.65.0: Generating aggregated env files grpc/1.65.0: Generated aggregated env files: ['conanbuild.bat', 'conanrun.bat'] grpc/1.65.0: Calling build() grpc/1.65.0: apply_conandata_patches(): No patches defined in conandata grpc/1.65.0: Running CMake.configure() grpc/1.65.0: RUN: cmake -G "Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="X://ConanHome/p/b/grpce06250e8d935c/p" -DCMAKE_PROJECT_grpc_INCLUDE="C:\Users\gmcdorman\git\CRSB.Conan2-Build-ThirdParty\build\ConanHome\p\b\grpce06250e8d935c\b\src\conan_cmake_project_include.cmake" -DgRPC_BUILD_CODEGEN="ON" -DgRPC_BUILD_CSHARP_EXT="OFF" -DgRPC_BUILD_TESTS="OFF" -DgRPC_INSTALL="ON" -DgRPC_INSTALL_SHAREDIR="res/grpc" -DgRPC_ZLIB_PROVIDER="package" -DgRPC_CARES_PROVIDER="package" -DgRPC_RE2_PROVIDER="package" -DgRPC_SSL_PROVIDER="package" -DgRPC_PROTOBUF_PROVIDER="package" -DgRPC_ABSL_PROVIDER="package" -DgRPC_BUILD_GRPC_CPP_PLUGIN="ON" -DgRPC_BUILD_GRPC_CSHARP_PLUGIN="ON" -DgRPC_BUILD_GRPC_NODE_PLUGIN="ON" -DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN="ON" -DgRPC_BUILD_GRPC_PHP_PLUGIN="ON" -DgRPC_BUILD_GRPC_PYTHON_PLUGIN="ON" -DgRPC_BUILD_GRPC_RUBY_PLUGIN="ON" -DgRPC_DOWNLOAD_ARCHIVES="OFF" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" "X://ConanHome/p/b/grpce06250e8d935c/b/src" -- Using Conan toolchain: X://ConanHome/p/b/grpce06250e8d935c/b/build/generators/conan_toolchain.cmake -- Conan toolchain: CMAKE_GENERATOR_TOOLSET=v142 -- Conan toolchain: Setting CMAKE_MSVC_RUNTIME_LIBRARY=$<$