curl-library
Re: libcurl version
Date: Tue, 15 Jun 2010 12:17:14 -0700
On Tue, Jun 15, 2010 at 09:33:19AM -0400, Alona Rossen wrote:
> I built libcurl from the same package curl-7.20.1.tar on Solaris and HP-UX. In
> the result, library versions are different on the two platforms.
>
> HP-UX11.11 RISC:
>
> /usr/local/curl72/lib> ls
> libcurl.a libcurl.sl libcurl.sl.6.0
> libcurl.la libcurl.sl.6 pkgconfig
>
> Solaris 10 SPARC:
>
> /usr/local/curl72/lib> ls
> libcurl.a libcurl.so libcurl.so.4.2.0
> libcurl.la libcurl.so.4 pkgconfig
>
> Please explain.
Sure! libcurl specifies its version number as a triple; for version 7.20.1,
that triple was 6:0:2 (or, in some cases, 7:0:2). It's libtool's job
to convert that platform- independent triple into a platform-specific
version number. Based on libtool's knowledge of the platform and how it
manages backward compatibility with libraries, it chooses appropriate
major and minor library version and SONAME numbers.
Some platforms cannot cope with newly-added public exports in shared
libraries while maintaining backward compatibility, so libtool bumps
the major version more often on those platforms. Platforms that use ELF
shared libraries don't have that restriction, so the major version/SONAME
doesn't need to be bumped as often there, and new libraries are more often
able to be drop-in replacements for older ones. Based on the numbers you
show above, I'm guessing HP-UX falls into the first category while Solaris
falls into the second.
See http://navi.cx/~mike/writing-shared-libraries.html for a further
discussion.
>>> Dan
P.S. Hi everybody!
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-06-15