(vision): cannot load openvslam library
Summary
module_navigation_openvslam cannot be loaded, it seems that it fails when trying to load libopenvslam.so.
[4006][00:00:03.596675][warning] [sight/libs/core/core/runtime/RuntimeException.cpp:39] Module load failed. libg2o_csparse_extension_d.so: cannot open shared object file: No such file or directory
[4007][00:00:03.596788][error] [sight/libs/core/core/runtime/detail/Module.cpp:333] Unable to load module sight_module_navigation_openvslam. Module load failed. libg2o_csparse_extension_d.so: cannot open shared object file: No such file or directory
[4008][00:00:03.596867][warning] [sight/libs/core/core/runtime/RuntimeException.cpp:39] Unable to load module sight_module_navigation_openvslam. Module load failed. libg2o_csparse_extension_d.so: cannot open shared object file: No such file or directory
It seems that rpath are correctly set on libsight_module_navigation_openvslam.so
$ readelf -d ./lib/libsight_module_navigation_openvslam.so | grep RUNPATH
0x000000000000001d (RUNPATH) Bibliothèque runpath:[/home/mschweitzer/dev/sight/src/sight/.build/sight/Debug/.sight-deps/sight-deps-19-0-0-19-g59a1b24-Ubuntu-20.10-Debug-x86_64/lib:/home/mschweitzer/dev/sight/src/sight/.build/sight/Debug/lib:]
BUT when doing a ldd on libsight_module_navigation_openvslam.so
all dependencies of openvslam (DBoW2, g2o, ....) are not found.
ldd lib/libsight_navigation_openvslam.so | grep g2o
libg2o_csparse_extension_d.so => not found
libg2o_core_d.so => not found
libg2o_stuff_d.so => not found
Steps to reproduce
ExOpenvslam --> load calibration --> error.
Dev environment
- OS: Linux (Ubuntu 20.10)
Possible fixes
A first workaround could be to add path of sight-deps into LD_LIBRARY_PATH when creating launching script.