I want to build protobuf, so I just cloned the package and cd
in the directory.
When I type ./autogen.sh
, some error happened.
I receive callback:
configure.ac:104: error: possibly undefined macro: AC_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /home/zhangxl/my/autoconf/bin/autoconf failed with exit status: 1
Someone said I should install libtool, but I have already installed autoconf, automaker, libtool and m4, but all of them are built from source, because I can't access the sudo password.
This is my .bashrc file:
export PATH=$PATH:/home/zhangxl/my/libtool/bin
export CPLUS_INCLUDE_PATH=/hpme/zhangxl/my/libtool/include:$CPLUS_INCLUDE_PATH
export LIBRARY_PATH=/home/zhangxl/my/libtool/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=/home/zhangxl/my/libtool/lib:$LD_LIBRARY_PATH
I think maybe the .bashrc file is not correct.
Make sure you have libtool
installed. This error message can be produced by autoconf
if it can not find libtool
on your system. In my case, the error looked a bit like this:
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf
...
configure.ac:41: error: possibly undefined macro: AC_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
I was able to fix the issue by installing libtool
with apt.
sudo apt-get update
sudo apt-get install libtool
libtool
is more than just a (set of) binaries. it also includes a couple of m4-macros (to be used by autotools), among them the AC_PROG_LIBTOOL
macro.
Since you didn't do a "proper" installation of libtool, autoconf is not finding these additional macros.
Look out for files like libtool.m4
, ltoptions.m4
... (probably somewhere in /home/zhangxl/my/libtool/share/aclocal/
and add the path to the autoreconf
invocation. Something like:
autoreconf -f -i -Wall,no-obsolete -I/home/zhangxl/my/libtool/share/aclocal/
(in case you wondered: autoreconf
is being called by autogen.sh
, near the end of that script; so when you've called autogen.sh
, most things already succeeded, only the invocation of autoreconf
failed, and that's what the above line fixes. if you want to be able to call autogen.sh
again, you must change the line with autoreconf as seen above)
I have faced similar issue and to resolve i have removed yum installed package and installed with dnf as shown below
$yum remove automake
$dnf install automake
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With