
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/224904/cv_bridge-install-error-on-rpi-rosindigo/ 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/endian/conversion.hpp:415:68: 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:417:68: 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/cv_bridge.cpp: In function ‘cv::Mat cv_bridge::matFromImage(const Image&)’: /home/px4/indigo_catkin_ws/src/vision_opencv/cv_bridge/src/cv_bridge.cpp:274:23: error: ‘boost::endian::order’ is not a class or namespace /home/px4/indigo_catkin_ws/src/vision_opencv/cv_bridge/src/cv_bridge.cpp:274:55: error: ‘boost::endian::order’ is not a class or namespace /home/px4/indigo_catkin_ws/src/vision_opencv/cv_bridge/src/cv_bridge.cpp:275:23: error: ‘boost::endian::order’ is not a class or namespace /home/px4/indigo_catkin_ws/src/vision_opencv/cv_bridge/src/cv_bridge.cpp:275:55: error: ‘boost::endian::order’ is not a class or namespace /home/px4/indigo_catkin_ws/src/vision_opencv/cv_bridge/src/cv_bridge.cpp: In member function ‘void cv_bridge::CvImage::toImageMsg(sensor_msgs::Image&) const’: /home/px4/indigo_catkin_ws/src/vision_opencv/cv_bridge/src/cv_bridge.cpp:369:44: error: ‘boost::endian::order’ is not a class or namespace /home/px4/indigo_catkin_ws/src/vision_opencv/cv_bridge/src/cv_bridge.cpp:369:76: error: ‘boost::endian::order’ is not a class or namespace /home/px4/indigo_catkin_ws/src/vision_opencv/cv_bridge/src/cv_bridge.cpp: In function ‘cv_bridge::CvImageConstPtr cv_bridge::toCvShare(const Image&, const boost::shared_ptr&, const string&)’: /home/px4/indigo_catkin_ws/src/vision_opencv/cv_bridge/src/cv_bridge.cpp:419:23: error: ‘boost::endian::order’ is not a class or namespace /home/px4/indigo_catkin_ws/src/vision_opencv/cv_bridge/src/cv_bridge.cpp:419:55: error: ‘boost::endian::order’ is not a class or namespace make[2]: *** [src/CMakeFiles/cv_bridge.dir/cv_bridge.cpp.o] Error 1 make[1]: *** [src/CMakeFiles/cv_bridge.dir/all] Error 2 make: *** [all] Error 2
Originally posted by powerstorm42 on ROS Answers with karma: 11 on 2017-01-03
Post score: 1
Original comments
Comment by ahendrix on 2017-01-03:
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