title: ffmpeg compilation failed with cuda, libnpp not found
body: <p>image: docker tensorflow/tensorflow:1.10.0-devel-gpu-py3
  os: ubuntu 16.04
  cuda: 9.0.176</p>
  
  <p>ffmpeg pulled from github and nv-codec-headers downloaded from videolan, both the latest version</p>
  
  <p>step 1:  cd /nv-codec-headers and make &amp;&amp; make install</p>
  
  <p>step 2: cd /ffmpeg (the ffmpeg source) , ./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</p>
  
  <p>output: ERROR: libnpp not found</p>
  
  <p>I also tried compiling ffmpeg with cuda 10, but it seemed the same problem. but if I deleted "--enable-libnpp" then ./configure works.</p>
  
  <p>the config.log has many errors:</p>
  
  <pre><code>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__ &gt;= 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 &gt;= 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
  
  </code></pre>