[lug] library naming conventions, sym links

Michael J. Hammel mjhammel at graphics-muse.org
Sat Jul 16 20:44:21 MDT 2005


On Sat, 2005-07-16 at 18:38 -0600, D. Stimits wrote:
> However, it seems that rpm is telling me this is wrong. Rpm seems to 
> want to do this, where libSomeLib.so.0.0.0 is the hard link:
> libSomeLib.so -> libSomeLib.so.0.0.0
> libSomeLib.so.0 -> libSomeLib.so.0.0.0
> libSomeLib.so.0.0 -> libSomeLib.so.0.0.0
> 
> Is this a correct standard, with the top scenario being wrong? It seems 
> like rpm is breaking things (or at least looking for a way to cause 
> version breakage) by using the latter version of sym link.

To my knowledge this is correct.  The real file has a name including the
full version number.  The rest are symlinks to that.  As an example (on
FC3, but this is true of all Linux distributions that use X11):

mjhammel(tty3)$ l libX11.so*
lrwxrwxrwx  1 root root     13 Jun  6 22:20 libX11.so -> libX11.so.6.2
lrwxrwxrwx  1 root root     13 Jun  6 22:19 libX11.so.6 -> libX11.so.6.2
-rwxr-xr-x  1 root root 814588 Mar 30 08:27 libX11.so.6.2

I know the linker uses .so when linking (-lX11 finds libX11.so) but I'm
not quite sure why we have the .so.<major> symlink (libX11.so.6 in this
example).  Something tells me I used to know, but apparently that brain
cell is on vacation.

I don't think RPM is broken in this respect.
-- 
Michael J. Hammel           |
The Graphics Muse           |          Better living through denial.
mjhammel at graphics-muse.org  |
http://www.graphics-muse.com 




More information about the LUG mailing list