Bug 85173 - cairo-gobject dependencies leak to main cairo.pc
Summary: cairo-gobject dependencies leak to main cairo.pc
Status: RESOLVED MOVED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Chris Wilson
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-18 13:03 UTC by Jakub Bogusz
Modified: 2018-08-25 13:26 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Bogusz 2014-10-18 13:03:53 UTC
Because of the accumulators mechanism behind CAIRO_ENABLE_FUNCTIONS, enabling gobject library causes its dependencies to leak to main cairo.pc file (i.e. Requires.private contains glib-2.0 and gobject-2.0 libraries).

This leakage could be avoided using e.g. such patch:
http://git.pld-linux.org/gitweb.cgi?p=packages/cairo.git;a=blob_plain;f=cairo-gobject-deps.patch;hb=HEAD
but it's rather a hack; nicer solution would be not to use CAIRO_ENABLE_FUNCTIONS for separate library or to introduce e.g. CAIRO_ENABLE_LIBRARY which works similar to CAIRO_ENABLE_FUNCTIONS, but doesn't accumulate gobject_* values to CAIRO_*.
Comment 1 Behdad Esfahbod 2014-10-21 19:41:17 UTC
But if you compile with gobject, then gobject is needed as a private dependency.  This is working-as-intended.
Comment 2 Jakub Bogusz 2014-10-26 09:41:25 UTC
libgobject is needed for libcairo-gobject, but I don't see any use of libgobject in libcairo.
Accumulators cause that -lgobject-2.0 is passed for libcairo linking (through CAIRO_LIBS), but libcairo doesn't use any symbols from libgobject and when as-needed linker feature is used, this dependency is dropped.

When packaging cairo, cairo-gobject library can go to separate package set; in such case glib/gobject dependency in packages with main cairo library could be avoided.
Comment 3 Behdad Esfahbod 2014-10-26 18:59:24 UTC
Ok I see what you mean.

When I designed the acummulators originally, there was only libcairo...  And things where designed around having one library only.

Reopening.
Comment 4 GitLab Migration User 2018-08-25 13:26:44 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/cairo/cairo/issues/10.


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.