博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Scribe在CentOS 5.8和6.4上编译不过的解决办法
阅读量:4107 次
发布时间:2019-05-25

本文共 2429 字,大约阅读时间需要 8 分钟。

安装环境:

CentOS 5.8

boost 1.5.3

thrift 0.9.0

编译时的错误提示:

/usr/local/include/thrift/protocol/TBinaryProtocol.tcc: In member function 'uint32_t apache::thrift::protocol::TBinaryProtocolT
::writeI16(int16_t)':/usr/local/include/thrift/protocol/TBinaryProtocol.tcc:147: error: there are no arguments to 'htons' that depend on a template parameter, so a declaration of 'htons' must be available/usr/local/include/thrift/protocol/TBinaryProtocol.tcc:147: error: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)/usr/local/include/thrift/protocol/TBinaryProtocol.tcc: In member function 'uint32_t apache::thrift::protocol::TBinaryProtocolT
::writeI32(int32_t)':/usr/local/include/thrift/protocol/TBinaryProtocol.tcc:154: error: there are no arguments to 'htonl' that depend on a template parameter, so a declaration of 'htonl' must be available/usr/local/include/thrift/transport/TSocket.h: At global scope:/usr/local/include/thrift/transport/TSocket.h:219: error: expected ';' before '*' token/usr/local/include/thrift/transport/TSocket.h:240: error: expected ',' or '...' before '*' token/usr/local/include/thrift/transport/TSocket.h:293: error: 'sockaddr_in' does not name a type/usr/local/include/thrift/transport/TSocket.h:294: error: 'sockaddr_in6' does not name a type/usr/local/include/thrift/server/TNonblockingServer.h:780: error: expected ',' or '...' before '*' tokenstore.cpp: In member function 'void BufferStore::setNewRetryInterval(bool)':store.cpp:1681: warning: comparison between signed and unsigned integer expressionsstore.cpp:1693: warning: comparison between signed and unsigned integer expressionsstore.h: In constructor 'NetworkStore::NetworkStore(StoreQueue*, const std::string&, bool)':store.h:407: warning: 'NetworkStore::opened' will be initialized afterstore.h:401: warning: 'time_t NetworkStore::lastServiceCheck'store.cpp:1743: warning: when initialized heremake[3]: *** [store.o] Error 1make[3]: Leaving directory `/root/download/scribe/src'make[2]: *** [all] Error 2make[2]: Leaving directory `/root/download/scribe/src'make[1]: *** [all-recursive] Error 1make[1]: Leaving directory `/root/download/scribe'make: *** [all] Error 2

解决办法:

export CPPFLAGS="-DHAVE_NETDB_H=1 -fpermissive"
./bootstrap.sh
./configure

如果在6.4上还通不过,就用如下命令:

 ./bootstrap.sh --with-boost-filesystem=boost_filesystem CPPFLAGS="-DHAVE_NETINET_IN_H"

转载地址:http://yuvsi.baihongyu.com/

你可能感兴趣的文章
TCP/IP协议三次握手与四次握手流程解析
查看>>
PHP 扩展开发 : 编写一个hello world !
查看>>
inet_ntoa、 inet_aton、inet_addr
查看>>
用模板写单链表
查看>>
用模板写单链表
查看>>
链表各类操作详解
查看>>
C++实现 简单 单链表
查看>>
数据结构之单链表——C++模板类实现
查看>>
Linux的SOCKET编程 简单演示
查看>>
正则匹配函数
查看>>
Linux并发服务器编程之多线程并发服务器
查看>>
聊聊gcc参数中的-I, -L和-l
查看>>
[C++基础]034_C++模板编程里的主版本模板类、全特化、偏特化(C++ Type Traits)
查看>>
C语言内存检测
查看>>
Linux epoll模型
查看>>
Linux select TCP并发服务器与客户端编程
查看>>
Linux系统编程——线程池
查看>>
Linux系统编程——线程池
查看>>
yfan.qiu linux硬链接与软链接
查看>>
Linux C++线程池实例
查看>>