一些 M4 宏似乎没有定义

Sir*_*sty 65 compiling autoconf

我正在尝试在我的 Arch Linux 发行版上重新安装 pacman。当我运行配置脚本“configure.ac”时,我得到一堆未定义的宏:

error: possibly undefined macro: AM_INIT_AUTOMAKE.
If this token and others are legitimate, please use m4_pattern_allow.
See the autoconf documentation.
error: possibly undefined macro: AC_PROG_LIBTOOL
error: possibly undefined macro: AM_GNU_GETTEXT 
error: possibly undefined macro: AM_GNU_GETTEXT_VERSION
error: possibly undefined macro: AM_CONDITIONAL
Run Code Online (Sandbox Code Playgroud)

有谁知道什么会导致这些宏未定义?来自 Ubuntu(一切正常,因此很无聊),我真的不了解 automake。

Sté*_*nez 78

试试这个,也许它可以帮助:

autoreconf --install
Run Code Online (Sandbox Code Playgroud)

(请参阅联机帮助页,还有一个--force选项)


Ric*_*rri 26

您发布的错误消息中的宏是由automakelibtool定义的;看起来您需要安装这些软件包。

然后试试 autoreconf --install

  • 在我的 CentOS6.7 系统上,我必须这样做:`sudo yum install autoconf automake libtool cmake autoconf-archive gcc-c++` (6认同)
  • @SirTasty 然后您可能需要按照 Stéphane 的建议运行“autoreconf”。 (2认同)

小智 7

对于其他人来说:虽然 automake 和 libtool 很可能是候选者,但某些系统不会自动安装 gettext。这也是必需的。


小智 5

安装以下可以解决 autoreconf 问题的软件包。

$ sudo apt-get -y install autoconf automake libtool cmake autoconf-archive build-essential
Run Code Online (Sandbox Code Playgroud)