Pkgconfig: empty libdir for library in pkconfig support file

Hi,

as a dependency for another project I packaged libevhtp, the resulting Nix expression can be found here.

Other projects can discover the library’s location via pkgconfig and then usually just take the libdir given in lib/pkgconfig/*.pc as library path for linking. Unfortunately, the libdir given in lib/pkgconfig/evhtp.pc is just unset/ empty. This is not the case for other libraries utilising pkgconfig and causes linking problems for applications using that lib.

What did I forget to make the libdir be set properly? Or do I have to do this manually in a postInstallPhase? Other libraries don’t seem to do that.

Unfortunately, since CMakeLists.txt files are impossible to write, the quality of projects’ build files is terrible.

In this case, it appears that they removed the variables they use in the .pc file during refactoring:

https://github.com/ellzey/libevhtp/commit/327bf14af964cd7ce7bd49d39e23fa07b8d238e3#diff-af3b638bc2a3e6c650974192a53c7291L209

https://github.com/ellzey/libevhtp/commit/327bf14af964cd7ce7bd49d39e23fa07b8d238e3#diff-af3b638bc2a3e6c650974192a53c7291L213

1 Like