| Note: This tutorial assumes that you have completed the previous tutorials: rosdep/Tutorials/How to add a system dependency. |
Add support for a new system dependency
Description: This will show you how to add support for a new system dependency.Tutorial Level:
Contents
Suppose, for example, that log4cxx was not already in a rosdep.yaml file in one of your stack dependencies, and you needed it in a package in your stack. In this scenario you would add (or append to) rosdep.yaml something like this:
log4cxx:
ubuntu:
9.04: liblog4cxx10-dev
8.10: |
if [ ! -f /opt/ros/lib/liblog4cxx.so.10 ] ; then
mkdir -p ~/ros/ros-deps
cd ~/ros/ros-deps
wget --tries=10 http://pr.willowgarage.com/downloads/apache-log4cxx-0.10.0-wg_patched.tar.gz
tar xzf apache-log4cxx-0.10.0-wg_patched.tar.gz
cd apache-log4cxx-0.10.0
./configure --prefix=/opt/ros
make
sudo make install
fi
8.04: |
if [ ! -f /opt/ros/lib/liblog4cxx.so.10 ] ; then
mkdir -p ~/ros/ros-deps
cd ~/ros/ros-deps
wget --tries=10 http://pr.willowgarage.com/downloads/apache-log4cxx-0.10.0-wg_patched.tar.gz
tar xzf apache-log4cxx-0.10.0-wg_patched.tar.gz
cd apache-log4cxx-0.10.0
./configure --prefix=/opt/ros
make
sudo make install
fi
debian:
sid: liblog4cxx10-dev
lenny: |
if [ ! -f /opt/ros/lib/liblog4cxx.so.10 ] ; then
mkdir -p ~/ros/ros-deps
cd ~/ros/ros-deps
wget --tries=10 http://pr.willowgarage.com/downloads/apache-log4cxx-0.10.0-wg_patched.tar.gz
tar xzf apache-log4cxx-0.10.0-wg_patched.tar.gz
cd apache-log4cxx-0.10.0
./configure --prefix=/opt/ros
make
sudo make install
fi
fedora: log4cxx-devel
arch: |
if ! pacman -Q log4cxx; then yaourt -S log4cxx; fi
macports: log4cxx
gentoo: ">=dev-libs/log4cxx-0.10"If a package name includes a special character (>, *), quote the line: gentoo: ">=dev-libs/log4cxx-0.10 app-shells/bash"
Best Practices
It is common to place shared dependencies in lower-level rosdep.yaml files in order to lock-in certain versions across a tree (e.g. boost). This strategy also helps prevent future incompatibilities.






