Building against ffmpeg with opencl
    Jakub Bogusz 
    qboosh at pld-linux.org
       
    Sat Jul 26 15:29:30 CEST 2014
    
    
  
On Sat, Jul 26, 2014 at 02:24:40PM +0200, Jan Palus wrote:
> Hi,
> 
> I'm trying to build new release of mpv against ffmpeg-2.2.5 which is now
> built with opencl. Unfortunately I get undefined symbols during linking:
> 
> /usr/lib64/gcc/x86_64-pld-linux/4.8.3/../../../../lib64/libavutil.so: undefined reference to `clReleaseMemObject at OPENCL_1.0'
> /usr/lib64/gcc/x86_64-pld-linux/4.8.3/../../../../lib64/libavutil.so: undefined reference to `clReleaseCommandQueue at OPENCL_1.0'
> /usr/lib64/gcc/x86_64-pld-linux/4.8.3/../../../../lib64/libavfilter.so: undefined reference to `clFinish at OPENCL_1.0'
> /usr/lib64/gcc/x86_64-pld-linux/4.8.3/../../../../lib64/libavutil.so: undefined reference to `clSetKernelArg at OPENCL_1.0'
> /usr/lib64/gcc/x86_64-pld-linux/4.8.3/../../../../lib64/libavfilter.so: undefined reference to `clReleaseProgram at OPENCL_1.0'
> /usr/lib64/gcc/x86_64-pld-linux/4.8.3/../../../../lib64/libavutil.so: undefined reference to `clGetPlatformInfo at OPENCL_1.0'
> /usr/lib64/gcc/x86_64-pld-linux/4.8.3/../../../../lib64/libavutil.so: undefined reference to `clEnqueueUnmapMemObject at OPENCL_1.0'
> /usr/lib64/gcc/x86_64-pld-linux/4.8.3/../../../../lib64/libavutil.so: undefined reference to `clCreateProgramWithSource at OPENCL_1.0'
> ...
> 
> I suppose it is somewhat connected to the fact that NVIDIA's libOpenCL
> (which I have installed) does not provide versioned symbols. Any ideas
> how this could be solved? Adding -lOpenCL fixes the problem but I don't
> think it is a right direction.
(Side note: Mesa libOpenCL doesn't provide @OPENCL_1.0 versioning, AMD's
(fglrx) IIRC does).
Use ocl-icd libOpenCL, which redirects calls to selected target library
(every implementation should provide a file in /etc/OpenCL/vendors dir).
-- 
Jakub Bogusz    http://qboosh.pl/
    
    
More information about the pld-devel-en
mailing list