#1137000 dpkg-dev: dpkg-makeshlibs should generate empty shlibs:Depends if there are no NEEDED libraries

#1137000#5
Date:
2026-05-18 11:08:02 UTC
From:
To:
Dear Maintainer,

while packaging some plugins I noticed that dpkg-gencontrol emits the following warning:

afaiu, the problem here is that:
- the plugin is a compiled ELF object,
  that links against "-lm -lc".
- as such, the package contains a "Depends: ${shlibs:Depends}" stanza.
- however, the plugin doesn't use any of these libraries' symbols, so the
  dependencies correctly get stripped away.
- dpkg-makeshlibs correctly detects that there are no dependencies,
- but instead of setting ${shlibs:Depends} to an empty value, it unsets
  it
- dpkg-gencontrol then emits a warning.

i don't think it is reasonable in this case for the maintainer to just
remove the "Depends: ${shlibs:Depends}" stanza.

afaict, the fix is "simple": if dpkg-gencontrol finds an ELF-binary that
doesn't link against any library, then shlibs:Depends should simply be
empty.

thanks.