SAI icon indicating copy to clipboard operation
SAI copied to clipboard

Multiple variables have initializer but incomplete type

Open jean-christophe-manciot opened this issue 4 years ago • 1 comments

Ubuntu 20.04 sai v1.5.2 thrift 0.13.0-2build2

Building with:

sed -Ei 's|^(SAI_HEADER_DIR \?= ).*$|\1/path/to/git-saithrift/inc|g' /path/to/git-saithrift/test/saithrift/Makefile
debuild -i -I --no-sign --build=binary -j1

leads to:

...
g++ -I/home/actionmystique/src/SAI/saithrift-build/git-saithrift/inc -I. -std=c++11 -DFORCE_BOOST_SMART_PTR -c src/switch_sai_rpc_server.cpp -o src/obj/switch_sai_rpc_server.o -I/home/actionmystique/src/SAI/saithrift-build/git-saithrift/inc -I. -std=c++11 -DFORCE_BOOST_SMART_PTR -I./src/gen-cpp
src/switch_sai_rpc_server.cpp: In function ‘void* switch_sai_thrift_rpc_server_thread(void*)’:
src/switch_sai_rpc_server.cpp:3914:44: error: variable ‘boost::shared_ptr<switch_sai_rpcHandler> handler’ has initializer but incomplete type
 3914 |   shared_ptr<switch_sai_rpcHandler> handler(new switch_sai_rpcHandler());
      |                                            ^
src/switch_sai_rpc_server.cpp:3915:35: error: variable ‘boost::shared_ptr<apache::thrift::TProcessor> processor’ has initializer but incomplete type
 3915 |   shared_ptr<TProcessor> processor(new switch_sai_rpcProcessor(handler));
      |                                   ^
src/switch_sai_rpc_server.cpp:3916:47: error: variable ‘boost::shared_ptr<apache::thrift::transport::TServerTransport> serverTransport’ has initializer but incomplete type
 3916 |   shared_ptr<TServerTransport> serverTransport(new TServerSocket(port));
      |                                               ^
src/switch_sai_rpc_server.cpp:3917:49: error: variable ‘boost::shared_ptr<apache::thrift::transport::TTransportFactory> transportFactory’ has initializer but incomplete type
 3917 |   shared_ptr<TTransportFactory> transportFactory(new TBufferedTransportFactory());
      |                                                 ^
src/switch_sai_rpc_server.cpp:3918:47: error: variable ‘boost::shared_ptr<apache::thrift::protocol::TProtocolFactory> protocolFactory’ has initializer but incomplete type
 3918 |   shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
      |                                               ^
make[3]: *** [Makefile:77: src/obj/switch_sai_rpc_server.o] Error 1
make[3]: Leaving directory '/home/actionmystique/src/SAI/saithrift-build/git-saithrift/test/saithrift'
make[2]: *** [Makefile:29: saithrift-build] Error 2
make[2]: Leaving directory '/home/actionmystique/src/SAI/saithrift-build/git-saithrift'
make[1]: *** [debian/rules:26: override_dh_auto_build] Error 2
make[1]: Leaving directory '/home/actionmystique/src/SAI/saithrift-build/git-saithrift'
make: *** [debian/rules:23: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

Full build log saithrift_1.5.2_amd64.build.log

jean-christophe-manciot avatar Apr 07 '20 07:04 jean-christophe-manciot

-using boost::shared_ptr; +using std::shared_ptr;

chuzirui avatar May 06 '22 07:05 chuzirui