libtool错误在Ubuntu 13.04上构建thrift 0.9.1

Dav*_*d V 16 c++ compilation thrift

在Ubuntu 13.04上构建thrift 0.9.1(支持C,C++,java,C#,perl,python)我收到此错误.

./configure运行没有任何选项,运行没有任何选项...

Making all in test
make[2]: Entering directory `/home/dvb/sw/thrift-0.9.1/test'
Making all in nodejs
make[3]: Entering directory `/home/dvb/sw/thrift-0.9.1/test/nodejs'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/dvb/sw/thrift-0.9.1/test/nodejs'
Making all in cpp
make[3]: Entering directory `/home/dvb/sw/thrift-0.9.1/test/cpp'
Makefile:832: warning: overriding commands for target `gen-cpp/ThriftTest.cpp'
Makefile:829: warning: ignoring old commands for target `gen-cpp/ThriftTest.cpp'
/bin/bash ../../libtool --tag=CXX   --mode=link g++ -Wall -g -O2 -L/usr/lib   -o libtestgencpp.la  ThriftTest_constants.lo ThriftTest_types.lo ../../lib/cpp/libthrift.la -lssl -lcrypto -lrt -lpthread 
libtool: link: ar cru .libs/libtestgencpp.a .libs/ThriftTest_constants.o .libs/ThriftTest_types.o 
ar: .libs/ThriftTest_constants.o: No such file or directory
make[3]: *** [libtestgencpp.la] Error 1
make[3]: Leaving directory `/home/dvb/sw/thrift-0.9.1/test/cpp'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/dvb/sw/thrift-0.9.1/test'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/dvb/sw/thrift-0.9.1'
make: *** [all] Error 2
dvb@dvb-u13:~/sw/thrift-0.9.1$ 
Run Code Online (Sandbox Code Playgroud)

Dav*_*d V 13

虽然这似乎是0.9.1版本tarball中的一个缺陷,但是在今天下午通过git引入的树顶部并不是问题.

如果遇到这个问题的解决方案是通过git直接获取源树而不是下载tarball来使用更新版本的thrift.构建的唯一区别是您需要在configure之前运行bootstrap.sh.这是有据可查的.

注意另外两个有用的数据:1.配置构建 - 不带测试(Mike Johnson下面 - 谢谢)2.这个问题在0.9.2版本中得到修复(Luke在下面 - 谢谢!)


小智 9

我今晚遇到了这个问题并"修复"了它.问题是ar(1)在test/cpp/.libs目录中找不到.o文件.我确信在test/cpp中的Makefile.am中有一些缺失的魔法,但我没有耐心或者自动修复它.

相反,我只是将test/cpp中的.o文件符号链接到test/cpp/.libs /.这修复了C++测试的构建.

cd thrift-0.9.1/test/cpp/.libs
for i in ../*.o; do echo $i; ln -s $i .; done
Run Code Online (Sandbox Code Playgroud)


小智 6

从那以后,Thrift发布了这个编译问题.您可以选择跳过编译测试,而不是:

./configure --without-tests
Run Code Online (Sandbox Code Playgroud)