On Mon, 13 Jul 2026 at 05:32, Paul Eggert <[email protected]> wrote: > > On 7/12/26 18:29, Bruno Haible via Gnulib discussion list wrote: > > The approach looks reasonable to me. Of course, I'll also value the opinion > > of the other Gnulib and coreutils contributors. Also, since this patch adds > > complexity, I'd like to understand why approach (b) [from the other mail] > > would not work. > > I'm a bit more puzzled. I also don't see why (b) doesn't suffice. > Certainly (b) is simpler. And I am dubious about the dlopen business in > general; it's not needed for the other libraries coreutils dynamically > link to, and why is libsystemd special?
coreutils _already_ uses dlopen (correctly!) to optionally load openssl for an optional feature in sort: https://github.com/coreutils/coreutils/blob/fb631c3e6dd29d89e4c65b8e3969deb1db2bcb98/src/sort.c#L2396 ...which was implemented by none others than yourself, I might add ;-) https://github.com/coreutils/coreutils/commit/7f57ac2d20c144242953a8dc7d95b02df0244751 As already mentioned, libraries that are linked to binaries in all distributions are _hard_ dependencies, as the binary fails to load entirely if they are missing. It just crashes on startup, and you can't even run --help or so, which is very much not what we want. That's why the process of adding dependencies for linked libraries is entirely automated, and it is not something that is handled manually, and _we do not want_ to handle it manually. Which is why your proposal of "just not installing the library" is not an option. If it's linked, then it's a hard dependency of the coreutils package, and thus it always gets installed and cannot be skipped. The dependencies and the dependency tree is the same for all use cases and it's part of the package metadata. There's no functionality to do so, and there will never be, as things would break left and right. > Also, I don't know what the difference is between the original patch > (which you responded to negatively) and the revised patch. https://github.com/coreutils/gnulib/compare/adea45527f9342dd37d698c5780eea647783e935..c3a50e2ba14fbe0862eb348976d17aaaca0b9166 As per request, I've removed the silent fallback to the old method if the library is not found.
