ffmpeg编译失败,cuda,找不到libnpp

ffmpeg编译失败,cuda,找不到libnpp,ffmpeg,cuda,Ffmpeg,Cuda,图片:docker tensorflow/tensorflow:1.10.0-devel-gpu-py3 操作系统:ubuntu 16.04 中大:9.0.176 ffmpeg来自github,nv编解码器头来自videolan,两者都是最新版本 步骤1:cd/nv编解码器头和make&&make安装 步骤2:cd/ffmpeg(ffmpeg源代码),/configure--extra-cflags=-I/usr/local/include--extra-ldconfig=-L/usr/loca

图片:docker tensorflow/tensorflow:1.10.0-devel-gpu-py3 操作系统:ubuntu 16.04 中大:9.0.176

ffmpeg来自github,nv编解码器头来自videolan,两者都是最新版本

步骤1:cd/nv编解码器头和make&&make安装

步骤2:cd/ffmpeg(ffmpeg源代码),/configure--extra-cflags=-I/usr/local/include--extra-ldconfig=-L/usr/local/lib--enable gpl--enable lbopus--enable librtmp--enable-libx264--enable nonfree--enable libnpp--enable cuvid enable nvenc--enable cuda

输出:错误:找不到libnpp

我也试着用CUDA10编译ffmpeg,但似乎是同样的问题。但是如果我删除了“-enable libnpp”,那么./configure就可以工作了

config.log有许多错误:

ERROR: libnpp not found
root@336584ef0a4e:~/ffmpeg_sources/ffmpeg# cat ./ffbuild/config.log | grep error    error_resilience
    error_resilience
    strerror_r
    error_resilience
    strerror_r
error_color=''
error_resilience_select='me_cmp'
h264_decoder_suggest='error_resilience'
mpeg_er_select='error_resilience'
wmv2_decoder_select='blockdsp error_resilience h263_decoder idctdsp intrax8 videodsp wmv2dsp'
    3   #error "unsatisfied condition: __STDC_VERSION__ >= 201112L"
    3   #error "unsatisfied condition: defined __UCLIBC__"
/tmp/ffconf.DiL4dMbF/test.c:3:2: error: #error "unsatisfied condition: defined __UCLIBC__"
 #error "unsatisfied condition: defined __UCLIBC__"
    3   #error "unsatisfied condition: defined __GLIBC__"
    3   #error "unsatisfied condition: defined __UCLIBC__"
/tmp/ffconf.DiL4dMbF/test.c:3:2: error: #error "unsatisfied condition: defined __UCLIBC__"
 #error "unsatisfied condition: defined __UCLIBC__"
    3   #error "unsatisfied condition: defined __GLIBC__"
/tmp/ffconf.DiL4dMbF/test.c:2:11: error: 'localtime_r' undeclared here (not in a function)
    3   #error "unsatisfied condition: defined(__PIC__) || defined(__pic__) || defined(PIC)"
/tmp/ffconf.DiL4dMbF/test.c:3:2: error: #error "unsatisfied condition: defined(__PIC__) || defined(__pic__) || defined(PIC)"
 #error "unsatisfied condition: defined(__PIC__) || defined(__pic__) || defined(PIC)"
/tmp/ffconf.DiL4dMbF/test.c:1:20: fatal error: intrin.h: No such file or directory
nasm -Werror -o /tmp/ffconf.DiL4dMbF/test.o /tmp/ffconf.DiL4dMbF/test.asm
nasm -f elf64 -g -F dwarf -Werror -o /tmp/ffconf.DiL4dMbF/test.o /tmp/ffconf.DiL4dMbF/test.asm
nasm -f elf64 -g -F dwarf -Werror -o /tmp/ffconf.DiL4dMbF/test.o /tmp/ffconf.DiL4dMbF/test.asm
nasm -f elf64 -g -F dwarf -Werror -o /tmp/ffconf.DiL4dMbF/test.o /tmp/ffconf.DiL4dMbF/test.asm
nasm -f elf64 -g -F dwarf -Werror -o /tmp/ffconf.DiL4dMbF/test.o /tmp/ffconf.DiL4dMbF/test.asm
nasm -f elf64 -g -F dwarf -Werror -o /tmp/ffconf.DiL4dMbF/test.o /tmp/ffconf.DiL4dMbF/test.asm
/tmp/ffconf.DiL4dMbF/test.asm:1: error: unknown 'cpu' type 'amdnop'
/tmp/ffconf.DiL4dMbF/test.c:1:22: fatal error: arm_neon.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:26: fatal error: netinet/sctp.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:3:57: error: 'struct sockaddr' has no member named 'sa_len'
collect2: error: ld returned 1 exit status
/tmp/ffconf.DiL4dMbF/test.c:1:20: fatal error: atomic.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:22: fatal error: mbarrier.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:3:50: error: '_aligned_malloc' undeclared (first use in this function)
/tmp/ffconf.DiL4dMbF/test.c:3:45: error: 'arc4random' undeclared (first use in this function)
collect2: error: ld returned 1 exit status
check_func strerror_r
    1   extern int strerror_r();
    2   int main(void){ strerror_r(); }
