Undefined reference error while building
I am trying to update my version of rtabmap to the current one on Ubuntu 20.04 with ros noetic. While following the instructions below from here:
############ rtabmap ###########
$ cd rtabmap
$ git pull origin master
$ cd build
$ make #<-- This is where I get the error
$ make install # Do "sudo make install" if you installed rtabmap in "/usr/local"
############ rtabmap_ros###########
$ roscd rtabmap_ros
$ git pull origin master
$ roscd
$ cd ..
$ catkin_make -j1 --pkg rtabmap_ros
At the indicated point, I end up with the following error:
(base) zippyzoo77@MountainLion:~/rtabmap/build$ make
[ 4%] Built target rtabmap_utilite
[ 5%] Built target res_tool
[ 42%] Built target rtabmap_core
[ 80%] Built target rtabmap_gui
[ 81%] Linking CXX executable ../../bin/rtabmap
/usr/bin/ld: ../../bin/librtabmap_core.so.0.20.19: undefined reference to `octomath::Pose6D::Pose6D(octomath::Pose6D const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [app/src/CMakeFiles/rtabmap.dir/build.make:243: bin/rtabmap] Error 1
make[1]: *** [CMakeFiles/Makefile2:993: app/src/CMakeFiles/rtabmap.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
I have done all the proper steps and have octomap installed, so I really don't know what could be causing this error. Any help on debugging this so I can get rtabmap up and working would be greatly appreciated. Thanks!
I also get this warning (for over a dozen libraries in the same location) during a previous install step, which I think may be at the root of the problem. What could cause my installation of ROS to be doing this to my files, and how can I fix this?
CMake Warning at examples/NoEventsExample/CMakeLists.txt:64 (ADD_EXECUTABLE):
Cannot generate a safe runtime search path for target noEventsExample
because files in some directories may conflict with libraries in implicit
directories:
runtime library [liboctomap.so.1.9] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/noetic/lib
runtime library [liboctomath.so.1.9] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/noetic/lib
Some of these libraries may not be found correctly.
hey, if your create the workspace it is
catkin_make
or not?Eventually it is catkin_make yes, but that's not where I was running into trouble. I still don't know what was causing this, I eventually ended up just completely uninstalling rtabmap and reinstalling it.