Control: severity -1 normal

On Thu, 2012-10-04 at 13:59:05 +0100, Simon McVittie wrote:
> Package: dpkg-dev
> Version: 1.16.8
> Severity: wishlist
> File: /usr/bin/dpkg-shlibdeps

> However, when libraries share a package, unnecessary linking does not
> necessarily cause a useless dependency. For instance, if you link
> against any of GLib, GObject, GIO and GModule, uselessly linking against
> any of the others is not a problem, because you're going to depend on
> libglib2.0-0 in any case; and if you link against libc, uselessly linking
> against libm, libpthread etc. does not introduce a dependency, because
> you're going to depend on libc6 (or libc0.1 or whatever) in any case.

Well it can introduce a waste of resources as supposedly unneeded
shared libraries get read and loaded into memory, and the linker has
to traverse them to check if symbols are used from there. But then
the case of an executable unneedingly depending on an unused shared
library is already covered by --warnings=4, so this is certainly buggy.

> In the particular case of libpthread, evading the library dependency can
> apparently even be harmful, if you're going to dlopen modules that really
> do depend on libpthread later (which is why GModule explicitly depends on it,
> and triggers "useless dependency" warnings in everything that links GModule,
> which is basically everything GNOME-related).
> See: http://article.gmane.org/gmane.comp.gnome.gtk+.devel.general/18117

Right, but why is gmodule-2.0.pc exporting -pthread on Libs? It would
appear it only needs to link against -pthread itself? Also that way
programs linking against gmodule would not be able to filter out the
pthread dependency from the command line.

> If you're not willing to do this in general, just silencing the warning for
> libpthread in the same way that's already been done for libm would also
> be a reasonable solution.

I've always considered the libm supressions a hack, that eventually
needs to be fixed more generally. So, fixing this would allow to get
rid of that libm special case (the other seems bogus anyway and I've
already removed it locally targetting 1.17.x).

thanks,
guillem


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to