【问题标题】:./configure failed, error: Gentoo sanity check failed./configure 失败,错误:Gentoo 健全性检查失败
【发布时间】:2014-12-02 12:55:16
【问题描述】:

我正在从this site 编译 ZThread-2.3.2。

解压 tar.gz 文件后。我在 ZThread-2.3.2 的根目录下运行了命令

./configure --prefix=/home/Documents/zthread

过了一会儿,它给了我一个错误

*** Gentoo sanity check failed! ***
*** libtool.m4 and ltmain.sh have a version mismatch! ***
*** (libtool.m4 = 1.5.10, ltmain.sh = ) ***

Please run:

  libtoolize --copy --force

if appropriate, please contact the maintainer of this
package (or your distribution) for help.

然后我按要求执行了这个命令:

libtoolize --copy --force

但它仍然给了我错误信息:

libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: You should add the contents of the following files to `aclocal.m4':
libtoolize:   `/usr/share/aclocal/libtool.m4'
libtoolize:   `/usr/share/aclocal/ltoptions.m4'
libtoolize:   `/usr/share/aclocal/ltversion.m4'
libtoolize:   `/usr/share/aclocal/ltsugar.m4'
libtoolize:   `/usr/share/aclocal/lt~obsolete.m4'
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.

我检查了libtool的版本如下:

libtool --version

它说 libtool 版本是 2.4.2:

libtool (GNU libtool) 2.4.2
Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996

Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

是什么导致了这个问题?有没有人成功安装ZThread?

我知道除了 ZThread 之外还有很多线程库,我只是想知道哪里出了问题。

【问题讨论】:

  • ltmain.sh 接缝没有版本。你检查过这个吗?您能否确定健全性检查如何检测版本?
  • 这更适合超级用户。
  • @harper 是的,我检查了ltmain.sh 文件。在第 49 行。VERSION=1.5.10。事实上,我是 linux 风格编译和安装的新手。现在我不知道健全性检查如何检测版本。有什么想法吗?
  • @OMGtechy 你的意思是我应该在./configure 之前添加sudo 然后输入我的密码?
  • @lqr 不,他的意思是 superuser.com 。无论如何,您是否尝试过 google 上的第一个链接告诉您的内容? autoreconf --force --install --symlink ?对我来说似乎有些 automake 文件版本冲突

标签: c++ linux


【解决方案1】:

我刚刚在 Ubuntu 上安装了 ZThread。

ltmain.sh 有一个空版本的原因是 ./configure 文件中的语法错误。 *** Gentoo sanity check failed! ***之前应该有如下错误:

checking for correct ltmain.sh version... grep: character class syntax is [[:space:]], not [:space:]
no

错误在 ./configure 文件的以下行:

gentoo_ltmain_version=`grep '^[:space:]*VERSION=' $ltmain | sed -e 's|^[:space:]*VERSION=||'`

将[:space:] 更改为[[:space:]] 后,变为以下内容,应该可以解决问题:

gentoo_ltmain_version=`grep '^[[:space:]]*VERSION=' $ltmain | sed -e 's|^[:space:]*VERSION=||'`

在此之后您可能会遇到编译错误,因为 ZThread 使用了已弃用的语法,您可以通过在 ./configure 中添加以下行来解决此问题:

CXXFLAGS="$CXXFLAGS -fpermissive"

【讨论】:

  • 在 Linux Mint 19(基于 Ubuntu 18.04)上,“sed”也会出现类似的问题。所以可能值得对 sed 表达式进行类似的更改。
猜你喜欢
  • 1970-01-01
  • 2019-05-05
  • 1970-01-01
  • 2020-12-18
  • 2021-04-04
  • 2015-01-23
  • 2017-06-09
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多