Re: Lintian warnings on A+ package
On Tue, Jan 08, 2002 at 10:57:30PM -0500, Neil L. Roeth wrote:
> I made packages for A+ and ran lintian on them. One of them spits out a few
> warnings and one error that I'd like to resolve, but I do not know how. I
> hope someone can help, since when I finish this I'll have built my first
> Debian packages!
> 1) "binary-or-shlib-defines-rpath ./usr/bin/a+ /usr/lib:/usr/X11R6/lib"
> (warning) How do I remove this rpath? The program uses autoconf, libtool and
> automake, but I am not familiar with these tools so I do not know where to
This means that the binary or library has the library path hardcoded
into it. It means that if we move the libraries to different directories
in the future, the program will stop working. (We have moved the
libraries like this before, during the libc5 -> libc6 transition.)
Here's the code I use in the debian/rules script for the libstroke
package. I don't know if this is the currently recommended way but
it appears to work.
# Patch the generated libtool to avoid passing -rpath when linking,
# and to explicitly link libraries against the libraries they
# depend on.
sed < libtool > libtool-2 \
-e 's/^hardcode_libdir_flag_spec.*$$/hardcode_libdir_flag_spec=" -D__LIBTOOL_IS_A_FOOL__ "/' -e '/^archive_cmds="/s/"$$/ \\$$deplibs"/'
mv libtool-2 libtool
chmod 755 libtool
I thought I heard that modern libtool didn't do this any more.
Maybe you can run libtoolize on the sources and solve the
problem that way.
This patch also makes a shared library declare dependencies on the
libraries it is linked to eg libc6, libm etc.
Hamish Moffatt VK3SB <email@example.com> <firstname.lastname@example.org>