Failed to process package 'cv_bridge':
I am installing Indigo on a Raspberry Pi 2 B running Rasbian Jessie. I am using the instructions at:
http://wiki.ros.org/ROSberryPi/Installing%20ROS%20Indigo%20on%20Raspberry%20Pi
I am trying to run the command
sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/indigo
I am getting the following error.
[ 33%] Building CXX object src/CMakeFiles/cv_bridge.dir/cv_bridge.cpp.o
Linking CXX shared library /home/pi/ros_catkin_ws/devel_isolated/cv_bridge/lib/libcv_bridge.so
[ 33%] Built target cv_bridge
Scanning dependencies of target cv_bridge_boost
[100%] [100%] Building CXX object src/CMakeFiles/cv_bridge_boost.dir/module_opencv2.cpp.o
Building CXX object src/CMakeFiles/cv_bridge_boost.dir/module.cpp.o
/home/pi/ros_catkin_ws/src/vision_opencv/cv_bridge/src/module_opencv2.cpp:124:16: error: cannot declare variable ‘g_numpyAllocator’ to be of abstract type ‘NumpyAllocator’
NumpyAllocator g_numpyAllocator;
^
/home/pi/ros_catkin_ws/src/vision_opencv/cv_bridge/src/module_opencv2.cpp:71:7: note: because the following virtual functions are pure within ‘NumpyAllocator’:
class NumpyAllocator : public cv::MatAllocator
^
In file included from /usr/local/include/opencv2/core.hpp:59:0,
from /usr/local/include/opencv2/core/core.hpp:48,
from /home/pi/ros_catkin_ws/src/vision_opencv/cv_bridge/include/cv_bridge/cv_bridge.h:43,
from /home/pi/ros_catkin_ws/src/vision_opencv/cv_bridge/src/module.hpp:22,
from /home/pi/ros_catkin_ws/src/vision_opencv/cv_bridge/src/module_opencv2.cpp:35:
/usr/local/include/opencv2/core/mat.hpp:417:23: note: virtual cv::UMatData* cv::MatAllocator::allocate(int, const int*, int, void*, size_t*, int, cv::UMatUsageFlags) const
virtual UMatData* allocate(int dims, const int* sizes, int type,
^
/usr/local/include/opencv2/core/mat.hpp:419:18: note: virtual bool cv::MatAllocator::allocate(cv::UMatData*, int, cv::UMatUsageFlags) const
virtual bool allocate(UMatData* data, int accessflags, UMatUsageFlags usageFlags) const = 0;
^
/usr/local/include/opencv2/core/mat.hpp:420:18: note: virtual void cv::MatAllocator::deallocate(cv::UMatData*) const
virtual void deallocate(UMatData* data) const = 0;
^
/home/pi/ros_catkin_ws/src/vision_opencv/cv_bridge/src/module_opencv2.cpp: In function ‘int convert_to_CvMat2(const PyObject*, cv::Mat&)’:
/home/pi/ros_catkin_ws/src/vision_opencv/cv_bridge/src/module_opencv2.cpp:206:11: error: ‘class cv::Mat’ has no member named ‘refcount’
m.refcount = refcountFromPyObject(o);
^
src/CMakeFiles/cv_bridge_boost.dir/build.make:77: recipe for target 'src/CMakeFiles/cv_bridge_boost.dir/module_opencv2.cpp.o' failed
make[2]: *** [src/CMakeFiles/cv_bridge_boost.dir/module_opencv2.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:678: recipe for target 'src/CMakeFiles/cv_bridge_boost.dir/all' failed
make[1]: *** [src/CMakeFiles/cv_bridge_boost.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
<== Failed to process package 'cv_bridge':
Command '['/opt/ros/indigo/env.sh', 'make', '-j4', '-l4']' returned non-zero exit status 2
Reproduce this error by running:
==> cd /home/pi/ros_catkin_ws/build_isolated/cv_bridge && /opt/ros/indigo/env.sh make -j4 -l4
Command failed, exiting.
I have tried searching this and other sites and have not found a similar problem reported. The closest problem I found referenced changing the size of the swap file as the solution, but that did not help.
Thanks,
Asked by jayraypi on 2016-01-04 12:33:30 UTC
Comments
Do you have opencv3 installed?
Asked by takahashi on 2016-01-05 03:20:00 UTC
Did someone fix it? I have the same problem now
Asked by julimen5 on 2017-11-04 21:58:06 UTC
Hi
Have you solved the problem? I met the same problem now.
Thanks
Asked by RachelRen on 2018-12-04 02:54:54 UTC
Hello! any solution?
Asked by subarashi on 2021-07-09 09:47:02 UTC