Outdated libtool

From Gentoo Wiki
Jump to: navigation, search

The Problem

An error occurs when building and linking a package which hasn't had 'libtool' files updated for a long time. When linking, libtool throws away the flag '-flto', which apparently does not know, because 'libtool' generated by autoreconf + ./configure somewhen has become ancient and obsolete.

How to find affected packages

Try to propagate the flag '-flto' by supplementing CFLAGS, or/and CXXFLAGS, and LDFLAGS with it. If linking fails with the message 'not an object or archive', or 'file not recognized: File format not recognized' or something similar this is likely the case. It is highly likely that 'libtool' needs to be updated according to recent autotools

Packages required to get rid of the problem

>=sys-devel/autoconf-2.69-r4
>=sys-devel/automake-1.15.1-r2
>=sys-devel/libtool-2.4.6-r3

How to fix it

First of all, we must update automake, autoconf and libtool in our system. Refer to the clause

Then, different packages require different approaches to do away with the issue. The solution depends on how autotools-related files have been generated, and this is project-specific thing

Here below the list of some packages and solutions are shown:

dev-libs/libdaemon

From the root of the project, execute
rm -rf m4/*
autoreconf --install --force

media-libs/libuninameslist

From the root of the project, execute
autoreconf --install --force

net-libs/libasyncns

From the root of the project, execute
autoreconf --install --force

sys-fs/inotify-tools

From the root of the project, execute
autoreconf --install --force

dev-libs/chmlib

From the root of the project, execute
autoreconf --install --force

media-libs/libid3tag

From the root of the project, execute
autoconf --force configure.ac > configure

app-crypt/mhash

From the root of the project, execute
autoreconf --install --force

dev-libs/libIDL

From the root of the project, execute
autoreconf --install --force

References

  • Tracker bug #668736
  • initial report with some explanation bug #668404 (should be copied to the wiki and improved here)