Actionlib connection_monitor.cpp fails when trying to compile ROS Medlodic from source
Here is the failure output:
[ 97%] Building CXX object CMakeFiles/actionlib.dir/src/connection_monitor.cpp.o
/home/chrisl8/ros_catkin_ws/src/actionlib/src/connection_monitor.cpp: In member function ‘bool actionlib::ConnectionMonitor::waitForActionServerToStart(const ros::Duration&, const ros::NodeHandle&)’:
/home/chrisl8/ros_catkin_ws/src/actionlib/src/connection_monitor.cpp:278:66: error: no matching function for call to ‘boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>::subsecond_duration(double)’
boost::posix_time::milliseconds(time_left.toSec() * 1000.0f);
^
In file included from /usr/include/boost/date_time/posix_time/posix_time_config.hpp:16,
from /usr/include/boost/date_time/posix_time/posix_time_system.hpp:13,
from /usr/include/boost/date_time/posix_time/ptime.hpp:12,
from /usr/include/boost/date_time/posix_time/posix_time_types.hpp:12,
from /usr/include/boost/thread/thread_time.hpp:11,
from /usr/include/boost/thread/detail/platform_time.hpp:11,
from /usr/include/boost/thread/pthread/condition_variable.hpp:9,
from /usr/include/boost/thread/condition_variable.hpp:16,
from /usr/include/boost/thread/condition.hpp:13,
from /home/chrisl8/ros_catkin_ws/src/actionlib/include/actionlib/client/connection_monitor.h:43,
from /home/chrisl8/ros_catkin_ws/src/actionlib/src/connection_monitor.cpp:36:
/usr/include/boost/date_time/time_duration.hpp:285:14: note: candidate: ‘template<class T> boost::date_time::subsecond_duration<base_duration, frac_of_second>::subsecond_duration(const T&, typename boost::enable_if<boost::is_integral<Functor>, void>::type*)’
explicit subsecond_duration(T const& ss,
^~~~~~~~~~~~~~~~~~
/usr/include/boost/date_time/time_duration.hpp:285:14: note: template argument deduction/substitution failed:
/usr/include/boost/date_time/time_duration.hpp: In substitution of ‘template<class T> boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>::subsecond_duration(const T&, typename boost::enable_if<boost::is_integral<T> >::type*) [with T = double]’:
/home/chrisl8/ros_catkin_ws/src/actionlib/src/connection_monitor.cpp:278:66: required from here
/usr/include/boost/date_time/time_duration.hpp:285:14: error: no type named ‘type’ in ‘struct boost::enable_if<boost::is_integral<double>, void>’
In file included from /usr/include/boost/date_time/posix_time/posix_time_config.hpp:16,
from /usr/include/boost/date_time/posix_time/posix_time_system.hpp:13,
from /usr/include/boost/date_time/posix_time/ptime.hpp:12,
from /usr/include/boost/date_time/posix_time/posix_time_types.hpp:12,
from /usr/include/boost/thread/thread_time.hpp:11,
from /usr/include/boost/thread/detail/platform_time.hpp:11,
from /usr/include/boost/thread/pthread/condition_variable.hpp:9,
from /usr/include/boost/thread/condition_variable.hpp:16,
from /usr/include/boost/thread/condition.hpp:13,
from /home/chrisl8/ros_catkin_ws/src/actionlib/include/actionlib/client/connection_monitor.h:43,
from /home/chrisl8/ros_catkin_ws/src/actionlib/src/connection_monitor.cpp:36:
/usr/include/boost/date_time/time_duration.hpp:270:30: note: candidate: ‘boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>::subsecond_duration(const boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>&)’
class BOOST_SYMBOL_VISIBLE subsecond_duration : public base_duration
^~~~~~~~~~~~~~~~~~
/usr/include/boost/date_time/time_duration.hpp:270:30: note: no known conversion for argument 1 from ‘double’ to ‘const boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>&’
/usr/include/boost/date_time/time_duration.hpp:270:30: note: candidate: ‘boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>::subsecond_duration(boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>&&)’
/usr/include/boost/date_time/time_duration.hpp:270:30: note: no known conversion for argument 1 from ‘double’ to ‘boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>&&’
make[2]: *** [CMakeFiles ...
Same here, probably because of an upgrade to libboost 1.67. At least here on debian testing, on which it worked fine with libboost 1.62