Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[LLVM 20.1.4] building clang-tools-extra from source fails #139523

Copy link
Copy link
Closed as not planned
@dragon7307

Description

@dragon7307
Issue body actions

I have been attempting to compile llvm (tag: llvmorg-20.1.4) from source, yet it seems it failed due to an issue with clang-tools-extra.

For context: I have been trying to build llvm from source from the specified tag on a debian distribution on x86-64/amd64 with gcc 12.2.0 installed and, as far as I can tell, all required dependencies.

I generated the build files successfully with: cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;compiler-rt;lld" -B build -S llvm in the llvm-project directory to a build directory.

Then I ran from said directory cmake --build build, which is where compilation aborted.

Here's the relevant part of the log:

FAILED: tools/llvm-exegesis/lib/CMakeFiles/LLVMExegesis.dir/LatencyBenchmarkRunner.cpp.o
/usr/bin/c++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/dragon/dev/llvm-project/build/tools/llvm-exegesis/lib -I/home/dragon/dev/llvm-project/llvm/tools/llvm-exegesis/lib -I/home/dragon/dev/llvm-project/build/include -I/home/dragon/dev/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -std=c++17 -MD -MT tools/llvm-exegesis/lib/CMakeFiles/LLVMExegesis.dir/LatencyBenchmarkRunner.cpp.o -MF tools/llvm-exegesis/lib/CMakeFiles/LLVMExegesis.dir/LatencyBenchmarkRunner.cpp.o.d -o tools/llvm-exegesis/lib/CMakeFiles/LLVMExegesis.dir/LatencyBenchmarkRunner.cpp.o -c /home/dragon/dev/llvm-project/llvm/tools/llvm-exegesis/lib/LatencyBenchmarkRunner.cpp
In file included from /usr/include/c++/12/bits/stl_algobase.h:64,
                 from /usr/include/c++/12/memory:63,
                 from /home/dragon/dev/llvm-project/llvm/tools/llvm-exegesis/lib/Assembler.h:18,
                 from /home/dragon/dev/llvm-project/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.h:18,
                 from /home/dragon/dev/llvm-project/llvm/tools/llvm-exegesis/lib/LatencyBenchmarkRunner.h:17,
                 from /home/dragon/dev/llvm-project/llvm/tools/llvm-exegesis/lib/LatencyBenchmarkRunner.cpp:9:
/usr/include/c++/12/bits/stl_pair.h: In instantiation of ‘constexpr std::pair<_T1, _T2>::pair(std::pair<_U1, _U2>&&) [with _U1 = llvm::MCSection*; _U2 = int; typename std::enable_if<(std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_MoveConstructiblePair<_U1, _U2>() && std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type <anonymous> = true; _T1 = llvm::MCSection*; _T2 = unsigned int]’:
/home/dragon/dev/llvm-project/llvm/include/llvm/ADT/MapVector.h:99:52:   required from ‘ValueT& llvm::MapVector<KeyT, ValueT, MapType, VectorType>::operator[](const KeyT&) [with KeyT = llvm::MCSection*; ValueT = std::vector<llvm::MCDwarfLineEntry>; MapType = llvm::DenseMap<llvm::MCSection*, unsigned int, llvm::DenseMapInfo<llvm::MCSection*, void>, llvm::detail::DenseMapPair<llvm::MCSection*, unsigned int> >; VectorType = llvm::SmallVector<std::pair<llvm::MCSection*, std::vector<llvm::MCDwarfLineEntry> >, 0>]’
/home/dragon/dev/llvm-project/llvm/include/llvm/MC/MCDwarf.h:237:24:   required from here
/usr/include/c++/12/bits/stl_pair.h:555:51: internal compiler error: Segmentation fault
  555 |           second(std::forward<_U2>(__p.second)) { }
      |                                                   ^
0x1afaeb6 internal_error(char const*, ...)
        ???:0
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-12/README.Bugs> for instructions.
[6717/7064] Building CXX object tools/llvm-exegesis/lib/X86/CMakeFiles/LLVMExegesisX86.dir/Target.cpp.o
ninja: build stopped: subcommand failed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.