andreasfertig / cppinsights

C++ Insights - See your source code with the eyes of a compiler
https://cppinsights.io
MIT License
4.04k stars 238 forks source link

build failed on ubuntu #641

Closed LightSun closed 2 months ago

LightSun commented 3 months ago

env: ubuntu 18.04 build cmd:

INSIGHT_DIR=$(pwd)/cppinsights
mkdir build
cd build
cmake -G Ninja -D=CMAKE_BUILD_TYPE=Release -DLLVM_EXTERNAL_PROJECTS=cppinsights -DLLVM_EXTERNAL_CPPINSIGHTS_SOURCE_DIR=${INSIGHT_DIR} -DINSIGHTS_USE_SYSTEM_INCLUDES=off -DCLANG_LINK_CLANG_DYLIB=on -DLLVM_LINK_LLVM_DYLIB=on ../llvm-project/llvm

ninja

log.

(base) heaven7@heaven7-hp:/media/heaven7/Elements_SE/study/github/thirds$ sh build_cppinsights.sh 
mkdir: cannot create directory ‘build’: File exists
CMake Deprecation Warning at /media/heaven7/Elements_SE/study/github/thirds/llvm-project/cmake/Modules/CMakePolicy.cmake:6 (cmake_policy):
  The OLD behavior for policy CMP0114 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  CMakeLists.txt:6 (include)

CMake Deprecation Warning at /media/heaven7/Elements_SE/study/github/thirds/llvm-project/cmake/Modules/CMakePolicy.cmake:11 (cmake_policy):
  The OLD behavior for policy CMP0116 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  CMakeLists.txt:6 (include)

