- Package:
- libglib2.0-dev
- Source:
- glib2.0
- Description:
- Development files for the GLib library
- Submitter:
- Peter Fritzsche
- Date:
- 2017-10-06 10:06:02 UTC
- Severity:
- normal
I tried to package some software which uses gmodule-2.0 and libgobject-2.0.
Now dpkg-shlibdeps just hammers my output with messages like
dependency on xxxx could be avoided if ....
I checked your /usr/lib/pkgconfig/gmodule-2.0.pc and noticed that there is a
Require statement with many other pkg-config files. libgmodule-2.0.so.0.2400.1
doesn't seem have have so have unresolved symbols. So either the header files
generate code which creates otherwise unresolved symbols or you don't use
Require in /usr/lib/pkgconfig/gtk+-2.0.pc correctly. Please see the difference
with Require.private in gmodule-2.0:
$ pkg-config --cflags gobject-2.0 gmodule-2.0
-pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include+
$ pkg-config --libs gobject-2.0 gmodule-2.0
-Wl,--export-dynamic -pthread -lgobject-2.0 -lgmodule-2.0 -lrt
How it looks now:
$ pkg-config --cflags gobject-2.0 gmodule-2.0
-pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
$ pkg-config --libs gobject-2.0 gmodule-2.0
-pthread -Wl,--export-dynamic -lgobject-2.0 -lgthread-2.0 -lgmodule-2.0 -lrt -
lglib-2.0
So the cflags are untouched, but the libs are a lot cleaner for non static
compilations. Please change it to Require.private or give a good reason not to
do so (broken build systems of other applications are no good reason). It
should cleanup many dependencies in our repository which aren't needed at all
and only happens due to gmodule's and gobject's bad pkg-config file.
Maybe someone can check too why -pthread and -lrt is needed. I don't see a
reason here.
Debian Release: squeeze/sid
500 unstable ftp.uni-kl.de
500 unstable ftp.debian.org
1 experimental ftp.debian.org
--- Package information. ---
Depends (Version) | Installed
=============================-+-=============
libc6 (>= 2.2.5) | 2.10.2-9
libpcre3 (>= 7.7) | 8.02-1
libglib2.0-0 (= 2.24.1-1) | 2.24.1-1
pkg-config (>= 0.14.0) | 0.24-1
zlib1g-dev | 1:1.2.3.4.dfsg-3
Recommends (Version) | Installed
=========================-+-===========
python | 2.5.4-9
Suggests (Version) | Installed
=============================-+-===========
libglib2.0-doc |
tags 582865 + wontfix thanks For better or worse, GLib upstream intend for the ABI of the GLib cluster of libraries to be "if you use the pkg-config for one, you can rely on having the API and ABI of the ones lower in the stack". So a pkg-config check for gio-2.0 gives you all of GIO, GObject, GLib, GThread. GLib, GObject, GIO, GModule and GThread are all one big library package (libglib2.0-0) so dpkg-shlibdeps is incorrect here: the dependency could not be avoided, because there is no additional dependency. I opened <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=689603> for this some time ago.