Ask Your Question
0

Buildfarm - Failing to find dependencies

asked 2020-07-16 00:58:06 -0500

haditab gravatar image

I'm having trouble building a ros2 package on the buildfarm. It seems to be having issues finding the packages listed in CMakeLitst.txt. Error messages are as follows:

22:44:28 CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:567 (message):
22:44:28   Imported targets and dependency information not available for Boost version
22:44:28   (all versions older than 1.33)
22:44:28 Call Stack (most recent call first):
22:44:28   /usr/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
22:44:28   /usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
22:44:28   CMakeLists.txt:9 (find_package)
22:44:28 
22:44:28 
22:44:28 CMake Error at /usr/share/cmake-3.10/Modules/FindBoost.cmake:1947 (message):
22:44:28   Unable to find the requested Boost libraries.
22:44:28 
22:44:28   Unable to find the Boost header files.  Please set BOOST_ROOT to the root
22:44:28   directory containing Boost or BOOST_INCLUDEDIR to the directory containing
22:44:28   Boost's headers.
22:44:28 Call Stack (most recent call first):
22:44:28   CMakeLists.txt:9 (find_package)
22:44:28 
22:44:28 
22:44:28 CMake Error at CMakeLists.txt:10 (find_package):
22:44:28   By not providing "Findrcutils.cmake" in CMAKE_MODULE_PATH this project has
22:44:28   asked CMake to find a package configuration file provided by "rcutils", but
22:44:28   CMake did not find one.
22:44:28 
22:44:28   Could not find a package configuration file provided by "rcutils" with any
22:44:28   of the following names:
22:44:28 
22:44:28     rcutilsConfig.cmake
22:44:28     rcutils-config.cmake
22:44:28 
22:44:28   Add the installation prefix of "rcutils" to CMAKE_PREFIX_PATH or set
22:44:28   "rcutils_DIR" to a directory containing one of the above files.  If
22:44:28   "rcutils" provides a separate development package or SDK, be sure it has
22:44:28   been installed.

The full log is available here. My CMakeLists.txt file is as follows:

cmake_minimum_required(VERSION 3.5)
project(lgsvl_bridge)

if(NOT CMAKE_C_STANDARD)
  set(CMAKE_C_STANDARD 99)
endif()

find_package(ament_cmake REQUIRED)
find_package(Boost REQUIRED system)
find_package(rcutils REQUIRED)
find_package(rcl REQUIRED)

include_directories(${Boost_INCLUDE_DIRS})

add_executable(lgsvl_bridge
  src/bridge.cc
  src/client.cc
  src/clients.cc
  src/node.cc
  src/server.cc
  src/types.cc
)

target_link_libraries(lgsvl_bridge ${Boost_LIBRARIES} ${CMAKE_DL_LIBS})

ament_target_dependencies(lgsvl_bridge rcutils rcl)

install(TARGETS lgsvl_bridge DESTINATION bin)

ament_package()

Link to repo is here. I haven't been having any issues building locally so I'm having a hard time debugging this. Any help would be welcome.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-07-16 12:30:03 -0500

tfoote gravatar image

You're missing a dependency on rcutils. You have an <exec_depend> only currently which says that the package needs to be available at runtime but not at build time. Thus rcutils is not provided when you try to build the package.

You should probably be declaring <depends> to get it at buildtime and at runtime.

If you have it in your workspace at build time CMake will find it. The debian builds are strict about only provisioning your declared dependencies.

edit flag offensive delete link more

Comments

Thanks this worked for getting past that failure but I'm getting other failures with the same error but for ament_cmake_ros (example here). I can't get it to work similarly though. Actually even if I remove ament_cmake_ros from my package.xml and CMakeLists.txt it still fails with the same error on line 9 of CMakeLists.txt. It kind of seems like it's not pulling the new code I've pushed, is that the case? Also, is there a way to trigger that job manually? It seems to be triggered by system once at 11 PM.

haditab gravatar image haditab  ( 2020-07-20 12:13:42 -0500 )edit

If you have a new problem please ask a new question.

And the buildfarm is trying to build the latest released version into debian packages. If you want it to pick up your new changes you need to tag a new release and run bloom again to release the new version into the rosdistro.

tfoote gravatar image tfoote  ( 2020-07-20 15:00:28 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-07-16 00:57:03 -0500

Seen: 118 times

Last updated: Jul 16 '20