我正在从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之外还有很多线程库,我只是想知道出了什么问题。
答案 0 :(得分:2)
我刚刚在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"