Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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. This is the error:

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 void="">&, 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

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!

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. This is the error:The error is quoted below.

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 void="">&, 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

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 void="">&, 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