20:52 valpackett: heey.. What's up with the libclc / llvm23 spirv-mesa3d- target nonsense? Does anyone have recs on what distros gotta do? Seems like just upgrading to llvm 23 (as alpine did just recently) straight up breaks rusticl (Libclc failed to load.)
20:52 valpackett: https://github.com/llvm/llvm-project/issues/218800 "Clang now rejects the spirv-unknown-mesa3d triple" "it seems the change on llvm's side was intentional"
20:53 valpackett: do we switch to mesa-libclc? do we have to build that with clang22?
20:56 karolherbst: valpackett: just use https://gitlab.freedesktop.org/karolherbst/mesa-libclc (and ask packagers to use that)
20:56 karolherbst: valpackett: it can build with clang-23 afaik
20:57 karolherbst: the issue isn't really the target anyway, but that llvm-23 follows a different model with libclc
20:58 karolherbst: the targets on llvm-23 to be used should be spirv64-unknown-unknown and spir32-unknown-unknown anyway
20:58 karolherbst: valpackett: like I also asked for the mesa3d target to be renamed, because there was nothing mesa specific about it in the first place, so one should just use the normal spirv targets there
21:00 karolherbst: but libclc from llvm-23 will be broken for other reasons
21:01 valpackett: oof, ok, thanks
21:03 valpackett: seems odd that mesa itself does not support the generic target names yet?
21:06 karolherbst: valpackett: llvm-23 changed the structure of where files are installed
21:07 karolherbst: like you can put the built binaries at the old locations and it's fine, but currently libclc-23 only builds `libclc.spv` files, no?
21:07 karolherbst: the target gets encoded in the directory path, but it's some sub path of the clang resource directory or something, and that's kinda a huge mess
21:36 valpackett: yeah it provides `usr/share/clc/spirv{32,64}-unknown-{unknown/libclc.spv,vulkan/libclc.bc}`
21:36 valpackett: nothing with `mesa3d-`
21:36 valpackett: doesn't seem to be a clang resource directory
21:37 karolherbst: valpackett: it dpeends how its build
21:37 karolherbst: *built
21:38 karolherbst: valpackett: there was some discussion here: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40601 but it changes depending on whether libclc was built standalone or part of the llvm/clang build or something
21:38 valpackett: the 22 package did have `usr/share/clc/spirv-mesa3d-.spv`, `usr/share/clc/spirv64-mesa3d-.spv`, nvptx, and a truckload of amd model specific bytecode
21:38 karolherbst: yeah.. I've removed/disabled that for mesa-libclc
21:39 karolherbst: nothing used those really...
21:39 karolherbst: maybe rocm does? but they have their own integration
21:39 valpackett: so for the issue with the file not being found at all, the difference is `mesa3d` vs `unknown-unknown`, not where it is
21:40 valpackett: https://gitlab.alpinelinux.org/alpine/aports/-/commit/b709e15f0d28d54f3ebdbd3eea7ca645f202ceb9 huh alpine actually includes mesa's patches
21:40 karolherbst: yeah, it's the easiest solution for now
21:41 karolherbst: valpackett, if you build libclc as part of llvm, then it's installed somewhere else :)
21:41 valpackett: right, in alpine it was standalone before as well
21:42 karolherbst: which.. is great, because libclc also does not have a pkg-config file anymore
21:42 valpackett: but everything still broke because mesa doesn't support the unknown-unknown paths
21:42 karolherbst: which makes sense, because libclc can't be built with all the targets anymore, so each target is its own build
21:42 karolherbst: yeah.. but you can just rename the file for that
21:43 karolherbst: or well.. patch mesa
21:43 karolherbst: for a specific distribution this is all doable
21:43 karolherbst: the issue is having a general solution
21:43 valpackett: sure, that's what I'll do in alpine now
21:43 karolherbst: yeah, but libclc from llvm-23 won't work correctly anyway
21:43 valpackett: but it's libclc *with* mesa patches
21:44 karolherbst: ohh.. well I guess if the patches from the llvm_23 branch are picked it's fine
21:44 karolherbst: it's just not well test
21:45 valpackett: so the llvm_23 branch does not revert the target rename, and upstream mesa does not support the rename
21:45 valpackett: so it all broke with everything packaged as-intended-by-mesa :)
21:47 karolherbst: right...
21:47 karolherbst: could add symlinks I guess...
21:47 karolherbst: but maybe we could fix relying on a pkg-config file...
21:47 karolherbst: like.. it's gone, but we could check multiple paths? dunno...
21:47 karolherbst: currently the code doesn't really support alternative paths
21:50 karolherbst: Mhhh yeah.. I think I like the idea of just keep relying on a pc file
21:51 karolherbst: maybe I'll play around tomorrow and come up with something there
21:54 valpackett: thanks!