Bug#302196: lintian: Please add test for broken libtool .la files shipping in packages
Package: lintian
Version: 1.23.8
Severity: wishlist
The problem:
libtool uses .la files to locate libraries, and if they are not in any
of the common locations (in ld.so.conf), it adds rpath information to
anything that needs to link to those libs.
Some packages do stupid things in their builds that interact with libtool
to provide bad library location information inside the .la files.
This break any and all packages that need to use that library and also use
libtool.
The typical mistake that causes this problem is to override prefix on
$(MAKE) install, instead of fixing the package so that only an override of
DESTDIR is necessary to get things to compile correctly.
The tests proposed:
Binary package test:
It is an ERROR for any .la files to have libdir= line when the contents of
that variable are not pointing to the ABSOLUTE path to the .la file
(this assumes .la files are always installed in the same directory as
the .so and .a files).
e.g.: good:
libdir='/usr/lib' for /usr/lib/*.la
e.g.: bad:
$grep libdir /usr/lib/*la | grep -v -E '=./usr/lib.'
/usr/lib/libapreq2.la:libdir='/lib'
/usr/lib/libsnmp.la:libdir='/build/buildd/net-snmp-5.1.2/debian/tmp/usr/lib'
in other words, a .la file in /usr/lib/foo/bar/baz/baka.la would HAVE
to contain libdir='/usr/lib/foo/bar/baz' for it not to be in error.
-- System Information:
Debian Release: 3.1
APT prefers unstable
APT policy: (990, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.10-debian6+libata9dev1+bluesmoke
Locale: LANG=pt_BR.ISO-8859-1, LC_CTYPE=pt_BR.ISO-8859-1 (charmap=ISO-8859-1)
Versions of packages lintian depends on:
ii binutils 2.15-5 The GNU assembler, linker and bina
ii diffstat 1.38-1 produces graph of changes introduc
ii file 4.12-1 Determines file type using "magic"
ii gettext 0.14.2-1 GNU Internationalization utilities
ii intltool-debian 0.30+20040213 Help i18n of RFC822 compliant conf
ii man-db 2.4.2-21 The on-line manual pager
ii perl [libdigest-md5-perl] 5.8.4-8 Larry Wall's Practical Extraction
-- no debconf information
--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
Reply to: