>>>> "SJT" == Stephen J Turnbull
<turnbull(a)sk.tsukuba.ac.jp> writes:
SJT> `ln -sf libXaw3d.so.6.1 libXaw.so' and bingo! no errors. But I
SJT> don't think I want to do this permanently.
SJT> Or do I? (Advice, please.)
Maybe. Here's how dynamic linking and shared objects are supposed to
work:
Dynamic ELF applications have a .dynamic section which has a number of
fields containing information about the dynamic requirements of the
app. In particular, for this discussion, there is one or more
NEEDED members which describe the shared objects that the binary
needs to run (such as libc.so.1). You'll note that these are
versioned names. On Solaris, you can look at the .dynamic section
with dump -Lv <binary>.
Now, when shared objects are created, ld takes its -h "name" argument
(or the -o "name" in -h's absence) and records that name into the
resulting object. So, libc is built with a "-h libc.so.1". This name
appears in the SONAME member of the .dynamic section.
When creating a dynamic executable, the link editor (ld, usually
invoked under the covers by the compiler) takes arguments in the form
-lc and translates them to "libc.so" and looks in each of the
directories defined by "-L" options or $LD_LIBRARY_PATH or any default
path such as /usr/lib. Note: ld will NOT find /usr/lib/libc.so.1
So, in the case of a simple app linking with libc, ld simply opens
/usr/lib/libc.so and as part of its work, it takes the SONAME from
libc.so and writes it out again as a NEEDED in the app. ld doesn't
know or care that libc.so is a symlink...
Now, at some point, somebody decides that libc needs upgrading in a
manner that renders it incompatible with libc.so.1. Thus libc.so.2 is
born. It is further decided that all NEW applications should link to
this, so the symlink libc.so is revectored to libc.so.2. libc.so.1
will continue to exist and be available to applications that have been
linked against it.
Pretty simple really. But there are many ways to screw this up and I
suspect that in your installation that is exactly what has happened.
Hope I've helped you decide on the correct course...