[Top][All Lists]

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

Re: library versioning

From: Ralf Wildenhues
Subject: Re: library versioning
Date: Tue, 3 Feb 2009 20:02:53 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

* Matěj Týč wrote on Tue, Feb 03, 2009 at 11:15:10AM CET:
> > This is not possible, in general.  It has nothing much to do with
> > libtool either, because typically it's just the system semantics that
> > allow for only one unversioned soname symlink.
> OK, but an easy check whether I can safely link with the lib would be
> nice, too.

Well, a feature check would be more in line with Autoconf "philosophy"
than a version-based one, I guess.  True, this is less applicable for
the large software stacks that desktop apps typically use, than e.g.,
for the numerical libraries where often, several different
implementations exist that provide (nearly) the same API.

> > Of course, if you don't have to be able to have multiple versions
> > installed concurrently, then all you do is use a configure test like
> > AC_CHECK_LIB or sisters with the latest-added symbol that you need,
> > or a self-written link test if the latest needed API isn't
> > distinguishable by function symbol alone.
> Another point of having a AC_CHECK_LTLIB - like macro would be a
> possibility to check whether the version of the library is OK.
> Sometimes it is not possible to use AC_CHECK_LIB to check whether a
> function is in the library (due to calling convention).

Are you hinting at C++ here?  Somebody should write a decent check for
C++ libraries.  Or maybe one exists already out there, dunno.

> Well, I just wonder what is the sense of the libtool's versioning
> system since it can't be used by library users :-)

It can be used.  However, library versioning is primarily a concept to
allow support of existing binaries.  Recompiling is intended to always
work against the newest versions of things.

A corollary is that, when you are building software in order to
distribute it in binary form, then build it against the oldest versions
of the libraries that you want to be compatible with.

At least that is the way it was originally intended, I think.

I should admit that, in principle, libtool could go beyond that and
support some sort of linking against older library versions; on some
systems, this could work.  But we try not to promote semantics that
are unportable.  And anyway there is no analogous functionality in
the preprocessor: for included headers, there exists no agreed-upon
versioning concept, and you typically cannot mix those from different
versions either.

Hope that helps.


reply via email to

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