ffmpeg "ERROR: opencl not found"문제 컴파일

3874 단어
ffmpeg "ERROR: opencl not found"문제를 컴파일합니다.
ffmpeg는 2.x버전은opencl를 지원하며 하드웨어를 이용하여 디코딩을 가속화할 수 있기 때문에 컴파일 시도를 할 수 있습니다.
/tmp/ffconf.UNWNaz4r.c:1:23: error: OpenCL/cl.h: No such file or directory
/tmp/ffconf.UNWNaz4r.c: In function 'check_clEnqueueNDRangeKernel':
/tmp/ffconf.UNWNaz4r.c:2: error: 'clEnqueueNDRangeKernel' undeclared (first use in this function)
/tmp/ffconf.UNWNaz4r.c:2: error: (Each undeclared identifier is reported only once
/tmp/ffconf.UNWNaz4r.c:2: error: for each function it appears in.)
check_lib2 CL/cl.h clEnqueueNDRangeKernel -lOpenCL
check_func_headers CL/cl.h clEnqueueNDRangeKernel -lOpenCL
check_ld cc -lOpenCL
check_cc
BEGIN /tmp/ffconf.UNWNaz4r.c
    1   #include <CL/cl.h>
    2   long check_clEnqueueNDRangeKernel(void) { return (long) clEnqueueNDRangeKernel; }
    3   int main(void) { return 0; }
END /tmp/ffconf.UNWNaz4r.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -O3 -march=nocona -m64 
-I/root/20130423/_release/include -std=c99 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.wxa3Qkrq.o /tmp/ffconf.UNWNaz4r.c
/tmp/ffconf.UNWNaz4r.c:1:19: error: CL/cl.h: No such file or directory
/tmp/ffconf.UNWNaz4r.c: In function 'check_clEnqueueNDRangeKernel':
/tmp/ffconf.UNWNaz4r.c:2: error: 'clEnqueueNDRangeKernel' undeclared (first use in this function)
/tmp/ffconf.UNWNaz4r.c:2: error: (Each undeclared identifier is reported only once
/tmp/ffconf.UNWNaz4r.c:2: error: for each function it appears in.)
ERROR: opencl not found

나는 이미 cuda 드라이브를 설치했다.
오픈cl의 라이브러리를 찾아보세요. 존재합니다.
[root@localhost OpenCL]# whereis libOpenCL
libOpenCL: /usr/lib64/libOpenCL.so
[root@localhost lib64]# pwd
/usr/lib64
[root@localhost lib64]# ll *Open*
lrwxrwxrwx. 1 root root     14 May  8 11:03 libOpenCL.so -> libOpenCL.so.1
lrwxrwxrwx. 1 root root     16 May  8 11:03 libOpenCL.so.1 -> libOpenCL.so.1.0
lrwxrwxrwx. 1 root root     18 May  8 11:03 libOpenCL.so.1.0 -> libOpenCL.so.1.0.0
-rwxr-xr-x. 1 root root  21296 May  8 11:03 libOpenCL.so.1.0.0
lrwxrwxrwx. 1 root root     20 May  7 16:16 libQtOpenGL.so.4 -> libQtOpenGL.so.4.6.2
lrwxrwxrwx. 1 root root     20 May  7 16:16 libQtOpenGL.so.4.6 -> libQtOpenGL.so.4.6.2
-rwxr-xr-x. 1 root root 800288 Sep 26  2011 libQtOpenGL.so.4.6.2

OK, 라이브러리가 존재하는지 확인하지만 헤더 파일이 없습니다.cuda에서 제공하는 Opencl의 헤더 파일copy는/usr/include/OpenCL 및/usr/include/CL입니다.
그 후에, 컴파일은 버전 충돌을 발견했고, ffmpeg는 1.2 버전이 필요했다...
"ERROR: opencl must be installed and version must be 1.2 or compatible"
버전 1.2 다운로드(http://www.khronos.org/opencl/)의 Opencl를 원래 버전으로 교체하고 컴파일에 성공했습니다.(컴파일 추가 - lOpenCL)
테스트:
[root@localhost test]# ./ffmpeg -opencl_bench
ffmpeg version 2.2 Copyright (c) 2000-2014 the FFmpeg developers
  built on May 10 2014 11:26:51 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)
  configuration: --prefix=/root/20130423/_release --cc= --extra-cflags=-I/root/20130423/_release/include --extra-ldflags='-L/root/20130423/_release/lib -lm' --enable-pthreads --extra-libs=-lpthread --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libfaac --enable-libaacplus --enable-postproc --enable-demuxer=oss --disable-debug --enable-nonfree --enable-static --enable-version3 --enable-opencl
  libavutil      52. 66.100 / 52. 66.100
  libavcodec     55. 52.102 / 55. 52.102
  libavformat    55. 33.100 / 55. 33.100
  libavdevice    55. 10.100 / 55. 10.100
  libavfilter     4.  2.100 /  4.  2.100
  libswscale      2.  5.102 /  2.  5.102
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
platform_idx    device_idx      device_name     runtime
0       1       Tesla K10.G1.8GB        1719
0       0       Tesla K10.G1.8GB        1723

좋은 웹페이지 즐겨찾기