Package: dpkg-dev
Version: 1.18.6
Severity: normal
Control: block 818873 with -1

Hi Guillem,

dpkg-shlibdeps with multiple -l options works counterintuitively - the
paths are searched in the reverse order they were given.

This causes a problem when building gcc-5-cross (#818873) which calls 

  dpkg-shlibdeps -Tdebian/libgnat-5-s390x-cross.substvars
  -l/lib/s390x-linux-gnu -l/usr/lib/s390x-linux-gnu
  -l/s390x-linux-gnu/lib -l/usr/s390x-linux-gnu/lib
  -l/«PKGBUILDDIR»/gcc/debian/tmp/usr/s390x-linux-gnu/lib
  -l/«PKGBUILDDIR»/gcc/debian/tmp/usr/s390x-linux-gnu/lib
  debian/libgnat-5-s390x-cross/usr/s390x-linux-gnu/lib/libgnat-5.so.1
  debian/libgnat-5-s390x-cross/usr/s390x-linux-gnu/lib/libgnarl-5.so.1

and finds 

  /«PKGBUILDDIR»/gcc/debian/tmp/usr/s390x-linux-gnu/lib/libgcc_s.so.1

instead of

  /usr/s390x-linux-gnu/lib/libgcc_s.so.1

Having -l/«PKGBUILDDIR»/gcc/debian/tmp/usr/s390x-linux-gnu/lib in that
list does not look too useful to me ... but dpkg-shlibdeps should either
process the -l options in the given order or at least document the
actual order being used in the manpage.

So

  LD_LIBRARY_PATH=FIRST:SECOND:THIRD dpkg-shlibdeps -lfirst -lsecond -lthird ...

will currently search these paths (and some more builtin paths
probably):

  third
  second
  first
  FIRST
  SECOND
  THIRD


Andreas

Reply via email to