moveit / warehouse_ros_mongo

Implementation of warehouse_ros using MongoDB
17 stars 33 forks source link

Problems with building on Nvidia Jetson #69

Closed Serafadam closed 3 years ago

Serafadam commented 3 years ago

Hi, I tried to build this package on Nvidia Xavier Jetson (in my Galactic Docker container), and there were some errors:

--- stderr: warehouse_ros_mongo                                                                                                                                                                                 
/usr/bin/ld: CMakeFiles/test_warehouse_ros_mongo_cpp.dir/test/test_warehouse_ros_mongo.cpp.o: undefined reference to symbol '_ZN5boost6system15system_categoryEv'
//usr/lib/aarch64-linux-gnu/libboost_system.so.1.65.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [test_warehouse_ros_mongo_cpp] Error 1
make[1]: *** [CMakeFiles/test_warehouse_ros_mongo_cpp.dir/all] Error 2
make: *** [all] Error 2

I managed to fix it by adding some linking in CMakeLists.txt:

target_link_libraries(${PROJECT_NAME} ${Boost_FILESYSTEM_LIBRARY})
target_link_libraries(${PROJECT_NAME} ${Boost_SYSTEM_LIBRARY})
target_link_libraries(${PROJECT_NAME} ${Boost_THREAD_LIBRARY})

I can make a PR with those changes, I guess this doesn't really affect other builds.

henningkayser commented 3 years ago

@Serafadam thanks for the heads-up! I don't see Boost getting linked against the library anywhere. Could you try adding Boost to the existing ament_target_dependencies(${PROJECT_NAME} ...) and see if that fixes your issue?

@tylerjw do you think it would make sense to introduce a variable for ConfigExtras.cmake that provides all dependencies imported by it? That way things like this might not get lost so easily.

Serafadam commented 3 years ago

Hi, this also works :slightly_smiling_face:

henningkayser commented 3 years ago

Great! Would you mind preparing a PR for this?

Serafadam commented 3 years ago

Sure, here it is https://github.com/ros-planning/warehouse_ros_mongo/pull/70

henningkayser commented 3 years ago

Thanks, @Serafadam!