【问题标题】:why autogen.sh failed even with the correct autoconf?为什么即使使用正确的 autoconf,autogen.sh 也会失败?
【发布时间】:2012-08-21 15:26:11
【问题描述】:

autogen.sh 失败,输出显示我需要更高版本的 autoconf。但事实上我有一个 2.6x 的 autoconf....

为什么还是失败了?

[mirror@home 4]$ ./autogen.sh
+ autoreconf -i -f -v
autoreconf: Entering directory `.'
autoreconf: configure.in: not using Gettext
autoreconf: running: aclocal --force -I m4
configure.in:4: error: Autoconf version 2.60 or higher is required
configure.in:4: the top level
autom4te: /usr/bin/m4 failed with exit status: 63
aclocal: autom4te failed with exit status: 63
autoreconf: aclocal failed with exit status: 63

//configure:4中的内容
它是 AC_PREREQ(2.60)

[mirror@home 4]$ autoconf
autoconf      autoconf2.59  autoconf2.6x
[mirror@home 4]$ autoconf
[mirror@home 4]$ ls -l autocon
[mirror@home 4]$ ls /usr/bin/autoconf* -l
lrwxrwxrwx 1 root root    12 Aug 27 13:55 /usr/bin/autoconf -> autoconf2.6x
-rwxr-xr-x 1 root root  7663 Jan  6  2007 /usr/bin/autoconf2.59
-rwxr-xr-x 1 root root 14635 Feb  3  2011 /usr/bin/autoconf2.6x

2.63 > 2.60,但是autogen失败了,真的很混乱:(

[mirror@home 4]$ autoconf --version
autoconf (GNU Autoconf) 2.63
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later
<http://gnu.org/licenses/old-licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David J. MacKenzie and Akim Demaille.

更多细节:

    autoreconf --version
    autoreconf (GNU Autoconf) 2.59

我想知道为什么 autogen.sh 失败了?

【问题讨论】:

  • configure.in 的第 4 行实际上是什么?
  • configure.in 确实是configure.ac 的旧名称,所以我猜您正在尝试更新旧项目?尝试重命名文件(也许 autoconf 在遇到configure.in 文件时会假定一些兼容的东西)
  • autoreconf --version 打印什么?
  • @ptomato autoreconf (GNU Autoconf) 2.59
  • 也许修复你的系统,让 autoreconf 指向 autoreconf2.6x,就像 autoconf 指向 autoconf2.6x 一样。

标签: centos autotools autoconf automake autogen


【解决方案1】:

您安装了两个版本的 autoconf,当aclocal 运行autom4te 时,这会启动旧版本。您的路径中有autom4te-2.6x 吗?如果是这样,请在运行autoreconf-2.64 之前设置export AUTOM4TE=autom4te2.6x

或者直接运行:

AUTOM4TE=autom4te2.6x ./autogen.sh

另见:

update autoconf to at least 2.6

why i failed to build autoconf with autoconf2.6x, its version is newer than 2.6 anyhow

【讨论】:

    猜你喜欢
    • 2022-01-15
    • 2021-12-22
    • 2011-10-04
    • 1970-01-01
    • 2014-11-06
    • 1970-01-01
    • 2014-11-17
    • 2021-06-20
    • 2018-05-24
    相关资源
    最近更新 更多