在 Ubuntu 13.04 上构建 thrift 0.9.1(支持 C、C++、java、C#、perl、python)我收到此错误。
./configure 不带任何选项运行,make 不带任何选项运行...
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$
最佳答案
虽然这似乎是 0.9.1 版本 tarball 中的一个缺陷,但截至今天下午,通过 git 拉取的树的顶部不是问题。
如果遇到此问题,解决方案是使用更新版本的 thrift,直接通过 git 获取源代码树,而不是下载 tarball。构建的唯一区别是您需要在配置之前运行 bootstrap.sh。这是有据可查的。
请注意另外两个有用的数据位: 1. 配置构建 --without-tests(下面是 Mike Johnson - 谢谢) 2. 这个问题在 0.9.2 版本中得到修复(Luke below-谢谢!)
关于c++ - 在 Ubuntu 13.04 上构建 thrift 0.9.1 时出现 libtool 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18643642/