After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 685464 - [PATCH] Package config file depends on too much
[PATCH] Package config file depends on too much
Status: RESOLVED FIXED
Product: libgdata
Classification: Platform
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: libgdata-maint
libgdata-maint
Depends on:
Blocks:
 
 
Reported: 2012-10-04 03:50 UTC by Robert Ancell
Modified: 2013-01-08 01:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Revert change to pkg-config dependencies - we don't need that many dependencies to compile against libgdata (802 bytes, patch)
2012-10-04 03:51 UTC, Robert Ancell
needs-work Details | Review
Add dependencies on gobject-2.0 glib-2.0 gio-2.0 to pkg-config file (733 bytes, patch)
2012-10-04 03:59 UTC, Robert Ancell
none Details | Review
Split packages into public and private so the .pc file has correct depenencies (2.20 KB, patch)
2012-10-04 20:17 UTC, Robert Ancell
committed Details | Review

Description Robert Ancell 2012-10-04 03:50:14 UTC
The changes in [1] mean the pkg-config file now requires more packages to be installed than required.

The only packages that are required to be installed are libsoup and libxml as the libgdata headers refer to them. While libgdata links to liboauth and other packages you don't need the headers to compile against them.

Attached patch reverts the change to this pkg-config file. Note if you did want to list the library dependencies (which would include liboauth etc) then you use Requires.private (though I don't think it's worth the effort).

[1] http://git.gnome.org/browse/libgdata/commit/?id=56a39743779f63791e27886aaa3a9338602406f3
Comment 1 Robert Ancell 2012-10-04 03:51:55 UTC
Created attachment 225768 [details] [review]
Revert change to pkg-config dependencies - we don't need that many dependencies to compile against libgdata
Comment 2 Robert Ancell 2012-10-04 03:59:10 UTC
Created attachment 225769 [details] [review]
Add dependencies on gobject-2.0 glib-2.0 gio-2.0 to pkg-config file

The previous patch made me notice that you don't explicitly require the glib/gobject/gio packages though you include their headers (they are currently pulled in because you depend on libsoup). This patch adds those dependencies.
Comment 3 Philip Withnall 2012-10-04 16:52:43 UTC
Review of attachment 225768 [details] [review]:

Part of the point of that commit was to centralise the list of dependencies so that I didn’t keep forgetting to update the pkg-config file. Could you please re-work it to use GDATA_PACKAGES_PUBLIC (and GDATA_PACKAGES_PRIVATE) variables to replace GDATA_PACKAGES in configure.ac. Then GDATA_PACKAGES_PUBLIC can be used in ‘Requires’ and GDATA_PACKAGES_PRIVATE can be used in ‘Requires.private’. Same for GNOME_PACKAGES — it could be split into GNOME_PACKAGES_[PUBLIC|PRIVATE]. Thanks.
Comment 4 Robert Ancell 2012-10-04 20:17:00 UTC
Created attachment 225844 [details] [review]
Split packages into public and private so the .pc file has correct depenencies
Comment 5 Philip Withnall 2012-10-05 10:20:20 UTC
Review of attachment 225844 [details] [review]:

Looks good to me. Please commit to master. Thanks!
Comment 6 Robert Ancell 2013-01-07 04:06:28 UTC
Re-opening as it turns out Requires.private does drag in the additional dependencies - pkg-config uses them to generate cflags. These flags are not required to compile, so the only solution seems to be to drop Requires.private entirely.

i.e. pkg-config --cflags WITHOUT Requires.private:

-pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libxml2 -I/usr/include/libsoup-2.4 -I/usr/include/libgdata

pkg-config --cflags WITH Requires.private:

-pthread -I/usr/include/libsoup-gnome-2.4 -I/usr/include/libxml2 -I/usr/include/goa-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libsoup-2.4 -I/usr/include/nss -I/usr/include/nspr -I/usr/include/p11-kit-1 -I/usr/include/libgdata -I/usr/include/gcr-3 -I/usr/include/gck-1
Comment 7 Philip Withnall 2013-01-07 09:12:31 UTC
(In reply to comment #6)
> Re-opening as it turns out Requires.private does drag in the additional
> dependencies - pkg-config uses them to generate cflags. These flags are not
> required to compile, so the only solution seems to be to drop Requires.private
> entirely.

Sorry if I’m misunderstanding, but what’s the problem with extra -I directories being listed in the CFLAGS? gcc should ignore them, shouldn’t it?

This seems to be the recommended solution: see point #3 on http://people.freedesktop.org/~dbn/pkg-config-guide.html#faq.
Comment 8 Robert Ancell 2013-01-08 01:52:55 UTC
Gah, it is me who is misunderstanding. This does seem to be the correct behaviour.

BTW, the reason I brought this up is there is a project which has a dependency that conflicts with one of the packages in the dependency tree of Requires.private. It's annoying that these dependencies are there as they're not required for dynamic linking but I'll try and solve the conflict instead.

Thanks!