On Thu, 30 Nov 2017 21:18:29 +0800 YunQiang Su <wzss...@gmail.com> wrote: > On Wed, 29 Nov 2017 13:51:20 +0000 James Cowgill <jcowg...@debian.org> wrote: > > Hi YunQiang, > > > > On 14/11/17 03:34, YunQiang Su wrote: > > > Package: dpkg-cross > > > Version: 2.6.15-2 > > > > > > the ld.so.1 of n32 and 64 should be in > > > lib32 and lib64. > > > We should not put them in > > > /usr/$(multiarch)/lib > > > as o32 will put its ld.so.1 their. > > > > Are you sure this is correct? At least the o32 ld.so.1 from > > cross-toolchain-base 19 gets installed into > > "/usr/mips64el-linux-gnuabi64/libo32/ld.so.1" and doesn't conflict with > > the n64 linker here. > > > > > --- /usr/bin/dpkg-cross 2017-07-24 15:47:10.000000000 +0000 > > > +++ dpkg-cross 2017-11-14 03:30:13.175812265 +0000 > > > @@ -1019,6 +1019,10 @@ > > > # Skip links that are going to point to themselves > > > next if ($lv eq $_); > > > > > > + # skip /usr/$(multiarch)/lib/ld.so.1 for mips n32 and 64. > > > + # their ld.so.1 should be in lib32 and lib64. > > > + next if ($multiarch =~ m/^mips[n32,64]/ && $_ =~ > > > m/lib\/ld.so.1$/); > > > + > > > # skip links to private modules and plugins that are not > > > # useful or packaged in the -cross package, basically > > > anything > > > # in a directory beneath /usr/lib/. See #499292 > > > > As Helmut noted this causes bug #882263 which broke the mips64el cross > > compilers. That bug is caused by not fixing up the libc.so linker script > > to go with this change. > > > > libc6 installs "/usr/lib/mips64el-linux-gnuabi64/libc.so" which is an > > ld-script and hardcodes the path "/lib/mips64el-linux-gnuabi64/ld.so.1". > > dpkg-cross changes this to "/usr/mips64el-linux-gnuabi64/lib/ld.so.1" > > which no longer exists after this patch. > > Yes, we should change it to "/usr/mips64el-linux-gnuabi64/lib64/ld.so.1" > instead of "/usr/mips64el-linux-gnuabi64/lib/ld.so.1". > > The patch is for Doko.
Ohhh, sorry, this patch has a problem: I lost the ld.so.1 filename :( > > @Wooky: it seems that your version of dpkg-cross is some different with > doko's. > I will try to figure one patch for you. > > > > > > James > >
--- cross-toolchain-base-20/debian/dpkg-cross 2017-11-20 06:01:44.000000000 +0800 +++ dpkg-cross 2017-11-30 21:24:07.376939568 +0800 @@ -632,6 +632,13 @@ } while (<FROM>) { if ($multiarch) { + if ($multiarch =~ m/mips(isa)?64.*-linux.*-gnuabi64.*/){ + s:(^|[^-\w/])(/usr)?/lib/${multiarch}ld.so.1:$1$crosslib64/ld.so.1:g; + }elsif ($multiarch =~ m/^mips(isa)?64.*-linux.*-gnuabin32.*/){ + s:(^|[^-\w/])(/usr)?/lib/${multiarch}ld.so.1:$1$crosslibn32/ld.so.1:g; + }elsif ($multiarch =~ m/^mips(isa)?32.*-linux.*-gnu.*/){ + s:(^|[^-\w/])(/usr)?/lib/${multiarch}ld.so.1:$1$crosslibo32/ld.so.1:g; + } s:(^|[^-\w/])(/usr)?/lib/$multiarch:$1$crosslib/:g; s:(^|[^-\w/])(/usr)?/lib32/$multiarch:$1$crosslib32/:g; s:(^|[^-\w/])(/usr)?/lib64/$multiarch:$1$crosslib64/:g; @@ -1028,7 +1035,7 @@ # skip /usr/$(multiarch)/lib/ld.so.1 for mips n32 and 64. # their ld.so.1 should be in lib32 and lib64. - next if ($multiarch =~ m/^mips[n32,64]/ && $_ =~ m/lib\/ld.so.1$/); + next if ($multiarch =~ m/^mips(isa)?64/ && $_ =~ m/lib\/ld.so.1$/); # m/lib\/ld.so.1$/); # skip links to private modules and plugins that are not