[SLUG] LPI: Library naming

john at johnallsopp.co.uk john at johnallsopp.co.uk
Mon Sep 19 09:03:53 BST 2005


Hi ppl

I've a question about the LPI thing. We're learning about shared
libraries atm, and I've looked at two books and still don't quite get
this:

Brunson says there are two shared library naming conventions:

libraryname-major-minor-patch.so, eg. libc.2.2.4.so

and

libraryname.so.major-minor-patch, eg. libc.so.6

Then it says to look at ls /lib/libc.so.6 and you'll see:

blah blah /lib/libc.so.6 -> libc.2.2.4.so

This -> is a symbolic link between the former and the latter. It means
that programs that want an older version of a library (libc.so.6) get
redirected to the latest version (libc.2.2.4.so).

Fine.

My questions are:

1) does the latter shared library naming convention always refer to a
symbolic link? Is that why there are two naming conventions. Or are
the two not connected at all?

2) libc.so.6 doesn't seem to conform to the second naming convention.
Come to that, neither does the former. I'd have expected libc-2-2-4.so
for the former, and libc.so. well, what is that 6? If it's 2.2.6 then
it's a later version anyway.

So I'm confused. Who can shed some light on it for me?

Cheers
J




More information about the Scarborough mailing list