Solution to fail to compile Scribe on CentOS 5.8

Source: Internet
Author: User
Tags htons

The following is an error message when installing CentOS 5.8 boost 1.5.3 thrift 0.9.0: [cpp]/usr/local/include/thrift/protocol/TBinaryProtocol. tcc: In member function 'uint32 _ t apache: thrift: protocol: TBinaryProtocolT <Transport _ >:: 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 <Transport _ >:: 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' * 'token store. cpp: In member function 'void BufferStore: setNewRetryInterval (bool) ': store. cpp: 1681: warning: comparison between signed and unsigned integer expressions store. cpp: 1693: warning: comparison between signed and unsigned integer expressions store. h: In constructor 'networkstore: NetworkStore (StoreQueue *, const std: string &, bool) ': store. h: 407: warning: 'networkstore: opened' will be initialized after store. h: 401: warning: 'Time _ t NetworkStore: lastservicecheck' store. cpp: 1743: warning: when initialized here make [3]: *** [store. o] Error 1 make [3]: Leaving directory '/root/download/scribe/src 'make [2]: *** [all] Error 2 make [2]: leaving directory '/root/download/scribe/src' make [1]: *** [all-recursive] Error 1 make [1]: leaving directory '/root/download/scribe' make: *** [all] Error 2 solution: export CPPFLAGS = "-DHAVE_NETDB_H = 1-fpermissive ". /bootstrap. sh. /configure

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.