FAILED: CMakeFiles/opencl-clang.dir/common_clang.cpp.o /usr/bin/x86_64-pc-linux-gnu-g++ -DCOMMON_CLANG_EXPORTS -DLIBCOMMON_CLANG_NAME=\"libopencl-clang.so.8\" -DUSE_PREBUILT_LLVM -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I/usr/lib/llvm/8/include -I. -I. -DNDEBUG -O2 -pipe -march=native -fPIC -std=gnu++11 -MD -MT CMakeFiles/opencl-clang.dir/common_clang.cpp.o -MF CMakeFiles/opencl-clang.dir/common_clang.cpp.o.d -o CMakeFiles/opencl-clang.dir/common_clang.cpp.o -c /var/tmp/portage/dev-libs/opencl-clang-8.0.1_p20191001/work/opencl-clang-8.0.1_p20191001/common_clang.cpp /var/tmp/portage/dev-libs/opencl-clang-8.0.1_p20191001/work/opencl-clang-8.0.1_p20191001/common_clang.cpp:54:10: fatal error: LLVMSPIRVLib/LLVMSPIRVLib.h: No such file or directory 54 | #include "LLVMSPIRVLib/LLVMSPIRVLib.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.1_no-multilib-20190929-041856 ------------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-gnu-9.2.0 * clang: clang version 9.0.0 (tags/RELEASE_900/final) Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm/9/bin llvm: 9.0.0 Available Python interpreters, in order of preference: [1] python3.6 [2] python2.7 (fallback) [3] pypy3 (fallback) Available Ruby profiles: [1] ruby24 (with Rubygems) [2] ruby25 (with Rubygems) * Available Rust versions: [1] rust-1.38.0 * java-config: The following VMs are available for generation-2: *) IcedTea JDK 3.13.0 [icedtea-bin-8] 2) JamVM JDK 2.0.0 [jamvm] Available Java Virtual Machines: [1] icedtea-bin-8 system-vm [2] jamvm repository: ==> /var/db/repos/gentoo/metadata/timestamp.chk <== Wed, 02 Oct 2019 00:46:08 +0000 emerge -qpvO dev-libs/opencl-clang [ebuild N ] dev-libs/opencl-clang-8.0.1_p20191001
Created attachment 591578 [details] emerge-info.txt
Created attachment 591580 [details] dev-libs:opencl-clang-8.0.1_p20191001:20191002-045446.log
Created attachment 591582 [details] emerge-history.txt
Created attachment 591584 [details] environment
Created attachment 591586 [details] etc.portage.tbz2
Created attachment 591588 [details] logs.tbz2
Created attachment 591590 [details] temp.tbz2
Could this be an bug on multislot with LLVM8 and LLVM9? I also did hit that error. If I look for that missing header files, I can see, they are present, but for CLANG9. -> /usr/lib/llvm/9/include/LLVMSPIRVLib/LLVMSPIRVLib.h If I look into emerge of dev-util/spirv-llvm-translator, which provides this, I can see: -- Found LLVM: 8.0.1 -- Found ccache: /usr/bin/ccache -- <<< Gentoo configuration >>> Build type Gentoo Install path /usr/lib/llvm/9 Doesn't look right for me, when LLVM 8.0.1 is found, but install path is for LLVM 9?
If I do a symlink for LLVMSPIRVLib.h, LLVMSPIRVLib.so and LLVMSPIRVLib.so.8 from /usr/lib/llvm/9/ to /usr/lib/llvm/8 the compilation succeseds.
Could someone who has already reproduced this problem post their complete build logs for dev-util/spirv-llvm-translator as well as the output of ldd for libLLVMSPIRVLib.so from that package? The snippet posted by Conrad in #c8 suggests the problem might be with the ebuilds feeding CMake an incorrect install directory when both llvm8 and llvm9 are present but I would to confirm this.
Created attachment 592036 [details] build.log build.log for dev-util/spirv-llvm-translator. ldd output for /usr/lib/llvm/9/lib64/libLLVMSPIRVLib.so linux-vdso.so.1 (0x00007ffe2d568000) libLLVMAnalysis.so.8 => /usr/lib/llvm/8/lib64/libLLVMAnalysis.so.8 (0x00007202510c4000) libLLVMBitWriter.so.8 => /usr/lib/llvm/8/lib64/libLLVMBitWriter.so.8 (0x0000720251079000) libLLVMCore.so.8 => /usr/lib/llvm/8/lib64/libLLVMCore.so.8 (0x0000720250d65000) libLLVMSupport.so.8 => /usr/lib/llvm/8/lib64/libLLVMSupport.so.8 (0x0000720250b83000) libLLVMTransformUtils.so.8 => /usr/lib/llvm/8/lib64/libLLVMTransformUtils.so.8 (0x0000720250991000) libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/libstdc++.so.6 (0x000072025069e000) libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/libgcc_s.so.1 (0x0000720250682000) libc.so.6 => /lib64/libc.so.6 (0x00007202504b2000) libLLVMBinaryFormat.so.8 => /usr/lib/llvm/8/lib64/../lib64/libLLVMBinaryFormat.so.8 (0x0000720250492000) libLLVMObject.so.8 => /usr/lib/llvm/8/lib64/../lib64/libLLVMObject.so.8 (0x00007202503a3000) libLLVMProfileData.so.8 => /usr/lib/llvm/8/lib64/../lib64/libLLVMProfileData.so.8 (0x0000720250336000) libm.so.6 => /lib64/libm.so.6 (0x00007202501f9000) libLLVMMC.so.8 => /usr/lib/llvm/8/lib64/../lib64/libLLVMMC.so.8 (0x0000720250123000) libz.so.1 => /lib64/libz.so.1 (0x0000720250105000) libdl.so.2 => /lib64/libdl.so.2 (0x00007202500ff000) libtinfo.so.6 => /lib64/libtinfo.so.6 (0x00007202500bb000) libpthread.so.0 => /lib64/libpthread.so.0 (0x0000720250097000) libLLVMDemangle.so.8 => /usr/lib/llvm/8/lib64/../lib64/libLLVMDemangle.so.8 (0x0000720250053000) /lib64/ld-linux-x86-64.so.2 (0x00007202517c0000) libLLVMBitReader.so.8 => /usr/lib/llvm/8/lib64/../lib64/../lib64/libLLVMBitReader.so.8 (0x000072024ffe4000) libLLVMMCParser.so.8 => /usr/lib/llvm/8/lib64/../lib64/../lib64/libLLVMMCParser.so.8 (0x000072024ff8f000)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0eaa982a9810a52b839aadc6768daaad482fd37 commit a0eaa982a9810a52b839aadc6768daaad482fd37 Author: Marek Szuba <marecki@gentoo.org> AuthorDate: 2019-10-07 12:09:14 +0000 Commit: Marek Szuba <marecki@gentoo.org> CommitDate: 2019-10-07 12:22:36 +0000 dev-util/spirv-llvm-translator: pass $LLVM_MAX_SLOT to get_llvm_prefix() When invoked without max_slot, get_llvm_prefix() iterates over *all* LLVM slots known to llvm.eclass - including those exceeding LLVM_MAX_SLOT. As a consequence, an ebuild can e.g. end up getting installed into llvm:9 directories in spite of having been linked against llvm:8. Closes: https://bugs.gentoo.org/696048 Package-Manager: Portage-2.3.76, Repoman-2.3.16 Signed-off-by: Marek Szuba <marecki@gentoo.org> .../spirv-llvm-translator-8.0.1.2-r1.ebuild | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+)