I am on Debian buster. I was reading the manpage of pkg-config and found that .pc files are and can be listed in many places . From the manpage -
pkg-config retrieves information about packages from special metadata files. These files are named after the package, and has a .pc extension. On most systems, pkg-config looks in /usr/lib/pkgconfig, /usr/share/pkgconfig, /usr/local/lib/pkgconfig and /usr/local/share/pkgconfig for these files. It will additionally look in the colon-separated (on Windows, semicolon-separated) list of directories specified by the PKG_CONFIG_PATH environment variable.
- From pkg-config manpage
sure enough I saw that there are packages in /usr/lib/pkgconfig/, /usr/lib/x86_64-linux-gnu/pkgconfig/ and /usr/share/pkgconfig/ , while I can understand the /usr/local/.. part for locally compiled/built apps. I do not understand why there is a distinction between /usr/lib/pkgconfig/ and /usr/share/pkgconfig . Is it something to do with some things need to be in userspace https://en.wikipedia.org/wiki/User_space or something else entirely ?