#999420 dh_shlibdeps: Please consider option (or default) to ignore weak symbols for dependencies

Package:
dpkg
Source:
dpkg
Description:
Debian package management system
Submitter:
Josh Triplett
Date:
2021-11-11 07:03:05 UTC
Severity:
wishlist
#999420#3
Date:
2021-11-10 19:57:06 UTC
From:
To:
When a program or library declares a weak symbol, that typically
indicates that it's prepared to do without the symbol.

However, dh_shlibdeps takes weak symbols into account when determining
library dependencies, and will produce a strict Depends on a library
even if only needed for a weak symbol. Some software (e.g. the Rust
standard library) works around this by calling dlsym instead, but that
introduces other potential issues, and weak symbols are *much* simpler
and easier to work with.

I'd like to propose changing this behavior, either with an option, or as
part of a future debhelper compatibility level (which could make that
option the default). I'd propose instead that dh_shlibdeps could
separate out dependencies from weak symbols, and put them in a separate
substitution field, which packagers could then choose to put in either
Depends or Recommends or Suggests or nowhere, as appropriate.

The net effect of this would be to broaden shared library dependencies,
making packages easier to install and backport, and making it easier for
upstreams to make use of weak symbols without introducing compatibility
issues.

- Josh Triplett

#999420#8
Date:
2021-11-11 06:57:48 UTC
From:
To:
Josh Triplett:

Hi Josh,

Most of what you request in this bug happens (or requires support) in
the underlying dpkg tool, dpkg-shlibdeps.  I am therefore reassigning it
to dpkg.

Quoting the remaining text in full (below) for the sake of the dpkg
maintainer.

~Niels