"AM_PROG_LIBTOOL" not found in library
Asked Answered
M

2

18

I got an error while trying to compile a library in centOS 7, and i tried reinstall libtool but it does not help. Below is the error

+ autoreconf --install
configure.ac:32: warning: macro 'AM_PROG_LIBTOOL' not found in library
configure.ac:32: error: possibly undefined macro: AM_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
Manizales answered 19/3, 2015 at 2:31 Comment(0)
B
10

You might need: autoreconf -fvi to make sure everything is updated.

It's also worth noting that AM_PROG_LIBTOOL is deprecated, and should be replaced with LT_INIT, and optionally with LT_PREREQ beforehand.

Baier answered 19/3, 2015 at 6:53 Comment(10)
since what version of libtool is AM_PROG_LIBTOOL deprecated in favour of LT_INIT? do you know? I ask because, before I replace it with LT_INIT in my project, I guess I should require this version in LT_PREREQ() call firstPrickly
@Prickly - If it's your project, then there's no reason why you shouldn't be using the latest autotools to generate the build system. At this time: LT_PREREQ([2.4.6])Baier
there's always a reason to require older versions instead of latest: reach to a bigger audience of systems/devs, so I want to know the oldest version that supported LT_INITPrickly
(my project can also mean open source, not internal ;) )Prickly
@Prickly - but if you make dist - i.e., distribute the build system created by applying the autotools - the end user doesn't need to have the autotools installed. Which is the whole point:)Baier
well, by end user I mean the developer that git clones my project, not the one that installs the tarballPrickly
@Prickly - I myself think it's reasonable to expect anyone who is using the autotools in 'maintainer' mode to have the latest versions installed. Opinions will vary about this.Baier
why don't you just say that you don't know the first autoconf version that introduced LT_INIT? :)Prickly
@Prickly - because I don't know off-hand. Why not just grep the ChangeLog?Baier
it turns out it's not as easy as you think, the first mention of LT_INIT is: 2004-02-23 Gary V. Vaughan <gary [[at]] gnu.org> * bin/autoreconf.in (autoreconf_current_directory): Recognize LT_INIT from the next generation of Libtool. But not sure what version is that commit included in, and not sure if that's really the correct commit.Prickly
M
35

I solved it just by:

sudo yum install libtool

Mcconnell answered 29/7, 2019 at 19:24 Comment(2)
I got the same problem on Ubuntu 18.04. sudo apt install libtool worked for meTso
I got the same problem on Windows msys2, pacman -S libtool works.Mcgary
B
10

You might need: autoreconf -fvi to make sure everything is updated.

It's also worth noting that AM_PROG_LIBTOOL is deprecated, and should be replaced with LT_INIT, and optionally with LT_PREREQ beforehand.

Baier answered 19/3, 2015 at 6:53 Comment(10)
since what version of libtool is AM_PROG_LIBTOOL deprecated in favour of LT_INIT? do you know? I ask because, before I replace it with LT_INIT in my project, I guess I should require this version in LT_PREREQ() call firstPrickly
@Prickly - If it's your project, then there's no reason why you shouldn't be using the latest autotools to generate the build system. At this time: LT_PREREQ([2.4.6])Baier
there's always a reason to require older versions instead of latest: reach to a bigger audience of systems/devs, so I want to know the oldest version that supported LT_INITPrickly
(my project can also mean open source, not internal ;) )Prickly
@Prickly - but if you make dist - i.e., distribute the build system created by applying the autotools - the end user doesn't need to have the autotools installed. Which is the whole point:)Baier
well, by end user I mean the developer that git clones my project, not the one that installs the tarballPrickly
@Prickly - I myself think it's reasonable to expect anyone who is using the autotools in 'maintainer' mode to have the latest versions installed. Opinions will vary about this.Baier
why don't you just say that you don't know the first autoconf version that introduced LT_INIT? :)Prickly
@Prickly - because I don't know off-hand. Why not just grep the ChangeLog?Baier
it turns out it's not as easy as you think, the first mention of LT_INIT is: 2004-02-23 Gary V. Vaughan <gary [[at]] gnu.org> * bin/autoreconf.in (autoreconf_current_directory): Recognize LT_INIT from the next generation of Libtool. But not sure what version is that commit included in, and not sure if that's really the correct commit.Prickly

© 2022 - 2024 — McMap. All rights reserved.