Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 638322 - media-libs/mesa-9999 USE=opencl - Error: The mesa OpenCL implementation doesn't seem to provide libOpenCL.so file.
Summary: media-libs/mesa-9999 USE=opencl - Error: The mesa OpenCL implementation doesn...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Matt Turner
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-21 13:36 UTC by Luke A. Guest
Modified: 2017-12-10 07:01 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Don't compile OpenCL / Clover lib as an ICD library. (mesa-icd.patch,287 bytes, patch)
2017-11-27 19:48 UTC, Luke A. Guest
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Luke A. Guest 2017-11-21 13:36:34 UTC
I've been installing mesa-9999 package with USE=opencl and noticed on updating the following message:

Switching to xorg-x11 OpenGL interface... done
!!! Error: The mesa OpenCL implementation doesn't seem to provide
!!! Error: libOpenCL.so file. This might be an effect of breakage introduced
!!! Error: by a prioprietary driver installer. Please re-merge the package
!!! Error: providing your OpenCL implementation.
!!! Error: Selected OpenCL implementation incomplete.
exiting

The /usr/lib/OpenCL/vendors/mesa/include/ /usr/lib/OpenCL/vendors/mesa/lib/ dirs are empty. There are /usr/lib/libMesaOpenCL.so* files installed.

Switching to ocl-icd also doesn't work properly as no headers are found:

# ls -l /usr/include/CL/
total 32
lrwxrwxrwx 1 root root 49 May 30 18:00 cl_egl.h -> //usr/lib64/OpenCL/global/include/CL-1.2/cl_egl.h
lrwxrwxrwx 1 root root 51 Nov  3 12:40 cl_ext.h -> ../../lib64/OpenCL/vendors/mesa/include/CL/cl_ext.h
lrwxrwxrwx 1 root root 54 Nov  3 12:40 cl_gl_ext.h -> ../../lib64/OpenCL/vendors/mesa/include/CL/cl_gl_ext.h
lrwxrwxrwx 1 root root 50 Nov  3 12:40 cl_gl.h -> ../../lib64/OpenCL/vendors/mesa/include/CL/cl_gl.h
lrwxrwxrwx 1 root root 47 Nov  3 12:40 cl.h -> ../../lib64/OpenCL/vendors/mesa/include/CL/cl.h
lrwxrwxrwx 1 root root 49 Nov  3 12:40 cl.hpp -> ../../lib64/OpenCL/vendors/mesa/include/CL/cl.hpp
lrwxrwxrwx 1 root root 56 Nov  3 12:40 cl_platform.h -> ../../lib64/OpenCL/vendors/mesa/include/CL/cl_platform.h
lrwxrwxrwx 1 root root 51 Nov  3 12:40 opencl.h -> ../../lib64/OpenCL/vendors/mesa/include/CL/opencl.h

All but the top entry is a broken link.
Comment 1 Luke A. Guest 2017-11-27 19:46:34 UTC
To get this to work again, I added:

$(use_enable opencl)
--disable-opencl-icd

to the ebuild, which then compiles libOpenCL.so not libMesaOpenCL.so giving:

ls -lR /usr/lib/OpenCL/vendors/mesa/
/usr/lib/OpenCL/vendors/mesa/:
total 1020
drwxr-xr-x 1 root root       4 Nov 27 19:41 include
drwxr-xr-x 1 root root       0 May 30 18:29 lib
lrwxrwxrwx 1 root root      18 Nov 27 19:40 libOpenCL.so -> libOpenCL.so.1.0.0
lrwxrwxrwx 1 root root      18 Nov 27 19:40 libOpenCL.so.1 -> libOpenCL.so.1.0.0
-rwxr-xr-x 1 root root 1034064 Nov 27 19:40 libOpenCL.so.1.0.0

/usr/lib/OpenCL/vendors/mesa/include:
total 0
drwxr-xr-x 1 root root 214 Nov 27 19:41 CL

/usr/lib/OpenCL/vendors/mesa/include/CL:
total 284
-rw-r--r-- 1 root root   4883 Nov 27 19:40 cl_d3d10.h
-rw-r--r-- 1 root root   4877 Nov 27 19:40 cl_d3d11.h
-rw-r--r-- 1 root root   5181 Nov 27 19:40 cl_dx9_media_sharing.h
-rw-r--r-- 1 root root   5164 Nov 27 19:40 cl_egl.h
-rw-r--r-- 1 root root  13999 Nov 27 19:40 cl_ext.h
-rw-r--r-- 1 root root   2630 Nov 27 19:40 cl_gl_ext.h
-rw-r--r-- 1 root root   7346 Nov 27 19:40 cl_gl.h
-rw-r--r-- 1 root root  61550 Nov 27 19:40 cl.h
-rw-r--r-- 1 root root 112900 Nov 27 19:40 cl.hpp
-rw-r--r-- 1 root root  41327 Nov 27 19:40 cl_platform.h
-rw-r--r-- 1 root root   1754 Nov 27 19:40 opencl.h

/usr/lib/OpenCL/vendors/mesa/lib:
total 0

ls -lR /usr/lib/libOpenCL*
lrwxrwxrwx 1 root root 38 Nov 27 19:41 /usr/lib/libOpenCL.so -> OpenCL/vendors/mesa/libOpenCL.so.1.0.0
lrwxrwxrwx 1 root root 38 Nov 27 19:41 /usr/lib/libOpenCL.so.1 -> OpenCL/vendors/mesa/libOpenCL.so.1.0.0

1) Why doesn't the ebuild install the libs to /usr/lib/OpenCL/vendors/mesa/lib?
2) There are obvious issues with this being built as an ICD, which is how OpenCL is supposed to work, i.e. multiple implementations on one system controlled via a loader library which finds the icd's via /etc/OpenCL.
Comment 2 Luke A. Guest 2017-11-27 19:48:10 UTC
Created attachment 506852 [details, diff]
Don't compile OpenCL / Clover lib as an ICD library.
Comment 3 Larry the Git Cow gentoo-dev 2017-12-10 07:00:12 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2520c11d0de89e908aa68c082daa8cabdd9e5dcf

commit 2520c11d0de89e908aa68c082daa8cabdd9e5dcf
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2017-12-10 06:59:14 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2017-12-10 06:59:47 +0000

    media-libs/mesa: Use --disable-opencl-icd for now
    
    Bug: https://bugs.gentoo.org/638322

 media-libs/mesa/mesa-9999.ebuild | 1 +
 1 file changed, 1 insertion(+)}