libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Opening libraries by soname


From: Ralf Wildenhues
Subject: Re: Opening libraries by soname
Date: Mon, 10 Dec 2007 10:24:51 +0100
User-agent: Mutt/1.5.17 (2007-11-13)

Hello Paolo,

* Paolo Bonzini wrote on Mon, Dec 10, 2007 at 09:44:55AM CET:
> In debian, libncurses.so is not installed unless libncurses-dev is also 
> installed.  Therefore, programs should open libncurses.so.5 directly.

And on Solaris, the program should know that libncurses.so.5 on
GNU/Linux happens to be libncurses.so.3.1.1, and on AIX libncurses.a,
and on FreeBSD libncurses.4.1.1.so, and on HP-UX libncurses.so.4.1?
(I made the numbers up now, but the principle should be clear.)

The only way I see that happen in a sane way is to have all three
libtool version numbers passed to a new lt_dlopenadvise API (CVS HEAD)
and have libltdl compute the soversion from there.

But even then it will still break one feature of modules: that you can
have backward-compatible upgrades that still work.

> However, this is not possible with ltdl_openext.  Would a patch be accepted 
> to extend ltdl_openext("libncurses.5") like this:
>
> - of course, opening "libncurses.5" tries to open libncurses.5.so and 
> libncurses.5.la first
>
> - on some systems it might succeed, as on Darwin.  on other it will fail, 
> but it will recognize the soversion suffix and try to open libncurses.so.5.
>
> - failing to do so, it will try libncurses.la and check the current/age 
> items to detect if the library supports that soversion.

The last item would be the right thing to do, but of course .la files
are only in the -dev package, too, so it would not help you any further.
Doing all three gets you another factor in the already quite large
number of syscalls that ltdl makes.

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]