NVIDIA-ISAAC-ROS / isaac_ros_nitros

NVIDIA Isaac Transport for ROS package for hardware-acceleration friendly movement of messages
Other
95 stars 18 forks source link

Cuda incompatibility on Orin when compiling isaac_ros_nitros #31

Closed ryank-cobot closed 10 months ago

ryank-cobot commented 10 months ago

I am running into some issues when attempting to compile the latest version (v 0.31.0-dp) of isaac_ros_nitros in our docker environment on Jetson. I believe I am running into a CUDA compatibility issue because Jetpack 5.1.1 ships with CUDA 11.4 and the x86 requirement states CUDA 11.8 for Isaac ROS (https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common#:~:text=Notes-,Jetson,-Jetson%20Orin%0AJetson). I know it is possible now to upgrade to CUDA 11.8 on Jetson (https://docs.nvidia.com/cuda/cuda-for-tegra-appnote/index.html#cuda-upgradable-package-for-jetson) however I have been unable to get that upgrade process to work within our DockerFile because of the nvidia-l4t-core dependency on cuda which is incompatible with a dockerfile install from my attempts. I will paste the specific isaac_ros_nitros compilation error below This is a pretty big blocker for us right now so thank you for your help in advance.

In file included from /usr/local/cuda-11.4/include/cuda/std/cmath:19,
                 from /usr/local/cuda-11.4/include/cuda/std/complex:12,
                 from /home/install/isaac_ros_gxf/share/isaac_ros_gxf/gxf/include/gxf/std/complex.hpp:23,
                 from /home/install/isaac_ros_gxf/share/isaac_ros_gxf/gxf/include/gxf/std/tensor.hpp:30,
                 from /home/install/isaac_ros_gxf/share/isaac_ros_gxf/gxf/include/gxf/multimedia/video.hpp:30,
                 from /home/third-party/isaac_ros_nitros/isaac_ros_nitros/include/isaac_ros_nitros/utils/vpi_utilities.hpp:20,
                 from /home/third-party/isaac_ros_nitros/isaac_ros_nitros/src/utils/vpi_utilities.cpp:11:
/usr/local/cuda-11.4/include/cuda/std/detail/libcxx/include/cmath:569:101: error: 'float cuda::std::__3::hypot(float, float, float)' conflicts with a previous declaration
  569 | inline _LIBCUDACXX_INLINE_VISIBILITY float       hypot(       float x,       float y,       float z ) { return sqrt(x*x + y*y + z*z); }
      |                                                                                                     ^
In file included from /home/build/isaac_ros_nitros/_deps/yaml-cpp-src/include/yaml-cpp/emitter.h:10,
                 from /home/build/isaac_ros_nitros/_deps/yaml-cpp-src/include/yaml-cpp/yaml.h:11,
                 from /home/install/isaac_ros_gxf/share/isaac_ros_gxf/gxf/include/gxf/std/parameter_parser.hpp:31,
                 from /home/install/isaac_ros_gxf/share/isaac_ros_gxf/gxf/include/gxf/core/parameter.hpp:29,
                 from /home/install/isaac_ros_gxf/share/isaac_ros_gxf/gxf/include/gxf/core/component.hpp:25,
                 from /home/install/isaac_ros_gxf/share/isaac_ros_gxf/gxf/include/gxf/std/allocator.hpp:21,
                 from /home/install/isaac_ros_gxf/share/isaac_ros_gxf/gxf/include/gxf/multimedia/video.hpp:28,
                 from /home/third-party/isaac_ros_nitros/isaac_ros_nitros/include/isaac_ros_nitros/utils/vpi_utilities.hpp:20,
                 from /home/third-party/isaac_ros_nitros/isaac_ros_nitros/src/utils/vpi_utilities.cpp:11:
/usr/include/c++/9/cmath:1868:3: note: previous declaration 'float std::hypot(float, float, float)'
 1868 |   hypot(float __x, float __y, float __z)
      |   ^~~~~
In file included from /usr/local/cuda-11.4/include/cuda/std/cmath:19,
                 from /usr/local/cuda-11.4/include/cuda/std/complex:12,
                 from /home/install/isaac_ros_gxf/share/isaac_ros_gxf/gxf/include/gxf/std/complex.hpp:23,
                 from /home/install/isaac_ros_gxf/share/isaac_ros_gxf/gxf/include/gxf/std/tensor.hpp:30,
                 from /home/install/isaac_ros_gxf/share/isaac_ros_gxf/gxf/include/gxf/multimedia/video.hpp:30,
                 from /home/third-party/isaac_ros_nitros/isaac_ros_nitros/include/isaac_ros_nitros/utils/vpi_utilities.hpp:20,
                 from /home/third-party/isaac_ros_nitros/isaac_ros_nitros/src/utils/vpi_utilities.cpp:11:
/usr/local/cuda-11.4/include/cuda/std/detail/libcxx/include/cmath:570:101: error: 'double cuda::std::__3::hypot(double, double, double)' conflicts with a previous declaration
  570 | inline _LIBCUDACXX_INLINE_VISIBILITY double      hypot(      double x,      double y,      double z ) { return sqrt(x*x + y*y + z*z); }
      |                                                                                                     ^
In file included from /home/build/isaac_ros_nitros/_deps/yaml-cpp-src/include/yaml-cpp/emitter.h:10,
                 from /home/build/isaac_ros_nitros/_deps/yaml-cpp-src/include/yaml-cpp/yaml.h:11,
                 from /home/install/isaac_ros_gxf/share/isaac_ros_gxf/gxf/include/gxf/std/parameter_parser.hpp:31,
                 from /home/install/isaac_ros_gxf/share/isaac_ros_gxf/gxf/include/gxf/core/parameter.hpp:29,
                 from /home/install/isaac_ros_gxf/share/isaac_ros_gxf/gxf/include/gxf/core/component.hpp:25,
                 from /home/install/isaac_ros_gxf/share/isaac_ros_gxf/gxf/include/gxf/std/allocator.hpp:21,
                 from /home/install/isaac_ros_gxf/share/isaac_ros_gxf/gxf/include/gxf/multimedia/video.hpp:28,
                 from /home/third-party/isaac_ros_nitros/isaac_ros_nitros/include/isaac_ros_nitros/utils/vpi_utilities.hpp:20,
                 from /home/third-party/isaac_ros_nitros/isaac_ros_nitros/src/utils/vpi_utilities.cpp:11:
/usr/include/c++/9/cmath:1872:3: note: previous declaration 'double std::hypot(double, double, double)'
 1872 |   hypot(double __x, double __y, double __z)
      |   ^~~~~
In file included from /usr/local/cuda-11.4/include/cuda/std/cmath:19,
                 from /usr/local/cuda-11.4/include/cuda/std/complex:12,
                 from /home/install/isaac_ros_gxf/share/isaac_ros_gxf/gxf/include/gxf/std/complex.hpp:23,
                 from /home/install/isaac_ros_gxf/share/isaac_ros_gxf/gxf/include/gxf/std/tensor.hpp:30,
                 from /home/install/isaac_ros_gxf/share/isaac_ros_gxf/gxf/include/gxf/multimedia/video.hpp:30,
                 from /home/third-party/isaac_ros_nitros/isaac_ros_nitros/include/isaac_ros_nitros/utils/vpi_utilities.hpp:20,
                 from /home/third-party/isaac_ros_nitros/isaac_ros_nitros/src/utils/vpi_utilities.cpp:11:
/usr/local/cuda-11.4/include/cuda/std/detail/libcxx/include/cmath:572:101: error: 'long double cuda::std::__3::hypot(long double, long double, long double)' conflicts with a previous declaration
  572 | inline _LIBCUDACXX_INLINE_VISIBILITY long double hypot( long double x, long double y, long double z ) { return sqrt(x*x + y*y + z*z); }
      |                                                                                                     ^
In file included from /home/build/isaac_ros_nitros/_deps/yaml-cpp-src/include/yaml-cpp/emitter.h:10,
                 from /home/build/isaac_ros_nitros/_deps/yaml-cpp-src/include/yaml-cpp/yaml.h:11,
                 from /home/install/isaac_ros_gxf/share/isaac_ros_gxf/gxf/include/gxf/std/parameter_parser.hpp:31,
                 from /home/install/isaac_ros_gxf/share/isaac_ros_gxf/gxf/include/gxf/core/parameter.hpp:29,
                 from /home/install/isaac_ros_gxf/share/isaac_ros_gxf/gxf/include/gxf/core/component.hpp:25,
                 from /home/install/isaac_ros_gxf/share/isaac_ros_gxf/gxf/include/gxf/std/allocator.hpp:21,
                 from /home/install/isaac_ros_gxf/share/isaac_ros_gxf/gxf/include/gxf/multimedia/video.hpp:28,
                 from /home/third-party/isaac_ros_nitros/isaac_ros_nitros/include/isaac_ros_nitros/utils/vpi_utilities.hpp:20,
                 from /home/third-party/isaac_ros_nitros/isaac_ros_nitros/src/utils/vpi_utilities.cpp:11:
/usr/include/c++/9/cmath:1876:3: note: previous declaration 'long double std::hypot(long double, long double, long double)'
 1876 |   hypot(long double __x, long double __y, long double __z)
      |   ^~~~~
make[2]: *** [CMakeFiles/isaac_ros_nitros.dir/build.make:188: CMakeFiles/isaac_ros_nitros.dir/src/utils/vpi_utilities.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:159: CMakeFiles/isaac_ros_nitros.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
---
Failed   <<< isaac_ros_nitros [2min 16s, exited with code 2]
sandeepdutta commented 10 months ago

You will nee to patch CUDA. https://forums.developer.nvidia.com/t/docker-build-failure-when-compiling-isaac-ros-nitros-type-conflict-between-cuda-namespace-and-previously-declared-datatype/258242

ryank-cobot commented 10 months ago

@sandeepdutta That worked thanks so much!