darknet_ros
darknet_ros copied to clipboard
Error building on Ubuntu 18 with CUDA
Environment
- Ubuntu 18
- GEforce GTX 1070
- Nvidia CUDA v10.1 drivers installed
$ nvidia-smi
Sun Jun 23 16:31:48 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.56 Driver Version: 418.56 CUDA Version: 10.1 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 107... Off | 00000000:01:00.0 On | N/A |
| N/A 43C P8 8W / N/A | 445MiB / 8119MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
Repro steps
- Git clone repo (recursively)
-
catkin_make
Errors
[ 46%] Built target darknet_ros_msgs_generate_messages
In file included from /usr/local/cuda/include/host_config.h:50:0,
from /usr/local/cuda/include/cuda_runtime.h:78,
from <command-line>:0:
/usr/local/cuda/include/crt/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 6 are not supported!
#error -- unsupported GNU version! gcc versions later than 6 are not supported!
Workaround
I commented the CUDA related steps in darknet_ros/darknet_ros/CMakeLists.txt
and it was able to build successfully.
It would be nice to be able build this with CUDA support though. Is my CUDA version out of date?
Just ran into this issue. I think ubuntu 18.04 now comes with a GNU version > 6, a version CUDA 9 doesn't recognize. I was able to build the package by running
catkin build -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/bin/gcc-6
Hope this helps!
Ubuntu : 18.04 .02 (4.9.xxx) cuda: 10.0 GPU: Pascal gen (Jetson TX2) gcc: 7.3.0
I built and tested this today.
I had the same error with the version of cuda provided by the package manager. That problem went away when I installed the latest cuda from NVidia.
I still don't get a clean build. I am now having issues with OpenCV which I didn't get when building without cuda.
Hello All,
i have the same issue here,
#error -- unsupported GNU version! gcc versions later than 6 are not supported!
My specs are - Ubuntu 18.04 GPU - GeForce GTX 1660Ti gcc: 7.5.0 CUDA 10.2
I believe every Ubuntu 18.04 has a gcc version of 7+ and hence the package has issues building with CUDA support. My entire error when I do simple catkin_make is -
In file included from /usr/include/host_config.h:50:0,
from /usr/include/cuda_runtime.h:78,
from <command-line>:0:
/usr/include/crt/host_config.h:121:2: error: #error -- unsupported GNU version! gcc versions later than 6 are not supported!
#error -- unsupported GNU version! gcc versions later than 6 are not supported!
^~~~~
In file included from /usr/include/host_config.h:50:0,
from /usr/include/cuda_runtime.h:78,
from <command-line>:0:
/usr/include/crt/host_config.h:121:2: error: #error -- unsupported GNU version! gcc versions later than 6 are not supported!
#error -- unsupported GNU version! gcc versions later than 6 are not supported!
^~~~~
Let me know if there is any work-around. I am going to try what @ericjohnson97 said, will post the results soon.
I tried out @ericjohnson97's suggestion of using --
catkin build -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/bin/gcc-6
but instead of using catkin build (parallel to catkin_make_isolated) I used catkin_make. That helped me to build the package perfectly. but when I tested the darknet_ros launch file. It shut down immediately after launch stating -
CUDA ERROR - cuda-invalid-device-symbol-error
I would say this suggestion bypasses the proper CUDA setup. Is there anything other than this that we can make use of here?
Hello All,
any updates on that Issue? I am having the same problem. I tried the same as @BhooshanDeshpande but when I run the darknet_ros.launch file now I get following error: ERROR: cannot launch node of type [darknet_ros/darknet_ros]: Cannot locate node of type [darknet_ros] in package [darknet_ros]. Make sure file exists in package path and permission is set to executable (chmod +x)
Just ran into this issue. I think ubuntu 18.04 now comes with a GNU version > 6, a version CUDA 9 doesn't recognize. I was able to build the package by running
catkin build -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/bin/gcc-6
Hope this helps!
Worked for me! Thanks!