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

cross compilation of groovy using catkin: librospack.so not found

asked 2013-06-06 06:15:21 -0600

daniel_maier gravatar image

updated 2013-06-14 02:43:20 -0600

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 ...
(more)
edit retag flag offensive close merge delete

Comments

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?

Dirk Thomas gravatar image Dirk Thomas  ( 2013-06-10 07:47:07 -0600 )edit

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.

daniel_maier gravatar image daniel_maier  ( 2013-06-13 23:48:22 -0600 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2013-07-30 23:49:33 -0600

severin gravatar image

Hello Daniel,

I've spent a fair amount of time these last 2 days trying as well to cross-compile ROS for Nao.

I think your issue with roslib not finding rospack is due to the fact that the installation prefix of the various ros packages must be inside Nao's sysroot.

I've actually the same issue with log4cxx: many ROS packages fail to link because they do not find libapr, one of the dependency of log4cxx.

I could install correctly libapr in $sysroot (ie, configure with --prefix=/usr and install with make install DESTDIR=$sysroot), but I've not been able to compile libapr-util (they have a m4 macro to find libapr that is not too happy with sysroots).

How did you cross-compile log4cxx?

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-06-06 06:15:21 -0600

Seen: 1,707 times

Last updated: Jul 30 '13