Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined reference error while building #737

Closed
zippyzoo77 opened this issue Mar 29, 2022 · 3 comments
Closed

Undefined reference error while building #737

zippyzoo77 opened this issue Mar 29, 2022 · 3 comments

Comments

@zippyzoo77
Copy link

zippyzoo77 commented Mar 29, 2022

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!

@matlabbe
Copy link
Member

Which OctoMap version have you installed? ros-noetic-octomap?

@matlabbe
Copy link
Member

matlabbe commented Jan 27, 2023

On Noetic, another cause is that both liboctomap-dev and ros-noetic-octomap may be installed at the same time (some ros packages depend on the system version, and others on the noetic version). Cleanup rtabmap's build directory, make sure you sourced /opt/ros/noetic/setup.bash and redo cmake/make. Rtabmap's cmake should find the version in /opt/ros/noetic first, thus it will work with ros-noetic-octomap-msgs used by rtabmap_ros, and the undefined reference error won't show up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants