Web lists-archives.com

Re: Depends/Recommends from libraries

* Simon McVittie <smcv@xxxxxxxxxx> [170310 05:17]:
> On Thu, 09 Mar 2017 at 17:52:05 -0500, Marvin Renich wrote:
> > If more upstreams were careful to use dynamic loading in these
> > situations, it would be less of a problem.  In a perfect world, the
> > solution would be for foo's maintainer to convince upstream to switch to
> > dynamic loading.
> (For context, I maintain several game engines that default to dlopen()ing
> their dependencies, some of which I have patched to stop doing that.)
> I do not agree that dlopen()ing dependencies (what you have called "dynamic
> loading") is something we should encourage over normal linking with -lfoo
> (resulting in a DT_NEEDED entry, what you have called "static loading").

I'm sorry if I wasn't clear.  By "in these situations" I meant when the
library is only being used for a feature that is not likely to be used
by most users of the package, and only when the library has additional
dependencies that the user may want to avoid if he does not want the
feature provided by the library.

> Having done that, either the plugin can either be split out into its own
> package that is recommended or suggested by the main package (as was done
> for gnome-software support for Flatpak), or the plugin's dependencies can
> be downgraded to Recommends or Suggests with something like
> "dh_shlibdeps -- -e/usr/lib/myplugins/myplugin.so -dRecommends" and it
> will fail to dlopen if they are missing (as is done in at least iproute2 and
> thunar, see https://codesearch.debian.net/search?q=-dRecommends).

I believe I was suggesting something along those lines...

> If a library dependency is sufficiently "heavy" that it needs to become
> optional, please consider that approach.

...and only in this specific case.