Dear David, David Seifert <s...@gentoo.org> writes:
> We already have such a solution in the sci-overlay. It has proven > extremely brittle and shaky. What's more, using eselect set which library to link to was regarded harmful. > The plan is to do this via USE flags similar to python-single-r1 > flags. Yes, that was the conclusion in 2017. But now there is something to be renewed, see below. > Optionally, we can leave a "virtual" USE flag, where users can switch > implementation at runtime, but this will not be a supported > configuration. [...] > While I understand that runtime-switching sounds like a great feature, > it has proven too difficult to get right and too hard to enforce > invariants on correct symlinks. I thought so, too. Back in 2017, I did an investigate of Debian runtime switching, and concluded the patches were too heavy for us. That was the main reason we did not consider the Debian runtime switching way.[0, 1] However, I have made a deeper study this year, and concluded it is quite doable in a simple way in Gentoo. Historically, in alternative{,-2}.eclass of the science overlay, "alternative" is a name from Debian[2]. We have made it too complex over the years, and now there is a good chance to make it simple again. > People that want this can go the virtual+eselect approach in the > overlay, Which is brittle and shaky as we agree. > but 99% of Gentoo users will be happy with just linking against > OpenBLAS/reference-lapack and not having to fix weird stale symlinks > that eselect-alternatives somehow lost track of. With the simplified approach Mo is after, there will no longer be weird stale symlinks issues. The solution has been successfully proved by the update-alternative mechanism in Debian. Actually, by adopting mgorny's LDPATH way of handing gcc runtime, we don't need symlinks at all![3] For more details, please refer to https://people.debian.org/~lumin/gsoc19-gentoo.pdf > See also: > https://bugs.gentoo.org/632624 > https://bugs.gentoo.org/348843#c30 Thanks. That reminded me of all the discussions we all along. Yours, Benda 0. https://github.com/gentoo/sci/issues/805#issuecomment-345690034 1. https://github.com/gentoo/sci/issues/805#issuecomment-345701064 2. https://github.com/gentoo/sci/issues/805#issuecomment-332887691 3. https://bugs.gentoo.org/632618