Bug#343711: gdk-x11-2.0.pc spreads library dependencies needlessly

J.H.M. Dassen (Ray) fsmla at xinara.org
Sat Dec 17 13:52:02 UTC 2005

Package: libgtk2.0-dev
Version: 2.8.9-2
Severity: important

/usr/lib/pkgconfig/gdk-x11-2.0.pc currently includes a number of libraries
in its "Libs:" line which it only uses privately (as far as I have been able
to tell): -lXrandr -lXrender -lXi -lXinerama -lXext. 
(It also includes -lX11, but that dependency is exposed through e.g.

It should be improved to have them in Libs.private instead so as not to
expose these dependencies needlessly; see

It is possible that other .pc files from this package can also be improved
this way.

For reference, here's a log of the IRC conversation that led to this report:

23:53 -!- JHM [i=ray at cl-168.ams-01.nl.sixxs.net] has quit (Read error: 104 (Connection reset by peer))
23:54 -!- You're now known as JHM
02:57 -!- lool [n=lool at debian/developer/lool] has quit (Remote closed the connection)
09:36 -!- nutmeg (Andreas Metzler) [i=[o+zRjYh at adsl-] has joined #debian-devel
11:40 -!- lool (Loic Minier) [n=lool at debian/developer/lool] has joined #debian-devel
11:54 < nutmeg> Is the new GTK f*cked with respect to unneeded shlib-dependencies? Rebuilding a package against it adds a whole lot of dependencies ( libcairo2, libfontconfig1,  libfreetype6,  libpng12-0 libxcursor1 (>> 1.1.2), libxext6, libxi6, libxinerama1, libxrandr2, libxrender1 zlib1g)
11:55 < nutmeg> dependency_libs in /usr/lib/libgtk-x11-2.0.la is huge.
11:56 < nutmeg> (Yes, the respective package - gtklp - is using newest latest libtool.)
12:10 < JHM> nutmeg: The .la isn't the problem AFAIK; `pkg-config --libs gtk+-2.0` is.
12:11 < JHM> It looks like /usr/lib/pkgconfig/gtk+-2.0.pc should have "atk cairo" in a Requires.private rather than Requires.
12:14 < JHM> Except it can't, as it exposes both atk and cairo through #includes in its headers.
12:16 < nutmeg> JHM: Thanks, I'll be back in hour.
12:22 < JHM> AFAICT it would be a good idea to move Xrandr, Xrender, Xi, Xinerama and Xext from "Libs" to "Libs.private" in gdk-x11-2.0.pc .
12:23 < JHM> (The X11 dependency is exposed through gdk/gdkx.h and gdk-pixbuf-xlib/gdk-pixbuf-xlib*.h)
12:28 < lool> JHM: we had a lengthy discussion on the subject with vte
12:28 < lool> JHM: vte has the same problem with gtk, vte's headers include gtk's headers, and packages FTBFS since some Require were moved to Require.private
12:29 < lool> JHM: the decision is at the pkg-config level, but it's probable that we will have to stick with more ELF deps than truly needed for Gtkish libs
12:29 < lool> JHM: the only ELF deps which will disappear are the one only used in stable builds
12:30 < lool> s/stable/static
12:30 < lool> JHM: see #340904
12:30 -!- Netsplit sterling.freenode.net <-> irc.freenode.net quits: Penix, p2-mate, abi, Hydroxide, stargirl, mentor, kanru, lool, nekral, KhensU,  (+93 more, use /NETSPLIT to show all of them)
12:31 -!- Netsplit over, joins: zorton, Yoe, nutmeg, cappicard, ElBarono, Np237, lr, stargirl, StevenK, lamont-away (+33 more)
12:31 < lool> JHM: see also #340406
12:32 < JHM> lool: At least gdk-x11-2.0.pc looks like it could be cleaned up.
12:36 < lool> JHM: without breaking anything with #included headers etc.?
12:36 < JHM> The only dependency it exposes, AFAICT is the -lX11.
12:37 < lool> JHM: what do you want to clean?  the Libs line?
12:37 < JHM> Yes.
12:37 < lool> JHM: I agree with that
12:37 < lool> JHM: but it requires some checking in the headers
12:38 < lool> hmm no, stuff in the headers is probably in Requires anyway
12:47 -!- nutmeg (Andreas Metzler) [i=[e3oJMxB at adsl-] has joined #debian-devel
12:50 < nutmeg> JHM, lool: Could either of you knowledgable people submit a bug-report?
13:04 * nutmeg uploads gtklp featuring library bloat.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (800, 'unstable'), (750, 'experimental'), (500, 'testing-proposed-updates'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux
Locale: LANG=C, LC_CTYPE=en_US.ISO8859-1 (charmap=ISO-8859-1)

Versions of packages libgtk2.0-dev depends on:
ii  libatk1.0-dev            1.10.3-1        Development files for the ATK acce
ii  libcairo2-dev            1.0.2-3         Development files for the Cairo 2D
ii  libglib2.0-dev           2.8.4-2         Development files for the GLib lib
ii  libgtk2.0-0              2.8.9-2         The GTK+ graphical user interface 
ii  libpango1.0-dev          1.10.1-2        Development files for the Pango
ii  libx11-dev               6.8.2.dfsg.1-11 X Window System protocol client li
ii  libxcursor-dev           1.1.3-1         X cursor management library (devel
ii  libxext-dev              6.8.2.dfsg.1-11 X Window System miscellaneous exte
ii  libxfixes-dev            6.8.2.dfsg.1-11 X Window System miscellaneous 'fix
ii  libxi-dev                6.8.2.dfsg.1-11 X Window System Input extension li
ii  libxinerama-dev          6.8.2.dfsg.1-11 X Window System multi-head display
ii  libxrandr-dev            6.8.2.dfsg.1-11 X Window System Resize, Rotate and
ii  pkg-config               0.20-1          manage compile and link flags for 

libgtk2.0-dev recommends no packages.

-- debconf-show failed
Obsig: developing a new sig

More information about the Pkg-gnome-maintainers mailing list