[[User error/resolved]]: Mesa + AMDGPU broken as of latest update (40370)? llvm::RTDyldMemoryManager not found

I cannot launch sway at all.
I can launch i3, but I cannot launch alacritty.

My GPU is an AMDGPU, Vega64.

> alacritty
MESA-LOADER: failed to open radeonsi: /usr/lib64/dri/radeonsi_dri.so: undefined symbol: _ZTIN4llvm19RTDyldMemoryManagerE, version LLVM_17 (search paths /usr/lib64/dri, suffix _dri)
failed to load driver: radeonsi
MESA-LOADER: failed to open radeonsi: /usr/lib64/dri/radeonsi_dri.so: undefined symbol: _ZTIN4llvm19RTDyldMemoryManagerE, version LLVM_17 (search paths /usr/lib64/dri, suffix _dri)
failed to load driver: radeonsi
MESA-LOADER: failed to open swrast: /usr/lib64/dri/swrast_dri.so: undefined symbol: _ZTIN4llvm19RTDyldMemoryManagerE, version LLVM_17 (search paths /usr/lib64/dri, suffix _dri)
failed to load driver: swrast
Error: Error { raw_code: Some(165), raw_os_message: Some("GLXBadFBConfig"), kind: BadConfig }
> c++filt _ZTIN4llvm19RTDyldMemoryManagerE
typeinfo for llvm::RTDyldMemoryManager

Clear Linux 40370 newly upgraded to LLVM 17.05 from LLVM 16 in 40360, so seems like that could be related.

> nm -D /usr/lib64/dri/radeonsi_dri.so | grep _ZTIN4llvm19RTDyldMemoryManagerE
                 U _ZTIN4llvm19RTDyldMemoryManagerE@LLVM_17
> nm -D /usr/lib64/libLLVM.so | grep _ZTIN4llvm19RTDyldMemoryManagerE
0000000006e6f4a8 D _ZTIN4llvm19RTDyldMemoryManagerE@@LLVM_17

So, it is failing to link LLVM for some reason?

If anyone’s googling finds them here, the problem was that I had previously build LLVM 17 from source and placed it on my path.

The copy of LLVM I built did not have this symbol.

Removing my copy (which I no longer need, I just wanted the latest LLVM) fixes this.