[build2] Naming of library imports from pkg-config files

Christopher Head build2 at chead.ca
Wed Aug 2 03:45:01 UTC 2023


On Tue, 1 Aug 2023 11:05:55 +0200
Boris Kolpackov <boris at codesynthesis.com> wrote:

> Yes, this is pretty much the semantics except that there is one
> nuance: after not finding any .a/.so in each library search path we
> still checks for the .pc file in the pkgconfig/ subdirectory in order
> to handle binless libraries (the more general term we use for
> header-only libraries).
> 
> I believe this "works" via that binless logic: zlib.pc is found as
> binless and -lz it has in its Libs is treated as its binful
> prerequisite.

That makes perfect sense, thanks!

> While agree it would be helpful to document this somewhere, I am not
> sure the manual is the right place. I mean, theoretically it is, but
> if we document every C/C++ build nuance like this (of which there are
> hundreds), it will be a thousand-page tome. It is currently already
> 200 pages and hardly anyone reads it because it's "too long".
> 
> Lately we've been capturing this sort of things in HOWTOs so maybe
> we can do it there as a more broad "What target name should I use
> to import an unpackaged, system-installed library" question?
> 
> https://github.com/build2/HOWTO/

Hm, under the concept of The Four Kinds of Documentation¹, this kind of
information seems more like “reference” (aka “information-oriented”) or
“explanation” (aka “understanding-oriented”), not HOWTO (aka
“problem-oriented”); it’s not a guide to solving a specific problem,
rather more of a complete, detailed specification of how a system
behaves (i.e. “when you import foo%lib{bar}, these are the exact steps
that build2 will take to find the thing it’s trying to import”).
Normally I would expect to find that in the manual. Right now build2’s
manual seems to lean heavily towards “tutorial” (aka
“learning-oriented”) with some explanation-type text as well. I have not
really found any kind of reference-type documentation at all, actually;
is there one? I can put it in a HOWTO if that’s where you want it, it
just doesn’t seem like quite the right place to me.

¹https://documentation.divio.com/ and others
-- 
Christopher Head



More information about the users mailing list