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

boost path when cross compiling

asked 2012-01-09 13:28:19 -0500

dougnets22 gravatar image

When cross-compiling for the Nao in http://www.ros.org/wiki/nao/Tutorials/Cross-Compiling should the boost path be set to the system's boost directory (i.e. /usr) or to some directory local to the location of the cross-compilation (i.e. /media/external/ros/electric/ros...)? If the latter, where should I be setting the path?

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
4

answered 2012-01-09 22:53:20 -0500

Stefan Osswald gravatar image

Alternatively, you could set the ROS_BOOST_ROOT and ROS_BOOST_VERSION environment variables:

// for naoqi 1.10.xx
export ROS_BOOST_ROOT="${CTC_DIR}/staging/geode-linux/usr"    
export ROS_BOOST_VERSION="1.38.0"

// for naoqi 1.12
export ROS_BOOST_ROOT="${CTC_DIR}/sysroot/usr"
export ROS_BOOST_VERSION="1.45.0"

Make sure that the version variable matches the boost library version in your cross-compilation toolchain and that

rosboost-cfg --lib_dir

actually returns the correct directory containing the boost libraries.

edit flag offensive delete link more
4

answered 2012-01-09 17:51:42 -0500

Daniel Stonier gravatar image

If you're cross compiling you absolutely don't want to use your natively compiled boost directories - i.e. do not use /usr!

You need to look for where your cross compiled boost libs are actually installed - usually this will be inside your toolchain. I notice from the wiki page you link to the instructions:

cp -r $CTC_USR_DIR/lib/libboost* $TARGETDIR/libs/

The short of it - $TARGETDIR/libs should be what he's attaching to LD_LIBRARY_PATH in setup.sh to find boosts's libs. Just make sure it's empty to begin with (notice the export LD_LIBRARY_PATH= # just to be sure just above) otherwise it will pick up your native libs. Is there another variable you are trying to set to help with boost?

Actually, hacking it this way is a bit ugly - cmake would be much better here.

For more details:

If you want to be absolutely sure you have the libs, have a look in $TARGETDIR/libs/. You should see libboost*.so in there. You can actually check that they're cross compiled by running file on the command - e.g. in my arm toolchain:

file libexpat.so.0.1.0
libexpat.so.0.1.0: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped
edit flag offensive delete link more
-1

answered 2012-07-23 18:57:55 -0500

ryann2k1 gravatar image

Hi, Thanks for the posting. Helped me move to the next stage of my installation for ros nao. But I come accross another problem which is missing tf in my ros compilation as my post at http://answers.ros.org/question/39587/missing-tf-after-compile-ros-for-cross-compile-ros/ Anyone please can direct the problem? Thank you

edit flag offensive delete link more

Comments

Please don't write a question or comment as "answer" to the original question. Either post a comment or open a new question.

AHornung gravatar image AHornung  ( 2012-07-23 22:43:25 -0500 )edit

I am sorry about that

ryann2k1 gravatar image ryann2k1  ( 2012-07-24 15:39:47 -0500 )edit

Question Tools

Stats

Asked: 2012-01-09 13:28:19 -0500

Seen: 1,105 times

Last updated: Jul 23 '12