ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

cv_bridge installation error: wrong number of template arguments

asked 2017-01-03 14:43:17 -0500

powerstorm42 gravatar image

updated 2017-01-03 14:44:27 -0500

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 ...

(more)
edit retag flag offensive close merge delete

Comments

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

ahendrix gravatar image ahendrix  ( 2017-01-03 17:03:31 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2017-01-04 15:33:09 -0500

powerstorm42 gravatar image

updated 2017-01-04 15:36:13 -0500

In the end I was able to get cv_bridge to compile by upgrading Ubilinux from Debian 7 Wheezy to 8 Jessie. It is possible that libboost1.49-dev included in Wheezy was too old for cv_bridge, and Jessie comes with libboost1.55-dev. Boost 1.53 is also the minimum version required for ROS Indigo: http://www.ros.org/reps/rep-0003.html (note that the official installation instructions for Indigo on Debian Wheezy don't mention the libboost-dev library being too old). For anyone else experiencing similar issues with ROS on Edison, there are some updated install scripts and instructions for Indigo and Kinetic available here: https://github.com/pennaerial/ros-setups

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-01-03 14:43:17 -0500

Seen: 458 times

Last updated: Jan 04 '17