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

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

Open
roboticsai opened this issue Apr 8, 2018 · 3 comments

Comments

@roboticsai
Copy link

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::AnyConversionRTT::ConnPolicy::update(const CORBA::Any&, RTT::corba::AnyConversionRTT::ConnPolicy::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_ptrRTT::base::DataSourceBase]’
/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
Copy link

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

@jwillemsen
Copy link

Same as orocos-toolchain/orocos_toolchain#25

@roboticsai
Copy link
Author

yes it solved this problem.

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