cross compilation of groovy using catkin: librospack.so not found
Hi,
I am trying to cross compile ROS groovy on a x86_64 machine for an atom 32 bit system. I got my toolchain file setup, cross-compiled the dependencies (log4cxx, poco), created a catkin workspace with
wstool init src -j8 http://packages.ros.org/web/rosinstall/generate/raw/groovy/robot
and finally started compiling the system with
./src/catkin/bin/catkin_make_isolated --install --cmake-args -DCMAKE_TOOLCHAIN_FILE=/mytoolchain_file
Here is when everything starts breaking apart:
<== Finished processing package [45 of 100]: 'rosconsole'
==> Processing catkin package: 'pluginlib'
==> Building with env: '/home/maierd/ros/ros_catkin_ws/install_isolated/env.sh'
==> cmake /home/maierd/ros/ros_catkin_ws/src/pluginlib -DCATKIN_DEVEL_PREFIX=/home/maierd/ros/ros_catkin_ws/devel_isolated/pluginlib -DCMAKE_INSTALL_PREFIX=/home/maierd/ros/ros_catkin_ws/install_isolated -DCMAKE_TOOLCHAIN_FILE=/home/maierd/cross/groovy/toolchain
-- Using CATKIN_DEVEL_PREFIX: /home/maierd/ros/ros_catkin_ws/devel_isolated/pluginlib
-- Using CMAKE_PREFIX_PATH: /home/maierd/ros/ros_catkin_ws/install_isolated
-- This workspace overlays: /home/maierd/ros/ros_catkin_ws/install_isolated
-- Found gtest: gtests will be built
-- Using CATKIN_TEST_RESULTS_DIR: /home/maierd/ros/ros_catkin_ws/build_isolated/pluginlib/test_results
-- catkin 0.5.65
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_TOOLCHAIN_FILE
...
make[2]: Entering directory `/home/maierd/ros/ros_catkin_ws/build_isolated/pluginlib'
Linking CXX executable CMakeFiles/CMakeRelink.dir/plugin_tool
/usr/bin/cmake -E cmake_link_script CMakeFiles/plugin_tool.dir/relink.txt --verbose=1
/home/maierd/cross/linux64-nao-atom-cross-toolchain-1.14.3/cross/bin/i686-aldebaran-linux-gnu-g++ --sysroot /home/maierd/cross/linux64-nao-atom-cross-toolchain-1.14.3//sysroot/ -pipe -fomit-frame-pointer -fno-align-jumps -fno-align-functions -fno-align-labels -fno-align-loops -m32 -mtune=generic -DOE_CROSS_BUILD -g -Wl,--sysroot,/home/maierd/cross/linux64-nao-atom-cross-toolchain-1.14.3//sysroot/ CMakeFiles/plugin_tool.dir/src/plugin_tool.cpp.o -o CMakeFiles/CMakeRelink.dir/plugin_tool -rdynamic -L/media/external/ros/groovy-atom-1.14.3/ros-deps/lib /home/maierd/ros/ros_catkin_ws/install_isolated/lib/libclass_loader.so /home/maierd/cross/linux64-nao-atom-cross-toolchain-1.14.3/sysroot/usr/lib/libboost_thread-mt.so /media/external/ros/groovy-atom-1.14.3/ros-deps/lib/libPocoFoundationd.so /home/maierd/cross/linux64-nao-atom-cross-toolchain-1.14.3/sysroot/usr/lib/libdl.so /home/maierd/ros/ros_catkin_ws/install_isolated/lib/libconsole_bridge.so /home/maierd/cross/linux64-nao-atom-cross-toolchain-1.14.3/sysroot/usr/lib/libboost_system-mt.so /home/maierd/ros/ros_catkin_ws/install_isolated/lib/librosconsole.so /home/maierd/cross/linux64-nao-atom-cross-toolchain-1.14.3/sysroot/usr/lib/libboost_regex-mt.so /media/external/ros/groovy-atom-1.14.3/ros-deps/lib/liblog4cxx.so /home/maierd/ros/ros_catkin_ws/install_isolated/lib/libcpp_common.so /home/maierd/ros/ros_catkin_ws/install_isolated/lib/librostime.so /home/maierd/cross/linux64-nao-atom-cross-toolchain-1.14.3/sysroot/usr/lib/libboost_date_time-mt.so /home/maierd/ros/ros_catkin_ws/install_isolated/lib/libroslib.so /home/maierd/cross/linux64-nao-atom-cross-toolchain-1.14.3/sysroot/usr/lib/libboost_filesystem-mt.so /home/maierd/cross/linux64-nao-atom-cross-toolchain-1.14.3/sysroot/usr/lib/libboost_system-mt.so -ltinyxml /home/maierd/ros/ros_catkin_ws/install_isolated/lib/librosconsole.so /home/maierd/cross/linux64-nao-atom-cross-toolchain-1.14.3/sysroot/usr/lib/libboost_regex-mt.so /media/external/ros/groovy-atom-1.14.3/ros-deps/lib/liblog4cxx.so /home/maierd/ros/ros_catkin_ws/install_isolated/lib/libcpp_common.so /home/maierd/ros/ros_catkin_ws/install_isolated/lib/librostime.so /home/maierd/cross/linux64-nao-atom-cross-toolchain-1.14.3/sysroot/usr/lib/libboost_date_time-mt.so /home/maierd/ros/ros_catkin_ws/install_isolated/lib/libroslib.so /home/maierd/cross/linux64-nao-atom-cross-toolchain-1.14.3/sysroot/usr/lib/libboost_filesystem-mt.so -ltinyxml
/home/maierd/cross/linux64-nao-atom-cross-toolchain-1.14.3/cross/bin/../lib/gcc/i686-aldebaran-linux-gnu/4.5.3/../../../../i686-aldebaran-linux-gnu ...
The downstream packages should not need to know about the dependency of roslib on rospack, so adding it there is not the right way to solve it. libroslib.so is linked against librospack.so and by default using rpath information. Is your build moving the libraries at some point?
I am just following the instructions from here: http://ros.org/wiki/groovy/Installation/Source. I am not moving anything manually. Is there anything I can do to (help) debug this problem? readelf -d ./install_isolated/lib/libroslib.so shows no RPATH entry. However, neither does readelf -d /opt/ros/groovy/lib/libroslib.so (and I installed this one via apt-get) or my natively (i.e. without cross-compilation) built libroslib.so.