[comp.sys.sun] ld.so looks for wrong libc.so

mea@sparta.com (Mike Anderson) (03/20/91)

I have run across a rather strange situation.  I have 4.1.1 on one of my
disks and I have 4.1.1 coming.  Unfortunately, Sun's update service is now
claiming that they only ship 4.1.1 on CD ROM and we are a long way away
from being able to get a CD ROM drive (we have the money, but Sun's lead
times mean that we won't see it for weeks :-\ ).

I just got a new 669 MB disk for my SLCs and I wanted to get 4.1.1 on it.
Lacking a CD ROM drive, I thought to try to attach the new disk to my
current SCSI bus and use dump to get the OS on the new disk.  I formatted,
partitioned, used dump to copy over everything, installed the boot block
and everything looked good.  I put the new disk onto my SLC and voila, it
booted.

Now comes the strange part.  When I try to run certain programs like vi, I
get a message from ld.so saying it can't find libc.so.2 and the program
sputters and dies.  Now when I look at my /usr/lib, I see libc.so.1.6 but
no libc.so.2.  The ld.so.cache looks right (it shows libc.so.1.6) as does
LD_LIBRARY_PATH.  Issueing ldconfig doesn't clear it up either.  Reboots
are ineffective at clearing this problem up as well.  Anyone have any
clues, pointers or RTFMs they can give me to shed some light on this
problem?

Thanks in advance.

Mike Anderson
mea@sparta.com

jason@cs.odu.edu (Jason "dedos" Austin) (03/24/91)

In article <2005@brchh104.bnr.ca> mea@sparta.com (Mike Anderson) writes:

-> Now comes the strange part.  When I try to run certain programs like vi, I
-> get a message from ld.so saying it can't find libc.so.2 and the program
-> sputters and dies.  Now when I look at my /usr/lib, I see libc.so.1.6 but
-> no libc.so.2.  The ld.so.cache looks right (it shows libc.so.1.6) as does
-> LD_LIBRARY_PATH.

Vi uses libc.so.2 which is the system V version of the C library, and that
library is kept in /usr/5lib.  ld.so should default to scanning that
directory along with /usr/lib.  I would check to make sure /usr/5lib
exists.

Jason C. Austin
jason@cs.odu.edu

Mark.Bush@prg.oxford.ac.uk (Mark Bush) (03/27/91)

In article <2005@brchh104.bnr.ca> mea@sparta.com (Mike Anderson) writes:
>Now comes the strange part.  When I try to run certain programs like vi, I
>get a message from ld.so saying it can't find libc.so.2 and the program
>sputters and dies.  Now when I look at my /usr/lib, I see libc.so.1.6 but
>no libc.so.2.  The ld.so.cache looks right (it shows libc.so.1.6) as does
>LD_LIBRARY_PATH.  Issueing ldconfig doesn't clear it up either.  Reboots
>are ineffective at clearing this problem up as well.  Anyone have any
>clues, pointers or RTFMs they can give me to shed some light on this
>problem?

I think this came up net too long ago (and I got bitten by it when I
upgraded to SunOS4.1!).  The library used by `vi' and it's friends is the
System V libc, not the BSD one.  Check that you have /usr/5lib installed.

If you run `ldd /usr/ucb/vi' it will tell you what libraries it wants and
where it is expecting to find them.

Mark