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

Failed to process package 'cv_bridge':

asked 2016-01-04 11:33:30 -0500

jayraypi gravatar image

I am installing Indigo on a Raspberry Pi 2 B running Rasbian Jessie. I am using the instructions at:

http://wiki.ros.org/ROSberryPi/Instal...

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,

edit retag flag offensive close merge delete

Comments

Do you have opencv3 installed?

takahashi gravatar image takahashi  ( 2016-01-05 02:20:00 -0500 )edit

Did someone fix it? I have the same problem now

julimen5 gravatar image julimen5  ( 2017-11-04 21:58:06 -0500 )edit

Hi

Have you solved the problem? I met the same problem now.

Thanks

RachelRen gravatar image RachelRen  ( 2018-12-04 01:54:54 -0500 )edit

Hello! any solution?

subarashi gravatar image subarashi  ( 2021-07-09 09:47:02 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2021-07-09 09:47:24 -0500

subarashi gravatar image

Did you solve your problem?

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-01-04 11:33:30 -0500

Seen: 2,740 times

Last updated: Jul 09 '21