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

Revision history [back]

click to hide/show revision 1
initial version

Right now I'm just replacing the RPATH prefixes in the freshly created binaries by this little script which is part of the deployment. call it this way

> script /path/to/ros_node1 /path/to/ros_node2

and your executables will be replaced with new rpaths.

SEARCH_PATH="/home/phil/ros/cturtle"
REPLACE_PATH="/opt/ros/cturtle"

which chrpath > /dev/null
if [ $? != 0 ]; then
    echo "Couldn't find the program 'chrpath'. Maybe it's existant but not found in the PATH searchpath"
    echo "exit..."
    exit 1
fi

if [ $# -lt 1 ]; then
    echo "Please specifiy a list of files which you want to work on..."
    echo "e.g: \$ replace_rpath program1 program2"
    exit 1
fi

for FILE in $@ ; do
    echo "-- Preparing $FILE"
    if [ ! -e "$FILE" ] || [ ! -f "$FILE" ]; then
            echo "'$FILE' is either not a file or doesn't exist!"
    else
            chrpath -l $FILE  | sed -e "s+.*=++g" -e "s+${SEARCH_PATH}+${REPLACE_PATH}+g" | xargs -I {} chrpath -r {} $FILE
            if [ $? != 0 ]; then
                    echo "chrpath failed!"
            fi
    fi
done

Not nice, but at least a starting point. I'm still looking forward for other - not so brutal - solutions.