libbondcpp.so: undefined reference to core ROS functions & packages error
Hello, while compiling my catkin_ws I am encountering this issue while trying to build zed_wrapper_node. Libbondcpp from what I understand is a core ROS pre-compiled library which should always be recognized, along with the NodeHandle and SteadyTimer instances, indicating there is something wrong with my ROS setup. However, all of my other packages are compiling just fine, and they definitely also reference these same files, so I'm stumped. I'm running Kinetic, Ubuntu 16.04, Cuda 10.0, ZED SDK 3.0.1, and an NVIDIA GTX750ti with driver version 430.64. gcc version 6.5.0
The build log:
[ 91%] Built target amcl
[ 92%] Built target robot_pose_ekf
[ 92%] Built target test_robot_pose_ekf
[ 92%] Built target ros_filter_utilities
[ 92%] Built target ublox_gps
[ 92%] Built target geoconv
[ 92%] Built target filter_utilities
[ 92%] Built target collada_to_urdf
[ 92%] Built target urg_c_wrapper
[ 92%] Built target kdl_parser
[ 93%] Linking CXX executable /home/monarch/catkin_ws/devel/lib/zed_wrapper/zed_wrapper_node
[ 95%] Built target record
[ 95%] Built target collada_parser_plugin
[ 95%] Built target collada_urdf
[ 95%] Built target play
[ 95%] Built target navsat_transform
[ 95%] Built target filter_base
[ 95%] Built target costmap_2d
[ 96%] Built target ublox_gps_node
[ 96%] Built target check_kdl_parser
[ 96%] Built target getID
[ 97%] Built target urg_node
[ 97%] Built target ekf
[ 97%] Built target ukf
[ 97%] Built target navsat_transform_node
[ 97%] Built target urdf_to_collada
[ 98%] Built target costmap_2d_cloud
[ 98%] Built target costmap_2d_markers
[ 98%] Built target layers
[ 98%] Built target costmap_2d_node
[ 98%] Built target localization
[ 98%] Built target ros_filter
[ 98%] Built target clear_costmap_recovery
[ 98%] Built target point_grid
[ 98%] Built target move_slow_and_clear
[ 98%] Built target navfn
[ 98%] Built target ekf_localization_node
[ 98%] Built target move_base
[ 98%] Built target ukf_localization_node
[100%] Built target base_local_planner
[100%] Built target navtest
[100%] Built target move_base_node
/opt/ros/kinetic/lib/libbondcpp.so: undefined reference to `ros::NodeHandle::createSteadyTimer(ros::WallDuration, boost::function<void (ros::SteadyTimerEvent const&)> const&, bool, bool) const'
/opt/ros/kinetic/lib/libbondcpp.so: undefined reference to `ros::SteadyTimer::setPeriod(ros::WallDuration const&, bool)'
/opt/ros/kinetic/lib/libbondcpp.so: undefined reference to `ros::SteadyTimer::~SteadyTimer()'
/opt/ros/kinetic/lib/libbondcpp.so: undefined reference to `ros::SteadyTimer::stop()'
collect2: error: ld returned 1 exit status
[100%] Built target navfn_node
zed-ros-wrapper/zed_wrapper/CMakeFiles/zed_wrapper_node.dir/build.make:152: recipe for target '/home/monarch/catkin_ws/devel/lib/zed_wrapper/zed_wrapper_node' failed
make[2]: *** [/home/monarch/catkin_ws/devel/lib/zed_wrapper/zed_wrapper_node] Error 1
CMakeFiles/Makefile2:62021: recipe for target 'zed-ros-wrapper/zed_wrapper/CMakeFiles/zed_wrapper_node.dir/all' failed
make[1]: *** [zed-ros-wrapper/zed_wrapper/CMakeFiles/zed_wrapper_node.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[100%] Built target global_planner
[100%] Built target trajectory_planner_ros
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j8 -l8" failed
My Cmakelists for zed_ros_wrapper:
cmake_minimum_required(VERSION 2.8.7)
project(zed_wrapper)
# if CMAKE_BUILD_TYPE is not specified, take 'Release' as default
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE Release)
ENDIF(NOT CMAKE_BUILD_TYPE)
function(checkPackage package customMessage)
set(varName "${package}_FOUND")
if (NOT "${${varName}}")
string(REPLACE "_" "-" aptPackage ${package})
if("${customMessage}" STREQUAL "")
message(FATAL_ERROR "\n\n ${package} is missing, please try to install it with:\n sudo apt-get install ros- ...
Sorry I should have commented on the question and not the answer.
OK so there is no reason for this to not work as you have the last version of everything.
It is a bit hard to debug your issue as there are many moving parts (CUDA, proprietary SDK, many packages unrelated to ZED in you workspace lie move_base).
Could you confirm that you have the same error building a simple workspace with a nodelet. like
The goal is to figure out if you ...(more)
I do not have the same error, it builds without issue. Sorry for not responding sooner, didn't see this comment.
Ok good news. Now can you try the same with a workspace with ONLY the zed-ros-wrapper in it ? and edit you original question with the full build output?
I created catkin_new, made src, cloned the git, and IT COMPILED adding the full build output.
OK, so I took the new workspace, and started adding necessary folders from my previous workspace until it broke. The issue is that it isn't breaking consistently, which is preventing me from troubleshooting effectively.
does it also break if you build your workspace in isolation ? (using
catkin_make_isolated
)A workaround is to keep the working version of the zed wrapper in a workspace and build all your stuff in another workspace this way you don't mix or rebuild the one that works
Yes it does also break if I build it that way. I am now attempting to build just the zed_wrapper in one folder as I did before and the rest in another, and the zed_wrapper is failing in the same manner as before:
So I went to confirm that in our building the nodelet on its own beforehand wasn't causing some strange magic to occur, so I refollowed all the steps (cleaned up that tmp_ws, remade and compiled it), then made another new catkin_ws, and followed the steps for the zed_wrapper but it still isn't compiling.