Laszlo (Laca) Peter wrote:
> On Fri, 2007-05-11 at 00:04 +0100, Peter Tribble wrote:
>> On 5/10/07, Laszlo (Laca) Peter <laca at sun.com> wrote:
>>> The real trouble is what happens when multiple version of the same
>>> lib meet in an executable. It happens sometimes and there's no
>>> easy way to avoid or fix it. Actual examples are the acroread crash
>>> (caused by a libz collision) and currently various GNOME apps
>>> crash due to a clash between libexpat in Python and in /usr/sfw.
>>> The lower level the library, the higher the probability that it'll
>>> cause troubles. Tck/Tk is probably okay in this regard, but where
>>> do you draw the line?
>> I don't know. But I think something's going to have to be worked
>> out, and I keep bringing it up in the hope that someone way
>> smarter than myself will work out a way to cleanly support
>> multiple versions.
>
> Let me Cc tools-linking, maybe there is some linker magic that
> can help. AFAIR direct binding can help in some cases.
> We certainly can't solve this problem with just file system
> namespacing.
Direct bindings is a model that allows for objects to bind to
different instances of dependencies. A project is underway to
set direct bindings on for the whole OSNet, but there's some
groundwork that has to be established first - see 6455532.
It's not a panacea either - the problem with direct bindings
is that they can prevent interposition. This might be what you want
to achieve by binding to two different versions of a dependency.
But, as my experiments have shown, there's a ton of code out there
that was built expecting some form of interposition to be in
place. 6455532 is a long tail of me trying to unravel and manage
these two apposing concepts.
There's a new chapter to the Linker and Libraries Manual that I've
just written that tries to unravel all the pros-and-cons. See
Appendix D, "Direct Bindings":
http://linkers.central/llm/toc.html
(I need to get this pushed to opensolaris.org/os/community/tools/linker.
Note, there's no new linking magic here, its just that I finally go
around to creating a thorough discussion of Direct Bindings).
--
Rod.