Build failure: Missing gtsam_points/ann/kdtreex.hpp in glim on Jetson Orin Nano (ROS2 Humble, CUDA 12.6)
Describe the bug When building glim and glim_ros2 as instructed in the installation guide I get a "fatal error: gtsam_points/ann/kdtreex.hpp: No such file or directory" as seen below.
I tried both with arguments as shown below and plain colcon build, same result.
I am clearly missing a file, how do I get that? Or is there another solution to fix this?
To Reproduce Follow the installation guide from the "Install from PPA (...)" header on a fresh installation. Selecting the options for Ubuntu 22.04 and cuda 12.5.
GLIM version: 1.0.6-jammy GTSAM cuda: 1.0.6
Expected behavior
That colcon build does not crash and builds the packages.
Error meassage
colcon build --cmake-args -DBUILD_WITH_CUDA=ON -DBUILD_WITH_VIEWER=ON -DBUILD_WITH_MARCH_NATIVE=OFF
Starting >>> glim
[Processing: glim]
[Processing: glim]
[Processing: glim]
[Processing: glim]
[Processing: glim]
[Processing: glim]
[Processing: glim]
[Processing: glim]
[Processing: glim]
--- stderr: glim
/home/dev/workspace/src/glim/src/glim/viewer/interactive/manual_loop_close_modal.cpp:10:10: fatal error: gtsam_points/ann/kdtreex.hpp: No such file or directory
10 | #include <gtsam_points/ann/kdtreex.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [CMakeFiles/interactive_viewer.dir/build.make:90: CMakeFiles/interactive_viewer.dir/src/glim/viewer/interactive/manual_loop_close_modal.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
/home/dev/workspace/src/glim/src/glim/viewer/interactive/bundle_adjustment_modal.cpp: In member function ‘gtsam::NonlinearFactor::shared_ptr glim::BundleAdjustmentModal::run()’:
/home/dev/workspace/src/glim/src/glim/viewer/interactive/bundle_adjustment_modal.cpp:82:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
82 | ImGui::Image((void*)canvas->frame_buffer->color().id(), ImVec2(512, 512), ImVec2(0, 1), ImVec2(1, 0));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/dev/workspace/src/glim/src/glim/viewer/interactive_viewer.cpp: In member function ‘void glim::InteractiveViewer::update_viewer()’:
/home/dev/workspace/src/glim/src/glim/viewer/interactive_viewer.cpp:410:27: error: ‘using element_type = struct guik::ShaderSetting’ {aka ‘struct guik::ShaderSetting’} has no member named ‘set_color_mode’; did you mean ‘set_color’?
410 | drawable.first->set_color_mode(guik::ColorMode::RAINBOW);
| ^~~~~~~~~~~~~~
| set_color
/home/dev/workspace/src/glim/src/glim/viewer/interactive_viewer.cpp:413:27: error: ‘using element_type = struct guik::ShaderSetting’ {aka ‘struct guik::ShaderSetting’} has no member named ‘set_color_mode’; did you mean ‘set_color’?
413 | drawable.first->set_color_mode(guik::ColorMode::VERTEX_COLOR);
| ^~~~~~~~~~~~~~
| set_color
/home/dev/workspace/src/glim/src/glim/viewer/interactive_viewer.cpp:416:27: error: ‘using element_type = struct guik::ShaderSetting’ {aka ‘struct guik::ShaderSetting’} has no member named ‘set_color_mode’; did you mean ‘set_color’?
416 | drawable.first->set_color_mode(guik::ColorMode::FLAT_COLOR);
| ^~~~~~~~~~~~~~
| set_color
In file included from /usr/include/c++/11/utility:70,
from /usr/include/c++/11/tuple:38,
from /usr/include/c++/11/mutex:38,
from /home/dev/workspace/src/glim/include/glim/viewer/standard_viewer.hpp:3,
from /home/dev/workspace/src/glim/src/glim/viewer/standard_viewer.cpp:1:
/usr/include/c++/11/bits/stl_pair.h: In instantiation of ‘constexpr std::pair<typename std::__strip_reference_wrapper<typename std::decay<_Tp>::type>::__type, typename std::__strip_reference_wrapper<typename std::decay<_Tp2>::type>::__type> std::make_pair(_T1&&, _T2&&) [with _T1 = double; _T2 = double; typename std::__strip_reference_wrapper<typename std::decay<_Tp2>::type>::__type = double; typename std::decay<_Tp2>::type = double; typename std::__strip_reference_wrapper<typename std::decay<_Tp>::type>::__type = double; typename std::decay<_Tp>::type = double]’:
/home/dev/workspace/src/glim/src/glim/viewer/standard_viewer.cpp:56:37: required from here
/usr/include/c++/11/bits/stl_pair.h:567:5: note: parameter passing for argument of type ‘std::pair<double, double>’ when C++17 is enabled changed to match C++14 in GCC 10.1
567 | make_pair(_T1&& __x, _T2&& __y)
| ^~~~~~~~~
gmake[2]: *** [CMakeFiles/interactive_viewer.dir/build.make:76: CMakeFiles/interactive_viewer.dir/src/glim/viewer/interactive_viewer.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:339: CMakeFiles/interactive_viewer.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
gmake: *** [Makefile:146: all] Error 2
---
Failed <<< glim [4min 36s, exited with code 2]
Summary: 0 packages finished [4min 37s]
1 package failed: glim
1 package had stderr output: glim
1 package not processed
Environment: Jetson Orin Nano developer kit. Fresh installation with Jetpack 6.2
- CPU/GPU: ARMv8 rev 1 (v8l) (6) @ 1.344GH
- OS: Ubuntu 22.04.5 LTS aarch64
- ROS: ROS2 Humble
- CUDA: 12.6
- Build with CUDA: ON
Additional context I have tried a lot of things, this seems to be the closes I get to actually build on the Jetson.
This may be caused by the use of old versions of dependent packages. Please try upgrade gtsam_points and iridescence to the latest versions.
Note that /usr/local/lib/cmake/gtsam_points/ should be manually removed before installing the latest gtsam_points to make sure old cmake configurations are removed.