Diamondback's image_transport fails to compile, how come?
I am compiling ROS Diamondback from source, following the instructions at http://www.ros.org/wiki/diamondback/Installation/Arch. Most of the packages,
especially core ones like roscpp
compile without any problems, but when compiling image_transport via
rosmake image_transport
I receive the following error, where
[ 10%] Building CXX object CMakeFiles/image_transport.dir/src/publisher.o
In file included from /usr/include/boost/ptr_container/detail/reversible_ptr_container.hpp:24:0,
from /usr/include/boost/ptr_container/ptr_sequence_adapter.hpp:20,
from /usr/include/boost/ptr_container/ptr_vector.hpp:20,
from /opt/ros/diamondback/image_common/image_transport/src/publisher.cpp:38:
/usr/include/boost/ptr_container/clone_allocator.hpp:
[...] lots of other compiler error output [...]
/opt/ros/diamondback/image_common/image_transport/src/publisher.cpp:59:5: instantiated from here
/usr/include/boost/ptr_container/clone_allocator.hpp:34:27: error: cannot allocate an object of abstract type ‘image_transport::PublisherPlugin’
/opt/ros/diamondback/image_common/image_transport/include/image_transport/publisher_plugin.h:13:7: note: because the following virtual functions are pure within ‘image_transport::PublisherPlugin’:
/opt/ros/diamondback/image_common/image_transport/include/image_transport/publisher_plugin.h:22:23: note: virtual std::string image_transport::PublisherPlugin::getTransportName() const
/opt/ros/diamondback/image_common/image_transport/include/image_transport/publisher_plugin.h:49:20: note: virtual uint32_t image_transport::PublisherPlugin::getNumSubscribers() const
/opt/ros/diamondback/image_common/image_transport/include/image_transport/publisher_plugin.h:54:23: note: virtual std::string image_transport::PublisherPlugin::getTopic() const
/opt/ros/diamondback/image_common/image_transport/include/image_transport/publisher_plugin.h:59:16: note: virtual void image_transport::PublisherPlugin::publish(const Image&) const
/opt/ros/diamondback/image_common/image_transport/include/image_transport/publisher_plugin.h:72:16: note: virtual void image_transport::PublisherPlugin::shutdown()
/opt/ros/diamondback/image_common/image_transport/include/image_transport/publisher_plugin.h:87:16: note: virtual void image_transport::PublisherPlugin::advertiseImpl(ros::NodeHandle&, const string&, uint32_t, const SubscriberStatusCallback&, const SubscriberStatusCallback&, const VoidPtr&, bool)
make[3]: *** [CMakeFiles/image_transport.dir/src/publisher.o] Error 1
make[3]: Leaving directory `/opt/ros/diamondback/image_common/image_transport/build'
make[2]: *** [CMakeFiles/image_transport.dir/all] Error 2
make[2]: Leaving directory `/opt/ros/diamondback/image_common/image_transport/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/opt/ros/diamondback/image_common/image_transport/build'
-------------------------------------------------------------------------------}
[ rosmake ] Output from build of package image_transport written to:
The compiler doesn't like line 59 in image_transport/src/publishers.cpp
56 uint32_t getNumSubscribers() const
57 {
58 uint32_t count = 0;
59 BOOST_FOREACH(const PublisherPlugin& pub, publishers_)
60 count += pub.getNumSubscribers();
61 return count;
62 }
63
This very much seems like some piece of code trying to instantiate an abstract class that contains pure virtual methods (=0). Yet, I expect Diamondback's source tag to compile and be consistent. Is it possible that this is symptom of an incompatibility of ROS diamondback with a certain Boost version?