linux - config/config.guess 被符号链接(symbolic link)到第三方包中的错误文件

标签 linux autotools automake

我正在尝试构建这个使用 automake 的专有第三方项目。我正在使用 Ubuntu 14.04。运行配置时,出现此错误:

配置:错误:无法运行/bin/bash ../config/config.sub

失败似乎是由于 config/中的文件被符号链接(symbolic link)到我没有安装的特定 automake 版本:

lrwxrwxrwx 1 stefan stefan 37 feb 12 12:42 config.guess ->/usr/share/automake-1.11/config.guess lrwxrwxrwx 1 stefan stefan 35 feb 12 12:42 config.sub ->/usr/share/automake-1.11/config.sub

删除 config/中的文件并运行“autoreconf -fvi”不会导致重新生成它们,所以我不确定如何正确修复此问题。

我不想仅仅为了一些愚蠢的符号链接(symbolic link)而安装 automake-1.11,所以我用/usr/share/automake-1.14/中的较新版本覆盖了这些文件,它构建得很好。那应该没问题,即使人们可能会使用旧版本的 automake(或更新版本,就此而言)构建代码?还是有另一种更优雅的方式来处理这个问题?

编辑:第三方库的 autoreconf 输出:

autoreconf: Entering directory `somelib'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force 
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `config'.
libtoolize: copying file `config/ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
libtoolize: `AC_PROG_RANLIB' is rendered obsolete by `LT_INIT'
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: configure.ac: not using Automake
autoreconf: Leaving directory `somelib'

Edit2:我确实添加了:

AC_CONFIG_MACRO_DIR(配置)

配置.ac。令人困惑的是没有 Makefile.am——这个包似乎只使用 autoconf,而不是 automake,因为只有一个 Makefile.in。无论如何,通过上述更改并删除 config.* 文件后,我注意到它们在运行 autoreconf 后仍未重新生成。现在 'autoreconf -fvi' 的输出是:

autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force 
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `config'.
libtoolize: copying file `config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `config'.
libtoolize: copying file `config/libtool.m4'
libtoolize: copying file `config/ltoptions.m4'
libtoolize: copying file `config/ltsugar.m4'
libtoolize: copying file `config/ltversion.m4'
libtoolize: copying file `config/lt~obsolete.m4'
libtoolize: Consider adding `-I config' to ACLOCAL_AMFLAGS in Makefile.am.
libtoolize: `AC_PROG_RANLIB' is rendered obsolete by `LT_INIT'
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: configure.ac: not using Automake

最佳答案

这感觉就像您尝试构建的包的 tarball 尚未使用 make dist 构建,叹息。

正如人们已经指出的那样,解决方案是 autoreconf -fi 或类似的。既然你从中得到错误,你应该看看是否有一个 autogen.shbootstrap.sh 脚本应该传递给它正确的 -I 参数。

尽管“不使用 Automake”听起来可能比您的一般项目更奇特。

关于linux - config/config.guess 被符号链接(symbolic link)到第三方包中的错误文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35362907/

相关文章:

linux - 仅打开包含特定字符串的文件,然后在 Linux 命令行上替换

c - 涉及 float 的 autoconf 检查的非常量存储大小?

c++ - GNU Automake - 构建与其依赖项静态链接的动态库

c++ - Automake Yacc 输出文件名困境

c++ - 带 openc 的自动工具(未定义引用)

makefile - Autotools 库和目标文件输出控制

c - libpcap Radiotap header 提取

linux - 我可以在 linux 平台上构建我的 .net-core 应用程序,然后部署到 azure web 应用程序吗

linux - 选择linux上两个版本的gcc作为非管理员

autotools - 在 AC_INIT 中使用变量