make[2]: *** No rule to make target '/root/orca_ws/src/orb_slam_2_ros/orb_slam2/Thirdparty/g2o/lib/libg2o.so', needed by '/root/orca_ws/src/orb_slam_2_ros/orb_slam2/lib/liborb_slam2_ros_core.so'. Stop.
The fix is to depend on the CMake targets DBoW2 and g2o, not the .so files. I will submit a PR.
The ROS2 build sometimes fails due to a race condition, e.g., from https://github.com/clydemcqueen/orca3/issues/6:
The fix is to depend on the CMake targets
DBoW2
andg2o
, not the.so
files. I will submit a PR.