Ask Your Question
0

Failed package compiles: can't find opencv on debian (ros electric)

asked 2011-09-28 22:44:10 -0500

Joris gravatar image

updated 2014-01-28 17:10:27 -0500

ngrennan gravatar image

Hi,

I'm trying to compile ccny_vision/ar_pose and other packages that require opencv, on my amd64 Debian system. I have compiled and installed the latest stable opencv release via svn. I've tinkered with CMakeLists.txt and manifest.xml of the packages I've been trying to compile, and looked through a bunch of other files. But in the end I still get an error of this type:

mkdir -p bin cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=rospack find rosbuild/rostoolchain.cmake ..
[rosbuild] Building package cv_bridge [rosbuild] Cached build flags older than manifests; calling rospack to get flags Failed to invoke /home/joris/ros/ros/bin/rospack cflags-only-I;--deps-only cv_bridge
Package opencv-2.3.1 was not found in the pkg-config search path. Perhaps you should add the directory containing opencv-2.3.1.pc' to the PKG_CONFIG_PATH environment variable
No package 'opencv-2.3.1' found
[rospack] warning: got non-zero exit status from executing backquote expression "ret="
pkg-config opencv-2.3.1 --cflags`" && echo $ret" in [/home/joris/ros/vision_opencv/opencv2/manifest.xml] [rospack] error in backquote expansion for cv_bridge

Any help would be appreciated. Perhaps A simple howto about how to find and include OpenCV from ROS packages (including non electric-updated ones) for people like me who aren't familiar with the ROS / cmake linking process, would be a good idea too...

Joris

edit retag flag offensive close merge delete

Comments

you should probably take a look at the opencv package: http://www.ros.org/wiki/opencv2
Bram van de Klundert gravatar image Bram van de Klundert  ( 2011-09-29 23:14:11 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2011-10-02 22:59:18 -0500

Joris gravatar image

Ok, so I have worked my way around this issue, and although I have come to an interim conclusion about this (more below) I do not think that I have a definitive answer to my question that puts the problem into perspective...

It seems to me that "rosdep install" (or the "--rosdep-install" option for rosmake) should not be relied upon if your system is ``experimental'' - e.g. Debian or Ubuntu armel.

You may be lucky and the scripts may resolve dependencies into the correct packages for your system, where they exist.

But if you get a dependency error from rosdep and you're on an "experimental" system, abandon "--rosdep-install", build the libraries/packages you need from source or install from backports, and try building your ROS package again using rosmake, leaving out the rosdep step/option. Ignore warnings (for the moment, at least), and if your package installs without errors, you should be set. If you get errors about dependencies that you are sure you built and/or installed, then I have one more silverish bullet, which is to ensure the ".pc" file for your library/package is in the pkg-config path with .pc files (in my case, "/usr/local/lib/pgkconfig/").

Sometimes the ROS package might be looking for a particular .pc filename, like "opencv-2.3.pc", when your build of opencv 2.3 only placed a "opencv.pc" file there. Then, my solution is to create a symbolic link, in this case from "opencv.pc" to "opencv-2.3.pc" in the relevant pkgconfig path.

Hope this helps someone!

edit flag offensive delete link more

Comments

Naturally, experimental systems are less well-integrated. But don't over-generalize. There are OSX users actively working to fix broken rosdep issues as they find them. The approach you recommend does nothing to make ROS work better on Debian.

joq gravatar image joq  ( 2012-04-17 12:14:17 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2011-09-28 22:44:10 -0500

Seen: 1,927 times

Last updated: Apr 17 '12