如何在构建Thrift 0.9.2时启用TNonblockingServer

时间:2015-09-29 10:23:21

标签: c++ linux thrift

我试图用版本0.9.2建立一个节俭,这是我执行的命令:

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,但我失败了。

1 个答案:

答案 0 :(得分:1)

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

AX_LIB_EVENT([1.0])
have_libevent=$success

echo "   Build TNonblockingServer .. : $have_libevent"

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

  

语言要求

     

<强> C ++

     
      
  • Boost 1.53.0

  •   
  • libevent(可选,构建非阻塞服务器

  •   
  • zlib(可选)

  •   

最低提升版本实际上是 1.54 ,该网站稍稍过时了。