1

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 ?

1 Answer 1

3

The distinction is related to architecture independence. .pc files which might be architecture-specific go in /usr/lib (on Debian, /usr/lib/pkgconfig for pre-multiarch packages, /usr/lib/<triplet>/pkgconfig for multiarch packages), .pc files which are sure to be architecture-independent can go in /usr/share (only /usr/share/pkgconfig, no need to distinguish triplets here).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .