On Sat, Nov 05, 2016 at 10:40:30PM +0100, Marco d'Itri wrote: > This is a more complex issue, since it does not happen on my i386 > system. > It has been discussed in #810499 but I am not sure about the best way to > fix this.
It depends on the search order for library directories. dpkg-shlibdeps parses /etc/ld.so.conf and has its own idea on which directories to search built into the Dpkg::Shlibdeps module. Thus the failure comes and goes as the search order changes. By changing the search order, you can even reproduce in on amd64: sbuild -d sid --add-depends=usrmerge --chroot-setup-commands="sed -i 's#^/usr##;t;s#^/lib#/usr&#' /etc/ld.so.conf.d/x86_64-linux-gnu.conf" dash The crucial bit here is that dpkg-shlibdeps assumes that every single library is provided in exactly one location and that it can use that location to look up which package it belongs to. The /usr merge breaks that assumption by providing e.g. libc.so.6 via two locations. Depending on which location is found first, dpkg-shlibdeps gives up. I conclude that dpkg-shlibdeps only works on merged /usr by sheer luck. Helmut