-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Improve make
error message when pkg-config is not installed
#10058
Comments
Background in grpc#10058
To be clear: besides #10059 I think it would also be an improvement to detect pkg-config in the Makefile. But I lack the expertise and time to add that check to the Makefile, hence this issue and no PR for that. |
We do detect pkg-config in the Makefile, right here: https://github.com/grpc/grpc/blob/master/Makefile#L446. And we do check for a system OpenSSL even if you don't have pkg-config. One possible explanation for the error you're seeing is that OpenSSL is installed in an unusual location, and that pkg-config was able to find it, but it wasn't in the default include or link path. |
I see that there is a check there but it is not used for reporting a problem to the user; it seems to be part of a cross-compilation workflow. The problem is not just with pkg-config. Here is what happens if I run
But INSTALL (which is INSTALL.md to be precise) does not tell me what else to install. And
This is actually a different problem from what I started this issue with but it is part of the overall challenging installation experience. And right now I don't have any clue how to move along |
I ran into the same problem today install the gem (version 1.7.3) on a Debian container that did not have the
|
Same error message while installing python grpcio package on OS X. Solved by installing pkg-config package after reading this thread. |
@mehrdada Reopened because of multiple new occurrences. |
Assigning to @jtattermusch as the C/Make UX expert. |
This issue/PR has been automatically marked as stale because it has not had any update (including commits, comments, labels, milestones, etc) for 180 days. It will be closed automatically if no further update occurs in 1 day. Thank you for your contributions! |
I recently got to blunder my way through compiling gRPC from source. To be more specific, I was running
gem install grpc --platform=ruby
, which kicks into the top-level Makefile. This message had me confused for quite some time:Now if I look in INSTALL.md I don't see
pkg-config
listed as a Linux pre-requisite. https://github.com/grpc/grpc/blob/master/INSTALL.md#linux At least in Ubuntu 16.04,build-essential
does not includepkg-config
.The only way I was able to find the problem was by trying to read the Makefile (which is a bit over my head) until I saw that the OpenSSL test variables depend on an invocation of pkg-config, which led me to the lucky guess of
apt-get install pkg-config
.Long story short I think it would help if the Makefile prints an accurate error message if pkg-config cannot be found at all, instead of the current generic one. I will submit a PR to add pkg-config to INSTALL.md.
The text was updated successfully, but these errors were encountered: