Re: ld.so for multiarch and multilib installed at same time

Yunqiang Su <[email protected]>
Newsgroups gmane.linux.debian.devel.general,gmane.linux.debian.ports.mips
Message-ID <CAKcpw6W9vrU5+TmvXPiw=zvUgcCRsAu7ynYWCBB53GUnNS3+8w@mail.gmail.com>
On Fri, Apr 25, 2014 at 5:58 PM, Steve McIntyre <[email protected]> wrote:
> Yunqiang Su wrote:
>>On amd64 system:
>>
>> libc6-i386  make /lib/ld-linux.so.2  link to /lib32/ld-linux.so.2 and link to
>>       /lib32/ld-2.18.so
>>
>>libc6:i386 make /lib/ld-linux.so.2 link to /lib/i386-linux-gnu/ld-2.18.so
>>
>>when these 2 packages installed at the same time
>>     /lib/ld-linux.so.2 is linked to /lib/i386-linux-gnu/ld-2.18.so
>>
>>And dpkg is happy about that this happens.
>
> What's responsible for making the links? Are they directly in the
> package, or made by postinst etc.? Are the 2 packages sensible in
> terms of multi-arch setup?

ldso is the load of binary, it is the entrance of any binary execution.
On any system, it is fixed

please see:
https://wiki.debian.org/Multiarch/LibraryPathOverview#ELF interpreter

It is directly in these packages.

>
>>On mips64el system:
>>
>>libc6-mips32 make /lib/ld.so.1 link to /lib/ld-2.18.so
>>         (yes, quite strange, mips system asks for use /lib as o32
>>multilib path)
>
> Meh, it's not doing the braindead /lib32 thing. That shouldn't be a
> problem. :-)

lib32 is left for n32 multilib on mips* systems.

>
>>libc6:mipsel make /lib/ld.so.1 link to /lib/mipsel-linux-gnu/ld-2.18.so
>>
>>When try to install these 2 packages both, dpkg will be unhappy:
>>
>>dpkg: error processing archive libc6_2.18-4_mipsel.deb (--install):
>> trying to overwrite '/lib/ld.so.1', which is also in package
>>libc6-mips32 2.18-4
>>Errors were encountered while processing:
>>
>>
>>I also tried to repack libc6:mipsel to link /lib/ld.so.1 to
>>/lib/mipsel-linux-gnu/ld.so.1
>>instead of ld-2.18.so directly.
>>It aslo has the same problem.
>
> Well, you're still trying to replace the same file (link) on
> disk. dpkg is not going to be happy with that, unless they're
> consistent for multi-arch.
>

The problems is why on amd64, dpkg is happy about it?

> --
> Steve McIntyre, Cambridge, UK.                                [email protected]
> Support the Campaign for Audiovisual Free Expression: http://www.eff.org/cafe/



-- 
Yunqiang Su
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.