ROS unable to find opencv libraries
I am trying to build image_view from source on Gumstix Overo which has ros groovy running on linaro.
However, one of dependencies of image_view -- opencv2 cannot be resolved in system dependency. So I cannot use rosdep to install opencv2.
Then I went to http://opencv.org/downloads.html and downloaded version 2.4.3 and followed instruction to install OpenCV.
However, when I make image_view, I got the following error.
[rosmake-0] Starting >>> image_view [ make ]
[ rosmake ] Last 40 linesage_view: 346.6 sec ] [ 1 Active 17/18 Complete ]
{-------------------------------------------------------------------------------
CMakeFiles/stereo_view.dir/src/nodes/stereo_view.cpp.o: In function `~Mat':
/usr/local/include/opencv2/core/mat.hpp:278: undefined reference to `cv::fastFree(void*)'
CMakeFiles/stereo_view.dir/src/nodes/stereo_view.cpp.o: In function `~CvBridge':
/root/catkin_ws/src/vision_opencv-fuerte-devel/cv_bridge/include/cv_bridge/CvBridge.h:72: undefined reference to `cvReleaseImageHeader'
/root/catkin_ws/src/vision_opencv-fuerte-devel/cv_bridge/include/cv_bridge/CvBridge.h:77: undefined reference to `cvReleaseImage'
/root/catkin_ws/src/vision_opencv-fuerte-devel/cv_bridge/include/cv_bridge/CvBridge.h:72: undefined reference to `cvReleaseImageHeader'
/root/catkin_ws/src/vision_opencv-fuerte-devel/cv_bridge/include/cv_bridge/CvBridge.h:77: undefined reference to `cvReleaseImage'
CMakeFiles/stereo_view.dir/src/nodes/stereo_view.cpp.o: In function `~Mat':
/usr/local/include/opencv2/core/mat.hpp:278: undefined reference to `cv::fastFree(void*)'
/usr/local/include/opencv2/core/mat.hpp:278: undefined reference to `cv::fastFree(void*)'
CMakeFiles/stereo_view.dir/src/nodes/stereo_view.cpp.o: In function `~Mat_':
/usr/local/include/opencv2/core/mat.hpp:367: undefined reference to `cv::Mat::deallocate()'
CMakeFiles/stereo_view.dir/src/nodes/stereo_view.cpp.o: In function `~Mat':
/usr/local/include/opencv2/core/mat.hpp:367: undefined reference to `cv::Mat::deallocate()'
/usr/local/include/opencv2/core/mat.hpp:367: undefined reference to `cv::Mat::deallocate()'
CMakeFiles/stereo_view.dir/src/nodes/stereo_view.cpp.o: In function `StereoView::saveImage(char const*, cv::Mat const&)':
/root/catkin_ws/src/image_pipeline-electric/image_view/src/nodes/stereo_view.cpp:499: undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
/root/catkin_ws/src/image_pipeline-electric/image_view/src/nodes/stereo_view.cpp:499: undefined reference to `cv::imwrite(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)'
CMakeFiles/stereo_view.dir/src/nodes/stereo_view.cpp.o: In function `CvBridge':
/root/catkin_ws/src/vision_opencv-fuerte-devel/cv_bridge/include/cv_bridge/CvBridge.h:66: undefined reference to `cvCreateImageHeader'
/root/catkin_ws/src/vision_opencv-fuerte-devel/cv_bridge/include/cv_bridge/CvBridge.h:66: undefined reference to `cvCreateImageHeader'
CMakeFiles/stereo_view.dir/src/nodes/stereo_view.cpp.o: In function `StereoView':
/root/catkin_ws/src/image_pipeline-electric/image_view/src/nodes/stereo_view.cpp:377: undefined reference to `cv::namedWindow(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
/root/catkin_ws/src/image_pipeline-electric/image_view/src/nodes/stereo_view.cpp:378: undefined reference to `cv::namedWindow(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
/root/catkin_ws/src/image_pipeline-electric/image_view/src/nodes/stereo_view.cpp:379: undefined reference to `cv::namedWindow(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
/root/catkin_ws/src/image_pipeline-electric/image_view/src/nodes/stereo_view.cpp:380: undefined reference to `cvSetMouseCallback'
/root/catkin_ws/src/image_pipeline-electric/image_view/src ...
I don't understand why if you are in groovy the compilation process is made in electric/fuerte (see the file path in each error e.g. "vision_opencv-FUERTE-devel"). Have you checked out the git branch to groovy?
Because I have problem using catkin_make, catkin_make cannot find groovy package in source folder. I asked a question about that before, this is the link http://answers.ros.org/question/54539/help-with-catkin_make-on-an-arm/. However, the problem haven't solved. That's why I use rosmake instead.