Skip to content
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

pkg-config --cflags "grpc++" is taking a while to return #29137

Open
matttbe opened this issue Mar 17, 2022 · 3 comments
Open

pkg-config --cflags "grpc++" is taking a while to return #29137

matttbe opened this issue Mar 17, 2022 · 3 comments
Labels
disposition/help wanted Maintainers do not have enough resources to allocate to this at the moment. Help is appreciated! kind/bug lang/c++ priority/P2

Comments

@matttbe
Copy link

matttbe commented Mar 17, 2022

What version of gRPC and what language are you using?

1.43.2 in C++

What operating system (Linux, Windows,...) and version?

Linux CentOS 7 (with devtoolset-8 and llvm-toolset-7)

What runtime / compiler are you using (e.g. python version or version of gcc)

GCC 8.3.1

What did you do?

pkg-config --cflags "grpc grpc++" is taking a long time.

If you run pkg-config --debug --cflags "grpc++", it looks like there is a dependence loop somewhere.

What did you expect to see?

A clean and quick pkg-config --debug --cflags "grpc++"

What did you see instead?

In debug mode, you can see a lot of dependences, always the same (absl) just after this line:

    Adding 'grpc++' to list of known packages, returning as package 'grpc++'

Anything else we should know about your project / environment?

Compiled with CMake, first compiling third_party/abseil-cpp/cmake/ then other 3rd party libs and finally GRPC.

@yashykt yashykt added untriaged disposition/help wanted Maintainers do not have enough resources to allocate to this at the moment. Help is appreciated! and removed untriaged labels Mar 23, 2022
@yashykt
Copy link
Member

yashykt commented Mar 29, 2022

cc @veblush

@nicolasnoble nicolasnoble removed their assignment Jun 15, 2022
@timofey-retailnext
Copy link

I have a similar problem with long cmake config stage for my SW that uses grpc (various pc/linux with gcc 8/10/11, cmake 3.18-3.23).
Last grpc that is able to configure pretty fast was 1.36.x.
GRPC v1.39.x exported absl libs to its cmake config files and this resulted in 5-10 min delay during cmake build configuration of my SW.
All later GRCP v1.4x (including 1.43.2 mentioned above and the latest 1.48.0) produce approx 30 min delays during cmake config ...
I'm also convinced that there is a dependency loop inside libabsl_* cmake definitions that leads to such a huge cmake configuration delay.

@pszemus
Copy link
Contributor

pszemus commented May 19, 2023

I had a similar problem on CentOS 7. It turns out that pkg-config (not developed since 2017) was replaced by pkgconf in newer Linux distributions (e.g. Fedora 26+, RHEL 8+) which has some nice features, like (cyclic) dependency graphs.

Replacing pkg-config with pkgconf (which can be simlinked to pkg-config), in my CentOS 7, accelerated pkg-config --libs grpc++ or pkg-config --libs protobuf from 30 minutes to 2 seconds !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition/help wanted Maintainers do not have enough resources to allocate to this at the moment. Help is appreciated! kind/bug lang/c++ priority/P2
Projects
None yet
Development

No branches or pull requests

7 participants