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

Bug#325226: libc6: Wrong dynamic linker on amd64



Hello,

On 06-Feb-22 20:37, Aurelien Jarno wrote:
> Andreas Jochens a écrit :
> >This occurs because the patch changes the default library search path
> >of the dynamic linker from "/lib /usr/lib" to "/lib64 /usr/lib64".
> 
> Well it's already strange it has works before. The dynamic linker path 
> on amd64 is /lib64/ld-linux-x86-64.so.2, and most of the binaries seems 
> to use this path. However it seems that a few binaries and libraries are 
> using /lib/ld-linux-x86-64.so.2. This is wrong.

I do not think that there are any binaries in Debian amd64 which are using
/lib/ld-linux-x86-64.so.2 as the linker path. The official Debian amd64
port always used /lib64/ld-linux-x86-64.so.2 as the linker path
as far as I know.

Anyway, there seems to be a misunderstanding here. I referred to the default 
list of paths which are searched _by_ the dynamic linker for libraries 
in the absence of a '/etc/ld.so.conf' file - not to the path _of_ the 
dynamic linker itself which is (and always was) /lib64/ld-linux-x86-64.so.2. 

Your patch has changed the former, i.e. default list of searched library 
paths from '/lib /usr/lib' to '/lib64 /usr/lib64'. This change can be 
debated but it _is_ a change to the current status quo nonetheless.

As long as the /usr/lib64 symlink is added to the installer udeb
that change is not a real problem.

It is just my personal opinion that we should not unnecessarily make
the amd64 port depend on that symlink. I think that libraries should be 
accessed through /usr/lib where they are installed.

Without your patch the /usr/lib64 symlink could safely be removed 
without disturbing the system because libraries were accessed through
/usr/lib. With your patch, the /usr/lib64 symlink can no longer be 
removed without problems because /usr/lib is not searched for libraries 
by the linker unless /usr/lib is explicitly added to /etc/ld.so.conf.

> all librairies and binaries are using the /lib/ linker. Just try to 
> remove /lib64 on your computer, even with the unpatched glibc, you will 
> see that it is completly broken.

Yes, without the /lib64 symlink the system breaks in any case because
the path to the linker /lib64/ld-linux-x86-64.so.2 - which is hardcoded 
by gcc into every binary - no longer exists without the /lib64 symlink.

But I liked the fact that up to now this was the _only_ thing
which really used the /lib64 symlink. I do not like the ugly
(/usr)/lib64 directories at all and I think they should be dropped
in the long term. Again, this point is just my personal opinion
and not really technically important to make things work now.

Regards
Andreas Jochens



Reply to: