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

Does not build on Kinetic with gcc 6 #21

Closed
VictorLamoine opened this issue Jan 27, 2017 · 3 comments · Fixed by #25
Closed

Does not build on Kinetic with gcc 6 #21

VictorLamoine opened this issue Jan 27, 2017 · 3 comments · Fixed by #25

Comments

@VictorLamoine
Copy link
Contributor

VictorLamoine commented Jan 27, 2017

catkin_make
Ubuntu 16.04
ROS Kinetic
gcc 6.2
boost 1.58

Tested both with the master and develop branches

In file included from /usr/include/boost/bind.hpp:22:0,
                 from /opt/ros/kinetic/include/ros/publisher.h:35,
                 from /opt/ros/kinetic/include/ros/node_handle.h:32,
                 from /opt/ros/kinetic/include/ros/ros.h:45,
                 from /home/im/code/catkin_workspace/src/tf2_web_republisher/src/tf_web_republisher.cpp:37:
/usr/include/boost/bind/bind.hpp: In instantiation of ‘void boost::_bi::list2<A1, A2>::operator()(boost::_bi::type<void>, F&, A&, int) [with F = boost::_mfi::mf1<void, TFRepublisher, actionlib::ServerGoalHandle<tf2_web_republisher::TFSubscriptionAction_<std::allocator<void> > >&>; A = boost::_bi::list1<const actionlib::ServerGoalHandle<tf2_web_republisher::TFSubscriptionAction_<std::allocator<void> > >&>; A1 = boost::_bi::value<TFRepublisher*>; 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<tf2_web_republisher::TFSubscriptionAction_<std::allocator<void> > >; R = void; F = boost::_mfi::mf1<void, TFRepublisher, actionlib::ServerGoalHandle<tf2_web_republisher::TFSubscriptionAction_<std::allocator<void> > >&>; L = boost::_bi::list2<boost::_bi::value<TFRepublisher*>, boost::arg<1> >; boost::_bi::bind_t<R, F, L>::result_type = void]’
/usr/include/boost/function/function_template.hpp:159:15:   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, TFRepublisher, actionlib::ServerGoalHandle<tf2_web_republisher::TFSubscriptionAction_<std::allocator<void> > >&>, boost::_bi::list2<boost::_bi::value<TFRepublisher*>, boost::arg<1> > >; R = void; T0 = actionlib::ServerGoalHandle<tf2_web_republisher::TFSubscriptionAction_<std::allocator<void> > >]’
/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, TFRepublisher, actionlib::ServerGoalHandle<tf2_web_republisher::TFSubscriptionAction_<std::allocator<void> > >&>, boost::_bi::list2<boost::_bi::value<TFRepublisher*>, boost::arg<1> > >; R = void; T0 = actionlib::ServerGoalHandle<tf2_web_republisher::TFSubscriptionAction_<std::allocator<void> > >]’
/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, TFRepublisher, actionlib::ServerGoalHandle<tf2_web_republisher::TFSubscriptionAction_<std::allocator<void> > >&>, boost::_bi::list2<boost::_bi::value<TFRepublisher*>, boost::arg<1> > >; R = void; T0 = actionlib::ServerGoalHandle<tf2_web_republisher::TFSubscriptionAction_<std::allocator<void> > >; 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, TFRepublisher, actionlib::ServerGoalHandle<tf2_web_republisher::TFSubscriptionAction_<std::allocator<void> > >&>, boost::_bi::list2<boost::_bi::value<TFRepublisher*>, boost::arg<1> > >; R = void; T0 = actionlib::ServerGoalHandle<tf2_web_republisher::TFSubscriptionAction_<std::allocator<void> > >; typename boost::enable_if_c<boost::type_traits::ice_not<boost::is_integral<Functor>::value>::value, int>::type = int]’
/home/im/code/catkin_workspace/src/tf2_web_republisher/src/tf_web_republisher.cpp:95:51:   required from here
/usr/include/boost/bind/bind.hpp:313:35: error: no match for call to ‘(boost::_mfi::mf1<void, TFRepublisher, actionlib::ServerGoalHandle<tf2_web_republisher::TFSubscriptionAction_<std::allocator<void> > >&>) (TFRepublisher*&, const actionlib::ServerGoalHandle<tf2_web_republisher::TFSubscriptionAction_<std::allocator<void> > >&)’
         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 /opt/ros/kinetic/include/ros/forwards.h:40,
                 from /opt/ros/kinetic/include/ros/common.h:37,
                 from /opt/ros/kinetic/include/ros/ros.h:43,
                 from /home/im/code/catkin_workspace/src/tf2_web_republisher/src/tf_web_republisher.cpp:37:
/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 = TFRepublisher; A1 = actionlib::ServerGoalHandle<tf2_web_republisher::TFSubscriptionAction_<std::allocator<void> > >&] <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 /opt/ros/kinetic/include/ros/publisher.h:35,
                 from /opt/ros/kinetic/include/ros/node_handle.h:32,
                 from /opt/ros/kinetic/include/ros/ros.h:45,
                 from /home/im/code/catkin_workspace/src/tf2_web_republisher/src/tf_web_republisher.cpp:37:
/usr/include/boost/bind/bind.hpp:313:35: error: binding ‘const actionlib::ServerGoalHandle<tf2_web_republisher::TFSubscriptionAction_<std::allocator<void> > >’ to reference of type ‘actionlib::ServerGoalHandle<tf2_web_republisher::TFSubscriptionAction_<std::allocator<void> > >&’ 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 /opt/ros/kinetic/include/ros/forwards.h:40,
                 from /opt/ros/kinetic/include/ros/common.h:37,
                 from /opt/ros/kinetic/include/ros/ros.h:43,
                 from /home/im/code/catkin_workspace/src/tf2_web_republisher/src/tf_web_republisher.cpp:37:
/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 = TFRepublisher; A1 = actionlib::ServerGoalHandle<tf2_web_republisher::TFSubscriptionAction_<std::allocator<void> > >&]
     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 /opt/ros/kinetic/include/ros/publisher.h:35,
                 from /opt/ros/kinetic/include/ros/node_handle.h:32,
                 from /opt/ros/kinetic/include/ros/ros.h:45,
                 from /home/im/code/catkin_workspace/src/tf2_web_republisher/src/tf_web_republisher.cpp:37:
/usr/include/boost/bind/bind.hpp:313:35: note:   cannot convert ‘(& a)->boost::_bi::list1<A1>::operator[]<const actionlib::ServerGoalHandle<tf2_web_republisher::TFSubscriptionAction_<std::allocator<void> > >&>(boost::_bi::storage2<A1, boost::arg<I> >::a2_<boost::_bi::value<TFRepublisher*>, 1>)’ (type ‘const actionlib::ServerGoalHandle<tf2_web_republisher::TFSubscriptionAction_<std::allocator<void> > >’) to type ‘actionlib::ServerGoalHandle<tf2_web_republisher::TFSubscriptionAction_<std::allocator<void> > >&’
         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 /opt/ros/kinetic/include/ros/forwards.h:40,
                 from /opt/ros/kinetic/include/ros/common.h:37,
                 from /opt/ros/kinetic/include/ros/ros.h:43,
                 from /home/im/code/catkin_workspace/src/tf2_web_republisher/src/tf_web_republisher.cpp:37:
/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 = TFRepublisher; A1 = actionlib::ServerGoalHandle<tf2_web_republisher::TFSubscriptionAction_<std::allocator<void> > >&]
     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 /opt/ros/kinetic/include/ros/publisher.h:35,
                 from /opt/ros/kinetic/include/ros/node_handle.h:32,
                 from /opt/ros/kinetic/include/ros/ros.h:45,
                 from /home/im/code/catkin_workspace/src/tf2_web_republisher/src/tf_web_republisher.cpp:37:
/usr/include/boost/bind/bind.hpp:313:35: note:   cannot convert ‘(& a)->boost::_bi::list1<A1>::operator[]<const actionlib::ServerGoalHandle<tf2_web_republisher::TFSubscriptionAction_<std::allocator<void> > >&>(boost::_bi::storage2<A1, boost::arg<I> >::a2_<boost::_bi::value<TFRepublisher*>, 1>)’ (type ‘const actionlib::ServerGoalHandle<tf2_web_republisher::TFSubscriptionAction_<std::allocator<void> > >’) to type ‘actionlib::ServerGoalHandle<tf2_web_republisher::TFSubscriptionAction_<std::allocator<void> > >&’
         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 /opt/ros/kinetic/include/ros/forwards.h:40,
                 from /opt/ros/kinetic/include/ros/common.h:37,
                 from /opt/ros/kinetic/include/ros/ros.h:43,
                 from /home/im/code/catkin_workspace/src/tf2_web_republisher/src/tf_web_republisher.cpp:37:
/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 = TFRepublisher; A1 = actionlib::ServerGoalHandle<tf2_web_republisher::TFSubscriptionAction_<std::allocator<void> > >&]
     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 ‘TFRepublisher*’ to ‘TFRepublisher&’
tf2_web_republisher/CMakeFiles/tf2_web_republisher.dir/build.make:62 : la recette pour la cible « tf2_web_republisher/CMakeFiles/tf2_web_republisher.dir/src/tf_web_republisher.cpp.o » a échouée
make[2]: *** [tf2_web_republisher/CMakeFiles/tf2_web_republisher.dir/src/tf_web_republisher.cpp.o] Erreur 1
@T045T
Copy link
Contributor

T045T commented Feb 6, 2017

I'm sorry, but on a fresh, fully updated Xenial VM, I don't get any errors building tf2_web_republisher. That VM does have a different GCC version (5.4) on it, so that might be your issue.

@VictorLamoine
Copy link
Contributor Author

VictorLamoine commented Feb 6, 2017

Agreed, it compiles fine using gcc 5.4 on my machine:
catkin_make -DCMAKE_CXX_COMPILER=/usr/bin/g++-5 -DCMAKE_C_COMPILER=/usr/bin/gcc-5

With gcc 6 it seems like the boost function signatures are the problem. Not sure what exactly! What changed?
I'll post again if I find a solution, feel free to help me :)

@VictorLamoine VictorLamoine changed the title Does not build on Kinetic Does not build on Kinetic with gcc 6 Feb 6, 2017
@T045T
Copy link
Contributor

T045T commented Feb 6, 2017

Looks like the big change is defaulting to --std=c++14, so explicitly forcing it back to --std=gnu++98 might help?

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

Successfully merging a pull request may close this issue.

2 participants