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

Bug#2126: libc5-dev: relative symlink can fail



Package: libc5-dev
Version: 5.2.18-1

/usr/lib/libc.so is needed in the new scheme of things so that the
linker can find which libc you want to link against.

At the moment, it's a relative symlink, pointing to:
   ../../lib/libc.so.5.2.18

However, if /usr or /usr/lib are also symlinks, then this falls over.

In particular, my /usr disc died recently, and I replaced /usr by a
symlink to a backup I'd made:
    /usr -> /home/and1000/usr

This means that /usr/lib/libc.so is no longer valid, since it points to:
    /home/and1000/lib/libc.so.5.2.18
(which doesn't exist)

So, the symptom is that ld links everything static. Not everyone
checks their binaries to see how they're linked, and the reason why ld
is linking everything static is completely non-obvious!

The quick fix is to make /usr/lib/libc.so an absolute symlink, but
that will also break in some circumstances. It has the advantage of
breaking in a more obvious manner, though :)

I can't think of a better fix, unfortunately. Maybe I shouldn't be
doing nasty things to /usr :)

Austin


Reply to: