查看文章
 
scribe 各种编译错误处理方法
2011-07-06 15:39

最近好像身边的朋友安装scribe 都碰到一些问题,这里做一下汇总处理方法。我今天安装也碰到很多错误,不过没有及时做记录,以经看不到了,把知道的几个错误记录一下。

如果编译错误 请用下载这个地址的版本 https://github.com/pcting/scribe

 

编译错误

scribe_server.h:45: error: conflicting return type specified for ‘virtual scribe::thrift::ResultCode scribeHandler::Log(const std::vector<scribe::thrift::LogEntry, std::allocator<scribe::thrift::LogEntry> >&)’
../src/gen-cpp/scribe.h:18: error:   overriding ‘virtual scribe::thrift::ResultCode::type scribe::thrift::scribeIf::Log(const std::vector<scribe::thrift::LogEntry, std::allocator<scribe::thrift::LogEntry> >&)’
store.cpp: In member function ‘bool FileStore::writeMessages(boost::shared_ptr<std::vector<boost::shared_ptr<scribe::thrift::LogEntry>, std::allocator<boost::shared_ptr<scribe::thrift::LogEntry> > > >, boost::shared_ptr<FileInterface>)’:
store.cpp:786: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 5 has type ‘size_t’
store.cpp: In member function ‘virtual bool FileStore::readOldest(boost::shared_ptr<std::vector<boost::shared_ptr<scribe::thrift::LogEntry>, std::allocator<boost::shared_ptr<scribe::thrift::LogEntry> > > >, tm*)’:
store.cpp:916: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 5 has type ‘size_t’
store.cpp: In member function ‘virtual void BufferStore::periodicCheck()’:
store.cpp:1411: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 5 has type ‘size_t’
/usr/local/include/boost-1_36/boost/system/error_code.hpp: At global scope:
/usr/local/include/boost-1_36/boost/system/error_code.hpp:205: warning: ‘boost::system::system_category’ defined but not used
/usr/local/include/boost-1_36/boost/system/error_code.hpp:206: warning: ‘boost::system::generic_category’ defined but not used
/usr/local/include/boost-1_36/boost/system/error_code.hpp:210: warning: ‘boost::system::posix_category’ defined but not used
/usr/local/include/boost-1_36/boost/system/error_code.hpp:211: warning: ‘boost::system::errno_ecat’ defined but not used
/usr/local/include/boost-1_36/boost/system/error_code.hpp:212: warning: ‘boost::system::native_ecat’ defined but not used

请下载 https://github.com/pcting/scribe 版本。

 

2.   编译fb303 出错  ‘fb_status’ is not a class or namespace

我是使用boost 1.46有这个问题,使用boost 1.36 就没问题

 

3. thrift 编译出错

gen-cpp/scribe.cpp: In member function ‘virtual bool scribe::thrift::scribeProcessor::process_fn(apache::thrift::protocol::TProtocol*, apache::thrift::protocol::TProtocol*, std::string&, int32_t, void*)’:
gen-cpp/scribe.cpp:288: error: no matching function for call to ‘scribe::thrift::scribeProcessor::process_fn(apache::thrift::protocol::TProtocol*&, apache::thrift::protocol::TProtocol*&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, int32_t&, void*&)’
/usr/local/include/thrift/fb303/FacebookService.h:1239: note: candidates are: virtual bool facebook::fb303::FacebookServiceProcessor::process_fn(apache::thrift::protocol::TProtocol*, apache::thrift::protocol::TProtocol*, std::string&, int32_t)
thrift版本问题,thrift 0.6 和 pcting-scribe-2ee14d3 就会报这个错,thrift 0.5编译就过了
还有,每次编译最好make clean后再编

 

 

目前只能回滚看到这几个错误了,回头再补上。



类别:其它||添加到搜藏 |分享到i贴吧|浏览(1376)|评论 (0)
 
最近读者:
 
网友评论:
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
     

   
帮助中心 | 空间客服 | 投诉中心 | 空间协议
©2012 Baidu