Build and test LLVM/MLIR Failed
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 524
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 46
Description
**What I did before:**
```
$ git clone git@github.com:llvm/circt.git
$ cd circt
$ git submodule init
$ git submodule update
$ mkdir llvm/build
$ cd llvm/build
$ cmake -G Ninja ../llvm \
-DLLVM_ENABLE_PROJECTS="mlir" \
-DLLVM_TARGETS_TO_BUILD="host" \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DCMAKE_BUILD_TYPE=DEBUG \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
$ ninja
[1415/4773] Building CXX object lib/Transforms/Vectoriz...iles/LLVMVectorize.dir/SandboxVectorizer/Legality.cpp.o
In file included from /home/lqc/circt/llvm/llvm/lib/Transforms/Vectorize/SandboxVectorizer/Legality.cpp:9:
/home/lqc/circt/llvm/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Legality.h:115:33: warning: ‘maybe_unused’ attribute ignored [-Wattributes]
115 | [[maybe_unused]] ResultReason Reason;
| ^~~~~~
[1417/4773] Building CXX object lib/Transforms/Vectoriz...ectorize.dir/SandboxVectorizer/Passes/BottomUpVec.cpp.o
In file included from /home/lqc/circt/llvm/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Passes/BottomUpVec.h:21,
from /home/lqc/circt/llvm/llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes/BottomUpVec.cpp:9:
/home/lqc/circt/llvm/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Legality.h:115:33: warning: ‘maybe_unused’ attribute ignored [-Wattributes]
115 | [[maybe_unused]] ResultReason Reason;
| ^~~~~~
[1418/4773] Building CXX object lib/Transforms/Vectoriz...ir/SandboxVectorizer/SandboxVectorizerPassBuilder.cpp.o
In file included from /home/lqc/circt/llvm/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Passes/BottomUpVec.h:21,
from /home/lqc/circt/llvm/llvm/lib/Transforms/Vectorize/SandboxVectorizer/SandboxVectorizerPassBuilder.cpp:3:
/home/lqc/circt/llvm/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Legality.h:115:33: warning: ‘maybe_unused’ attribute ignored [-Wattributes]
115 | [[maybe_unused]] ResultReason Reason;
| ^~~~~~
[1433/4773] Building CXX object lib/Transforms/Vectorize/CMakeFiles/LLVMVectorize.dir/VPlanUtils.cpp.o
In file included from /home/lqc/circt/llvm/llvm/lib/Transforms/Vectorize/VPlanUtils.cpp:10:
/home/lqc/circt/llvm/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h: In instantiation of ‘bool llvm::VPlanPatternMatch::detail::CheckTupleElements(const TupleTy&, Fn, std::index_sequence<_Idx ...>) [with TupleTy = std::tuple<>; Fn = llvm::VPlanPatternMatch::Recipe_match, 0, false, llvm::VPCanonicalIVPHIRecipe>::match(const llvm::VPRecipeBase*) const::; long unsigned int ...Is = {}; std::index_sequence<_Idx ...> = std::integer_sequence]’:
/home/lqc/circt/llvm/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:161:28: required from ‘bool llvm::VPlanPatternMatch::detail::all_of_tuple_elements(const TupleTy&, Fn) [with TupleTy = std::tuple<>; Fn = llvm::VPlanPatternMatch::Recipe_match, 0, false, llvm::VPCanonicalIVPHIRecipe>::match(const llvm::VPRecipeBase*) const::]’
/home/lqc/circt/llvm/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:197:38: required from ‘bool llvm::VPlanPatternMatch::Recipe_match::match(const llvm::VPRecipeBase*) const [with Ops_t = std::tuple<>; unsigned int Opcode = 0; bool Commutative = false; RecipeTys = {llvm::VPCanonicalIVPHIRecipe}]’
/home/lqc/circt/llvm/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:184:25: required from ‘bool llvm::VPlanPatternMatch::Recipe_match::match(const llvm::VPValue*) const [with Ops_t = std::tuple<>; unsigned int Opcode = 0; bool Commutative = false; RecipeTys = {llvm::VPCanonicalIVPHIRecipe}]’
/home/lqc/circt/llvm/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:198:45: required from ‘llvm::VPlanPatternMatch::Recipe_match, 0, false, llvm::VPCanonicalIVPHIRecipe>, llvm::VPlanPatternMatch::specific_intval<0> >, 0, false, llvm::VPScalarIVStepsRecipe>::match(const llvm::VPRecipeBase*) const:: [with auto:28 = llvm::VPlanPatternMatch::Recipe_match, 0, false, llvm::VPCanonicalIVPHIRecipe>]’
/home/lqc/circt/llvm/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:155:12: required from ‘bool llvm::VPlanPatternMatch::detail::CheckTupleElements(const TupleTy&, Fn, std::index_sequence<_Idx ...>) [with TupleTy = std::tuple, 0, false, llvm::VPCanonicalIVPHIRecipe>, llvm::VPlanPatternMatch::specific_intval<0> >; Fn = llvm::VPlanPatternMatch::Recipe_match, 0, false, llvm::VPCanonicalIVPHIRecipe>, llvm::VPlanPatternMatch::specific_intval<0> >, 0, false, llvm::VPScalarIVStepsRecipe>::match(const llvm::VPRecipeBase*) const::; long unsigned int ...Is = {0, 1}; std::index_sequence<_Idx ...> = std::integer_sequence]’
/home/lqc/circt/llvm/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:161:28: required from ‘bool llvm::VPlanPatternMatch::detail::all_of_tuple_elements(const TupleTy&, Fn) [with TupleTy = std::tuple, 0, false, llvm::VPCanonicalIVPHIRecipe>, llvm::VPlanPatternMatch::specific_intval<0> >; Fn = llvm::VPlanPatternMatch::Recipe_match, 0, false, llvm::VPCanonicalIVPHIRecipe>, llvm::VPlanPatternMatch::specific_intval<0> >, 0, false, llvm::VPScalarIVStepsRecipe>::match(const llvm::VPRecipeBase*) const::]’
/home/lqc/circt/llvm/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:197:38: required from ‘bool llvm::VPlanPatternMatch::Recipe_match::match(const llvm::VPRecipeBase*) const [with Ops_t = std::tuple, 0, false, llvm::VPCanonicalIVPHIRecipe>, llvm::VPlanPatternMatch::specific_intval<0> >; unsigned int Opcode = 0; bool Commutative = false; RecipeTys = {llvm::VPScalarIVStepsRecipe}]’
/home/lqc/circt/llvm/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:184:25: required from ‘bool llvm::VPlanPatternMatch::Recipe_match::match(const llvm::VPValue*) const [with Ops_t = std::tuple, 0, false, llvm::VPCanonicalIVPHIRecipe>, llvm::VPlanPatternMatch::specific_intval<0> >; unsigned int Opcode = 0; bool Commutative = false; RecipeTys = {llvm::VPScalarIVStepsRecipe}]’
/home/lqc/circt/llvm/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:29:17: required from ‘bool llvm::VPlanPatternMatch::match(Val*, const Pattern&) [with Val = llvm::VPValue; Pattern = llvm::VPlanPatternMatch::Recipe_match, 0, false, llvm::VPCanonicalIVPHIRecipe>, llvm::VPlanPatternMatch::specific_intval<0> >, 0, false, llvm::VPScalarIVStepsRecipe>]’
/home/lqc/circt/llvm/llvm/lib/Transforms/Vectorize/VPlanUtils.cpp:58:18: required from here
/home/lqc/circt/llvm/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:154:48: warning: parameter ‘P’ set but not used [-Wunused-but-set-parameter]
154 | bool CheckTupleElements(const TupleTy &Ops, Fn P, std::index_sequence) {
| ~~~^
/home/lqc/circt/llvm/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h: In instantiation of ‘bool llvm::VPlanPatternMatch::detail::CheckTupleElements(const TupleTy&, Fn, std::index_sequence<_Idx ...>) [with TupleTy = std::tuple<>; Fn = llvm::VPlanPatternMatch::Recipe_match, 0, false, llvm::VPCanonicalIVPHIRecipe>::match(const llvm::VPRecipeBase*) const::; long unsigned int ...Is = {}; std::index_sequence<_Idx ...> = std::integer_sequence]’:
/home/lqc/circt/llvm/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:161:28: required from ‘bool llvm::VPlanPatternMatch::detail::all_of_tuple_elements(const TupleTy&, Fn) [with TupleTy = std::tuple<>; Fn = llvm::VPlanPatternMatch::Recipe_match, 0, false, llvm::VPCanonicalIVPHIRecipe>::match(const llvm::VPRecipeBase*) const::]’
/home/lqc/circt/llvm/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:203:41: required from ‘bool llvm::VPlanPatternMatch::Recipe_match::match(const llvm::VPRecipeBase*) const [with Ops_t = std::tuple<>; unsigned int Opcode = 0; bool Commutative = false; RecipeTys = {llvm::VPCanonicalIVPHIRecipe}]’
/home/lqc/circt/llvm/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:184:25: required from ‘bool llvm::VPlanPatternMatch::Recipe_match::match(const llvm::VPValue*) const [with Ops_t = std::tuple<>; unsigned int Opcode = 0; bool Commutative = false; RecipeTys = {llvm::VPCanonicalIVPHIRecipe}]’
/home/lqc/circt/llvm/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:198:45: required from ‘llvm::VPlanPatternMatch::Recipe_match, 0, false, llvm::VPCanonicalIVPHIRecipe>, llvm::VPlanPatternMatch::specific_intval<0> >, 0, false, llvm::VPScalarIVStepsRecipe>::match(const llvm::VPRecipeBase*) const:: [with auto:28 = llvm::VPlanPatternMatch::Recipe_match, 0, false, llvm::VPCanonicalIVPHIRecipe>]’
/home/lqc/circt/llvm/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:155:12: required from ‘bool llvm::VPlanPatternMatch::detail::CheckTupleElements(const TupleTy&, Fn, std::index_sequence<_Idx ...>) [with TupleTy = std::tuple, 0, false, llvm::VPCanonicalIVPHIRecipe>, llvm::VPlanPatternMatch::specific_intval<0> >; Fn = llvm::VPlanPatternMatch::Recipe_match, 0, false, llvm::VPCanonicalIVPHIRecipe>, llvm::VPlanPatternMatch::specific_intval<0> >, 0, false, llvm::VPScalarIVStepsRecipe>::match(const llvm::VPRecipeBase*) const::; long unsigned int ...Is = {0, 1}; std::index_sequence<_Idx ...> = std::integer_sequence]’
/home/lqc/circt/llvm/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:161:28: required from ‘bool llvm::VPlanPatternMatch::detail::all_of_tuple_elements(const TupleTy&, Fn) [with TupleTy = std::tuple, 0, false, llvm::VPCanonicalIVPHIRecipe>, llvm::VPlanPatternMatch::specific_intval<0> >; Fn = llvm::VPlanPatternMatch::Recipe_match, 0, false, llvm::VPCanonicalIVPHIRecipe>, llvm::VPlanPatternMatch::specific_intval<0> >, 0, false, llvm::VPScalarIVStepsRecipe>::match(const llvm::VPRecipeBase*) const::]’
/home/lqc/circt/llvm/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:197:38: required from ‘bool llvm::VPlanPatternMatch::Recipe_match::match(const llvm::VPRecipeBase*) const [with Ops_t = std::tuple, 0, false, llvm::VPCanonicalIVPHIRecipe>, llvm::VPlanPatternMatch::specific_intval<0> >; unsigned int Opcode = 0; bool Commutative = false; RecipeTys = {llvm::VPScalarIVStepsRecipe}]’
/home/lqc/circt/llvm/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:184:25: required from ‘bool llvm::VPlanPatternMatch::Recipe_match::match(const llvm::VPValue*) const [with Ops_t = std::tuple, 0, false, llvm::VPCanonicalIVPHIRecipe>, llvm::VPlanPatternMatch::specific_intval<0> >; unsigned int Opcode = 0; bool Commutative = false; RecipeTys = {llvm::VPScalarIVStepsRecipe}]’
/home/lqc/circt/llvm/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:29:17: required from ‘bool llvm::VPlanPatternMatch::match(Val*, const Pattern&) [with Val = llvm::VPValue; Pattern = llvm::VPlanPatternMatch::Recipe_match, 0, false, llvm::VPCanonicalIVPHIRecipe>, llvm::VPlanPatternMatch::specific_intval<0> >, 0, false, llvm::VPScalarIVStepsRecipe>]’
/home/lqc/circt/llvm/llvm/lib/Transforms/Vectorize/VPlanUtils.cpp:58:18: required from here
/home/lqc/circt/llvm/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:154:48: warning: parameter ‘P’ set but not used [-Wunused-but-set-parameter]
[3145/4773] Building CXX object lib/Passes/CMakeFiles/LLVMPasses.dir/PassBuilder.cpp.o
FAILED: lib/Passes/CMakeFiles/LLVMPasses.dir/PassBuilder.cpp.o
/usr/bin/c++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/lqc/circt/llvm/build/lib/Passes -I/home/lqc/circt/llvm/llvm/lib/Passes -I/home/lqc/circt/llvm/build/include -I/home/lqc/circt/llvm/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-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 -g -fno-exceptions -funwind-tables -fno-rtti -std=c++17 -MD -MT lib/Passes/CMakeFiles/LLVMPasses.dir/PassBuilder.cpp.o -MF lib/Passes/CMakeFiles/LLVMPasses.dir/PassBuilder.cpp.o.d -o lib/Passes/CMakeFiles/LLVMPasses.dir/PassBuilder.cpp.o -c /home/lqc/circt/llvm/llvm/lib/Passes/PassBuilder.cpp
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
[3164/4773] Building CXX object lib/Target/X86/CMakeFiles/LLVMX86CodeGen.dir/X86ISelLowering.cpp.o
ninja: build stopped: subcommand failed.
```
**My Configuration**:
```
Operation System:Ubuntu-22.04(WSL2)
cmake version 3.22.1
Python 3.10.12
zlib 1.3.1
GNU Make 4.3
PyYAML 6.0.2
```
**My Question**:
First, I would like to know if the content in the "Setting this up" section of the README needs to be executed in order. Specifically, does the LLVM/MLIR build and test need to be completed first before successfully building CIRCT?
Additionally, I would like to ask how to resolve issues encountered when executing the ninja command.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the build from llvm/build using the shown CMake configuration and ninja invocation. Inspect the complete failure around llvm/include/llvm/Transforms/Vectorize/VPlanPatternMatch.h and llvm/lib/Transforms/Vectorize/VPlanUtils.cpp; done means identifying the cause and confirming that the LLVM/MLIR build completes, but the report omits the final error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system, compilers, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100