[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: 2.4 commit review



Hugh McMaster wrote:
> Hi Howard,
> 
> 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 places),
> 
> 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
> anyway.)
> For instance, how many people know ldap depends on lber?

If they're linking to shared libraries, they don't need to know, since
libldap.so already links to liblber.so.

If we had a sane static library implementation, that included its dependency
libraries in a __LIBS element (the same way ranlib stores symbol offsets in
a __SYMDEF element in static libraries) then nobody would ever need to know.
pkg-config is a bullshit hack that doesn't solve the root problem.

>> 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.

And pkg-config doesn't change that; I still have to know where the .pc files went.

> 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.

We have a project policy of not including content we can't support. And as a general
circumstance, if we don't use something ourselves, then we aren't in a position to support it.
Are you going to be here for the next 20+ years to support this addition?

-- 
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/