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

Re: Looking for help using libtool



On Thu, Apr 20, 2000 at 09:56:59PM +0300, Antti-Juhani Kaijanaho wrote:
> > How would I find out the correct .so "major" and "minor" numbers (if that
> > *is* the right terminology) if I were to create dynamic libraries as
> > you'd mentioned?
> 
> Choose them.  Make sure that the major number reflects the ABI version.
> Increase the minor version every time the code changes, and increase
> the major number when the interface (public definitions) change.
> 
> A simple and probably not fully correct way of checking for ABI changes
> is to compare the public .h files; if they have changed, th ABI has
> probably changed, and vice versa.
> 
> Of course, if upstream provides you with shared object versions, use them.

Well said, I'll just add some notes about stuff I've seen:

Try to persuade upstream to use .so libraries if possible, so they start
caring about the numbers. When you start versioning, you may start at 0.0.0,
that's completely normal. Remember to change the package name when the major
version (the one in SONAME[1]) changes. Don't bother much with versioning
.so libs that are not shared libraries, i.e. stuff that isn't intended to be
linked to but dlopen()ed (sp?) - name it libwhatever.so and put it in a
directory under /usr/lib that is not accessed through ld.so.conf (also,
don't make shlibs for it and ignore Lintian warnings/errors regarding it).

[1] objdump -p libwhatever.so | grep SONAME

-- 
Digital Electronic Being Intended for Assassination and Nullification


Reply to: