Moved from: http://bugzilla.gnome.org/show_bug.cgi?id=319251 Output from pkg-config is not formatted, therefore the output can look like this: cking for DEPENDENCIES... configure: error: Package requirements ( glib-2.0 >= 2.8.0, gtk+-2.0 >= 2.8.3, libxml-2.0 >= 2.6.12 libxslt >= 1.1.7 libgnomeui-2.0 >= 2.6.0 libglade-2.0 >= 2.3.1 gnome-vfs-2.0 >= 2.9.2 gnome-vfs-module-2.0 gconf-2.0 gnome-desktop-2.0 >= 2.9.91 libgnomeprint-2.2 >= 2.4.0 libgnomeprintui-2.2 >= 2.4.0 ) were not met. You should also be told WHICH of the package requirements failed. Otherwise you have to guess.
Created attachment 4092 [details] [review] Part 1 of patch, patches main.c
Created attachment 4093 [details] [review] Part 2 of patch, patches pkg.c
Created attachment 4094 [details] [review] Part 3 of patch, patches pkg.h
Created attachment 4095 [details] [review] Part 4 of patch, patches pkg.m4
I couldn't figure GNU Arch so these diffs are against released pkg-config-0.20. That is also why I had to diff them separately instead of in one file. Sorry about that. The full patch makes for some major improvements to pkg-configs output. Instead of printing each failed dependancy when it is encountered I created an object ErrorSummary which keeps track of which package request that failed and when all package requests have been processed, prints an error summary. That makes it so that the error message you get when not using the --short-error option is only printed once. The output also becomes more "human readable" and less verbose. I also made a related change to PKG_CHECK_MODULES in pkg.m4 and removed the printing of the package requirements which was the cause of the unformatted output in my first comment. With this patch the output now looks like: -------- checking for GALEON_DEPENDENCY... configure: error: Missing dependencies: Packages 'gnome-desktop-2.0' and 'libgnomeui-2.0' not found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GALEON_DEPENDENCY_CFLAGS and GALEON_DEPENDENCY_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.
Can you please just update pkg.m4 in your package and see if the new behaviour in 0.20 already gives what you want? I think it should.
(In reply to comment #6) > Can you please just update pkg.m4 in your package and see if the new behaviour > in 0.20 already gives what you want? I think it should. 0.20 is more helpful because it outputs all missing dependencies instead of just stopping on the first one. But the output isn't pretty: $ ./pkg-config --print-errors --errors-to-stdout "gnome-desktop-3.0 libgnomeui-3.0 gtk+ >= 33" Package gnome-desktop-3.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gnome-desktop-3.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gnome-desktop-3.0' found Package libgnomeui-3.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `libgnomeui-3.0.pc' to the PKG_CONFIG_PATH environment variable No package 'libgnomeui-3.0' found Requested 'gtk+ >= 33' but version of GTK+ is 1.2.10 $ pkg-config --print-errors --errors-to-stdout --short-errors "gnome-desktop-3.0 libgnomeui-3.0 gtk+ >= 33" No package 'gnome-desktop-3.0' found No package 'libgnomeui-3.0' found Requested 'gtk+ >= 33' but version of GTK+ is 1.2.10 Whereas with the patch: $ pkg-config --print-errors --errors-to-stdout "gnome-desktop-3.0 libgnomeui-3.0 gtk+ >= 33" Packages 'libgnomeui-3.0' and 'gnome-desktop-3.0' not found Requested 'gtk+ >= 33' but installed version of GTK+ is 1.2.10 Packages 'libgnomeui-3.0' and 'gnome-desktop-3.0' was not found in the pkg-config search path. Perhaps you should add the directories containing the files: 'libgnomeui-3.0.pc' and 'gnome-desktop-3.0.pc' to the PKG_CONFIG_PATH environment variable $ pkg-config --print-errors --errors-to-stdout --short-errors "gnome-desktop-3.0 libgnomeui-3.0 gtk+ >= 33" Packages 'libgnomeui-3.0' and 'gnome-desktop-3.0' not found Requested 'gtk+ >= 33' but installed version of GTK+ is 1.2.10 I think that is a big improvement but it's your choice.
I agree that your long error message looks better and is more readable, so I will switch to something resembling that. I think the short error message is fine already, so that will stay.
Björn Lindqvist Do you still experience this issue with newer drivers ? Please check the status of your issue.
-- 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/42.
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.