[FFmpeg-devel] Unable to compile with cuda on WSL2

Timo Rothenpieler timo at rothenpieler.org
Sat Apr 1 12:28:40 EEST 2023


On 01.04.2023 10:41, Dylan Fernando wrote:
> I'm trying to compile on WSL2 Ubuntu with cuda enabled. Command:
> 
> ./configure --enable-nonfree --enable-cuda-nvcc --extra-c
> flags=-I/opt/local/cuda/include --nvccflags="-gencode
> arch=compute_52,code=sm_52 -O2"
> 
> when compiling, I get the error:
> NVCC    libavfilter/vf_bilateral_cuda.ptx
> /bin/sh: 1: nvcc: not found
> make: *** [ffbuild/common.mak:128: libavfilter/vf_bilateral_cuda.ptx] Error
> 127
> 
> The output when I run nvcc -V is:
> nvcc: NVIDIA (R) Cuda compiler driver
> Copyright (c) 2005-2023 NVIDIA Corporation
> Built on Tue_Feb__7_19:32:13_PST_2023
> Cuda compilation tools, release 12.1, V12.1.66
> Build cuda_12.1.r12.1/compiler.32415258_0
> 
> I added this to .bashrc:
> export CUDA_HOME=/usr/local/cuda-12.1
> export
> LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-12.1/lib64:/usr/local/cuda-12.1/extras/CUPTI/lib64
> export PATH=$PATH:$CUDA_HOME/bin
> 
> Thanks,
> Dylan
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".

nvcc needs to be in your PATH. LD_LIBRARY_PATH is entirely irrelevant 
for CUDA.
So make sure to fix your PATH.

But really, just install clang and don't bother with proprietary nvcc.



More information about the ffmpeg-devel mailing list