Package: dpkg
Version: 1.18.10
Severity: normal

I built a large package (mythtv) with this recipie:
 git clone https://github.com/MythTV/packaging -b fixes/0.28
 cd packaging/deb
 ./build-debs.sh fixes/0.28

This all works fine until the dh_shlibdeps when packing it up at the
end.

which complains about missing dependency info for
/usr/lib/ld-linux-armhf.so.3

(log below)

so the odd thing is that 
dpkg -S ld-linux-armhf.so.3 shows two files:
libc6:armhf: /lib/ld-linux-armhf.so.3
libc6:armhf: /lib/arm-linux-gnueabihf/ld-linux-armhf.so.3
but not a copy in /usr/lib (or /usr/lib/arm-linux-gnueabihf).
but there is indeed such a copy:
$ ls -l /usr/lib/ld-linux-armhf.so.3 
lrwxrwxrwx 1 root root 30 Oct 18 22:10 /usr/lib/ld-linux-armhf.so.3 -> 
arm-linux-gnueabihf/ld-2.24.so
both copies have the same md5sum.

Do we expect libc6 to put 2 copies of this library (and 2 symlinks to it) onto 
the fs? 

Or has this come from somewhere else? (This is current install from stretch
Debian-installer (Oct 31 2016, with .iso from Oct 31 2016), so shouldn't have
any cruft). 

Obviously the dpkg -S lookup dkpg-shlibdeps does fails for
/usr/lib/ld-linux-armhf.so.3

However removing /usr/lib/arm-linux-gnueabihf/ld-linux-armhf.so.3 breaks
everything. In fact it turns out that there is (hard linking? bind-mounting?)
magic involved, so deleting /usr/lib/arm-linux-gnueabihf/ld-linux-armhf.so.3 
also
deleted /lib/arm-linux-gnueabihf/ld-linux-armhf.so.3 and thus of course
everything broke. i.e it's not 'really' 2 copies at all, just some kind of
mirroring of /lib into /usr/lib (or the other way round?).

So, after a bit of struggle putting libc back, I find that this is probably
something to do with usrmerge: https://wiki.debian.org/UsrMerge

So, if it is now 'correct' that all libs appear in both /lib and /usr/lib, then
maybe dpkg-shlibdeps should understand that /usr/lib/ld-linux-armhf.so.3 is the
same as /lib/ld-linux-armhf.so.3 and use both to look up which package is
responsible in order to find the .symbols/.shlibs files?

Because I don't see how we can restrict builds from finding the 'wrong' one.

Or is there something I am missing about how this is supposed to work?

We do have symbols and shlibs files for ld-linux-armhf.so.3:
/var/lib/dpkg/info/libc6:armhf.symbols
/var/lib/dpkg/info/libc6:armhf.shlibs

so they should be findable. 

How should I fix this build? 

And is there a doc explaining how usrmerge is implemented on debian?

------------log excerpt---------
This happens:
   dh_shlibdeps
   dpkg-shlibdeps: error: no dependency information found for 
/usr/lib/ld-linux-ar\
mhf.so.3 (used by debian/mythtv-common/usr/bin/mythffplay)
Hint: check if the library actually comes from a package.
dh_shlibdeps: dpkg-shlibdeps -Tdebian/mythtv-common.substvars debian/mythtv-com\
mon/usr/bin/mythccextractor debian/mythtv-common/usr/bin/mythmetadatalookup deb\
ian/mythtv-common/usr/bin/mythffprobe debian/mythtv-common/usr/bin/mythffserver\
 debian/mythtv-common/usr/bin/mythutil debian/mythtv-common/usr/bin/mythffplay \
debian/mythtv-common/usr/bin/mythffmpeg debian/mythtv-common/usr/bin/mythshutdo\
wn debian/mythtv-common/usr/lib/mythtv/filters/liblinearblend.so debian/mythtv-\
common/usr/lib/mythtv/filters/libcrop.so debian/mythtv-common/usr/lib/mythtv/fi\
lters/libdenoise3d.so debian/mythtv-common/usr/lib/mythtv/filters/libforce.so d\
ebian/mythtv-common/usr/lib/mythtv/filters/libquickdnr.so debian/mythtv-common/\
usr/lib/mythtv/filters/libbobdeint.so debian/mythtv-common/usr/lib/mythtv/filte\
rs/libadjust.so debian/mythtv-common/usr/lib/mythtv/filters/libgreedyhdeint.so \
debian/mythtv-common/usr/lib/mythtv/filters/libivtc.so debian/mythtv-common/usr\
/lib/mythtv/filters/libinvert.so debian/mythtv-common/usr/lib/mythtv/filters/li\
bkerneldeint.so debian/mythtv-common/usr/lib/mythtv/filters/libyadif.so debian/\
mythtv-common/usr/lib/mythtv/filters/libonefield.so debian/mythtv-common/usr/li\
b/mythtv/filters/libfieldorder.so debian/mythtv-common/usr/lib/mythtv/filters/l\
ibpostprocess.so debian/mythtv-common/usr/lib/mythtv/filters/libvflip.so return\
ed exit code 2
debian/rules:96: recipe for target 'binary' failed
-------------




-- System Information:
Debian Release: 8.6
Architecture: armhf (armv7l)

Kernel: Linux 4.7.0-1-armmp-lpae #1 SMP
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Reply via email to