Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile error while make zipkin-cpp, it seems confilct between std and boost #15

Open
biangw opened this issue Sep 13, 2017 · 2 comments

Comments

@biangw
Copy link

biangw commented Sep 13, 2017

[ 58%] Building CXX object src/CMakeFiles/zipkin.dir/Collector.cpp.o
In file included from /root/zipkin-cpp/build/externals/include/thrift/transport/TServerSocket.h:25:0,
from /root/zipkin-cpp/build/externals/include/thrift/transport/TSocket.h:27,
from /root/zipkin-cpp/src/ScribeCollector.h:5,
from /root/zipkin-cpp/src/Collector.cpp:15:
/root/zipkin-cpp/build/externals/include/thrift/cxxfunctional.h:115:23: error: ‘function’ is already declared in this scope
using ::std::tr1::function;
^
/root/zipkin-cpp/build/externals/include/thrift/cxxfunctional.h:119:39: error: ‘_1’ is already declared in this scope
using ::std::tr1::placeholders::_1;
^
/root/zipkin-cpp/build/externals/include/thrift/cxxfunctional.h:120:39: error: ‘_2’ is already declared in this scope
using ::std::tr1::placeholders::_2;
^
/root/zipkin-cpp/build/externals/include/thrift/cxxfunctional.h:121:39: error: ‘_3’ is already declared in this scope
using ::std::tr1::placeholders::_3;
^
/root/zipkin-cpp/build/externals/include/thrift/cxxfunctional.h:122:39: error: ‘_4’ is already declared in this scope
using ::std::tr1::placeholders::_4;
^
/root/zipkin-cpp/build/externals/include/thrift/cxxfunctional.h:123:39: error: ‘_5’ is already declared in this scope
using ::std::tr1::placeholders::_5;
^
/root/zipkin-cpp/build/externals/include/thrift/cxxfunctional.h:124:39: error: ‘_6’ is already declared in this scope
using ::std::tr1::placeholders::_6;
^
In file included from /root/zipkin-cpp/src/ScribeCollector.h:9:0,
from /root/zipkin-cpp/src/Collector.cpp:15:
/root/zipkin-cpp/build/gen-cpp/Scribe.h:222:72: error: invalid covariant return type for ‘virtual std::shared_ptrapache::thrift::TProcessor ScribeProcessorFactory::getProcessor(const apache::thrift::TConnectionInfo&)’
::apache::thrift::stdcxx::shared_ptr< ::apache::thrift::TProcessor > getProcessor(const ::apache::thrift::TConnectionInfo& connInfo);
^
In file included from /root/zipkin-cpp/build/externals/include/thrift/TDispatchProcessor.h:22:0,
from /root/zipkin-cpp/build/gen-cpp/Scribe.h:10,
from /root/zipkin-cpp/src/ScribeCollector.h:9,
from /root/zipkin-cpp/src/Collector.cpp:15:
/root/zipkin-cpp/build/externals/include/thrift/TProcessor.h:215:41: error: overriding ‘virtual boost::shared_ptrapache::thrift::TProcessor apache::thrift::TProcessorFactory::getProcessor(const apache::thrift::TConnectionInfo&)’
virtual boost::shared_ptr getProcessor(const TConnectionInfo& connInfo) = 0;
^
In file included from /root/zipkin-cpp/src/Collector.cpp:15:0:
/root/zipkin-cpp/src/ScribeCollector.h: In constructor ‘zipkin::ScribeCollector::ScribeCollector(const zipkin::ScribeConf*)’:
/root/zipkin-cpp/src/ScribeCollector.h:68:47: error: no matching function for call to ‘ScribeClient::ScribeClient(boost::shared_ptr<apache::thrift::protocol::TBinaryProtocolTapache::thrift::transport::TTransport >&)’
m_client(new ScribeClient(m_protocol))
^
/root/zipkin-cpp/src/ScribeCollector.h:68:47: note: candidates are:
In file included from /root/zipkin-cpp/src/ScribeCollector.h:9:0,
from /root/zipkin-cpp/src/Collector.cpp:15:
/root/zipkin-cpp/build/gen-cpp/Scribe.h:169:3: note: ScribeClient::ScribeClient(std::shared_ptrapache::thrift::protocol::TProtocol, std::shared_ptrapache::thrift::protocol::TProtocol)
ScribeClient(apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) {
^
/root/zipkin-cpp/build/gen-cpp/Scribe.h:169:3: note: candidate expects 2 arguments, 1 provided
/root/zipkin-cpp/build/gen-cpp/Scribe.h:166:3: note: ScribeClient::ScribeClient(std::shared_ptrapache::thrift::protocol::TProtocol)
ScribeClient(apache::thrift::stdcxx::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) {
^
/root/zipkin-cpp/build/gen-cpp/Scribe.h:166:3: note: no known conversion for argument 1 from ‘boost::shared_ptr<apache::thrift::protocol::TBinaryProtocolTapache::thrift::transport::TTransport >’ to ‘std::shared_ptrapache::thrift::protocol::TProtocol’
/root/zipkin-cpp/build/gen-cpp/Scribe.h:164:7: note: ScribeClient::ScribeClient(const ScribeClient&)
class ScribeClient : virtual public ScribeIf {
^
/root/zipkin-cpp/build/gen-cpp/Scribe.h:164:7: note: no known conversion for argument 1 from ‘boost::shared_ptr<apache::thrift::protocol::TBinaryProtocolTapache::thrift::transport::TTransport >’ to ‘const ScribeClient&’
/root/zipkin-cpp/build/gen-cpp/Scribe.h:164:7: note: ScribeClient::ScribeClient(ScribeClient&&)
/root/zipkin-cpp/build/gen-cpp/Scribe.h:164:7: note: no known conversion for argument 1 from ‘boost::shared_ptr<apache::thrift::protocol::TBinaryProtocolTapache::thrift::transport::TTransport >’ to ‘ScribeClient&&’
make[2]: *** [src/CMakeFiles/zipkin.dir/Collector.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/zipkin.dir/all] Error 2
make: *** [all] Error 2

@biangw
Copy link
Author

biangw commented Sep 13, 2017

I have installed depeneded libraries as below,
boost : 1.64.0
thrift: 1.0.0-dev
gcc: 4.9.4
how to sovle this error? thanks

@helloopenworld
Copy link

I have the same problem ,how do you solve it .tks。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants