我正在尝试使用 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/