-- Found Python3: /home/heaven7/mambaforge/bin/python3.10 (found suitable version "3.10.13", minimum required is "3.6") found components: Interpreter
-- Could NOT find LibEdit (missing: LibEdit_INCLUDE_DIRS LibEdit_LIBRARIES) 
-- LLVM host triple: x86_64-unknown-linux-gnu
-- Native target architecture is X86
-- Threads enabled.
-- Doxygen disabled.
-- Ninja version: 1.12.0.git
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) 
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) 
-- OCaml bindings disabled.
-- LLVM default target triple: x86_64-unknown-linux-gnu
-- Building with -fPIC
-- Targeting AArch64
-- Targeting AMDGPU
-- Targeting ARM
-- Targeting AVR
-- Targeting BPF
-- Targeting Hexagon
-- Targeting Lanai
-- Targeting LoongArch
-- Targeting Mips
-- Targeting MSP430
-- Targeting NVPTX
-- Targeting PowerPC
-- Targeting RISCV
-- Targeting Sparc
-- Targeting SystemZ
-- Targeting VE
-- Targeting WebAssembly
-- Targeting X86
-- Targeting XCore
-- Generating version.h
-- Could not find the program clang-tidy.
-- Could not find the program include-what-you-use
-- Found Python3: /home/heaven7/mambaforge/bin/python3.10 (found version "3.10.13") found components: Interpreter
-- Found Python3: /home/heaven7/mambaforge/bin/python3.10. Target tests enabled.
-- 
-- [ Build summary ]
-- BUILD_INSIGHTS_OUTSIDE_LLVM : Off
-- CMAKE_GENERATOR       : Ninja
-- CMAKE_EXE_LINKER_FLAGS: 
-- CMAKE_LINKER          : /usr/bin/ld
-- CMAKE_OSX_ARCHITECTURES : 
-- Compiler ID           : GNU
-- Compiler version      : 8.4.0
-- Compiler path         : /usr/bin/c++
-- llvm-config           : 
-- Min LLVM major version: 18
-- Install path          : /usr/local
-- Clang resource dir    : 
-- CMAKE_SOURCE_DIR      : /media/heaven7/Elements_SE/study/github/thirds/llvm-project/llvm
-- CMAKE_BINARY_DIR      : /media/heaven7/Elements_SE/study/github/thirds/build
-- Git repo url          : git@github.com:andreasfertig/cppinsights.git
-- Git commit hash       : 8e4c57be6d77282da939912a2292ad59deecb7ac
-- Debug                 : OFF
-- Code Coverage         : OFF
-- Static linking        : OFF
-- Strip executable      : ON
-- Elevate includes:     : off
-- clang-tidy            : Off
-- include-what-you-use  : Off
-- 
-- Registering ExampleIRTransforms as a pass plugin (static build: OFF)
-- Registering Bye as a pass plugin (static build: OFF)
-- Failed to find LLVM FileCheck
-- Google Benchmark version: v0.0.0, normalized to 0.0.0
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX -- success
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Performing Test HAVE_PTHREAD_AFFINITY -- failed to compile
-- Configuring done (11.4s)
-- Generating done (2.1s)
-- Build files have been written to: /media/heaven7/Elements_SE/study/github/thirds/build
[1/138] Linking CXX executable bin/llvm-ar
FAILED: bin/llvm-ar 
: && /usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,-rpath-link,/media/heaven7/Elements_SE/study/github/thirds/build/./lib  -Wl,--gc-sections tools/llvm-ar/CMakeFiles/llvm-ar.dir/llvm-ar.cpp.o tools/llvm-ar/CMakeFiles/llvm-ar.dir/llvm-ar-driver.cpp.o -o bin/llvm-ar  -Wl,-rpath,"\$ORIGIN/../lib:"  -lLLVM  -lpthread && :
/usr/bin/ld: cannot find -lLLVM
collect2: error: ld returned 1 exit status
[2/138] Linking CXX shared library lib/libLTO.so.19.0git
FAILED: lib/libLTO.so.19.0git 
: && /usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/media/heaven7/Elements_SE/study/github/thirds/build/./lib  -Wl,--gc-sections  -Wl,--version-script,"/media/heaven7/Elements_SE/study/github/thirds/build/tools/lto/LTO.exports" -shared -Wl,-soname,libLTO.so.19.0git -o lib/libLTO.so.19.0git tools/lto/CMakeFiles/LTO.dir/LTODisassembler.cpp.o tools/lto/CMakeFiles/LTO.dir/lto.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:"  -lLLVM && :
/usr/bin/ld: cannot find -lLLVM
collect2: error: ld returned 1 exit status
[3/138] Linking CXX executable bin/llvm-lto
FAILED: bin/llvm-lto 
: && /usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,-rpath-link,/media/heaven7/Elements_SE/study/github/thirds/build/./lib  -Wl,--gc-sections tools/llvm-lto/CMakeFiles/llvm-lto.dir/llvm-lto.cpp.o -o bin/llvm-lto  -Wl,-rpath,"\$ORIGIN/../lib:"  -lLLVM  -lpthread && :
/usr/bin/ld: cannot find -lLLVM
collect2: error: ld returned 1 exit status
[4/138] Linking CXX executable bin/lli
FAILED: bin/lli 
: && /usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,--export-dynamic  -Wl,-rpath-link,/media/heaven7/Elements_SE/study/github/thirds/build/./lib  -Wl,--gc-sections tools/lli/CMakeFiles/lli.dir/lli.cpp.o -o bin/lli  -Wl,-rpath,"\$ORIGIN/../lib:"  -lLLVM  -lpthread && :
/usr/bin/ld: cannot find -lLLVM
collect2: error: ld returned 1 exit status
[5/138] Linking CXX executable bin/llvm-profdata
FAILED: bin/llvm-profdata 
: && /usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,-rpath-link,/media/heaven7/Elements_SE/study/github/thirds/build/./lib  -Wl,--gc-sections tools/llvm-profdata/CMakeFiles/llvm-profdata.dir/llvm-profdata.cpp.o tools/llvm-profdata/CMakeFiles/llvm-profdata.dir/llvm-profdata-driver.cpp.o -o bin/llvm-profdata  -Wl,-rpath,"\$ORIGIN/../lib:"  -lLLVM  -lpthread && :
/usr/bin/ld: cannot find -lLLVM
collect2: error: ld returned 1 exit status
[6/138] Linking CXX executable bin/llvm-bcanalyzer
FAILED: bin/llvm-bcanalyzer 
: && /usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,-rpath-link,/media/heaven7/Elements_SE/study/github/thirds/build/./lib  -Wl,--gc-sections tools/llvm-bcanalyzer/CMakeFiles/llvm-bcanalyzer.dir/llvm-bcanalyzer.cpp.o -o bin/llvm-bcanalyzer  -Wl,-rpath,"\$ORIGIN/../lib:"  -lLLVM  -lpthread && :
/usr/bin/ld: cannot find -lLLVM
collect2: error: ld returned 1 exit status
[7/138] Linking CXX executable bin/llvm-as
FAILED: bin/llvm-as 
: && /usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,-rpath-link,/media/heaven7/Elements_SE/study/github/thirds/build/./lib  -Wl,--gc-sections tools/llvm-as/CMakeFiles/llvm-as.dir/llvm-as.cpp.o -o bin/llvm-as  -Wl,-rpath,"\$ORIGIN/../lib:"  -lLLVM  -lpthread && :
/usr/bin/ld: cannot find -lLLVM
collect2: error: ld returned 1 exit status
[8/138] Linking CXX executable bin/llc
FAILED: bin/llc 
: && /usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,--export-dynamic  -Wl,-rpath-link,/media/heaven7/Elements_SE/study/github/thirds/build/./lib tools/llc/CMakeFiles/llc.dir/llc.cpp.o tools/llc/CMakeFiles/llc.dir/NewPMDriver.cpp.o -o bin/llc  -Wl,-rpath,"\$ORIGIN/../lib:"  -lLLVM  -lpthread && :
/usr/bin/ld: cannot find -lLLVM
collect2: error: ld returned 1 exit status
[9/138] Linking CXX executable bin/llvm-cat
FAILED: bin/llvm-cat 
: && /usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,-rpath-link,/media/heaven7/Elements_SE/study/github/thirds/build/./lib  -Wl,--gc-sections tools/llvm-cat/CMakeFiles/llvm-cat.dir/llvm-cat.cpp.o -o bin/llvm-cat  -Wl,-rpath,"\$ORIGIN/../lib:"  -lLLVM  -lpthread && :
/usr/bin/ld: cannot find -lLLVM
collect2: error: ld returned 1 exit status
[10/138] Linking CXX executable bin/llvm-cxxdump
FAILED: bin/llvm-cxxdump 
: && /usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,-rpath-link,/media/heaven7/Elements_SE/study/github/thirds/build/./lib  -Wl,--gc-sections tools/llvm-cxxdump/CMakeFiles/llvm-cxxdump.dir/llvm-cxxdump.cpp.o tools/llvm-cxxdump/CMakeFiles/llvm-cxxdump.dir/Error.cpp.o -o bin/llvm-cxxdump  -Wl,-rpath,"\$ORIGIN/../lib:"  -lLLVM  -lpthread && :
/usr/bin/ld: cannot find -lLLVM
collect2: error: ld returned 1 exit status
[11/138] Linking CXX executable bin/llvm-cfi-verify
FAILED: bin/llvm-cfi-verify 
: && /usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,-rpath-link,/media/heaven7/Elements_SE/study/github/thirds/build/./lib  -Wl,--gc-sections tools/llvm-cfi-verify/CMakeFiles/llvm-cfi-verify.dir/llvm-cfi-verify.cpp.o -o bin/llvm-cfi-verify  -Wl,-rpath,"\$ORIGIN/../lib:"  -lLLVM  -lpthread  lib/libLLVMCFIVerify.a  -lLLVM && :
/usr/bin/ld: cannot find -lLLVM
collect2: error: ld returned 1 exit status
[12/138] Linking CXX executable bin/llvm-cvtres
FAILED: bin/llvm-cvtres 
: && /usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,-rpath-link,/media/heaven7/Elements_SE/study/github/thirds/build/./lib  -Wl,--gc-sections tools/llvm-cvtres/CMakeFiles/llvm-cvtres.dir/llvm-cvtres.cpp.o -o bin/llvm-cvtres  -Wl,-rpath,"\$ORIGIN/../lib:"  -lLLVM  -lpthread && :
/usr/bin/ld: cannot find -lLLVM
collect2: error: ld returned 1 exit status
[13/138] Linking CXX executable bin/bugpoint
FAILED: bin/bugpoint 
: && /usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,--export-dynamic  -Wl,-rpath-link,/media/heaven7/Elements_SE/study/github/thirds/build/./lib tools/bugpoint/CMakeFiles/bugpoint.dir/BugDriver.cpp.o tools/bugpoint/CMakeFiles/bugpoint.dir/CrashDebugger.cpp.o tools/bugpoint/CMakeFiles/bugpoint.dir/ExecutionDriver.cpp.o tools/bugpoint/CMakeFiles/bugpoint.dir/ExtractFunction.cpp.o tools/bugpoint/CMakeFiles/bugpoint.dir/FindBugs.cpp.o tools/bugpoint/CMakeFiles/bugpoint.dir/Miscompilation.cpp.o tools/bugpoint/CMakeFiles/bugpoint.dir/OptimizerDriver.cpp.o tools/bugpoint/CMakeFiles/bugpoint.dir/ToolRunner.cpp.o tools/bugpoint/CMakeFiles/bugpoint.dir/bugpoint.cpp.o -o bin/bugpoint  -Wl,-rpath,"\$ORIGIN/../lib:"  -lLLVM  -lpthread && :
/usr/bin/ld: cannot find -lLLVM
collect2: error: ld returned 1 exit status
[14/138] Linking CXX executable bin/llvm-c-test
FAILED: bin/llvm-c-test 
: && /usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,-rpath-link,/media/heaven7/Elements_SE/study/github/thirds/build/./lib  -Wl,--gc-sections tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/attributes.c.o tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/calc.c.o tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/debuginfo.c.o tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/diagnostic.c.o tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/disassemble.c.o tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/echo.cpp.o tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/helpers.c.o tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/include-all.c.o tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/main.c.o tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/module.c.o tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/metadata.c.o tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/object.c.o tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/targets.c.o -o bin/llvm-c-test  -Wl,-rpath,"\$ORIGIN/../lib:"  -lLLVM  -lpthread && :
/usr/bin/ld: cannot find -lLLVM
collect2: error: ld returned 1 exit status
[15/138] Linking CXX executable bin/dsymutil
FAILED: bin/dsymutil 
: && /usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,-rpath-link,/media/heaven7/Elements_SE/study/github/thirds/build/./lib  -Wl,--gc-sections tools/dsymutil/CMakeFiles/dsymutil.dir/dsymutil.cpp.o tools/dsymutil/CMakeFiles/dsymutil.dir/BinaryHolder.cpp.o tools/dsymutil/CMakeFiles/dsymutil.dir/CFBundle.cpp.o tools/dsymutil/CMakeFiles/dsymutil.dir/DebugMap.cpp.o tools/dsymutil/CMakeFiles/dsymutil.dir/DwarfLinkerForBinary.cpp.o tools/dsymutil/CMakeFiles/dsymutil.dir/MachODebugMapParser.cpp.o tools/dsymutil/CMakeFiles/dsymutil.dir/MachOUtils.cpp.o tools/dsymutil/CMakeFiles/dsymutil.dir/Reproducer.cpp.o tools/dsymutil/CMakeFiles/dsymutil.dir/RelocationMap.cpp.o tools/dsymutil/CMakeFiles/dsymutil.dir/dsymutil-driver.cpp.o -o bin/dsymutil  -Wl,-rpath,"\$ORIGIN/../lib:"  -lLLVM  -lpthread && :
/usr/bin/ld: cannot find -lLLVM
collect2: error: ld returned 1 exit status
[16/138] Linking CXX executable bin/llvm-cov
FAILED: bin/llvm-cov 
: && /usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,-rpath-link,/media/heaven7/Elements_SE/study/github/thirds/build/./lib  -Wl,--gc-sections tools/llvm-cov/CMakeFiles/llvm-cov.dir/llvm-cov.cpp.o tools/llvm-cov/CMakeFiles/llvm-cov.dir/gcov.cpp.o tools/llvm-cov/CMakeFiles/llvm-cov.dir/CodeCoverage.cpp.o tools/llvm-cov/CMakeFiles/llvm-cov.dir/CoverageExporterJson.cpp.o tools/llvm-cov/CMakeFiles/llvm-cov.dir/CoverageExporterLcov.cpp.o tools/llvm-cov/CMakeFiles/llvm-cov.dir/CoverageFilters.cpp.o tools/llvm-cov/CMakeFiles/llvm-cov.dir/CoverageReport.cpp.o tools/llvm-cov/CMakeFiles/llvm-cov.dir/CoverageSummaryInfo.cpp.o tools/llvm-cov/CMakeFiles/llvm-cov.dir/SourceCoverageView.cpp.o tools/llvm-cov/CMakeFiles/llvm-cov.dir/SourceCoverageViewHTML.cpp.o tools/llvm-cov/CMakeFiles/llvm-cov.dir/SourceCoverageViewText.cpp.o tools/llvm-cov/CMakeFiles/llvm-cov.dir/TestingSupport.cpp.o -o bin/llvm-cov  -Wl,-rpath,"\$ORIGIN/../lib:"  -lLLVM  -lpthread  lib/libLLVMDebuginfod.a  -lLLVM  -lpthread && :
/usr/bin/ld: cannot find -lLLVM
collect2: error: ld returned 1 exit status
[17/138] Linking CXX shared module lib/LLVMHello.so
FAILED: lib/LLVMHello.so 
: && /usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wl,-z,nodelete   -Wl,-rpath-link,/media/heaven7/Elements_SE/study/github/thirds/build/./lib  -Wl,--gc-sections  -Wl,--version-script,"/media/heaven7/Elements_SE/study/github/thirds/build/lib/Transforms/Hello/LLVMHello.exports" -shared  -o lib/LLVMHello.so lib/Transforms/Hello/CMakeFiles/LLVMHello.dir/Hello.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib"  -lLLVM && :
/usr/bin/ld: cannot find -lLLVM
collect2: error: ld returned 1 exit status
[18/138] Building CXX object tools/llv...iles/llvm-config.dir/llvm-config.cpp.o
ninja: build stopped: subcommand failed.
(base) heaven7@heaven7-hp:/media/heaven7/Elements_SE/study/github/thirds$ 
andreasfertig commented 3 months ago

Hello @LightSun,

sorry for the trouble!

As far as I can say from your build log, this is not a C++ Insights issue. The failure seems to appear from Clang/LLVM. I think you have to enable -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" for building Clang and clang-tools-extra.

Andreas

andreasfertig commented 2 months ago

Hello @LightSun,

I'm closing this issue, assuming it is not related to C++ Insights.

Andreas