cv_bridge installation error: wrong number of template arguments
I am getting an error when trying to install cv_bridge on Ubilinux (based on Debian 7 Wheezy), with ROS Indigo. The error is quoted below.
I already discovered this answer: http://answers.ros.org/question/22490... However, the solution doesn't help me as it requires modifying the codebase to only work with little endian data, which I cannot guarantee. Digging through the source, it appears that cv_bridge includes the necessary boost::endian::conversion files within its source code, hence it should not require boost 1.58+ to be installed system-wide. However, compiling this included boost library creates this error.
Does anyone have any ideas how to debug this error or how to fix it? Thanks in advance!
In file included from /home/px4/indigo_catkin_ws/src/vision_opencv/cv_bridge/src/cv_bridge.cpp:36:0: /home/px4/indigo_catkin_ws/src/vision_opencv/cv_bridge/src/boost/endian/conversion.hpp:26:3: warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default] /home/px4/indigo_catkin_ws/src/vision_opencv/cv_bridge/src/boost/endian/conversion.hpp:329:72: error: wrong number of template arguments (1, should be 3) /home/px4/indigo_catkin_ws/src/vision_opencv/cv_bridge/src/boost/endian/conversion.hpp:328:13: error: provided for ‘template<boost::endian::order from,="" boost::endian::order="" to,="" class="" endianreversible=""> class boost::endian::detail::value_converter’ /home/px4/indigo_catkin_ws/src/vision_opencv/cv_bridge/src/boost/endian/conversion.hpp:331:78: error: wrong number of template arguments (1, should be 3) /home/px4/indigo_catkin_ws/src/vision_opencv/cv_bridge/src/boost/endian/conversion.hpp:328:13: error: provided for ‘template<boost::endian::order from,="" boost::endian::order="" to,="" class="" endianreversible=""> class boost::endian::detail::value_converter’ /home/px4/indigo_catkin_ws/src/vision_opencv/cv_bridge/src/boost/endian/conversion.hpp:333:75: error: wrong number of template arguments (1, should be 3) /home/px4/indigo_catkin_ws/src/vision_opencv/cv_bridge/src/boost/endian/conversion.hpp:328:13: error: provided for ‘template<boost::endian::order from,="" boost::endian::order="" to,="" class="" endianreversible=""> class boost::endian::detail::value_converter’ /home/px4/indigo_catkin_ws/src/vision_opencv/cv_bridge/src/boost/endian/conversion.hpp:335:75: error: wrong number of template arguments (1, should be 3) /home/px4/indigo_catkin_ws/src/vision_opencv/cv_bridge/src/boost/endian/conversion.hpp:328:13: error: provided for ‘template<boost::endian::order from,="" boost::endian::order="" to,="" class="" endianreversible=""> class boost::endian::detail::value_converter’ /home/px4/indigo_catkin_ws/src/vision_opencv/cv_bridge/src/boost/endian/conversion.hpp:411:65: error: wrong number of template arguments (1, should be 3) /home/px4/indigo_catkin_ws/src/vision_opencv/cv_bridge/src/boost/endian/conversion.hpp:410:13: error: provided for ‘template<boost::endian::order from,="" boost::endian::order="" to,="" class="" endianreversibleinplace=""> class boost::endian::detail::converter’ /home/px4/indigo_catkin_ws/src/vision_opencv/cv_bridge/src/boost/endian/conversion.hpp:413:71: error: wrong number of template arguments (1, should be 3) /home/px4/indigo_catkin_ws/src/vision_opencv/cv_bridge/src/boost/endian/conversion.hpp:410:13: error: provided for ‘template<boost::endian::order from,="" boost::endian::order="" to,="" class="" endianreversibleinplace=""> class boost::endian::detail::converter’ /home/px4/indigo_catkin_ws/src/vision_opencv/cv_bridge/src/boost ...
ROS depends on boost, so by including a second version of boost within cv_bridge you'll end up with two versions of boost on the include path, and then the order of include flags will determine which version ends up actually being included, in addition to creating symbol conflicts at link time