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 685477 - Incorrect pkg-config files causes useless linking in applications
Incorrect pkg-config files causes useless linking in applications
Status: RESOLVED OBSOLETE
Product: GUPnP
Classification: Other
Component: gupnp
unspecified
Other Linux
: Normal minor
: ---
Assigned To: GUPnP Maintainers
GUPnP Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-10-04 08:48 UTC by Andreas Henriksson
Modified: 2021-05-17 16:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gssdp patch 1/2 (1.05 KB, patch)
2012-10-04 09:06 UTC, Andreas Henriksson
committed Details | Review
gssdp patch 2/2 (1.43 KB, patch)
2012-10-04 09:06 UTC, Andreas Henriksson
none Details | Review
gupnp patch 1/2 (1.08 KB, patch)
2012-10-04 09:07 UTC, Andreas Henriksson
none Details | Review
gupnp patch 2/2 (1.48 KB, patch)
2012-10-04 09:07 UTC, Andreas Henriksson
none Details | Review
gupnp-av patch 1/2 (1.45 KB, patch)
2012-10-04 09:09 UTC, Andreas Henriksson
committed Details | Review
gupnp-av patch 2/2 (1.05 KB, patch)
2012-10-04 09:10 UTC, Andreas Henriksson
committed Details | Review
gupnp-dlna (1.69 KB, patch)
2012-10-04 09:11 UTC, Andreas Henriksson
none Details | Review
gupnp-igd (1.52 KB, patch)
2012-10-04 09:11 UTC, Andreas Henriksson
none Details | Review

Description Andreas Henriksson 2012-10-04 08:48:53 UTC
All pkg-config files in the gupnp stack (gssdp, gupnp, gupnp-av, ...) are flawed in two ways. 

1) Requires.Private is not parsed at all by pkg-config (c.f. Requires.private)
2) When exposing used libraries types in public headers, they should be in Requires.private (to be included in pkg-config --cflags libfoo, but not pkg-config --libs libfoo)

I guess the first mistake lead up to putting everything in Requires rather then Requires.private in the pkg-config files.

(For reference on 2, see the faq #2 in "Guide to pkg-config")
Comment 1 Andreas Henriksson 2012-10-04 08:57:37 UTC
Please beware!

Some applications might be broken to rely on GUPnP pulling in linker flags to libraries that the application uses!

One such application is Rygel which uses gssdp (et.al.) directly but doesn't link to it. See Bug #685478
Comment 2 Andreas Henriksson 2012-10-04 09:06:27 UTC
Created attachment 225778 [details] [review]
gssdp patch 1/2

the libraries in Requires.Private maybe should be in Requires.private for static linking to work properly. I have no way of testing this theory though.
Comment 3 Andreas Henriksson 2012-10-04 09:06:47 UTC
Created attachment 225779 [details] [review]
gssdp patch 2/2
Comment 4 Andreas Henriksson 2012-10-04 09:07:27 UTC
Created attachment 225781 [details] [review]
gupnp patch 1/2

the libraries in Requires.Private maybe should be in Requires.private for
static linking to work properly. I have no way of testing this theory though.
Comment 5 Andreas Henriksson 2012-10-04 09:07:47 UTC
Created attachment 225782 [details] [review]
gupnp patch 2/2
Comment 6 Andreas Henriksson 2012-10-04 09:09:13 UTC
Created attachment 225785 [details] [review]
gupnp-av patch 1/2
Comment 7 Andreas Henriksson 2012-10-04 09:10:40 UTC
Created attachment 225786 [details] [review]
gupnp-av patch 2/2

Once gssdp/gupnp gets fixed, gupnp-av will fail to build without this patch because of "underlinking" (not explicitly linking to stuff it uses directly).
Comment 8 Andreas Henriksson 2012-10-04 09:11:10 UTC
Created attachment 225787 [details] [review]
gupnp-dlna
Comment 9 Andreas Henriksson 2012-10-04 09:11:30 UTC
Created attachment 225788 [details] [review]
gupnp-igd
Comment 10 Jens Georg 2012-10-06 16:19:53 UTC
Comment on attachment 225778 [details] [review]
gssdp patch 1/2

Applied
Comment 11 Jens Georg 2012-10-06 16:20:09 UTC
Comment on attachment 225779 [details] [review]
gssdp patch 2/2

Applied
Comment 12 Jens Georg 2012-10-06 16:21:57 UTC
Comment on attachment 225781 [details] [review]
gupnp patch 1/2

commited
Comment 13 Jens Georg 2012-10-06 16:22:11 UTC
Comment on attachment 225782 [details] [review]
gupnp patch 2/2

Commited
Comment 14 Andreas Henriksson 2013-05-22 10:24:55 UTC
Comment on attachment 225787 [details] [review]
gupnp-dlna

While this patch is still correct in theory, the gst dependency has been split out of gupnp(-dlna) and into a separate sub-module.... If I understand the new lay of the land, this makes the problem strictly theoretical..... Marking the patch as obsolete (even though the exact same change could still be used on gupnp-dlna-gst-2.0.pc now, but for no practically visible gain).
Comment 15 GNOME Infrastructure Team 2021-05-17 16:29:29 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME'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.gnome.org/GNOME/gupnp/-/issues/31.