librospack not found when cross-compiling
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?