c++ - 如何在构建 Thrift 0.9.2 时启用 TNonblockingServer

标签 c++ linux thrift

我正在尝试使用 0.9.2 版构建一个 thrift,这是我执行的命令:

sudo ./configure --with-boost=/usr/local/boost_1.58.0

它会成功,但我收到这样的返回消息:

thrift 0.9.2

Building C++ Library ......... : yes
Building C (GLib) Library .... : yes
Building Java Library ........ : yes
Building C# Library .......... : no
Building Python Library ...... : yes
Building Ruby Library ........ : no
Building Haskell Library ..... : no
Building Perl Library ........ : no
Building PHP Library ......... : yes
Building Erlang Library ...... : no
Building Go Library .......... : no
Building D Library ........... : no
Building NodeJS Library ...... : no
Building Lua Library ......... : yes

C++ Library:
   Build TZlibTransport ...... : yes
   Build TNonblockingServer .. : no
   Build TQTcpServer (Qt) .... : yes

Java Library:
   Using javac ............... : javac
   Using java ................ : java
   Using ant ................. : /usr/bin/ant

Python Library:
   Using Python .............. : /usr/bin/python

PHP Library:
   Using php-config .......... : 

Lua Library:
   Using Lua .............. : /usr/bin/lua

If something is missing that you think should be present,
please skim the output of configure to find the missing
component.  Details are present in config.log.

我尝试了很多方法让 Build TNonblockingServer 选项为 YES 但我失败了。

最佳答案

您需要安装 libevent。以下是 configure.ac 中的相关部分:

AX_LIB_EVENT([1.0])
have_libevent=$success

echo "   Build TNonblockingServer .. : $have_libevent"

它也在“语言要求”部分下列出 over here :

Language requirements

C++

  • Boost 1.53.0

  • libevent (optional, to build the nonblocking server)

  • zlib (optional)

最低提升版本实际上是 1.54,网站在这一点上有点过时了。

关于c++ - 如何在构建 Thrift 0.9.2 时启用 TNonblockingServer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32841565/

相关文章:

python - 节俭 python - TApplicationException : Invalid method name

python - 我可以将 c++ 模板类导出到 C,然后再导出到带有 ctypes 的 python 吗?

c++ - 结构的通用比较运算符

Linux 上 .NET Core 中的 C# : Referencing or using . so 文件

linux - 相对于其他操作系统, 'know' 对 linux 意味着什么?

node.js - 与 Thrift 中的容器数据类型等效的 NodeJS 数据类型是什么?

java - 如何将 thrift 对象转换为可读字符串并将其转换回来?

c++ - 退出后从 C++ 程序永久设置环境变量

c++ - 在哪里可以获得能够报告 C 或 C++ 中的 for 循环错误的词法分析器?

c - fork 和pid