Actions
Bug #96
closeddemo-genom with ros/server fails to compile on gcc-6.1
Status:
Closed
Priority:
Normal
Assignee:
-
Description
Part of the error message
/usr/include/boost/bind/bind.hpp : dans l'instantiation de ‘void boost::_bi::list2<A1, A2>::operator()(boost::_bi::type<void>, F&, A&, int) [with F = boost::_mfi::mf1<void, genom_component_data, actionlib::ServerGoalHandle<genom::action::MoveDistance>&>; A = boost::_bi::list1<const actionlib::ServerGoalHandle<genom::action::MoveDistance>&>; A1 = boost::_bi::value<genom_component_data*>; A2 = boost::arg<1>]’ : /usr/include/boost/bind/bind.hpp:905:50: required from ‘boost::_bi::bind_t<R, F, L>::result_type boost::_bi::bind_t<R, F, L>::operator()(A1&&) [with A1 = actionlib::ServerGoalHandle<genom::action::MoveDistance>; R = void; F = boost::_mfi::mf1<void, genom_component_data, actionlib::ServerGoalHandle<genom::action::MoveDistance>&>; L = boost::_bi::list2<boost::_bi::value<genom_component_data*>, boost::arg<1> >; boost::_bi::bind_t<R, F, L>::result_type = void]’ /usr/include/boost/function/function_template.hpp:159:11: required from ‘static void boost::detail::function::void_function_obj_invoker1<FunctionObj, R, T0>::invoke(boost::detail::function::function_buffer&, T0) [with FunctionObj = boost::_bi::bind_t<void, boost::_mfi::mf1<void, genom_component_data, actionlib::ServerGoalHandle<genom::action::MoveDistance>&>, boost::_bi::list2<boost::_bi::value<genom_component_data*>, boost::arg<1> > >; R = void; T0 = actionlib::ServerGoalHandle<genom::action::MoveDistance>]’ /usr/include/boost/function/function_template.hpp:940:38: required from ‘void boost::function1<R, T1>::assign_to(Functor) [with Functor = boost::_bi::bind_t<void, boost::_mfi::mf1<void, genom_component_data, actionlib::ServerGoalHandle<genom::action::MoveDistance>&>, boost::_bi::list2<boost::_bi::value<genom_component_data*>, boost::arg<1> > >; R = void; T0 = actionlib::ServerGoalHandle<genom::action::MoveDistance>]’ /usr/include/boost/function/function_template.hpp:728:7: required from ‘boost::function1<R, T1>::function1(Functor, typename boost::enable_if_c<(boost::type_traits::ice_not<(boost::is_integral<Functor>::value)>::value), int>::type) [with Functor = boost::_bi::bind_t<void, boost::_mfi::mf1<void, genom_component_data, actionlib::ServerGoalHandle<genom::action::MoveDistance>&>, boost::_bi::list2<boost::_bi::value<genom_component_data*>, boost::arg<1> > >; R = void; T0 = actionlib::ServerGoalHandle<genom::action::MoveDistance>; typename boost::enable_if_c<(boost::type_traits::ice_not<(boost::is_integral<Functor>::value)>::value), int>::type = int]’ /usr/include/boost/function/function_template.hpp:1077:16: required from ‘boost::function<R(T0)>::function(Functor, typename boost::enable_if_c<(boost::type_traits::ice_not<(boost::is_integral<Functor>::value)>::value), int>::type) [with Functor = boost::_bi::bind_t<void, boost::_mfi::mf1<void, genom_component_data, actionlib::ServerGoalHandle<genom::action::MoveDistance>&>, boost::_bi::list2<boost::_bi::value<genom_component_data*>, boost::arg<1> > >; R = void; T0 = actionlib::ServerGoalHandle<genom::action::MoveDistance>; typename boost::enable_if_c<(boost::type_traits::ice_not<(boost::is_integral<Functor>::value)>::value), int>::type = int]’ src/demo_control-task.cc:182:12: required from here /usr/include/boost/bind/bind.hpp:313:35: erreur : no match for call to ‘(boost::_mfi::mf1<void, genom_component_data, actionlib::ServerGoalHandle<genom::action::MoveDistance>&>) (genom_component_data*&, const actionlib::ServerGoalHandle<genom::action::MoveDistance>&)’ unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/boost/bind/mem_fn.hpp:215:0, from /usr/include/boost/mem_fn.hpp:22, from /usr/include/boost/function/detail/prologue.hpp:18, from /usr/include/boost/function.hpp:24, from /home/adegroote/openrobots/include/ros/forwards.h:39, from /home/adegroote/openrobots/include/ros/common.h:37, from /home/adegroote/openrobots/include/ros/ros.h:43, from src/demo_control-task.cc:24: /usr/include/boost/bind/mem_fn_template.hpp:163:7: note : candidate: R boost::_mfi::mf1<R, T, A1>::operator()(T*, A1) const [with R = void; T = genom_component_data; A1 = actionlib::ServerGoalHandle<genom::action::MoveDistance>&] <near match> R operator()(T * p, A1 a1) const ^~~~~~~~ /usr/include/boost/bind/mem_fn_template.hpp:163:7: note : conversion of argument 2 would be ill-formed: In file included from /usr/include/boost/bind.hpp:22:0, from /home/adegroote/openrobots/include/ros/publisher.h:35, from /home/adegroote/openrobots/include/ros/node_handle.h:32, from /home/adegroote/openrobots/include/ros/ros.h:45, from src/demo_control-task.cc:24: /usr/include/boost/bind/bind.hpp:313:35: erreur : binding ‘const actionlib::ServerGoalHandle<genom::action::MoveDistance>’ to reference of type ‘actionlib::ServerGoalHandle<genom::action::MoveDistance>&’ discards qualifiers unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/boost/bind/mem_fn.hpp:215:0, from /usr/include/boost/mem_fn.hpp:22, from /usr/include/boost/function/detail/prologue.hpp:18, from /usr/include/boost/function.hpp:24, from /home/adegroote/openrobots/include/ros/forwards.h:39, from /home/adegroote/openrobots/include/ros/common.h:37, from /home/adegroote/openrobots/include/ros/ros.h:43, from src/demo_control-task.cc:24: /usr/include/boost/bind/mem_fn_template.hpp:168:25: note : candidate: template<class U> R boost::_mfi::mf1<R, T, A1>::operator()(U&, A1) const [with U = U; R = void; T = genom_component_data; A1 = actionlib::ServerGoalHandle<genom::action::MoveDistance>&] template<class U> R operator()(U & u, A1 a1) const ^~~~~~~~ /usr/include/boost/bind/mem_fn_template.hpp:168:25: note : template argument deduction/substitution failed: In file included from /usr/include/boost/bind.hpp:22:0, from /home/adegroote/openrobots/include/ros/publisher.h:35, from /home/adegroote/openrobots/include/ros/node_handle.h:32, from /home/adegroote/openrobots/include/ros/ros.h:45, from src/demo_control-task.cc:24: /usr/include/boost/bind/bind.hpp:313:35: note : cannot convert ‘(& a)->boost::_bi::list1<A1>::operator[]<const actionlib::ServerGoalHandle<genom::action::MoveDistance>&>(boost::_bi::storage2<A1, boost::arg<I> >::a2_<boost::_bi::value<genom_component_data*>, 1>)’ (type ‘const actionlib::ServerGoalHandle<genom::action::MoveDistance>’) to type ‘actionlib::ServerGoalHandle<genom::action::MoveDistance>&’ unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/boost/bind/mem_fn.hpp:215:0, from /usr/include/boost/mem_fn.hpp:22, from /usr/include/boost/function/detail/prologue.hpp:18, from /usr/include/boost/function.hpp:24, from /home/adegroote/openrobots/include/ros/forwards.h:39, from /home/adegroote/openrobots/include/ros/common.h:37, from /home/adegroote/openrobots/include/ros/ros.h:43, from src/demo_control-task.cc:24: /usr/include/boost/bind/mem_fn_template.hpp:176:25: note : candidate: template<class U> R boost::_mfi::mf1<R, T, A1>::operator()(const U&, A1) const [with U = U; R = void; T = genom_component_data; A1 = actionlib::ServerGoalHandle<genom::action::MoveDistance>&] template<class U> R operator()(U const & u, A1 a1) const ^~~~~~~~ /usr/include/boost/bind/mem_fn_template.hpp:176:25: note : template argument deduction/substitution failed: In file included from /usr/include/boost/bind.hpp:22:0, from /home/adegroote/openrobots/include/ros/publisher.h:35, from /home/adegroote/openrobots/include/ros/node_handle.h:32, from /home/adegroote/openrobots/include/ros/ros.h:45, from src/demo_control-task.cc:24: /usr/include/boost/bind/bind.hpp:313:35: note : cannot convert ‘(& a)->boost::_bi::list1<A1>::operator[]<const actionlib::ServerGoalHandle<genom::action::MoveDistance>&>(boost::_bi::storage2<A1, boost::arg<I> >::a2_<boost::_bi::value<genom_component_data*>, 1>)’ (type ‘const actionlib::ServerGoalHandle<genom::action::MoveDistance>’) to type ‘actionlib::ServerGoalHandle<genom::action::MoveDistance>&’ unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/boost/bind/mem_fn.hpp:215:0, from /usr/include/boost/mem_fn.hpp:22, from /usr/include/boost/function/detail/prologue.hpp:18, from /usr/include/boost/function.hpp:24, from /home/adegroote/openrobots/include/ros/forwards.h:39, from /home/adegroote/openrobots/include/ros/common.h:37, from /home/adegroote/openrobots/include/ros/ros.h:43, from src/demo_control-task.cc:24: /usr/include/boost/bind/mem_fn_template.hpp:184:7: note : candidate: R boost::_mfi::mf1<R, T, A1>::operator()(T&, A1) const [with R = void; T = genom_component_data; A1 = actionlib::ServerGoalHandle<genom::action::MoveDistance>&] R operator()(T & t, A1 a1) const ^~~~~~~~ /usr/include/boost/bind/mem_fn_template.hpp:184:7: note : no known conversion for argument 1 from ‘genom_component_data*’ to ‘genom_component_data&’ In file included from /usr/include/boost/bind.hpp:22:0, from /home/adegroote/openrobots/include/ros/publisher.h:35, from /home/adegroote/openrobots/include/ros/node_handle.h:32, from /home/adegroote/openrobots/include/ros/ros.h:45, from src/demo_control-task.cc:24:
My understand of this gory message (yes, they improve error messages in 6.1 ...) is that the signature of MoveDistance_rqstcb (and cie) are not correct. The expected signature from the documentation is
boost::function<void (GoalHandle)>
while the signature of the generated code is
boost::function<void (GoalHandle&)>
I don't know why clang++ and older gcc accept it. See the attached patch to fix it
Files
Actions