Darktable won’t start

darktable cannot be started, it displays the following error:

darktable-cltest
     0.0370 [dt_get_sysresource_level] switched to 1 as `default'
     0.0370   total mem:       32017MB
     0.0370   mipmap cache:    4002MB
     0.0370   available mem:   16008MB
     0.0370   singlebuff:      250MB
     0.0370   OpenCL tune mem: OFF
     0.0370   OpenCL pinned:   OFF
[opencl_init] opencl related configuration options:
[opencl_init] opencl: ON
[opencl_init] opencl_scheduling_profile: 'default'
[opencl_init] opencl_library: 'default path'
[opencl_init] opencl_device_priority: '*/!0,*/*/*/!0,*'
[opencl_init] opencl_mandatory_timeout: 400
[opencl_init] opencl library 'libOpenCL' found on your system and loaded
[opencl_init] found 2 platforms
[opencl_init] found 2 devices

[dt_opencl_device_init]
   DEVICE:                   0: 'cpu-AMD Ryzen 5 2600X Six-Core Processor'
   PLATFORM NAME & VENDOR:   Portable Computing Language, The pocl project
   CANONICAL NAME:           portablecomputinglanguagecpuamdryzen52600xsixcoreprocessor
   DRIVER VERSION:           4.0
   DEVICE VERSION:           OpenCL 3.0 PoCL HSTR: cpu-x86_64-pc-linux-gnu-znver1
   DEVICE_TYPE:              CPU
   GLOBAL MEM SIZE:          29969 MB
   MAX MEM ALLOC:            8192 MB
   MAX IMAGE SIZE:           16384 x 16384
   MAX WORK GROUP SIZE:      4096
   MAX WORK ITEM DIMENSIONS: 3
   MAX WORK ITEM SIZES:      [ 4096 4096 4096 ]
   ASYNC PIXELPIPE:          NO
   PINNED MEMORY TRANSFER:   NO
   MEMORY TUNING:            NO
   FORCED HEADROOM:          400
   AVOID ATOMICS:            NO
   MICRO NAP:                1000
   ROUNDUP WIDTH:            16
   ROUNDUP HEIGHT:           16
   CHECK EVENT HANDLES:      128
   TILING ADVANTAGE:         0.000
   DEFAULT DEVICE:           NO
   *** marked as disabled ***

   [dt_opencl_device_init]
   DEVICE:                   1: 'gfx1031'
   PLATFORM NAME & VENDOR:   AMD Accelerated Parallel Processing, Advanced Micro Devices, Inc.
   CANONICAL NAME:           amdacceleratedparallelprocessinggfx1031
   DRIVER VERSION:           3570.0 (HSA1.1,LC)
   DEVICE VERSION:           OpenCL 2.0 
   DEVICE_TYPE:              GPU
   GLOBAL MEM SIZE:          12272 MB
   MAX MEM ALLOC:            10431 MB
   MAX IMAGE SIZE:           16384 x 16384
   MAX WORK GROUP SIZE:      256
   MAX WORK ITEM DIMENSIONS: 3
   MAX WORK ITEM SIZES:      [ 1024 1024 1024 ]
   ASYNC PIXELPIPE:          NO
   PINNED MEMORY TRANSFER:   NO
   MEMORY TUNING:            NO
   FORCED HEADROOM:          400
   AVOID ATOMICS:            NO
   MICRO NAP:                250
   ROUNDUP WIDTH:            16
   ROUNDUP HEIGHT:           16
   CHECK EVENT HANDLES:      128
   TILING ADVANTAGE:         0.000
   DEFAULT DEVICE:           NO
   KERNEL BUILD DIRECTORY:   /usr/share/darktable/kernels
   KERNEL DIRECTORY:         /home/xbox/.cache/darktable/cached_v1_kernels_for_AMDAcceleratedParallelProcessinggfx1031_35700HSA11LC
   CL COMPILER OPTION:       -cl-fast-relaxed-math
PHI node has multiple entries for the same basic block with different incoming values!
  %967 = phi float [ %largephi.extractslice0, %sw.default ], [ %largephi.extractslice055, %sw.bb667 ], [ %largephi.extractslice059, %sw.bb663 ], [ %largephi.extractslice063, %sw.bb659 ], [ %largephi.e
xtractslice067, %sw.bb655 ], [ %largephi.extractslice071, %sw.bb646 ], [ %largephi.extractslice075, %_Z4fmodff.exit16 ], [ %largephi.extractslice079, %_Z4fmodff.exit13 ], [ %largephi.extractslice083, 
%_Z4fmodff.exit ], [ %largephi.extractslice087, %sw.bb562 ], [ %largephi.extractslice091, %sw.bb555 ], [ %largephi.extractslice095, %sw.bb533 ], [ %largephi.extractslice099, %if.then502 ], [ %largephi
.extractslice0103, %if.else517 ], [ %largephi.extractslice0107, %if.then456 ], [ %largephi.extractslice0111, %if.else471 ], [ %largephi.extractslice0115, %if.then393 ], [ %largephi.extractslice0119, %
if.else408 ], [ %largephi.extractslice0123, %if.then338 ], [ %largephi.extractslice0127, %if.else353 ], [ %largephi.extractslice0131, %if.then283 ], [ %largephi.extractslice0135, %if.else298 ], [ %lar
gephi.extractslice0139, %if.then224 ], [ %largephi.extractslice0143, %if.else241 ], [ %largephi.extractslice0147, %sw.bb193 ], [ %largephi.extractslice0151, %sw.bb180 ], [ %largephi.extractslice0155, 
%sw.bb168 ], [ %largephi.extractslice0159, %sw.bb158 ], [ %largephi.extractslice0163, %sw.bb147 ], [ %largephi.extractslice0167, %if.then116 ], [ %largephi.extractslice0171, %if.else131 ], [ %largephi
.extractslice0175, %sw.bb71 ], [ %largephi.extractslice0179, %sw.bb ], [ %largephi.extractslice0183, %if.end ], [ %largephi.extractslice0187, %if.end ], [ %largephi.extractslice0191, %if.end ], [ %lar
gephi.extractslice0195, %if.end ], [ %largephi.extractslice0199, %if.end ]
label %if.end
  %largephi.extractslice0199 = extractelement <4 x float> %div, i64 0
  %largephi.extractslice0187 = extractelement <4 x float> %div, i64 0
in function blendop_Lab
LLVM ERROR: Broken function found, compilation aborted!
[1]    11805 IOT instruction (core dumped)  darktable-cltest

My opencl installation is working fine opencl based programs are working like davinci resolve

Does anyone know how to deal with this problem?

You can try removing the cached kernels in this directory and having DT regenerate them. Also make sure your gpu driver is up to date.

Everything is fine with my opencl, all other programs work fine, it’s darktable that won’t open after the last system update. I tried deleting the darktable related folders but it didn’t do anything!

Apologies if you already stated, but knowing the operating system may help people to give feedback. Also, I have known darktable to crash when opening an image to develop and Open CL is activated in the preferences, but DT is unhappy working with it for any number of reasons. I mention this because if you are selecting an image outside of darktable and asking for it to be opened by darktable it may result in a crash, whereas if you open darktable without selecting an image it may open. If that is case then disable Open CL and see how you go.

However, if it is crashing when just opening the program I am at a loss because I have only seen Open CL problems when trying to open an image in the darkroom tab.

If I disable opencl to start darktable, it will run, but I want darktable to use gpu acceleration.

OK, I had a similar problem on one of my computers, which was BTW running Linux. The Open CL driver was not the latest from manufacturer. I installed the very latest driver and problem resolved. I hope your solution is this easy. Other programs may run on an older driver, but DT may not. I am no expert on this and certainly defer to the advice of any experts that respond to your post. In the meantime run DT without open CL as only a few modules really benefit from it and the program should still function fine.