:: Re: [DNG] leveldb support proposal
トップ ページ
このメッセージを削除
このメッセージに返信
著者: T.J. Duchene
日付:  
To: dng
題目: Re: [DNG] leveldb support proposal


On 03/01/2016 08:15 AM, dng-request@??? wrote:
> Message: 6
> Date: Tue, 1 Mar 2016 15:15:05 +0100
> From: Didier Kryn<kryn@???>
> To:dng@???
> Subject: Re: [DNG] leveldb support proposal
> Message-ID:<56D5A3E9.3060800@???>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> Le 01/03/2016 11:37, Noel Torres a écrit :
>> >It happens a lot that two packages you need request different versions
>> >of the same library, not always co-installable. Mostly if you go
>> >beyond "stable". Or even if you got stuck on oldstable and try to
>> >install some simple new package.
>> >
>> >And this is a good amount of the "dependency hell" when it comes to
>> >Desktop users.
>> >
>> >So, I think that having some way of installing multiple versions of
>> >the same library would be a useful feature. Heck, even windows does
>> >that in (some) right way.
>       I hesitated to reply because I know my answer is politically
> incorrect. "dependency hell" is the consequence of dynamic linkage. I
> understand that dynamic linkage is a necessity for distros, but if the
> concern is about one package, this very one can be linked statically.
> Just search for "static" in synaptic and you'll see that many Debian
> packages, including bash and zsh have static versions, therefore it is
> not so politically incorrect. Therefore nothing prevents bitcoin from
> being statically linked - only glibc remaining dynamic.

>
>       Didier

>
>

I'd just like to offer my opinions on the subject of Debian/Devuan
libraries, linking and so on. This is just an opinion, so no one has to
agree by any stretch of the human imagination, nor do I feel it
necessary to defend it. That said, it has been my experience that
dynamic linking is a two-edged sword. It's "the best thing ever" for
operating systems, but it has some rather ugly limitations. I'll try to
keep it simple, for everyone who is not an engineer.

It is very easy for Linux to become "confused" which library is the
right one. Software can, and will crash if it can't figure out which
library is the one it was compiled with. At the very least, your system
will display erratic behaviour, even if there are no serious bugs in the
source code. Virtually all Linux distributors dodge the linking issues,
by refusing to support more than one version of a program/library in a
given release.

There is no technical reason that you can't support multiple versions of
the same library (or any other software) in the same release. It is very
possible to make it work. I know, because I have done it. There are
different ways to solve this problem. Symlinks are most often used to
give one version of a library as a "default." Another is using a
wrapper script with LD_LIBRARY_PATH, and a third is to use a chroot.

The greatest stumbling block to implementing it system-wide on a
day-to-day basis in Devuan is the Debian package system. It is designed
to resolve packages based on a single chain of binary dependencies setup
by the Debian release team. When it was designed, Debian did not
consider it a necessity for you to be able to install multiple
versions. Fixing it would take a lot of convincing and a few years
worth of coding.

This same issue has come up before. It's not new. That is why Ubuntu
is considering Snappy instead of the Debian package system.


Cheers!
T.J.


P.S.

Just for a sense of completeness, Microsoft gets a mention. It resolves
the problem in a different way: the Registry combined with something
called COM, which I am not going to get into here. If anyone really
wants to know more about that sort of thing, I humbly suggest personal
research or asking me off-list. It's not an easy topic to delve into,
and generally not a welcome one on a Linux list. I mention it, because
it is possible to use the COM standard on Linux. Personally, I am glad
no one does.