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

Re: [Evms-devel] EVMS: shared libraries with unversioned sonames

On Wednesday 02 January 2002 08:32, Kevin Corry wrote:
> On Tuesday 01 January 2002 14:39, Matt Zimmerman wrote:
> > Currently, the default installation names the library libevms.0.2.4.so
> > and libevms.so is a symlink to that.  However, the soname is libevms.so:
> >
> > objdump -x /usr/lib/libevms.0.2.4.so | grep SONAME
> > objdump: /usr/lib/libevms.0.2.4.so: no symbols
> >   SONAME      libevms.so
> >
> > And this is the name which is embedded in executables which are linked
> > against the library:
> >
> > ldd =evms
> >         libdl.so.2 => /lib/libdl.so.2 (0x4001f000)
> >         libdlist.so => /usr/lib/libdlist.so (0x40023000)
> >         libevms.so => /usr/lib/libevms.so (0x40027000)
> >         libc.so.6 => /lib/libc.so.6 (0x40050000)
> >         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
> >
> > I believe what you want is the -soname linker option, but I normally use
> > libtool for this kind of thing.  Since you don't have to worry about OS
> > portability, you can probably get away with calling ld directly, but
> > could easily put together a libtool setup for it (and automake as well)
> > if you're interested.
> >
> > I would recommend libevms-0.2.4.so, as you said above, over the current
> > libevms.0.2.4.so, since many other programs use that convention.
> I have tried changing the soname to the version-specific name, and
> everything seems to work. The only problem I see now is that the user must
> run "ldconfig" after installing, because the user-interfaces are linked
> against "evms", and not against the specific version of evms. But this
> really shouldn't be a problem. It also means we probably don't need to
> explicitly create the sym-link on "make install", since "ldconfig" will do
> that. Could the "ldconfig" call be added to the top-level Makefile
> "install" target?
> I have also switched the library file name to libevms-x.y.z.so from
> libevms.x.y.z.so.
> If you are interested in creating an automake/libtool setup, give it a try
> and I will look it over and see if we can include it in the future.

What if we used libevms.so.x as the soname, and libevms-x.y.z.so as the 
filename for the library (where x is the version major number, y is minor, 
and z is patchlevel)? This seems to be common on many of the libraries on my 

Basically, we don't want to force the user-interfaces to  to be recompiled on 
every minor change to the engine core that doesn't change any of the external 
APIs. We only intend to change these APIs across a major version change. At 
most, new APIs may be added, but existing ones (and their defined 
functionality) will remain the same. Having the soname include only the major 
number means the existing binary user-interfaces could be used if a new minor 
or patch-level version of the engine library appears.

Any comments?


Reply to: