$ pkg-config --exists libsoup-2.4 && echo exists exists $ pkg-config --cflags libsoup-2.4 Package libtasn1 was not found in the pkg-config search path. Perhaps you should add the directory containing `libtasn1.pc' to the PKG_CONFIG_PATH environment variable Package 'libtasn1', required by 'GnuTLS', not found Of course, the real bug is that my libsoup-2.4.pc file is broken. But, imo, --exists should check the same things as --cflags before returning TRUE. A side effect is that the pkg.m4 macro does not notice this error, and merrily continues on with SOUP_CFLAGS equal to "". version is 0.25
Created attachment 62712 [details] [review] [1/2] Make check-missing test more explicit with --exists Currently the check-missing passes the packages on the command line with no options prior to running through --cflags/--libs, etc. Make this more explicitly pass --exists since this is a much more common operation performed from PKG_CHECK_MODULES. The expected result of 0 when Requires or Requires.private is missing is a regression from pre-0.24 pkg-config. --- check/check-missing | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)
Created attachment 62713 [details] [review] [2/2] Enable Requires and Requires.private for --exists Prior to pkg-config 0.24, --exists honored Requires and Requires.private. This was regressed in commits 02d5ae3f and 669bfe2e, which split the handling of Requires and Requires.private out more correctly for other options. This adds exists to the group of options that enable the Requires functionality. Freedesktop #43149 --- check/check-missing | 6 +++--- main.c | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-)
OK, I think I found the issue. This was a change that went into pkg-config-0.24 with commits 02d5ae3f and 669bfe2e. It's a regression in that previously --exists honored Requires and Requires.private. Can you see if the attached patches help?
Thanks, completely forgot about this. I don't have means to test this anymore. If I had been a wise bug report sumbitter in november, I would have attached the problematic .pc file. Let's assume it's fixed.
Confirmed, tested with gtk+-2.0 and a missing dependency of libpng12. This was what originally triggered the issue on my machine. (needs to be manually added now, I had some stale tree previously) Tested 6c27d5051ba9d81484edffe334c152a05fa2c6d8 (current master) --exists returns 0, --cflags shows error Tested same commit with the two patches applied --exists returns 1, --cflags shows error So the behaviour is now what I expect, configure fails on --exist now, the error message is in config.log. Confirmed as fixed.
This got fixed in commit 3ead3dfb and released in pkg-config-0.27.
*** Bug 58847 has been marked as a duplicate of this bug. ***
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.