Skip to content

Ubuntu22.04 ERROR: cuvid requested, but not all dependencies are satisfied: ffnvcodec #183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
aningxu opened this issue Mar 7, 2023 · 8 comments · Fixed by #200
Closed

Comments

@aningxu
Copy link

aningxu commented Mar 7, 2023

END /tmp/ffconf.39FjTVXM/test.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -I/root/ffmpeg-build-script/workspace/include -I/usr/local/cuda/include -std=c11 -fomit-frame-pointer -fPIC -pthread -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include/opus -I/root/ffmpeg-build-script/workspace/include/opus -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include/srt -I/root/ffmpeg-build-script/workspace/include/svt-av1 -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/usr/include/libxml2 -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -Wno-unused-const-variable -Wno-bool-operation -Wno-char-subscripts -Os -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wformat -c -o /tmp/ffconf.39FjTVXM/test.o /tmp/ffconf.39FjTVXM/test.c
check_cflags -fdiagnostics-color=auto
test_cflags -fdiagnostics-color=auto
test_cc -fdiagnostics-color=auto
BEGIN /tmp/ffconf.39FjTVXM/test.c
1 int x;
END /tmp/ffconf.39FjTVXM/test.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -I/root/ffmpeg-build-script/workspace/include -I/usr/local/cuda/include -std=c11 -fomit-frame-pointer -fPIC -pthread -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include/opus -I/root/ffmpeg-build-script/workspace/include/opus -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include/srt -I/root/ffmpeg-build-script/workspace/include/svt-av1 -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/usr/include/libxml2 -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -Wno-unused-const-variable -Wno-bool-operation -Wno-char-subscripts -Os -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wformat -fdiagnostics-color=auto -c -o /tmp/ffconf.39FjTVXM/test.o /tmp/ffconf.39FjTVXM/test.c
test_cflags -Wmaybe-uninitialized
test_cc -Wmaybe-uninitialized
BEGIN /tmp/ffconf.39FjTVXM/test.c
1 int x;
END /tmp/ffconf.39FjTVXM/test.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -I/root/ffmpeg-build-script/workspace/include -I/usr/local/cuda/include -std=c11 -fomit-frame-pointer -fPIC -pthread -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include/opus -I/root/ffmpeg-build-script/workspace/include/opus -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include/srt -I/root/ffmpeg-build-script/workspace/include/svt-av1 -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/root/ffmpeg-build-script/workspace/include -I/usr/include/libxml2 -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -Wno-unused-const-variable -Wno-bool-operation -Wno-char-subscripts -Os -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wformat -fdiagnostics-color=auto -Wmaybe-uninitialized -c -o /tmp/ffconf.39FjTVXM/test.o /tmp/ffconf.39FjTVXM/test.c
ERROR: cuvid requested, but not all dependencies are satisfied: ffnvcodec

@ImVexed
Copy link

ImVexed commented Mar 19, 2023

getting the same error

@whittinghamj
Copy link

Im also getting the same error on Ubuntu 22

@PhiSYS
Copy link

PhiSYS commented Mar 28, 2023

Also on Ubuntu 22.04 WSL2

@kdog0598
Copy link

kdog0598 commented Apr 1, 2023

I am also getting the same error on ubuntu 22

@farmani
Copy link

farmani commented Apr 7, 2023

any workaround for this?

@zaterio
Copy link

zaterio commented Apr 13, 2023

workaround:

in "FFmpeg" section, change configure line:

./configure "${CONFIGURE_OPTIONS[@]}" \

with:

PKG_CONFIG_PATH="/usr/src/ffmpeg-build-script/workspace/usr/lib/pkgconfig"  ./configure "${CONFIGURE_OPTIONS[@]}" \

in mi case:

 $WORKSPACE = /usr/src/ffmpeg-build-script/workspace

(adjust to your environment)

cuda must be installed and nv-codec-headers must be auto compiled by ffmpeg-build-script in previous step.

@tuxthepenguin84
Copy link

I had this issue but the workaround didn't work for me. I posted in another thread a similar issue with what worked for me, #187 (comment)

@kirk29974
Copy link

kirk29974 commented May 19, 2023

ERROR: cuvid requested, but not all dependencies are satisfied: ffnvcodec

the error is due to the fact that in the script there is disable-ffnvcodec in the ffmpeg build configuration, item that must be deleted "--disable-ffnvcodec" and also modified the script as follows:

if [[ "$OSTYPE" == "linux-gnu" ]]; then
if command_exists "nvcc"; then
if build "nv-codec" "12.0.16.0"; then
download "https://github.com/FFmpeg/nv-codec-headers/releases/download/n12.0.16.0/nv-codec-headers-12.0.16.0.tar.gz"
execute make PREFIX="${WORKSPACE}"
execute make PREFIX="${WORKSPACE}/usr" install
execute make PREFIX="${WORKSPACE}" install
build_done "nv-codec" "12.0.16.0"
fi
CFLAGS+=" -I/usr/local/cuda/include"
LDFLAGS+=" -L/usr/local/cuda/lib64"
CONFIGURE_OPTIONS+=("--enable-ffnvcodec" "--enable-cuda-nvcc" "--enable-cuvid" "--enable-nvenc" "--enable-cuda-llvm")

if [ -z "$LDEXEFLAGS" ]; then
  CONFIGURE_OPTIONS+=("--enable-libnpp") # Only libnpp cannot be statically linked.
fi

# https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/
CONFIGURE_OPTIONS+=("--nvccflags=-gencode arch=compute_52,code=sm_52")

else
CONFIGURE_OPTIONS+=("--disable-ffnvcodec")
fi

Vaapi doesn't work well with static links FFmpeg.

if [ -z "$LDEXEFLAGS" ]; then
# If the libva development SDK is installed, enable vaapi.
if library_exists "libva"; then
if build "vaapi" "1"; then
build_done "vaapi" "1"
fi
CONFIGURE_OPTIONS+=("--enable-vaapi")
fi
fi

if build "amf" "1.4.29"; then
download 'https://github.com/GPUOpen-LibrariesAndSDKs/AMF/archive/refs/tags/v1.4.29.tar.gz' 'AMF-1.4.29.tar.gz' 'AMF-1.4.29'
execute rm -rf "${WORKSPACE}/include/AMF"
execute mkdir -p "${WORKSPACE}/include/AMF"
execute cp -r "${PACKAGES}"/AMF-1.4.29/AMF-1.4.29/amf/public/include/* "${WORKSPACE}/include/AMF/"
build_done "amf" "1.4.29"
fi
CONFIGURE_OPTIONS+=("--enable-amf")
fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants