I have installed cuda and cuda-toolkit-10.2 from Nvidia Cuda Toolkit repository on my Ubuntu 20.04 machine to make a custom build of FFmpeg to using NVIDIA hardware acceleration so when I try to configure the source code with recomended command:
./configure --enable-cuda-sdk --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64
I get this error:
ERROR: failed checking for nvcc.and while I run this:
nvcc -V
It's working fine.
51 Answer
Finally, I downgrade my gcc and g++ to version 8 or lower, as though nvcc is not compatible with later than gcc version 8
1