Compilation error building against binary Bouncy: could not find FastRTPS
I'm building a few packages against the new Bouncy release and I'm seeing a difference between a binary installation and another one from source. Namely, when I source the installation from source my package builds normally, but when I source the binary one it hits an error. I'm on Ubuntu 18.04.
The error happens in a call to rosidl_generate_interfaces
:
rosidl_generate_interfaces(${PROJECT_NAME}
msg/Test.msg
srv/Test.srv
DEPENDENCIES std_msgs)
The error is:
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find FastRTPS (missing: FastRTPS_INCLUDE_DIR FastRTPS_LIBRARIES) Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/opt/ros/bouncy/share/fastrtps_cmake_module/cmake/Modules/FindFastRTPS.cmake:95 (find_package_handle_standard_args)
/opt/ros/bouncy/share/rmw_fastrtps_cpp/cmake/rmw_fastrtps_cpp-extras.cmake:20 (find_package)
/opt/ros/bouncy/share/rmw_fastrtps_cpp/cmake/rmw_fastrtps_cppConfig.cmake:30 (include)
/opt/ros/bouncy/share/rmw_implementation_cmake/cmake/call_for_each_rmw_implementation.cmake:61 (find_package)
/opt/ros/bouncy/share/rosidl_generator_py/cmake/rosidl_generator_py_get_typesupports.cmake:26 (call_for_each_rmw_implementation)
/opt/ros/bouncy/share/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake:27 (rosidl_generator_py_get_typesupports) /opt/ros/bouncy/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake:38 (include)
/opt/ros/bouncy/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:169 (ament_execute_extensions)
CMakeLists.txt:69 (rosidl_generate_interfaces)
My sources can be found at https://github.com/ada-ros. The package causing the error is rosidl_generator_ada. It's quite possible I'm doing something wrong in the CMakeLists.txt/package.xml because I'm not entirely confident on my understanding of ROS2 dependency tags. Thanks for any help.
For what is worth, after converting all the packages to ament_make build type, the error has gone away
Also I've prepared a small reproducer with the default output of
ros2 pkg create
. I've only added the minimal dependencies from my own package to reproduce the error. Here it is: https://github.com/mosteo/ros2_testcasesPlease post your exact steps to reproduce your problem (without the need to guess what you are actually doing in which order).
From a brief look the example package doesn't declare the dependencies in the package manifest. See https://github.com/ros2/common_interf... for an example package with messages.
Are you using
colcon
? If so, does the error persist after upgrading it?@DirkThomas, I thought the .xml file wouldn't affect the compilation driven by CMake, if there are missing dependencies there that would be a real mistake on my part. The real case had all dependencies (I think). Adding the ones in your example to this testcase didn't help. Steps I followed: (cont.)
Man, these comments are not the best! Anyway:
I just updated the testcase to add the deps in the xml, and (...)