[FFmpeg-user] How to build ffmpeg with OpenCL

Ramit Bhalla ramitbhalla at gmail.com
Sun Feb 2 18:46:45 CET 2014


>
>
> > cannot find -lOpenCL
>
> It appears that you have installed the headers
> but not the actual library.


 Okay I take that back, it's still not working. I build libOpenCL.so and
placed it in the compiler lib folder.

I'm still seeing this, any idea why and what I'm doing wrong?

/Software/ffmpeg/sandbox/mingw-w64-i686/bin/../lib/gcc/i686-w64-mingw32/4.8.0/../../../../i686-w64-mingw32/bin/ld:
-f may not be used without -shared
collect2: error: ld returned 1 exit status
check_lib2 CL/cl.h clEnqueueNDRangeKernel -lOpenCL
check_func_headers CL/cl.h clEnqueueNDRangeKernel -lOpenCL
check_ld cc -lOpenCL
check_cc
BEGIN /tmp/ffconf.krpZS1gQ.c
    1 #include <CL/cl.h>
    2 long check_clEnqueueNDRangeKernel(void) { return (long)
clEnqueueNDRangeKernel; }
    3 int main(void) { return 0; }
END /tmp/ffconf.krpZS1gQ.c
/Software/ffmpeg/sandbox/mingw-w64-i686/bin/i686-w64-mingw32-gcc
-D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1 -D__printf__=__gnu_printf__
-DPTW32_STATIC_LIB -DLIBTWOLAME_STATIC -std=c99 -fomit-frame-pointer
-pthread -I/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/include
-I/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/include
-I/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/include
-I/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/include/fribidi
-I/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/include/freetype2
-I/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/include
-I/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/include/freetype2
-I/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/include
-I/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/include/opus
-I/home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/include
-I/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/include
-I/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/include/schroedinger-1.0
-I/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/include/orc-0.4
-c -o /tmp/ffconf.ojOFiHPn.o /tmp/ffconf.krpZS1gQ.c
/Software/ffmpeg/sandbox/mingw-w64-i686/bin/i686-w64-mingw32-gcc
-Wl,--nxcompat -Wl,--dynamicbase -Wl,--as-needed -o
/tmp/ffconf.L6EvMcGZ.exe /tmp/ffconf.ojOFiHPn.o -lOpenCL -lzvbi -lxvidcore
-lxavs -lx264 -lvpx -lvpx -lvpx -lvorbisenc -lvorbis -logg -lvo-amrwbenc
-lvo-aacenc -lutvideo -lstdc++ -ltwolame -ltwolame -ltheoraenc -ltheoradec
-logg -lspeex -lsoxr
-L/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/lib
-lschroedinger-1.0 -lorc-0.4
-L/home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/lib
-L/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/lib -lrtmp
-lwinmm -lz -lgnutls -lnettle -lhogweed -lgmp -lcrypt32 -lws2_32 -liconv
-L/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/lib -lopus
-lopenjpeg -lopencore-amrwb -lopencore-amrnb -lmp3lame -lmodplug -lilbc
-lgsm -L/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/lib
-lfreetype -lexpat -lfdk-aac
-L/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/lib -lcaca
-lbluray -L/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/lib
-lass -lm -lfontconfig -lfribidi -lfreetype -lexpat
-L/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/lib -lgnutls
-lnettle -lhogweed -lgmp -lcrypt32 -lws2_32 -liconv
-L/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/lib -lfontconfig
-lfreetype -lexpat -lm -lbz2 -lz -pthread -lpsapi -ladvapi32 -lshell32
-lstdc++
/Software/ffmpeg/sandbox/mingw-w64-i686/bin/../lib/gcc/i686-w64-mingw32/4.8.0/../../../../i686-w64-mingw32/bin/ld:
cannot find -lOpenCL
collect2: error: ld returned 1 exit status
ERROR: opencl not found


More information about the ffmpeg-user mailing list