我正在运行 14.04 服务器(最小安装),并且正在尝试构建 apinger(https://github.com/Jajcus/apinger)。
这是我运行 ./autogen.sh 时得到的日志:
前几行指向一些似乎不存在于我的系统中的 autoconf 库。
如果我修复了这个问题,我认为其余的错误也会消失。在此先感谢大家的帮助。
configure.ac:31: error: AC_CHECK_MEMBER: requires literal arguments
../../lib/autoconf/types.m4:888: AC_CHECK_MEMBER is expanded from...
../../lib/autoconf/types.m4:921: AC_CHECK_MEMBERS is expanded from...
acinclude.m4:21: JK_AP_INET is expanded from...
configure.ac:31: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal: error: echo failed with exit status: 1
autoheader: error: AC_CONFIG_HEADERS not found in configure.ac
configure.ac: error: no proper invocation of AM_INIT_AUTOMAKE was found.
configure.ac: You should verify that configure.ac invokes AM_INIT_AUTOMAKE,
configure.ac: that aclocal.m4 is present in the top-level directory,
configure.ac: and that aclocal.m4 was recently regenerated (using aclocal)
Makefile.am: installing './INSTALL'
Makefile.am: installing './COPYING' using GNU General Public License v3 file
Makefile.am: Consider adding the COPYING file to the version control system
Makefile.am: for your code, to avoid questions about which license your project uses
src/Makefile.am: installing './depcomp'
/usr/share/automake-1.14/am/depend2.am: error: am__fastdepCC does not appear in AM_CONDITIONAL
/usr/share/automake-1.14/am/depend2.am: The usual way to define 'am__fastdepCC' is to add 'AC_PROG_CC'
/usr/share/automake-1.14/am/depend2.am: to 'configure.ac' and run 'aclocal' and 'autoconf' again
/usr/share/automake-1.14/am/depend2.am: error: AMDEP does not appear in AM_CONDITIONAL
/usr/share/automake-1.14/am/depend2.am: The usual way to define 'AMDEP' is to add one of the compiler tests
/usr/share/automake-1.14/am/depend2.am: AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC, AC_PROG_OBJCXX,
/usr/share/automake-1.14/am/depend2.am: AM_PROG_AS, AM_PROG_GCJ, AM_PROG_UPC
/usr/share/automake-1.14/am/depend2.am: to 'configure.ac' and run 'aclocal' and 'autoconf' again
src/Makefile.am: error: Lex source seen but 'LEX' is undefined
src/Makefile.am: The usual way to define 'LEX' is to add 'AM_PROG_LEX'
src/Makefile.am: to 'configure.ac' and run 'aclocal' and 'autoconf' again.
configure.ac: installing './ylwrap'
configure.ac:5: error: possibly undefined macro: AM_INIT_AUTOMAKE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:6: error: possibly undefined macro: AM_CONFIG_HEADER
configure.ac:11: error: possibly undefined macro: AM_PROG_LEX
./configure: line 2173: AM_INIT_AUTOMAKE: command not found
./configure: line 2174: syntax error near unexpected token `config.h'
./configure: line 2174: `AM_CONFIG_HEADER(config.h)'
答案1
编辑:
因此显然有一个更简单的方法。aclocal 不喜欢包括.m4第 41 行和第 42 行:
41: AC_CHECK_MEMBERS([struct icmp.icmp_type, struct icmp.icmp_code,\
42: struct icmp.icmp_cksum, struct icmp.icmp_seq,\
43: struct icmp.icmp_id],[],
您唯一需要修复的其他问题(与上述错误无关)是doc/Makefile.am. 只需更改此行:
STYLESHEET_DIR=/usr/share/sgml/docbook/xsl-stylesheets
更改为:
STYLESHEET_DIR=/usr/share/sgml/docbook/stylesheet/xsl/docbook-xsl