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

Library linknames: symlink to file or to soname?



Hello,

I just started reading the "Program Library HOWTO" and found that,
according to that document, the linkname of a library can be either a
symlink to the real filename, or to the soname. 

I wanted to know how this is handled in Debian, and first I couldn't
find anything in policy (but see below). So I just looked into /usr/lib,
and was surprised to find a mixture - on my woody+backports main system,
32 linker names link to sonames, but 98 to filenames, e.g.

$ ls -l /usr/lib/libssl.so
lrwxrwxrwx    1 root     root           15 2004-03-22 10:48 /usr/lib/libssl.so -> libssl.so.0.9.6

$ ls -l /usr/lib/libglut.so 
lrwxrwxrwx    1 root     root           12 2002-04-15 10:33 /usr/lib/libglut.so -> libglut.so.3

Meanwhile I found in the Policy Manual, 8.4: 

,----
| The development package should contain a symlink for the associated
| shared library without a version number. For example, the libgdbm-dev
| package should include a symlink from /usr/lib/libgdbm.so to
| libgdbm.so.3.0.0
`----

So it seems the minority quarter is wrong. Or are there any specific
reasons to handle this differently? 

And, by the way, does it matter at all? 

As long as nobody puts locally installed shared libraries into /usr/lib,
there will always be only one shared library file per soname version -
in the example there cannot be libgdbm.so.3.0.1, because if this version
is installed from a Debian package, the older package which contained
libdgbm.so.3.0.0 (and the dev package from the same source will be
updated, too). If I'm right with this, it doesn't matter, and the piece
of text from policy is just an example - correct?

A linker name might point to library files with different sonames, but
this is catered for by the conflicts between different -dev packages.

Regards, Frank

-- 
Frank Küster
Inst. f. Biochemie der Univ. Zürich
Debian Developer



Reply to: