ошибок:
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: skipping incompatible /usr/lib/llvm/17/lib/libLLVM-17.so when searching for -lLLVM-17
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lLLVM-17: No such file or directory
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: skipping incompatible /usr/lib/llvm/17/lib/libLLVM-17.so when searching for -lLLVM-17
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangAST: No such file or directory
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangTooling: No such file or directory
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangBasic: No such file or directory
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangASTMatchers: No such file or directory
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangFrontendTool: No such file or directory
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangFrontend: No such file or directory
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangDriver: No such file or directory
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangSerialization: No such file or directory
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangCodeGen: No such file or directory
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangParse: No such file or directory
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangSema: No such file or directory
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangStaticAnalyzerFrontend: No such file or directory
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangStaticAnalyzerCheckers: No such file or directory
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangStaticAnalyzerCore: No such file or directory
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangAnalysis: No such file or directory
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangIndex: No such file or directory
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangARCMigrate: No such file or directory
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangRewrite: No such file or directory
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangLex: No such file or directory
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangEdit: No such file or directory
Команда вызова cmake выглядит так:
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_DIR=/usr/lib/llvm/17/lib/cmake/llvm -DClang_DIR=/usr/lib/llvm/17/lib/cmake/clang -DCMAKE_PREFIX_PATH=/usr/lib/llvm/17 -DCMAKE_LIBRARY_PATH=/usr/lib/llvm/17/lib -DCMAKE_EXE_LINKER_FLAGS="-L/usr/lib/llvm/17/lib" -DCMAKE_SHARED_LINKER_FLAGS="-L/usr/lib/llvm/17/lib" -DLLVM_CONFIG_PATH=/usr/lib/llvm/17/bin/llvm-config ..
Я не понимаю, почему отсутствуют перечисленные файлы?
Вот USE флаги:
sys-devel/clang-17.0.6:17::gentoo USE="extra (pie) static-analyzer xml -debug -doc (-ieee-long-double) -test -verify-sig" ABI_X86="32 (64) (-x32)" LLVM_TARGETS="(AArch64) (AMDGPU) (ARM) (AVR) (BPF) (Hexagon) (Lanai) (LoongArch) (MSP430) (Mips) (NVPTX) (PowerPC) (RISCV) (Sparc) (SystemZ) (VE) (WebAssembly) (X86) (XCore) -ARC -CSKY -DirectX -M68k -SPIRV -Xtensa" PYTHON_SINGLE_TARGET="python3_12* -python3_10 -python3_11*"
sys-devel/llvm-17.0.6:17::gentoo USE="binutils-plugin libedit libffi ncurses xml -debug -debuginfod -doc -exegesis -test -verify-sig -xar -z3 -zstd" ABI_X86="32 (64) (-x32)" LLVM_TARGETS="(AArch64) (AMDGPU) (ARM) (AVR) (BPF) (Hexagon) (Lanai) (LoongArch) (MSP430) (Mips) (NVPTX) (PowerPC) (RISCV) (Sparc) (SystemZ) (VE) (WebAssembly) (X86) (XCore) -ARC -CSKY -DirectX -M68k -SPIRV -Xtensa"
почти) gpt паста
(я бфд не пользрвался 100500 лет, на правах угадайки) попробуй к линковщику -v добавить, мб объяснит что там не совпало.
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangIndex: No such file or directory /usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangARCMigrate: No such file or directory /usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangRewrite: No such file or directory /usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangLex: No such file or directory /usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangEdit: No such file or directory clang++: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [CMakeFiles/kslicer.dir/build.make:481: kslicer] Error 1 make[1]: *** [CMakeFiles/Makefile2:218: CMakeFiles/kslicer.dir/all] Error 2 make: *** [Makefile:91: all] Error 2
через -DCMAKE_CXX_FLAGS? У меня получился вывод: [100%] Linking CXX executable kslicer clang version 17.0.6 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm/17/bin Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang++.cfg System configuration file directory: /etc/clang Selected GCC installation: /usr/lib/gcc/x86_64-pc-linux-gnu/12 Candidate multilib: .;@m64 Candidate multilib: 32;@m32 Selected multilib: .;@m64 "/usr/bin/x86_64-pc-linux-gnu-ld.bfd" -pie --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o kslicer /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../lib64/Scrt1.o /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../lib64/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/12/crtbeginS.o -L/usr/lib/llvm/17/lib64 -L/usr/lib/gcc/x86_64-pc-linux-gnu/12 -L/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/lib -L/lib -L/usr/lib -z relro -z now CMakeFiles/kslicer.dir/kslicer_main.cpp.o CMakeFiles/kslicer.dir/kslicer_utils.cpp.o CMakeFiles/kslicer.dir/kslicer_warnings.cpp.o CMakeFiles/kslicer.dir/kslicer_def.cpp.o CMakeFiles/kslicer.dir/attributes.cpp.o CMakeFiles/kslicer.dir/block_expansion.cpp.o CMakeFiles/kslicer.dir/initial_pass.cpp.o CMakeFiles/kslicer.dir/initial_pass_compos.cpp.o CMakeFiles/kslicer.dir/extractor.cpp.o CMakeFiles/kslicer.dir/ast_matchers.cpp.o CMakeFiles/kslicer.dir/class_gen.cpp.o CMakeFiles/kslicer.dir/class_gen_ipv.cpp.o CMakeFiles/kslicer.dir/class_gen_rtv.cpp.o CMakeFiles/kslicer.dir/class_gen_vfh.cpp.o CMakeFiles/kslicer.dir/class_data.cpp.o CMakeFiles/kslicer.dir/template_rendering.cpp.o CMakeFiles/kslicer.dir/template_rendering_host.cpp.o CMakeFiles/kslicer.dir/rewrite_functions.cpp.o CMakeFiles/kslicer.dir/rewrite_kernel.cpp.o CMakeFiles/kslicer.dir/rewrite_control.cpp.o CMakeFiles/kslicer.dir/setter_process.cpp.o CMakeFiles/kslicer.dir/reduction.cpp.o CMakeFiles/kslicer.dir/shaders_clspv.cpp.o CMakeFiles/kslicer.dir/shaders_glsl.cpp.o CMakeFiles/kslicer.dir/shaders_ispc.cpp.o -lLLVM-17 -lclangAST -lclangTooling -lclangBasic -lclangASTMatchers -lclangFrontendTool -lclangFrontend -lclangDriver -lclangSerialization -lclangCodeGen -lclangParse -lclangSema -lclangStaticAnalyzerFrontend -lclangStaticAnalyzerCheckers -lclangStaticAnalyzerCore -lclangAnalysis -lclangIndex -lclangARCMigrate -lclangRewrite -lclangLex -lclangEdit -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-pc-linux-gnu/12/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../lib64/crtn.o /usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangAST: No such file or directory /usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangTooling: No such file or directory /usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangBasic: No such file or directory /usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangASTMatchers: No such file or directory /usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangFrontendTool: No such file or directory /usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangFrontend: No such file or directory /usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangDriver: No such file or directory /usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangSerialization: No such file or directory /usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangCodeGen: No such file or directory /usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangParse: No such file or directory /usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangSema: No such file or directory /usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangStaticAnalyzerFrontend: No such file or directory /usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangStaticAnalyzerCheckers: No such file or directory /usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangStaticAnalyzerCore: No such file or directory /usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lclangAnalysis: No such file or directory
в прошлый раз было про incompatible, а сейчас просто "нет", это разные вещи.
Обсуждают сегодня