On 10.02.2018 18:09, Sven Joachim wrote: > On 2018-02-10 15:00 +0100, Matthias Klose wrote: > >> On 10.02.2018 13:41, Sven Joachim wrote: >>> >>> Also, while installing foreign architecture packages might sometimes be >>> useful, linking a program in a newly built package against a shared >>> foreign-arch library is not really possible, because dpkg-shlipdeps will >>> generate incorrect dependencies for it. >> >> well, this is an issue which should be filed against dpkg-shlipdeps. Did you >> actually try to build that? > > Here's an example which you should be able to reproduce. The > grub-legacy package depends on multilib packages on amd64, since it's > 32-bit only: > > ,---- > | $ apt-cache show grub-legacy:amd64 | grep Depends > | Depends: lib32ncurses5 (>= 6), lib32tinfo5 (>= 6), libc6-i386 (>= 2.7), > grub-common > `---- > > Let's try to build it with i386 packages instead of multilib: > > ,---- > | $ apt-get source grub > | $ sed -i '/lib32ncurses5-dev/libncurses5-dev:i386/' grub-0.97/debian/control > `---- > > Build the package in a chroot with amd64 as native and i386 as foreign > architecture, I used pbuilder for that. This is the result: > > ,---- > | $ dpkg-deb -f grub-legacy_0.97-72_amd64.deb | grep Depends > | Depends: libc6 (>= 2.7), libncurses5 (>= 6), libtinfo5 (>= 6), grub-common > `---- > > The problem here is that the dependencies are not arch-qualified.
that's not how cross builds are supposed to work. build with dpkg-buildpackage -a <target>. of course fixing / removing the libc6-i386 b-d. And no, you can't upload such a package to the archive. Everything with dependencies on foreign archs gets rejected. In the end we want to get away with multilibs, but it's too early to remove that multilib support. Matthias