-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[package] grpc/1.65.0: downstream builds break if absel is used as shared #24806
Comments
hi @weatherhead99 - thank you for reporting this. Would you be able to provide a minimal example of a consumer project that results in that linker error?
On the other hand, the grpc recipe already expresses that some components depend on abseil libraries - its a bit hard to see, but: conan-center-index/recipes/grpc/all/conanfile.py Lines 344 to 345 in 5cc80c4
should be already "linking" the abseil targets: conan-center-index/recipes/grpc/all/target_info/grpc_1.65.0.yml Lines 34 to 50 in 5cc80c4
I would have expected this to work already - but need to double check. It would be useful if we had a way to repro this. |
I am trying to reproduce this in Ubuntu 22.04, gcc11 My first attempt has been trying to use the grpc
But this works fine. |
All shared still works fine:
|
Thanks @weatherhead99 - we have fixed this now in the recipe, thanks for reporting this! |
Description
When building a package which depends on gRPC, and using abseil as a shared library, downstream builds can break with an error like (on gcc):
or similar. In the recipe for gRPC, the
self.requires
statement for abseil correctly adds the "transitive_headers=True" trait. It should also add the "transitive_libs=True", because downstream consumers need to link to the abseil shared library.This is not true for static library usage, but unfortunately I don't see a way to detect whether abseil is a shared library at this point in the build. Using
self.options['abseil'].shared
doesn't seem to work, and of course `self.dependencies' doesn't exist at the time of the 'requirements()' method being called.Package and Environment Details
Conan profile
[settings]
arch=x86_64
build_type=RelWithDebInfo
compiler=gcc
compiler.cppstd=gnu20
compiler.libcxx=libstdc++11
compiler.version=13
os=Linux
[buildenv]
[conf]
[options]
grpc/*:with_libsystemd=False
/:shared=True
Steps to reproduce
create package which uses grpc/1.65.0 as a dependency
conan build . -oabseil/*:shared=True --build=missing
package build fails with missing DSO from command line related to absl
Logs
Click to expand log
The text was updated successfully, but these errors were encountered: