apache/brpc

thrift支持时,编译出错

Open

#1 328 ouverte le 10 janv. 2021

Voir sur GitHub
 (3 commentaires) (0 réactions) (0 assignés)C++ (3 936 forks)batch import
buggood first issue

Métriques du dépôt

Stars
 (16 226 stars)
Métriques de merge PR
 (Merge moyen 6j 19h) (30 PRs mergées en 30 j)

Description

Describe the bug (描述bug) 开启thrift,cmake -B build -DWITH_THRIFT=ON编译出错

/usr/local/include/thrift/protocol/TBinaryProtocol.h:38:7: note: candidate: ‘apache::thrift::protocol::TBinaryProtocolTapache::thrift::transport::TMemoryBuffer::TBinaryProtocolT(apache::thrift::protocol::TBinaryProtocolTapache::thrift::transport::TMemoryBuffer&&)’ /usr/local/include/thrift/protocol/TBinaryProtocol.h:38:7: note: no known conversion for argument 1 from ‘boost::shared_ptrapache::thrift::transport::TMemoryBuffer’ to ‘apache::thrift::protocol::TBinaryProtocolTapache::thrift::transport::TMemoryBuffer&&’ /mnt/e/ormosiaVM/github/Asty/Asty-platform-server/thirdparty/incubator-brpc/src/brpc/policy/thrift_protocol.cpp: In function ‘void brpc::policy::SerializeThriftRequest(butil::IOBuf*, brpc::Controller*, const google::protobuf::Message*)’: /mnt/e/ormosiaVM/github/Asty/Asty-platform-server/thirdparty/incubator-brpc/src/brpc/policy/thrift_protocol.cpp:673:110 error: no matching function for call to ‘apache::thrift::protocol::TBinaryProtocolTapache::thrift::transport::TMemoryBuffer::TBinaryProtocolT(boost::shared_ptrapache::thrift::transport::TMemoryBuffer&)’ 673 | apache::thrift::protocol::TBinaryProtocolTapache::thrift::transport::TMemoryBuffer oprot(out_buffer); | ^ In file included from /mnt/e/ormosiaVM/github/Asty/Asty-platform-server/thirdparty/incubator-brpc/src/brpc/policy/thrift_protocol.cpp:39: /usr/local/include/thrift/protocol/TBinaryProtocol.h:52:3: note: candidate: ‘apache::thrift::protocol::TBinaryProtocolT<Transport_, ByteOrder_>::TBinaryProtocolT(std::shared_ptr<Tp>, int32_t, int32_t, bool, bool) [with Transport = apache::thrift::transport::TMemoryBuffer; ByteOrder_ = apache::thrift::protocol::TNetworkBigEndian; int32_t = int]’ 52 | TBinaryProtocolT(std::shared_ptr<Transport_> trans, | ^~~~~~~~~~~~~~~~ /usr/local/include/thrift/protocol/TBinaryProtocol.h:52:3: note: candidate expects 5 arguments, 1 provided

To Reproduce (复现方法) 开启thrift,cmake -B build -DWITH_THRIFT=ON编译出错

Expected behavior (期望行为)

Versions (各种版本) OS:WSL2 ubuntu20.04 Compiler:gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2) brpc: commit b226c34b019223d6f59dbde892ad59f6740a2439 (HEAD -> master, origin/master, origin/HEAD) Merge: b34b776c ba5d932d Author: Jiashun Zhu zhujiashun2010@gmail.com Date: Thu Jan 7 19:25:17 2021 +0100

Additional context/screenshots (更多上下文/截图)

Guide contributeur