Bug 79032 - Unintuitive error message for missing .pc file
Summary: Unintuitive error message for missing .pc file
Status: RESOLVED MOVED
Alias: None
Product: pkg-config
Classification: Unclassified
Component: src (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: pkg-config
QA Contact:
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2014-05-21 18:18 UTC by Bill Spitzak
Modified: 2018-08-25 12:53 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
0001-If-a-package-can-t-be-found-print-the-search-path-to.patch (1.69 KB, patch)
2014-05-21 23:09 UTC, Peter Hutterer
Details | Splinter Review

Description Bill Spitzak 2014-05-21 18:18:02 UTC
If a .pc file is missing, it prints an error saying "Perhaps you should add the directory containing 'foo.pc' to PKG_CONFIG_PATH environment variable".

In 100% of the cases I have encountered this is not what is wrong. In every one of them the solution is to add 'foo.pc' to a directory already existing in PKG_CONFIG_PATH or the built-in path (by installing the missing package).

A better message is:

'foo.pc' not found in $PKG_CONFIG_PATH or /usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig

This should indicate that in the rare case of the file already existing that fixing the environment variable PKG_CONFIG_PATH will work. It also shows the search path, which is hard to find out otherwise.
Comment 1 Peter Hutterer 2014-05-21 23:09:17 UTC
Created attachment 99544 [details] [review]
0001-If-a-package-can-t-be-found-print-the-search-path-to.patch
Comment 2 GitLab Migration User 2018-08-25 12:53:25 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pkg-config/pkg-config/issues/12.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.