[ros-users] cross-compiling self_test fails

Daniel Maier maierd at informatik.uni-freiburg.de
Wed Apr 13 12:52:57 UTC 2011


Hi!

I am trying to cross-compile ROS (diamondback) for the Nao (again) in a  
32-bit ubuntu maverick chroot environment.
However, something seems to go wrong.
I have rostoolchain.cmake setup to include to the cross-compilation  
toolchain file provided by Aldebaran,
and manually set CMAKE_FIND_ROOT_PATH to point to the cross-compilation  
toolchain directories.

The ros base system builds without errors, however when I try to compile  
the package:

[ self_test ]

I receive the linker error:
/usr/lib/libboost_regex-mt.so: undefined reference to  
`std::ctype<char>::_M_widen_init() const at GLIBCXX_3.4.11'
collect2: ld returned 1 exit status


I think this problem is that ros tries to link to my local boost version  
instead of the one provided by Aldebaran.
More sepecific, I think the problem is that the file
CMakeFiles/selftest_rostest.dir/link.txt
contains the passage
-Wl,-rpath,/usr/lib

If I delete that part from the file, I can compile self_test, but it gets  
overwritten once I call rosmake again.
The passage is also in
test/CMakeFiles/error_selftest.dir/link.txt
test/CMakeFiles/no_id_selftest.dir/link.txt
test/CMakeFiles/nominal_selftest.dir/link.txt
test/CMakeFiles/exception_selftest.dir/link.txt

and I think it is somehow automatically generated by the  
rosbuild_add_gtest_build_flags line (or something like that).
However, I was unable to find the macro/script which generates this  
dependency.

Can someone help me out on this and either provide a patch or tell me what  
I am potentially doing wrong?

Thanks!
Dan



More information about the ros-users mailing list