autoconf
[Top][All Lists]
Advanced

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

Re: linking against shared libraries


From: Rainer Gerhards
Subject: Re: linking against shared libraries
Date: Mon, 12 Dec 2011 10:02:50 +0100

On Fri, Dec 9, 2011 at 5:34 PM, Mike Frysinger <address@hidden> wrote:
> On Friday 09 December 2011 06:21:18 Rainer Gerhards wrote:
>> I am trying to build a program so that it does not refer to shared
>> libraries by their version-specific name but rather a generic one. My
>> intent is to use checkinstall to generate packages.
>>
>> As a concrete example, I use some basic openssl functionality that is
>> available in both newer and older versions of the library (without any
>> ABI issues). In essence, it does not matter if 0.9.x or 1.0.x is used.
>> However, after my program is built, the exact version number seems to
>> be required. So if I build on an older system and move the binary over
>> to the newer one, the new one complains that 0.9.x is not available
>> (which is fine with me, because 1.0.x does nicely). And vice versa for
>> the other direction.
>
> it isn't possible to link against "libssl.so" and have that be recorded.  you
> have to realize that the differences between them isn't simply naming ... they
> changed because the binary interfaces between the two versions changed.
>
> the closest you could do is load the library with dlopen(), then use dlsym()
> to look up specific funcs, and then hope the specific functions you're using
> didn't actually change between versions.
> -mike

Thanks, this explains the problem. So I probably need to think about
going the dlopen()  way as I know the function has not changed, so
from my PoV either version is well.

Thanks,
Rainer



reply via email to

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