orocos-toolchain / rtt

Orocos Real-Time Toolkit
http://www.orocos.org
Other
73 stars 80 forks source link

error: invalid initialization of non-const reference of type ‘const RTT::corba::CConnPolicy*&’ #262

Open roboticsai opened 6 years ago

roboticsai commented 6 years ago

Here's d error:

In file included from /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/CorbaLib.cpp:50:0: /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/RTTCorbaConversion.hpp: In static member function ‘static bool RTT::corba::AnyConversion::update(const CORBA::Any&, RTT::corba::AnyConversion::StdType&)’: /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/RTTCorbaConversion.hpp:313:18: error: invalid initialization of non-const reference of type ‘const RTT::corba::CConnPolicy&’ from an rvalue of type ‘const RTT::corba::CConnPolicy’ if ( any >>= result ) { ^ In file included from /home/dinesh/ws/underlay_isolated/build_isolated/rtt/install/rtt/transports/corba/ServiceC.h:114:0, from /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/CorbaTypeTransporter.hpp:44, from /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/CorbaTemplateProtocol.hpp:42, from /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/CorbaLib.cpp:49: /home/dinesh/ws/underlay_isolated/build_isolated/rtt/install/rtt/transports/corba/DataFlowC.h:1320:32: note: initializing argument 2 of ‘CORBA::Boolean operator>>=(const CORBA::Any&, const RTT::corba::CConnPolicy&)’ RTT_CORBA_API ::CORBA::Boolean operator>>= (const ::CORBA::Any &, const RTT::corba::CConnPolicy &); ^ In file included from /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/DataFlowI.h:47:0, from /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/RemoteChannelElement.hpp:42, from /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/CorbaTemplateProtocol.hpp:43, from /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/CorbaLib.cpp:49: /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/CorbaConversion.hpp: In instantiation of ‘static bool RTT::corba::AnyConversion<std::vector<_Tp, _Alloc> >::update(const CORBA::Any&, RTT::corba::AnyConversion<std::vector<_Tp, _Alloc> >::StdType&) [with T = double; _Alloc = std::allocator; RTT::corba::AnyConversion<std::vector<_Tp, _Alloc> >::StdType = std::vector]’: /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/CorbaTemplateProtocol.hpp:118:57: required from ‘bool RTT::corba::CorbaTemplateProtocol::updateFromAny(const CORBA::Any, RTT::base::DataSourceBase::shared_ptr) const [with T = std::vector; RTT::base::DataSourceBase::shared_ptr = boost::intrusive_ptr]’ /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/CorbaLib.cpp:208:1: required from here /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/CorbaConversion.hpp:259:18: error: invalid initialization of non-const reference of type ‘const CORBA::DoubleSeq&’ from an rvalue of type ‘const CORBA::DoubleSeq’ if ( any >>= result ) { ^ In file included from /home/dinesh/ws/underlay_isolated/build_isolated/rtt/install/rtt/transports/corba/ServiceC.h:51:0, from /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/CorbaTypeTransporter.hpp:44, from /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/CorbaTemplateProtocol.hpp:42, from /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/CorbaLib.cpp:49: /home/dinesh/ACE_wrappers/TAO/tao/AnyTypeCode/DoubleSeqA.h:86:41: note: initializing argument 2 of ‘CORBA::Boolean operator>>=(const CORBA::Any&, const CORBA::DoubleSeq&)’ TAO_AnyTypeCode_Export ::CORBA::Boolean operator>>= (const ::CORBA::Any &, const CORBA::DoubleSeq *&); ^ In file included from /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/CorbaLib.cpp:42:0: /home/dinesh/ACE_wrappers/TAO/tao/PortableServer/PortableServer.h: At global scope: /home/dinesh/ACE_wrappers/TAO/tao/PortableServer/PortableServer.h:34:1: warning: ‘TAO_Requires_POA_Initializer’ defined but not used [-Wunused-variable] TAO_Requires_POA_Initializer = TAO_POA_Initializer::init (); ^ rtt/transports/corba/CMakeFiles/rtt-transport-corba-gnulinux_plugin.dir/build.make:62: recipe for target 'rtt/transports/corba/CMakeFiles/rtt-transport-corba-gnulinux_plugin.dir/CorbaLib.cpp.o' failed make[2]: [rtt/transports/corba/CMakeFiles/rtt-transport-corba-gnulinux_plugin.dir/CorbaLib.cpp.o] Error 1 CMakeFiles/Makefile2:935: recipe for target 'rtt/transports/corba/CMakeFiles/rtt-transport-corba-gnulinux_plugin.dir/all' failed make[1]: [rtt/transports/corba/CMakeFiles/rtt-transport-corba-gnulinux_plugin.dir/all] Error 2 Makefile:138: recipe for target 'all' failed make: *** [all] Error 2 <== Failed to process package 'rtt': Command '['/home/dinesh/ws/underlay_isolated/install_isolated/env.sh', 'make', '-j4', '-l4']' returned non-zero exit status 2

Reproduce this error by running: ==> cd /home/dinesh/ws/underlay_isolated/build_isolated/rtt && /home/dinesh/ws/underlay_isolated/install_isolated/env.sh make -j4 -l4

Command failed, exiting.

AFtr i enter command "catkin_make_isolated --install -DENABLE_CORBA=ON -DCORBA_IMPLEMENTATION=TAO" i'm getting above error. I'm using ubuntu 16.04.

jwillemsen commented 6 years ago

Try to change CorbaType* result; to const CorbaType* result; on line 259 of rtt/rtt/transports/corba/CorbaConversion.hpp

jwillemsen commented 6 years ago

Same as https://github.com/orocos-toolchain/orocos_toolchain/issues/25

roboticsai commented 6 years ago

yes it solved this problem.