/tmp/ffconf.DiL4dMbF/test.c:1:19: fatal error: conio.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:16: fatal error: io.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:23: fatal error: lzo/lzo1x.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:28: fatal error: mach/mach_time.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:20: fatal error: direct.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:23: fatal error: dxgidebug.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:18: fatal error: dxva.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:22: fatal error: dxva2api.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:16: fatal error: io.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:42: fatal error: libcrystalhd/libcrystalhd_if.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:25: fatal error: net/udplite.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:31: fatal error: valgrind/valgrind.h: No such file or directory
gcc: error: VideoToolbox: No such file or directory
gcc: error: unrecognized command line option '-framework'
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:36: fatal error: X11/extensions/XvMClib.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:35: fatal error: android/native_window.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:2:28: fatal error: media/NdkImage.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:3:37: fatal error: camera/NdkCameraManager.h: No such file or directory
gcc -Werror=missing-prototypes -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -I/root/ffmpeg_build/include -I/root/ffmpeg_build/include -I/usr/local/cuda/include -std=c11 -fomit-frame-pointer -c -o /tmp/ffconf.DiL4dMbF/test.o /tmp/ffconf.DiL4dMbF/test.m
gcc: error trying to exec 'cc1obj': execvp: No such file or directory
gcc -Werror=missing-prototypes -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -I/root/ffmpeg_build/include -I/root/ffmpeg_build/include -I/usr/local/cuda/include -std=c11 -fomit-frame-pointer -c -o /tmp/ffconf.DiL4dMbF/test.o /tmp/ffconf.DiL4dMbF/test.m
gcc: error trying to exec 'cc1obj': execvp: No such file or directory
gcc -Werror=missing-prototypes -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -I/root/ffmpeg_build/include -I/root/ffmpeg_build/include -I/usr/local/cuda/include -std=c11 -fomit-frame-pointer -c -o /tmp/ffconf.DiL4dMbF/test.o /tmp/ffconf.DiL4dMbF/test.m
gcc: error trying to exec 'cc1obj': execvp: No such file or directory
gcc -Werror=missing-prototypes -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -I/root/ffmpeg_build/include -I/root/ffmpeg_build/include -I/usr/local/cuda/include -std=c11 -fomit-frame-pointer -c -o /tmp/ffconf.DiL4dMbF/test.o /tmp/ffconf.DiL4dMbF/test.m
gcc: error trying to exec 'cc1obj': execvp: No such file or directory
gcc -Werror=missing-prototypes -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -I/root/ffmpeg_build/include -I/root/ffmpeg_build/include -I/usr/local/cuda/include -std=c11 -fomit-frame-pointer -c -o /tmp/ffconf.DiL4dMbF/test.o /tmp/ffconf.DiL4dMbF/test.m
gcc: error trying to exec 'cc1obj': execvp: No such file or directory
gcc -Werror=missing-prototypes -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -I/root/ffmpeg_build/include -I/root/ffmpeg_build/include -I/usr/local/cuda/include -std=c11 -fomit-frame-pointer -c -o /tmp/ffconf.DiL4dMbF/test.o /tmp/ffconf.DiL4dMbF/test.m
gcc: error trying to exec 'cc1obj': execvp: No such file or directory
gcc -Werror=missing-prototypes -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -I/root/ffmpeg_build/include -I/root/ffmpeg_build/include -I/usr/local/cuda/include -std=c11 -fomit-frame-pointer -c -o /tmp/ffconf.DiL4dMbF/test.o /tmp/ffconf.DiL4dMbF/test.m
gcc: error trying to exec 'cc1obj': execvp: No such file or directory
gcc -Werror=missing-prototypes -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -I/root/ffmpeg_build/include -I/root/ffmpeg_build/include -I/usr/local/cuda/include -std=c11 -fomit-frame-pointer -c -o /tmp/ffconf.DiL4dMbF/test.o /tmp/ffconf.DiL4dMbF/test.m
gcc: error trying to exec 'cc1obj': execvp: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:18: fatal error: d3d9.h: No such file or directory
pkg-config --exists --print-errors ffnvcodec >= 9.0.18.0
    3   #error "unsatisfied condition: !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)"
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:21: fatal error: windows.h: No such file or directory
pkg-config --exists --print-errors zlib
/tmp/ffconf.DiL4dMbF/test.c:1:19: fatal error: bzlib.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:18: fatal error: lzma.h: No such file or directory
collect2: error: ld returned 1 exit status
/tmp/ffconf.DiL4dMbF/test.c:1:17: fatal error: npp.h: No such file or directory
/tmp/ffconf.DiL4dMbF/test.c:1:17: fatal error: npp.h: No such file or directory


安装名为cuda npp-的软件包后,问题得到解决。有关更多信息,您可以访问
config.log
的结尾,它可能会提供有关故障的更多信息。libnpp不再存在。它已被转换成一系列其他libnppXXX库。阅读可能您需要使用更新版本的ffmpeg,该ffmpeg已在更新的cuda版本(如9和10)中更新为新的npp库命名格式。