This page is a mirror of http://people.debian.org/~keybuk/libtool-pass_all.html.

GNU Libtool and pass_all

Depending on the platform and architecture you're configuring the package on, GNU Libtool will choose a method for detecting whether a dependency is a shared or static library. On every platform supported by Debian this is not necessary as binutils is perfectly capable of working it out for itself.

The decision as to which test is used is made during your package's configure script during the AC_PROG_LIBTOOL macro. The correct result for Debian systems is “pass_all” which means all dependencies will be given to the linker for consideration. Later versions of Libtool will output the following if everything's working as it should be:

checking how to recognise dependent libraries... pass_all

If you've been directed to read this page then this isn't happening for your package on at least one architecture, most likely ARM. If you read the buildd logs for your package you'll probably find the following being output instead:

checking how to recognise dependent libraries...  file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )

The reason Libtool has failed to decide to use pass_all is because it decides by comparing the configuration name of your system against a list of known systems that can support it. Only the most recently released version of Libtool knows that Linux ARM should use this method too.

This wouldn't be so bad except that the file_magic method uses the file utility to test each and every file being linked against. This is not an entirely reliable method and causes several packages to be linked incorrectly, or not at all.

The Debian Libtool package has, since version 1.5-2, included a patch that uses pass_all for all GNU/Linux systems. The deprecated Libtool 1.4 packages have included this patch since 1.4.3-14 and an earlier patch that appended ARM and m68k to the list of Linux architectures since 1.4.3-8.

This patch has been accepted upstream and added to the Libtool CVS HEAD (future 1.6 release) and was included in the 1.5.2 stable release.

In order to cure this problem for your package you will need to update the version of Libtool it uses. This document explains how to do that.

Copyright © 2003–2004 Scott James Remnant <scott@netsplit.com>.
Permission is hereby granted, free of charge, to any person obtaining a copy of this document (the "Document"), to deal in the Document without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Document, and to permit persons to whom the Document is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Document.

THE DOCUMENT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE DOCUMENT OR THE USE OR OTHER DEALINGS IN THE DOCUMENT.