FS#79610 - [darktable] fails to launches due to LLVM error

Attached to Project: Arch Linux
Opened by hurricane pootis (HurricanePootis) - Thursday, 07 September 2023, 17:00 GMT
Last edited by Toolybird (Toolybird) - Saturday, 07 October 2023, 00:47 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Darktable fails to launch with the following message:

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.extractslice067, %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 ], [ %largephi.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 ], [ %largephi.extractslice0195, %if.end ], [ %largephi.extractslice0199, %if.end ]
label %if.end
%largephi.extractslice0183 = extractelement <4 x float> %div, i64 0
%largephi.extractslice0199 = extractelement <4 x float> %div, i64 0
in function blendop_Lab
LLVM ERROR: Broken function found, compilation aborted!
Aborted


Additional info:
* package version(s)
2:4.4.2-3
* config and/or log files etc.
* link to upstream bug report, if any

Steps to reproduce:
1) Install darktable
2) Run darktable
3) Fail
This task depends upon

Closed by  Toolybird (Toolybird)
Saturday, 07 October 2023, 00:47 GMT
Reason for closing:  No response
Comment by Toolybird (Toolybird) - Thursday, 07 September 2023, 22:12 GMT
A basic install (without OpenCL) works fine here. Have you enabled OpenCL? Which GPU/drivers?
Comment by Toolybird (Toolybird) - Thursday, 07 September 2023, 22:39 GMT
In a VM with Nvidia card passed thru, it still works fine after installing nvidia drivers and opencl-nvidia which auto-enables OpenCL support in darktable.
Comment by hurricane pootis (HurricanePootis) - Friday, 08 September 2023, 04:07 GMT
Yeah, I have opencl drivers installed. rocm-opencl-runtime on a Ryzen 5 5625U.
Comment by Baptiste (gigaturbo) - Friday, 08 September 2023, 17:55 GMT
Same error here after a package update:
```
Gtk-Message: 19:49:09.448: Failed to load module "appmenu-gtk-module"
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.extractslice067, %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 ], [ %largephi.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 ], [ %largephi.extractslice0195, %if.end ], [ %largephi.extractslice0199, %if.end ]
label %if.end
%largephi.extractslice0187 = extractelement <4 x float> %div, i64 0
%largephi.extractslice0195 = extractelement <4 x float> %div, i64 0
in function blendop_Lab
LLVM ERROR: Broken function found, compilation aborted!
```
Comment by Baptiste (gigaturbo) - Friday, 08 September 2023, 20:28 GMT
Comment by Toolybird (Toolybird) - Saturday, 09 September 2023, 00:23 GMT
> rocm-opencl-runtime

That pkg was compiled against llvm-libs-15 so I guess a recompile might fix it..

To confirm it's opencl causing the problem, does darktable start if you launch it like this?

$ darktable --disable-opencl

Comment by Baptiste (gigaturbo) - Saturday, 09 September 2023, 13:43 GMT
Yes It works with
$ darktable --disable-opencl
Comment by loqs (loqs) - Saturday, 09 September 2023, 14:34 GMT
Rebuilt darktable with pkgver incremented to 3.1:
https://drive.google.com/file/d/1M4u0ExaQ_sF3Bggkka056EfLlzWvz2A_/view?usp=sharing darktable-2:4.4.2-3.1-x86_64.pkg.tar.zst
Comment by Toolybird (Toolybird) - Saturday, 09 September 2023, 23:43 GMT
> Rebuilt darktable

Thanks @loqs, but that won't help if the root cause is "rocm-opencl-runtime" as hypothesized above?
Comment by loqs (loqs) - Saturday, 09 September 2023, 23:56 GMT
Wait for the rocm 5.6.1 rebuild to leave staging and see if that fixes the issue?
Comment by loqs (loqs) - Saturday, 16 September 2023, 08:22 GMT
Can you reproduce the issue with rocm-opencl-runtime 5.6.1-1 which was built with llvm 16?

Loading...