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

librospack not found when cross-compiling

asked 2012-05-17 06:11:23 -0500

baxelrod gravatar image

updated 2012-05-21 04:09:53 -0500

I am having trouble cross compiling ros for the Gumstix (overoevm). I am using ROS Electric. I am using a slightly custom distribution named commonos which is based on OpenEmbedded. I have all my dependencies installed for my target (libboost, lib4cxx, etc.)

my custom rostoolchain cmake file looks like this:

set(TOOLCHAIN_FAMILY "commonos")
set(TOOLCHAIN_TUPLE "arm-commonos-linux-gnueabi" CACHE STRING "Toolchain signature identifying cpu-vendor-platform-clibrary.")
set(TOOLCHAIN_SYSROOT "/opt/commonos/commonos-14_1/overoevm/arm-commonos-linux-gnueabi" CACHE STRING "Root of the target development environment (libraries, headers etc).")
set(TOOLCHAIN_INSTALL_PREFIX "/opt/commonos/commonos-14_1/overoevm/arm-commonos-linux-gnueabi"  CACHE STRING "Where to install headers/libraries etc).")

set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm-commonos-linux-gnueabi)
set(CMAKE_C_COMPILER   /opt/commonos/commonos-14_1/overoevm/bin/arm-commonos-linux-gnueabi-gcc) # Make sure these are in your PATH
set(CMAKE_CXX_COMPILER /opt/commonos/commonos-14_1/overoevm/bin/arm-commonos-linux-gnueabi-g++)
set(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN_SYSROOT} CACHE STRING "Cmake search variable for finding libraries/headers.")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # Don't search for programs in sysroot
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)  # Headers and libs from sysroot only
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

MARK_AS_ADVANCED(CMAKE_GENERATOR CMAKE_FIND_ROOT_PATH CMAKE_TOOLCHAIN_FILE TOOLCHAIN_FAMILY TOOLCHAIN_TUPLE TOOLCHAIN_SYSROOT)

Then, when I do:

rostoolchain select commonos/arm-commonos-linux-gnueabi
rosplatform select commonos/overo
rosprotect --unprotect --comms
rosprotect --pre-clean --comms

I get this error:

...
Linking CXX shared library ../lib/libroslib.so
/opt/commonos/commonos-14_1/overoevm/bin/../lib/gcc/arm-commonos-linux-gnueabi/4.5.3/../../../../arm-commonos-linux-gnueabi/bin/ld: skipping incompatible /opt/ros/electric/ros/tools/rospack/lib/librospack.so when searching for -lrospack
/opt/commonos/commonos-14_1/overoevm/bin/../lib/gcc/arm-commonos-linux-gnueabi/4.5.3/../../../../arm-commonos-linux-gnueabi/bin/ld: cannot find -lrospack
collect2: ld returned 1 exit status
...
[ rosmake ] Cleaned 12 Packages.                                                                             
[ rosmake ] Built 7 packages with 1 failures.

So I guess librospack.so is not being compiled with the embedded target compiler?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2014-12-24 11:27:15 -0500

tfoote gravatar image

There are now instructions for cross compiling ROS using Open Embedded: http://wiki.ros.org/hydro/Installatio...

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-05-17 06:11:23 -0500

Seen: 606 times

Last updated: Dec 24 '14