Compiling Rtabmap 0.20.0-noetic on NUC Ubuntu 20.04

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Compiling Rtabmap 0.20.0-noetic on NUC Ubuntu 20.04

seanxu112
Hello Mathieu,

I am trying to compile rtabmap on my new NUC with Ubuntu 20.04. I have installed libboost-all-dev, but when I tried to compile rtabmap it shows this:

[  4%] Built target rtabmap_utilite
[  5%] Built target res_tool
[  5%] Linking CXX shared library ../../../bin/librtabmap_core.so
/usr/bin/ld: cannot find -lBoost::thread
/usr/bin/ld: cannot find -lBoost::program_options
/usr/bin/ld: cannot find -lBoost::chrono
collect2: error: ld returned 1 exit status
make[2]: *** [corelib/src/CMakeFiles/rtabmap_core.dir/build.make:1885: ../bin/librtabmap_core.so.0.20.0] Error 1
make[1]: *** [CMakeFiles/Makefile2:894: corelib/src/CMakeFiles/rtabmap_core.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

I tried to run sudo ldconfig to fix any linking issue, but still unable to compile correctly. Do you have any suggestions?

Edit: I am using boost version 1.71.0 since ldconfig -p | grep libboost, gives this:
libboost_wserialization.so.1.71.0 (libc6,x86-64) => /lib/x86_64-linux-gnu/libboost_wserialization.so.1.71.0
libboost_wserialization.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libboost_wserialization.so
libboost_wave.so.1.71.0 (libc6,x86-64) => /lib/x86_64-linux-gnu/libboost_wave.so.1.71.0
libboost_wave.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libboost_wave.so
.....

Sicnerely,

Sean Xu
Reply | Threaded
Open this post in threaded view
|

Re: Compiling Rtabmap 0.20.0-noetic on NUC Ubuntu 20.04

matlabbe
Administrator
Which rtabmap version are you using. There was a fix not so long ago to correctly add those missing boost targets. See https://github.com/introlab/rtabmap/commit/8d63e9eae1c5c1b5511c29e7e9a029a3e17261cc

Reply | Threaded
Open this post in threaded view
|

Re: Compiling Rtabmap 0.20.0-noetic on NUC Ubuntu 20.04

seanxu112
Compiling with the code from the master branch compiles correctly but when I run rtabmap or rtabmap-databaseViewer, it says
rtabmap: error while loading shared libraries: librtabmap_gui.so.0.20: cannot open shared object file: No such file or directory
Do you know what is wrong here?
Reply | Threaded
Open this post in threaded view
|

Re: Compiling Rtabmap 0.20.0-noetic on NUC Ubuntu 20.04

seanxu112
Never mind running "sudo ldconfig" fixed that issue. Thank you!