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

Build failed: hypot() conflicts with previous declaration #24

Closed HedgeHao closed 1 year ago

HedgeHao commented 1 year ago

I'm building isaac_ros_nitros on Jetson Xavier. And the following errors occur.

/usr/local/cuda/include/cuda/std/detail/libcxx/include/cmath:569:101: error: ‘float cuda::std::__3::hypot(float, float, float)’ conflicts with a previous declaration

/usr/local/cuda/include/cuda/std/detail/libcxx/include/cmath:570:101: error: ‘double cuda::std::__3::hypot(double, double, double)’ conflicts with a previous declaration

/usr/local/cuda/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

I'm using docker image dustynv/ros:humble-ros-base-l4t-r35.3.1

My cuda version is

nvcc --version

Cuda compilation tools, release 11.4, V11.4.315
Build cuda_11.4.r11.4/compiler.31964100_0
nakai-omer commented 1 year ago

Any updates on this? this is super annoying, it is blocking us from using the Jetson...

nakai-omer commented 1 year ago

@HedgeHao Solved it by patching cuda, just like in the docker container.

Create the patch file under /tmp:

wget https://raw.githubusercontent.com/NVIDIA-ISAAC-ROS/isaac_ros_common/main/docker/patches/libcudacxx_aarch64_cuda_11_4.diff -P /tmp

Run the patch:

sudo patch -i /tmp/libcudacxx_aarch64_cuda_11_4.diff /usr/local/cuda-11.4/targets/aarch64-linux/include/cuda/std/detail/libcxx/include/cmath
jaiveersinghNV commented 1 year ago

Yes, we provide a number of patches that are used by the Isaac ROS Docker container to ensure all libraries play nicely inside the Isaac ROS development environment. An easy way to get all of those patches is to use our run_dev.sh script, available here.

HedgeHao commented 1 year ago

@nakai-omer You are right. After this patch it works fine.

willSapgreen commented 2 months ago

Hello @jaiveersinghNV I got "404 Not Found" when creating the patch file with @nakai-omer 's command. Is the server down today or the patch is no longer valid? Thank you for your precious time on this matter.