Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 531500

Summary: sci-libs/gdal-1.10.1 USE=opencl - configure: ld: cannot find -lOpenCL
Product: Gentoo Linux Reporter: Dainius Masiliūnas <pastas4>
Component: [OLD] LibraryAssignee: Sci-geo Project <sci-geosciences>
Status: RESOLVED OBSOLETE    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge info
build log
config log

Description Dainius Masiliūnas 2014-12-02 22:47:40 UTC
Enabling the opencl USE flag in gdal-1.10.1 results in its build failing in configure phase with the error:

checking for OpenCL support... checking CL/opencl.h usability... yes
checking CL/opencl.h presence... yes
checking for CL/opencl.h... yes
checking for clGetPlatformIDs in -lOpenCL... no
configure: error: --with-opencl requested, but libraries not found!

Reproducible: Didn't try

Steps to Reproduce:
1. Enable the "opencl" USE flag
2. Try to remerge gdal-1.10.1
Actual Results:  
Build failure.

Expected Results:  
Any additional required OpenCL libraries should be pulled into the dependency tree.

I already have Mesa 10.0.4 with the opencl USE flag installed.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-12-03 07:56:12 UTC
1) Please attach the entire build log to this bug report.
2) Please post your `emerge --info' output in a comment.
Comment 2 Dainius Masiliūnas 2014-12-03 09:40:35 UTC
Created attachment 390822 [details]
emerge info
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2014-12-03 12:09:03 UTC
(In reply to Jeroen Roovers from comment #1)
> 1) Please attach the entire build log to this bug report.

That and additionally, attach the config.log to this bug report.
Comment 4 Dainius Masiliūnas 2014-12-03 17:43:08 UTC
Created attachment 390878 [details]
build log
Comment 5 Dainius Masiliūnas 2014-12-03 17:49:04 UTC
Created attachment 390880 [details]
config log
Comment 6 Dainius Masiliūnas 2014-12-03 17:59:34 UTC
Aha, looks like I found the reason why. The file /usr/lib64/libOpenCL.so exists, but it's pointing to "OpenCL/vendors/amd/libOpenCL.so.1", which doesn't exist. Running `eselect opencl set 1` (of 1, there are no other providers) makes it work (pointing to "OpenCL/vendors/mesa/libOpenCL.so.1").

On this machine I had fglrx installed, then unmerged it to use the radeon driver, so maybe that's related to why there was nothing selected in eselect opencl?
Comment 7 Amy Liffey gentoo-dev 2015-12-30 20:06:54 UTC
Version is not in tree anymore.

Amy