Building FastRTPS fails, because of an error in foonathan_memory_vendor when cross-compiling for armhf [closed]

asked 2019-10-17 03:50:33 -0600

MCornelis gravatar image

When I try to cross-compile the current master version of ROS2 (eloquent freeze tomorrow) for armhf, I get the following error:

--- stderr: foonathan_memory_vendor
Cloning into 'foo_mem-ext'...
Already on 'master'
Submodule 'cmake/comp' ( registered for path 'cmake/comp'
Cloning into '/ros2_ws/build/foonathan_memory_vendor/foo_mem-ext-prefix/src/foo_mem-ext/cmake/comp'...
CMake Warning at src/CMakeLists.txt:86 (message):
  cannot generate container_node_sizes_impl.hpp, node size information will
  be unavailable

Which would not be too bad, except for the fact that FastRTPS needs the node size

--- stderr: fastrtps
In file included from /ros2_ws/src/eProsima/Fast-RTPS/src/cpp/rtps/reader/WriterProxy.h:32,
                 from /ros2_ws/src/eProsima/Fast-RTPS/src/cpp/rtps/reader/WriterProxy.cpp:22:
/ros2_ws/install/include/foonathan_memory/foonathan/memory/container.hpp:376:31: error: expected template-name before ‘<’ token
         : shared_ptr_node_size<T, std_allocator<T, RawAllocator, Mutex>>
      ... etc etc. 
make[2]: *** [src/cpp/CMakeFiles/fastrtps.dir/build.make:388: src/cpp/CMakeFiles/fastrtps.dir/rtps/reader/WriterProxy.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:987: src/cpp/CMakeFiles/fastrtps.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
Failed   <<< fastrtps   [ Exited with code 2 ]

thus this breaks my install. The above error occurs when I build on top of debian:buster with the following CMake toolchain:


set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)
set(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-psabi")


set(PYTHON_SOABI cpython-37m-arm-linux-gnueabihf)


The build does succeed when I cross-compile Dashing (no foonathan_memory_vendor there yet). I also made a dockerfile that builds master (eloquent) on top of Ubuntu 18.04 and that worked fine, which makes me think this is a master (eloquent) armhf cross-compile issue only.

Does anyone else run into this problem (and did you manage to fix this)? I am also OK with using a work-around for the time being. If I can somehow manually provide container_node_sizes_impl.hpp or provide foonathan_memory in some other way to the image, I can at least do some tests, until this issue is resolved.

I am aware that the foonathan_memory_vendor is actually the responsibility of eProsima, but because FastRTPS is the default ROS2 DDS vendor I assumed it was ok to ask this here.

If I am supposed to contact eProsima directly, please let me know how and where to do this.

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by MCornelis
close date 2019-10-17 04:43:05.258691


I also opened an issue on the eProsima github for this here:

MCornelis gravatar image MCornelis  ( 2019-10-17 03:58:37 -0600 )edit

I understand why you did it, but could you please not cross-post the same issue 5 mins after you've posted it here? Choose one venue, post it there and allow maintainers/members time to respond.

Cross-posting leads to split discussions in the best case, wasted (ie: duplicated) effort in most cases.

gvdhoorn gravatar image gvdhoorn  ( 2019-10-17 04:04:15 -0600 )edit

Whoops my bad. I do think however that it is easier to find people with the same problem here. Whereas just posting the issue on the github will most likely only get the attention of the maintainer. Should I close the issue here or on the github? I did also mention this ROS answers question on the issue, to make people aware of both places.

MCornelis gravatar image MCornelis  ( 2019-10-17 04:07:19 -0600 )edit

I believe you'll have better luck -- for now -- on the eProsima tracker. So close this one.

If/when it turns out that they cannot help you, you could re-open your post here on ROS Answers.

gvdhoorn gravatar image gvdhoorn  ( 2019-10-17 04:39:08 -0600 )edit