koide3 / glim

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

The package can not build with error CUDA::cudart #96

Open hoangkhai6893 opened 4 weeks ago

hoangkhai6893 commented 4 weeks ago

This is my error show when I try to build the package : " CMake Error at /usr/local/lib/cmake/gtsam_points/gtsam_points-targets.cmake:69 (set_target_properties): The link interface of target "gtsam_points::gtsam_points_cuda" contains:

CUDA::cudart

but the target was not found. Possible reasons include:

* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.

Call Stack (most recent call first): /usr/local/lib/cmake/gtsam_points/gtsam_points-config.cmake:53 (include) CMakeLists.txt:30 (find_package)" Currently, I using Jetson Nano to build this package. And setting on CmakeList.txt file is using build with CUDA. Could you help me to fix it?

koide3 commented 4 weeks ago

What is the version of your ubuntu and ROS? If it is older than ubuntu 22.04, you need to upgrade the cmake version.

hoangkhai6893 commented 4 weeks ago

I am using Ubuntu 22.04 for Jetson. The OS for Jetson has name Linux ubuntu 5.15.148-tegra with docker name is nvcr.io/nvidia/l4t-base:35.3.1. I am using ROS noetic to run Cmake version am using is 3.24

koide3 commented 4 weeks ago

I'm not sure but it seems like there are some issues on cmake and CUDA. Did you see any other warning/errors with cmake?

hoangkhai6893 commented 3 weeks ago

Thank you for your support. Finally, I resolved the problem. I added find_package(CUDAToolkit REQUIRED) and find_package(CUDA REQUIRED) to CMakeLists.txt. The problem comes from the Docker Container that I use on Jetson.