Libtool update


This is a slightly edited version of the bug report #237265. Thanks to RyanMurray for providing this information.

The older versions of libtool fail to correctly support shared libraries for the Debian mips and mipsel architectures. Debian versions 1.5-2 and 1.4.2-7 and higher correctly support them. You need to update all of the libtool related files by running the following on your source tree:

 autoreconf --force

You may need to use the --install option as well. You can also try the individual commands needed yourself:

 libtoolize --force --copy
 aclocal
 autoheader
 automake -a
 autoconf

autoheader may not be needed, and you may need to use versioned binaries (autoconf2.13, automake-1.{4,6,7}, aclocal-1.{4,6,7}, etc)

The correct configure script will have output that looks like this:

 # This must be Linux ELF.
 linux-gnu*)
   case $host_cpu in
   alpha* || hppa* || i*86 || mips || mipsel || powerpc* || sparc* || ia64* || arm* || m68k)
     lt_cv_deplibs_check_method=pass_all ;;
   *)

It is important that mips and mipsel (or mips*), arm, and m68k are listed in the configure script here, or seeing the following comment:

 # linux always uses pass_all now, this code is the old way (tm)

Older versions of libtool used a file_magic check for the pattern

 ELF [0-9][0-9]*-bit ["LM"]SB (shared object||dynamic lib )

The output of file(1) on a shared library on mips does not match this regular expression, however. Earlier versions of file had been modified to match this regular expression, but the latest version uses the same output as upstream once again. The file check often causes problems, and results on a build-dep on file that you might not otherwise be aware of. The new method doesn't need file(1) at all, and is far less fragile, so it is best to upgrade the configure script with proper mips support.

A line like

 .''libtool: line 1: s%^.*''%%: No such file or directory

indicates that the definition for SED is missing -- this happens when part of libtool has been updated, but not the rest of the auto* stuff that is also needed.