ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

librospack not found when cross-compiling

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

baxelrod gravatar image

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

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_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


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/
/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/ 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 is not being compiled with the embedded target compiler?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

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

tfoote gravatar image

There are now instructions for cross compiling ROS using Open Embedded:

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


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

Seen: 567 times

Last updated: Dec 24 '14