为什么我会收到此 aclocal 错误?

s g*_*s g 7 automake autoconf compilation autotools

我正在尝试libbsd在 Ubuntu 13.04 上从源代码进行编译。我正在使用工具链进行交叉编译,但 automake 在本地计算机上。我已经aclocal-1.13在 PATH 和所有内容中,但仍然收到此错误。我尝试过查找它们,但找不到任何线索。这里发生了什么?

<...>
config.status: executing libtool commands
CDPATH="${ZSH_VERSION+.}:" && cd .. && /bin/bash /home/me/libbsd/build-aux/missing aclocal-1.13 -I m4
error: cannot get project version.
configure.ac:9: error: AC_INIT should be called with package and version arguments
/usr/share/aclocal-1.13/init.m4:23: AM_INIT_AUTOMAKE is expanded from...
configure.ac:9: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal-1.13: error: echo failed with exit status: 1
make: *** [../aclocal.m4] Error 1
Run Code Online (Sandbox Code Playgroud)

任何帮助是极大的赞赏。

Car*_*ood 2

这里的错误是configure.ac:9: error: AC_INIT should be called with package and version arguments。您收到此错误是因为在configure.ac 的第9 行您没有将包和版本参数传递给AC_INIT。

确切的信息可以在这里找到: https: //www.gnu.org/software/automake/manual/automake.html#Public-Macros

即,

If your configure.ac has:

AC_INIT([src/foo.c])
AM_INIT_AUTOMAKE([mumble], [1.5])
Run Code Online (Sandbox Code Playgroud)

您应该按如下方式更正它:

AC_INIT([mumble], [1.5])
AC_CONFIG_SRCDIR([src/foo.c])
AM_INIT_AUTOMAKE
Run Code Online (Sandbox Code Playgroud)

尽管它周围的其他注释也很重要,恕我直言。