c++ - 在 Ubuntu 13.04 上构建 thrift 0.9.1 时出现 libtool 错误

标签 c++ compilation thrift

在 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/

相关文章:

javascript - grunt-contrib-handlebars - 输出与我运行 handlebars npm 任务时不同

c - 在 OS X 上构建 libical-1.0 失败

java - Apache 节俭 : Serializing data

c++ - 使用 CMake 链接到 cocoa 库(C++ 与 Objective-C 混合)

c++ - 成员函数 'select' 的“this”参数具有类型 'const SelectParam' ,但函数未标记为 const

c++ - shared_ptr 中 string_view 的返回值优化

c++ - float 破坏了我的代码

c - 为什么 "implicit declaration of function"只是一个警告?

java - 如何在 java 中合并一个 thrift 客户端(或者至少重用 tcp 连接)

java - 使用 Zookeeper 和 Thrift 负载均衡服务