c++ - ./配置失败,错误 : Gentoo sanity check failed

标签 c++ linux

我从 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还有很多线程库,我只是想知道哪里出了问题。

最佳答案

我刚刚在 Ubuntu 上安装了 ZThread。

ltmain.sh 版本为空的原因是 ./configure 文件中的语法错误。在 *** Gentoo 健全性检查失败之前你应该有以下错误! ***:

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"

关于c++ - ./配置失败,错误 : Gentoo sanity check failed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27250017/

相关文章:

c++ - 错误 C2662 无法从 const 转换为引用

c++ - 数组元素是不完整的对象吗?

c++ - VS 2008 调试 - 查找加载了哪个对话框

linux - Linux find命令如何删除多个文件?

linux - 为什么在 bash 脚本中查找匹配的 `"' 错误时会出现语法错误和意外的 EOF?

java - linux后台进程

linux - 寻找 。 -type -exec fgrep 问题

c++ - Visual Studio 2010 查看程序流程 (C++)

linux - 有什么方法可以通过 sed 删除第一次出现的模式吗?

c++ - Qt:使用 'mailto:' 打开用户的 gmail 电子邮件客户端失败