koide3 / glim

GLIM: versatile and extensible range-based 3D localization and mapping framework
MIT License
509 stars 64 forks source link

/opt/ros/humble/lib/glim_ros/glim_rosnode: symbol lookup error: /usr/local/lib/libgtsam_points.so: undefined symbol: _ZNK5gtsam15NonlinearFactor5rekeyERKSt6vectorImSaImEE #87

Closed Shaswat2001 closed 1 week ago

Shaswat2001 commented 1 week ago

I installed GLIM using the PPA method for ROS2 humble on Ubuntu 22.04, but when I run ros2 run glim_ros glim_rosnode,

I get the error -

/opt/ros/humble/lib/glim_ros/glim_rosnode: symbol lookup error: /usr/local/lib/libgtsam_points.so: undefined symbol: _ZNK5gtsam15NonlinearFactor5rekeyERKSt6vectorImSaImEE

How to solve this??

koide3 commented 1 week ago

Did you run sudo ldconfig after installing the package?

valgur commented 1 week ago

I would suggest running the executable with LD_DEBUG=all environment var set and sharing the output here or in a gist. That might hopefully provide sufficient detail to pinpoint the specific issue.

thisismoiself commented 1 week ago

I get the same error on Ubuntu 20.04 using ROS1. Executing rosrun glim_ros glim_rosnode launches the viewer fine (although i get an error about package glim_ext not found, but after launching the rosbag with rosbag play --clock os1_128_01.bag, the same error occurs and the node crashes:

/opt/ros/noetic/lib/glim_ros/glim_rosnode: symbol lookup error: /opt/ros/noetic/lib/libglim.so: undefined symbol: _ZNK12gtsam_points6KdTree10knn_searchEPKdmPmPd /opt/ros/noetic/lib/glim_ros/glim_rosnode: symbol lookup error: /opt/ros/noetic/lib/libglim.so: undefined symbol: _ZNK12gtsam_points6KdTree10knn_searchEPKdmPmPd

When running LD_DEBUG=all rosrun glim_ros glim_rosnode &> debug.txt and starting to play the rosbag, i get the following (i copied only lines containing the missing symbol into the gist, the whole file is 400mb): debug.txt

Shaswat2001 commented 1 week ago

I was able to solve this issue by doing -

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH