You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
no known conversion for argument 1 from ‘std::shared_ptr<bm_runtime::standard::StandardIf>’ to ‘boost::shared_ptr<bm_runtime::standard::StandardIf>’
#732
Closed
Natsuyu opened this issue
Mar 11, 2019
· 1 comment
And more generally, remove all references to boost::shared_ptr for
objects returned by the Thrift library. Instead use stdcxx::shared_ptr,
where stdcxx depends on the Thrift version (boost or std).
Fixes#732
I pushed a fix for this issue. I wasn't able to reproduce it myself, even when changing my Thrift version so hopefully it will work. There were definitely some inconsistencies in the code.
Note that we do NOT support the latest Thrift code (if you pull from the master branch on github: https://github.com/apache/thrift) because of breaking changes that were introduced for version 1.0.0 (https://thrift.apache.org/lib/cpp#breaking-changes). You can install any version between 0.9.2 and 0.12.1.
And more generally, remove all references to boost::shared_ptr for
objects returned by the Thrift library. Instead use stdcxx::shared_ptr,
where stdcxx depends on the Thrift version (boost or std).
Fixes#732
And more generally, remove all references to boost::shared_ptr for
objects returned by the Thrift library. Instead use stdcxx::shared_ptr,
where stdcxx depends on the Thrift version (boost or std).
Fixes#732
when I tried to make the files, it occurred the error:
depbase=
echo server.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'
;/bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../include -isystem../../third_party/jsoncpp/include -isystem../../third_party/spdlog -I../../thrift_src/gen-cpp -I/usr/local/opt/openssl/include -I/usr/local/Cellar/boost/1.68.0_1/include -Wall -Wextra -pthread -O0 -g -MT server.lo -MD -MP -MF $depbase.Tpo -c -o server.lo server.cpp &&
mv -f $depbase.Tpo $depbase.Plo
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../include -isystem../../third_party/jsoncpp/include -isystem../../third_party/spdlog -I../../thrift_src/gen-cpp -I/usr/local/opt/openssl/include -I/usr/local/Cellar/boost/1.68.0_1/include -Wall -Wextra -pthread -O0 -g -MT server.lo -MD -MP -MF .deps/server.Tpo -c server.cpp -fno-common -DPIC -o .libs/server.o
server.cpp: 在函数‘int bm_runtime::{anonymous}::serve(int)’中:
server.cpp:103:41: 错误:no matching function for call to ‘bm_runtime::standard::StandardProcessor::StandardProcessor(std::shared_ptr<bm_runtime::standard::StandardIf>)’
standard::get_handler(switch_)))
^
In file included from server.cpp:52:
../../thrift_src/gen-cpp/bm/Standard.h:8606:3: 附注:candidate: ‘bm_runtime::standard::StandardProcessor::StandardProcessor(boost::shared_ptr<bm_runtime::standard::StandardIf>)’
StandardProcessor(const boost::shared_ptr iface) :
^~~~~~~~~~~~~~~~~
../../thrift_src/gen-cpp/bm/Standard.h:8606:3: 附注: no known conversion for argument 1 from ‘std::shared_ptr<bm_runtime::standard::StandardIf>’ to ‘boost::shared_ptr<bm_runtime::standard::StandardIf>’
../../thrift_src/gen-cpp/bm/Standard.h:8530:7: 附注:candidate: ‘bm_runtime::standard::StandardProcessor::StandardProcessor(const bm_runtime::standard::StandardProcessor&)’
class StandardProcessor : public ::apache::thrift::TDispatchProcessor {
^~~~~~~~~~~~~~~~~
../../thrift_src/gen-cpp/bm/Standard.h:8530:7: 附注: no known conversion for argument 1 from ‘std::shared_ptr<bm_runtime::standard::StandardIf>’ to ‘const bm_runtime::standard::StandardProcessor&’
server.cpp:110:45: 错误:no matching function for call to ‘bm_runtime::simple_pre::SimplePreProcessor::SimplePreProcessor(std::shared_ptr<bm_runtime::simple_pre::SimplePreIf>)’
simple_pre::get_handler(switch_)))
^
In file included from server.cpp:53:
../../thrift_src/gen-cpp/bm/SimplePre.h:1095:3: 附注:candidate: ‘bm_runtime::simple_pre::SimplePreProcessor::SimplePreProcessor(boost::shared_ptr<bm_runtime::simple_pre::SimplePreIf>)’
SimplePreProcessor(boost::shared_ptr iface) :
^~~~~~~~~~~~~~~~~~
../../thrift_src/gen-cpp/bm/SimplePre.h:1095:3: 附注: no known conversion for argument 1 from ‘std::shared_ptr<bm_runtime::simple_pre::SimplePreIf>’ to ‘boost::shared_ptr<bm_runtime::simple_pre::SimplePreIf>’
../../thrift_src/gen-cpp/bm/SimplePre.h:1078:7: 附注:candidate: ‘bm_runtime::simple_pre::SimplePreProcessor::SimplePreProcessor(const bm_runtime::simple_pre::SimplePreProcessor&)’
class SimplePreProcessor : public ::apache::thrift::TDispatchProcessor {
^~~~~~~~~~~~~~~~~~
../../thrift_src/gen-cpp/bm/SimplePre.h:1078:7: 附注: no known conversion for argument 1 from ‘std::shared_ptr<bm_runtime::simple_pre::SimplePreIf>’ to ‘const bm_runtime::simple_pre::SimplePreProcessor&’
make[3]: *** [server.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
how can I fix it ?
The text was updated successfully, but these errors were encountered: