【发布时间】:2014-06-07 04:50:28
【问题描述】:
我正在 CentOS 虚拟机中静态编译 Thrift 0.9.0 二进制文件。我得到了 libthrift.a 二进制文件没有被创建的问题。我正在使用 vagrant box 来运行 centos: https://github.com/2creatives/vagrant-centos/releases/download/v6.5.1/centos65-x86_64-20131205.box
一旦我 ssh 到 vagrant box,我就会运行以下命令:
wget https://archive.apache.org/dist/thrift/0.9.0/thrift-0.9.0.tar.gz
tar -zxvf thrift-0.9.0.tar.gz
cd thrift-0.9.0
./configure --enable-static
make
这会运行,但我在系统上运行了一个查找命令 (sudo find / -name "*.a") 以查看是否生成了任何 ".a" 文件,并且生成的唯一文件是 "libparse. a" 这似乎不对。据我了解,它应该是“libthrift.a”。
通过 config.log 文件搜索它说它确实想要构建静态库:
configure:11944: checking whether to build static libraries
configure:11948: result: yes
查看日志文件中包含关键字“static”的更多位置会发现可能存在错误的潜在位置。
configure:9028: checking if gcc static flag -static works
configure:9056: result: no
configure:13915: checking if g++ static flag -static works
configure:13943: result: no
lt_cv_prog_compiler_static_works=no
lt_cv_prog_compiler_static_works_CXX=no
完整的日志文件在这里:http://www.filehosting.org/file/details/449460/staticThriftErrorLog.rtf
感谢任何帮助
【问题讨论】:
-
以防万一这只是一个版本控制问题,我只是尝试使用 yum (sudo yum update) 更新所有内容,并在成功更新后遇到了同样的问题。
-
即使安装了另一个堆栈溢出答案 (stackoverflow.com/questions/14388135/…) 中提到的依赖项后,静态问题仍然存在。
-
您是否尝试过与 Thrift trunk 相同的操作?我记得最近修复了 CentOS 上的一些问题。我不太清楚细节,不要这么用 CentOS。无论如何,如果您认为自己发现了问题,请随时发布邮件列表和/或提交 JIRA 票证。