博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
编译ffmpeg“ERROR: opencl not found”问题
阅读量:6078 次
发布时间:2019-06-20

本文共 3522 字,大约阅读时间需要 11 分钟。

hot3.png

编译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 -lOpenCLcheck_func_headers CL/cl.h clEnqueueNDRangeKernel -lOpenCLcheck_ld cc -lOpenCLcheck_ccBEGIN /tmp/ffconf.UNWNaz4r.c    1   #include 
2 long check_clEnqueueNDRangeKernel(void) { return (long) clEnqueueNDRangeKernel; } 3 int main(void) { return 0; }END /tmp/ffconf.UNWNaz4r.cgcc -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

我已经 。

查找一下opencl的库,是存在的。

[root@localhost OpenCL]# whereis libOpenCLlibOpenCL: /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.1lrwxrwxrwx. 1 root root     16 May  8 11:03 libOpenCL.so.1 -> libOpenCL.so.1.0lrwxrwxrwx. 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.0lrwxrwxrwx. 1 root root     20 May  7 16:16 libQtOpenGL.so.4 -> libQtOpenGL.so.4.6.2lrwxrwxrwx. 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版本()的opencl替换原来的版本,然后就编译成功了。(编译增加-lOpenCL)

测试一下:

[root@localhost test]# ./ffmpeg -opencl_benchffmpeg 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.100platform_idx    device_idx      device_name     runtime0       1       Tesla K10.G1.8GB        17190       0       Tesla K10.G1.8GB        1723

转载于:https://my.oschina.net/zhangxu0512/blog/262903

你可能感兴趣的文章
Oakley Sunglasses – Useful Information About Oakley Sunglasses
查看>>
[转载]html5教程
查看>>
Notification 使用详解(很全
查看>>
android-数据库操作实例,留着以后用
查看>>
Q85 最大矩形
查看>>
npm 无法安装 ionic 解决办法
查看>>
解决fragmentTransaction.replace不能全屏
查看>>
第十二周作业
查看>>
Hadoop学习笔记(七)
查看>>
Python日期与时间
查看>>
Fix: Windows Script Host access is disabled on this machine
查看>>
Class.forName()用法详解
查看>>
Silverlight 在IIS5.1或6.0下部署
查看>>
Linux内核的同步机制(转)
查看>>
用SQL语句获得一个存储过程返回的表
查看>>
论性能测试
查看>>
(转)记录程序崩溃时的调用堆栈
查看>>
Java NIO缓冲区(Buffer)(3)
查看>>
jdbc连接一些问题和常规操作
查看>>
这些代码都是 吃屁的,
查看>>