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 652737 - all gtk apps linked against libpng
all gtk apps linked against libpng
Status: RESOLVED FIXED
Product: gdk-pixbuf
Classification: Platform
Component: general
git master
Other Linux
: Normal minor
: ---
Assigned To: gdk-pixbuf-maint
gdk-pixbuf-maint
Depends on:
Blocks:
 
 
Reported: 2011-06-16 13:47 UTC by Edward Sheldrake
Modified: 2011-08-27 02:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Put GDK_PIXBUF_EXTRA_LIBS in Libs.private (557 bytes, patch)
2011-06-16 13:47 UTC, Edward Sheldrake
none Details | Review
Keep png out of Libs.private if in Requires.private (1.45 KB, patch)
2011-07-15 18:22 UTC, Edward Sheldrake
none Details | Review
Clean up dependencies in the .pc file (2.44 KB, patch)
2011-08-27 02:44 UTC, Matthias Clasen
committed Details | Review

Description Edward Sheldrake 2011-06-16 13:47:01 UTC
Created attachment 190046 [details] [review]
Put GDK_PIXBUF_EXTRA_LIBS in Libs.private

If the png loader is built into gdk-pixbuf, then the libs specified by gdk-pixbuf-2.0.pc include libpng (-lpng12), and the result is most gtk programs end up needlessly linking against libpng.

A fix is to use Libs.private in gdk-pixbuf-2.0.pc, similar to what was already done for Requires.private.

I've tested the patch for a while, it doesn't appear to cause any problems, although I found a couple more things that don't link against libm properly (the libpng libs drag in -lm as well).
Comment 1 Matthias Clasen 2011-06-17 13:31:08 UTC
I don't think it will make any difference in practice, but the patch looks reasonable.
Comment 2 Edward Sheldrake 2011-07-15 18:17:25 UTC
No, it doesn't make a lot of difference - although I suppose -lpng12 shouldn't even be in Libs.private if libpng is in Requires.private.
Comment 3 Edward Sheldrake 2011-07-15 18:22:41 UTC
Created attachment 192051 [details] [review]
Keep png out of Libs.private if in Requires.private

For this to make sense, I changed the order so that a version specific dep, such as libpng15 or libpng12, is found before just "libpng".
Comment 4 Matthias Clasen 2011-08-27 02:44:37 UTC
The following fix has been pushed:
d430bc4 Clean up dependencies in the .pc file
Comment 5 Matthias Clasen 2011-08-27 02:44:39 UTC
Created attachment 194898 [details] [review]
Clean up dependencies in the .pc file

Add libpng to Requires.private instead of Requires.
Patches by Edward Sheldrake,