I shared this in the [email protected] thread already, but since this seems to be more complex then initially thought I’m opening a new thread.
TL;DR: Anyone got a hot tip on getting OpenCL on Fedora to work?
I tried digging around a little and it might be harder then expected. So essentially it seems FAH is using a hardcoded library name (including version) - I don’t know if this is even the right way to do it but that’s not the point either. From what I can tell it tries to find
libOpenCL.so, but can’t because it doesn’t exist:
[[email protected] ~]$ ls -l /usr/lib | grep libOpenCL && ls -l /usr/lib64 | grep libOpenCL lrwxrwxrwx. 1 root root 18 Jul 26 2019 libOpenCL.so.1 -> libOpenCL.so.1.0.0 -rwxr-xr-x. 1 root root 144860 Jul 26 2019 libOpenCL.so.1.0.0 lrwxrwxrwx. 1 root root 18 Jul 26 2019 libOpenCL.so.1 -> libOpenCL.so.1.0.0 -rwxr-xr-x. 1 root root 137304 Jul 26 2019 libOpenCL.so.1.0.0
[[email protected] ~]$ ldconfig -p | grep libOpenCL libOpenCL.so.1 (libc6,x86-64) => /lib64/libOpenCL.so.1 libOpenCL.so.1 (libc6) => /lib/libOpenCL.so.1
So yes, it actually does not exist. I then tried manually symlinking the file (even though I don’t really want to mess around with system libs), but that didn’t work either:
So I tried digging around what is providing my current files.
[[email protected] ~]$ dnf repoquery --installed -l mesa-libOpenCL /etc/OpenCL/vendors/mesa.icd /usr/lib/.build-id /usr/lib/.build-id/8f /usr/lib/.build-id/8f/7570d3fec6096811dec97e7b6576d87f858263 /usr/lib64/libMesaOpenCL.so.1 /usr/lib64/libMesaOpenCL.so.1.0.0
As you can see the mesa package doesn’t actually provide the generic openCL libraries. The generic files are provided separately:
[[email protected] ~]$ dnf provides /usr/lib/libOpenCL.so.1 Last metadata expiration check: 0:11:00 ago on Sun 15 Mar 2020 22:39:34 CET. ocl-icd-2.2.12-6.fc31.i686 : OpenCL Library (Installable Client Library) Bindings Repo : @System Matched from: Filename : /usr/lib/libOpenCL.so.1 ocl-icd-2.2.12-6.fc31.i686 : OpenCL Library (Installable Client Library) Bindings Repo : fedora Matched from: Filename : /usr/lib/libOpenCL.so.1
According to the README of the
ocl-icd this seems to be a package to forward generic OpenCL calls to vendor-specific libs (i.e. Mesa-OpenCL in this case).
So I tried finding a package that provides
libOpenCL.so, and only found both
[[email protected] ~]$ dnf provides /usr/lib64/libOpenCL.so /usr/lib/libOpenCL.so Last metadata expiration check: 1:26:59 ago on Sun 15 Mar 2020 22:39:34 CET. ocl-icd-devel-2.2.12-6.fc31.i686 : OpenCL Library Development files Repo : fedora Matched from: Filename : /usr/lib/libOpenCL.so ocl-icd-devel-2.2.12-6.fc31.x86_64 : OpenCL Library Development files Repo : fedora Matched from: Filename : /usr/lib64/libOpenCL.so
Tried installing both of them but they also just add a symlink so the result is the same as above.
Anything I missed?