When `dev-util/spirv-llvm-translator` is not installed with the latest slot, `llvm-core/libclc` won't find it because it only considers the latest slot. So e.g. when I have LLVM 19 and 20 installed due to dependencies, and `dev-util/spirv-llvm-translator` is only installed for LLVM 19, but not 20, this happens during configure: >>> Configuring source in /home/share/gentoo/var/tmp/portage/llvm-core/libclc-19.1.7/work/libclc ... * Source directory (CMAKE_USE_DIR): "/home/share/gentoo/var/tmp/portage/llvm-core/libclc-19.1.7/work/libclc" * Build directory (BUILD_DIR): "/home/share/gentoo/var/tmp/portage/llvm-core/libclc-19.1.7/work/libclc_build" cmake -C /home/share/gentoo/var/tmp/portage/llvm-core/libclc-19.1.7/work/libclc_build/gentoo_common_config.cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/home/share/gentoo/usr -DLIBCLC_TARGETS_TO_BUILD=spirv-mesa3d-;spirv64-mesa3d-;nvptx--;nvptx64--;nvptx--nvidiacl;nvptx64--nvidiacl -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_TOOLCHAIN_FILE=/home/share/gentoo/var/tmp/portage/llvm-core/libclc-19.1.7/work/libclc_build/gentoo_toolchain.cmake /home/share/gentoo/var/tmp/portage/llvm-core/libclc-19.1.7/work/libclc loading initial cache file /home/share/gentoo/var/tmp/portage/llvm-core/libclc-19.1.7/work/libclc_build/gentoo_common_config.cmake -- The CXX compiler identification is GNU 15.1.0 -- The C compiler identification is GNU 15.1.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /home/share/gentoo/usr/bin/x86_64-pc-linux-gnu-g++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /home/share/gentoo/usr/bin/x86_64-pc-linux-gnu-gcc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Performing Test HAVE_FFI_CALL -- Performing Test HAVE_FFI_CALL - Success -- Found FFI: /home/share/gentoo/usr/lib64/libffi.so -- Found ZLIB: /home/share/gentoo/usr/lib64/libz.so (found version "1.3.1") -- Found zstd: /home/share/gentoo/usr/lib64/libzstd.so -- Found LibXml2: /home/share/gentoo/usr/lib64/libxml2.so (found version "2.13.8") -- Linker detection: GNU ld -- libclc LLVM version: 20.1.4 CMake Error at CMakeLists.txt:148 (message): SPIR-V targets requested, but spirv-tools is not installed The problem here is: `libclc LLVM version: 20.1.4`, which will then make it search for SPIR-V in the wrong folders. AFAICT the ebuild is missing `CMAKE_INSTALL_PREFIX` and/or `LLVM_ROOT` in `mycmakeargs[]`; but I'm not expert. Reproducible: Always
Created attachment 928794 [details, diff] llvm-root.patch This seems to work, but I'm not sure what the implications are, so I wouldn't trust it without more knowledge.