flathub / flathub/org.darktable.Darktable
OpenCL broken
- Dominant language
- Python
- Stars
- 12
- Forks
- 18
- Avg merge
- 45m
- Merged PRs (30d)
- 1
Description
Reported as a bug to darktable directly, however is apparently broken packaging (not managed by darktable).
### Describe the bug
Darktable packaging for Flatpak seems to have broken OpenCL support. Research seems to indicate this may be due to darktable hardlinking specific Clang versions (and not including them in the flatpak manifest), thus meaning any changes from darktable devs (upgrading Clang or changing freedesktop runtime) will break OpenCL support.
Related thread: https://discuss.pixls.us/t/how-to-make-my-amd-gpu-work-with-the-flatpak-version-of-darktable/48167/27
darktable-cltest output:
```
flatpak run --command=sh org.darktable.Darktable
[📦 org.darktable.Darktable ~]$ RUSTICL_ENABLE=radeonsi darktable-cltest -d verbose
darktable 5.0.1
Copyright (C) 2012-2025 Johannes Hanika and other contributors.
Compile options:
Bit depth -> 64 bit
Debug -> DISABLED
SSE2 optimizations -> ENABLED
OpenMP -> ENABLED
OpenCL -> ENABLED
Lua -> ENABLED - API version 9.4.0
Colord -> ENABLED
gPhoto2 -> ENABLED
GMIC -> ENABLED - Compressed LUTs are supported
GraphicsMagick -> ENABLED
ImageMagick -> DISABLED
libavif -> ENABLED
libheif -> ENABLED
libjxl -> ENABLED
LibRaw -> ENABLED - Version 0.22.0-Devel202403
OpenJPEG -> ENABLED
OpenEXR -> ENABLED
WebP -> ENABLED
See https://www.darktable.org/resources/ for detailed documentation.
See https://github.com/darktable-org/darktable/issues/new/choose to report bugs.
0.6422 [dt_get_sysresource_level] switched to 1 as `default'
0.6422 total mem: 31383MB
0.6422 mipmap cache: 3922MB
0.6422 available mem: 15691MB
0.6422 singlebuff: 245MB
0.6432 [opencl_init] opencl disabled via darktable preferences
0.6434 [dt_dlopencl_init] could not find default opencl runtime library 'libOpenCL'
0.6435 [dt_dlopencl_init] could not find default opencl runtime library 'libOpenCL.so'
0.6437 [dt_dlopencl_init] found default opencl runtime library 'libOpenCL.so.1'
0.6437 [opencl_init] opencl library 'libOpenCL.so.1' found on your system and loaded, preference 'default path'
4.5954 [opencl_init] found 1 platform
[opencl_init] found 2 devices
[dt_opencl_device_init]
OpenCL Mesa platform `Mesa/X.org' --> `AMD Radeon RX 7700S'
4.5955 [dt_opencl_write_device_config] writing data '0 250 0 16 16 128 0 0 0.000 0.000 0.250' for 'cldevice_v5_rusticlamdradeonrx7700s'
4.5955 [dt_opencl_write_device_config] writing data '600' for 'cldevice_v5_rusticlamdradeonrx7700s_id0'
DEVICE: 0: 'AMD Radeon RX 7700S (radeonsi, navi33, LLVM 19.1.7, DRM 3.61, 6.14.6-300.fc42.x86_64)'
CONF KEY: cldevice_v5_rusticlamdradeonrx7700s
PLATFORM, VENDOR & ID: rusticl, Mesa:Mesa/X.org, ID=4098
CANONICAL NAME: rusticlamdradeonrx7700s
DRIVER VERSION: 25.0.5 (git-a89e404408)
DEVICE VERSION: OpenCL 3.0
DEVICE_TYPE: GPU, dedicated mem
GLOBAL MEM SIZE: 8192 MB
MAX MEM ALLOC: 2048 MB
MAX IMAGE SIZE: 16384 x 16384
MAX WORK GROUP SIZE: 1024
MAX WORK ITEM DIMENSIONS: 3
MAX WORK ITEM SIZES: [ 1024 1024 1024 ]
ASYNC PIXELPIPE: NO
PINNED MEMORY TRANSFER: NO
AVOID ATOMICS: NO
MICRO NAP: 250
ROUNDUP WIDTH & HEIGHT 16x16
CHECK EVENT HANDLES: 128
TILING ADVANTAGE: 0.000
DEFAULT DEVICE: NO
KERNEL BUILD DIRECTORY: /app/share/darktable/kernels
KERNEL DIRECTORY: /var/home/crystalyne/.var/app/org.darktable.Darktable/cache/darktable/cached_v5_kernels_for_rusticlAMDRadeonRX7700S_2505gita89e404408
CL COMPILER OPTION:
CL COMPILER COMMAND: -w -DAMD=1 -I"/app/share/darktable/kernels"
4.6008 [dt_opencl_device_init] testing program `demosaic_ppg.cl' ..
4.6011 [opencl_fopen_stat] could not open file `/var/home/crystalyne/.var/app/org.darktable.Darktable/cache/darktable/cached_v5_kernels_for_rusticlAMDRadeonRX7700S_2505gita89e404408/demosaic_ppg.cl.bin'!
4.6011 [opencl_load_program] could not load cached binary program, trying to compile source
4.6013 [opencl_load_program] successfully loaded program from '/app/share/darktable/kernels/demosaic_ppg.cl' MD5: '476cab28a24b30a56a5860c361caad9f'
4.6328 [opencl_build_program] could not build program: CL_BUILD_PROGRAM_FAILURE
4.6328 [opencl_build_program] BUILD STATUS: -2
4.6328 BUILD LOG:
4.6328 :1:10: fatal error: 'opencl-c-base.h' file not found
Error executing LLVM compilation action.
4.6328 [dt_opencl_device_init] failed to compile program `demosaic_ppg.cl'!
4.6328 [dt_opencl_write_device_config] writing data '0 250 0 16 16 128 0 0 0.000 0.000 0.250' for 'cldevice_v5_rusticlamdradeonrx7700s'
4.6328 [dt_opencl_write_device_config] writing data '600' for 'cldevice_v5_rusticlamdradeonrx7700s_id0'
[dt_opencl_device_init]
OpenCL Mesa platform `Mesa/X.org' --> `AMD Radeon 780M'
4.6329 [dt_opencl_write_device_config] writing data '0 250 0 16 16 128 0 1 0.000 0.000 0.250' for 'cldevice_v5_rusticlamdradeon780m'
4.6329 [dt_opencl_write_device_config] writing data '600' for 'cldevice_v5_rusticlamdradeon780m_id0'
DEVICE: 1: 'AMD Radeon 780M (radeonsi, phoenix, LLVM 19.1.7, DRM 3.61, 6.14.6-300.fc42.x86_64)'
CONF KEY: cldevice_v5_rusticlamdradeon780m
PLATFORM, VENDOR & ID: rusticl, Mesa:Mesa/X.org, ID=4098
CANONICAL NAME: rusticlamdradeon780m
DRIVER VERSION: 25.0.5 (git-a89e404408)
DEVICE VERSION: OpenCL 3.0
DEVICE_TYPE: GPU, dedicated mem
*** insufficient global memory (512MB) ***
4.6330 [dt_opencl_write_device_config] writing data '0 250 0 16 16 128 0 1 0.000 0.000 0.250' for 'cldevice_v5_rusticlamdradeon780m'
4.6330 [dt_opencl_write_device_config] writing data '600' for 'cldevice_v5_rusticlamdradeon780m_id0'
[opencl_init] no suitable devices found.
4.6330 [opencl_init] FINALLY: opencl PREFERENCE=OFF is NOT AVAILABLE and NOT ENABLED.
```
### Steps to reproduce
Attempt to run Darktable with OpenCL enabled from Flatpak runtime
### Expected behavior
Darktable should support OpenCL within the flatpak runtime
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.