On Sun, 24 Nov 2019 at 01:59, Howard Chu wrote:
AFAICS it is just another moving part that breaks. It doesn't
provide any information.
To use it you have to know whether to look in the /usr configs or /usr/local (or other
pkg-config automatically knows where the headers and libraries are,
since information is hard-coded into the pc file. If the headers and
libraries are installed in a standard system location (e.g. /usr/lib
or /usr/include), this information is not passed to the command line,
since the paths are already in the environment.If you have pkg-config
files in a custom location (e.g. /opt), you can simply set
PKG_CONFIG_PATH and you'll get
-L/opt/my/custom/path -ldap -lber
It's just a different workflow.
One of the problems with detecting openldap is that developers need to
know where the libraries and headers are. pkg-config handles this for
you when compiling. (And yes, I'll admit developers should know this
For instance, how many people know ldap depends on lber?
If I know to look in /usr/local to find the package config I want,
then I already know that the
header and lib paths I need are in /usr/local and it hasn't helped at all.
The point is that you had to know about your setup. pkg-config is just
an easier way of working with headers and libraries. It also means I
don't need to know which libraries depend on which others. It just
works. OpenLDAP makes this harder than it should be.
More importantly, relying on it actively prevents you from working
with packages in their
own build directories. As someone who frequently has to build multiple versions of
dependencies to check that they all work with our OpenLDAP builds, I can't be
re-install every different version I'm working with, particularly when I could
just add a few items to LDFLAGS, LIBPATH, or whatnot. Every time I run across a build
script that requires using pkg-config to find a package I have to go through and comment
it out just so my env var settings will take effect.
PKG_CONFIG_PATH will help you here, but it's just one option. You
could also use a (s)chroot or other containers.
So from an active developer's perspective, it adds steps but
doesn't add useful information.
`pkg-config --libs ldap' or`pkg-config --cflags ldap' tells me
everything I need to know to link against openldap.
If there is some particular information you need, we can also add
One thing I'd like to reiterate is that you wouldn't be using these
pkg-config files. They are for third parties. I believe there is a
need for them -- and Ryan has expressed support after testing the
patches. You seem to disagree about the need - that's fine. But I
don't believe it's fair to prevent people from having the option to
use pkg-config support if we can offer it.