-
Notifications
You must be signed in to change notification settings - Fork 15.6k
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
Missing abseil linkage in libprotobuf.a #19375
Comments
@mkruskal-google could you look at this? |
Have you tried using |
I tried with pkg-config:
|
I grepped for libs mentioned in pkgconfig to see if they are present in build/, following are the pc files of libs not being built, i suppose. Some, such as absl_absl_check are empty i.e.
For now, I've resorted to using protobuf v21.12 as it has no dependence on abseil (it works) but i would like not to be stuck with a 2 year old version of this lib. |
I would expect that I suspect that the reason some of the Abseil .pc files don't have a corresponding .a file is just that some of them are headers only. But I don't think you need to worry about that since the command above should provide the correct flags in any case. |
Anyone solve this issue? I've tried everything under the sun and I've been struggling with this for 2 weeks now. |
Can't compile on multiple systems because of this. |
This is what fixed it for me: #19494 (comment) |
Maybe the real libabsl were the friends we made on this journey. |
correction: maybe the real libabsl_2024121627637371928 were the friends we made on this journey |
I have succeeded in compiling using cmake only and added protobuf support to my existing project using a local gRPC installation instead of protobuf. I have succeeded in compiling libprotobuf using cmake by manually compiling libabsl by setting two testing flags to OFF. I have had trouble linking and am giving up for now. What caused this issue? Or was I just one command line argument away from success? |
What version of protobuf and what language are you using?
Version: v28.0 (checkout out from github)
Language: C++
What operating system (Linux, Windows, ...) and version?
Linux, Ubuntu (22.04)
What runtime / compiler are you using (e.g., python version or gcc version)
g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
What did you do?
I am trying to create an executable that is linked statically with
libprotobuf-lite.a, compiled from source (not the one available in /usr/lib),
but face linker errors from abseil not being linked statically with
libprotobuf-lite.a
Steps to reproduce the behavior:
Create a fresh directory, in it
Download the onnx proto definition
this should create libprotbuf-lite.a in the build directory
What did you expect to see
Expected the executable to be built completely without any linker errors.
What did you see instead?
Compilation terminates with these absl errors:
Anything else we should know about your project / environment
Initially i was not linking absl .a libs explicitly assuming them to be fully linked in the libprotobuf-lite.a. Upon checking
out all the issues similar to this, I started linking absl. The linker error still persist even after linking absl libs fully.
The system is a very barebone linux image with no other absl/protobuf. Here's ldd for protoc,
The text was updated successfully, but these errors were encountered: