Description of problem: darktable no longer works with OpenCL on Fedora 37. It's likely other OpenCL-related software may have problems as well. (Anything that needs opencl-c-base.h) Version-Release number of selected component (if applicable): 15.0.6-1.fc37 is problematic. This version prevents darktable from compiling OpenCL optimizations. 15.0.0-2.fc37 includes the necessary file, opencl-c-base.h. How reproducible: Every time. Steps to Reproduce: 1. Make sure 15.0.6-1.fc37 is installed, and 15.0.0-2.fc37 is not installed. 2. Also ensure you have OpenCL enabled on your video card. (Intel needs intel-opencl; AMD needs rocm-opencl. I'm not sure about NVidia.) 3. Run darktable-cltest. Actual results: See that the card is "not supported" as it cannot compile the OpenCL optimizations for the modules. Expected results: The command `darktable-cltest` should show that a card is supported when OpenCL libraries are installed. Additional info: There's an issue @ https://github.com/darktable-org/darktable/issues/12971 with more information. Specifically, this commenter tracked down the issue and has a workaround (to install the older version of clang-libs in the meantime): https://github.com/darktable-org/darktable/issues/12971#issuecomment-1352364429
I just checked clang-libs-15.0.6-1.fc37.x86_64.rpm and it does contain usr/lib64/clang/15.0.6/include/opencl-c-base.h. From the github thread, I suspect that *something* is embedding a hardcoded 15.0.0 resource directory, while the file is now in the 15.0.6 resource directory. We probably need to find that something and rebuild it. (This problem should be solved for good with Clang 16 via https://reviews.llvm.org/D125860.)
I'm on nvidia, so can't directly reproduce this, but: > rpm2cpio rocm-comgr-5.3.0-1.fc38.x86_64.rpm | cpio -idmv > strings usr/lib64/libamd_comgr.so.2.4.0 | grep opencl-c-base.h /usr/lib64/clang/15.0.0/include/opencl-c-base.h /usr/lib64/clang/15.0.0/include/opencl-c-base.h /usr/lib64/clang/15.0.0/include/opencl-c-base.h /usr/lib64/clang/15.0.0/include/opencl-c-base.h So it looks like rocm-compilersupport is the problematic package. As it so happens, there is a pending update to rocm 5.4.1 available at https://bodhi.fedoraproject.org/updates/FEDORA-2022-f523363d5e. Doing the same check on that build, it uses the /usr/lib64/clang/15.0.6/include/opencl-c-base.h path. Could you please check whether that update fixes the issue for you?
Applied the rocm 5.4.1 update from https://bodhi.fedoraproject.org/updates/FEDORA-2022-f523363d5e and ran `dnf update` to sync the rest of the repositories to the latest. darktable-cltest -d verbose passes and Darktable settings show OpenCL active.
I can confirm; this works for me too! Thanks for debugging further and pointing out the ROCm fix! (Apologies for taking a few days to get back to this issue.)