build iree failed
#19866
-
I try some tag but all failed due to same reason。 The compiler I'm using
I did try to find why but faield, please give me some information that might help me location this problem.
(tf) ➜ iree git:(heads/iree-3.2.0rc20250130) ✗ python -m pip install -r runtime/bindings/python/iree/runtime/build_requirements.txt
cmake -G Ninja -B ./iree-build/ -S . \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DIREE_ENABLE_ASSERTIONS=ON \
-DIREE_ENABLE_SPLIT_DWARF=ON \
-DIREE_ENABLE_THIN_ARCHIVES=ON \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DIREE_ENABLE_LLD=ON \
-DIREE_TARGET_BACKEND_DEFAULTS=OFF \
-DIREE_TARGET_BACKEND_LLVM_CPU=ON \
-DIREE_HAL_DRIVER_DEFAULTS=OFF \
-DIREE_HAL_DRIVER_LOCAL_SYNC=ON \
-DIREE_HAL_DRIVER_LOCAL_TASK=ON
Requirement already satisfied: pip>=21.3 in /home/cds/anaconda3/envs/tf/lib/python3.11/site-packages (from -r runtime/bindings/python/iree/runtime/build_requirements.txt (line 6)) (24.2)
Requirement already satisfied: setuptools>=62.4.0 in /home/cds/anaconda3/envs/tf/lib/python3.11/site-packages (from -r runtime/bindings/python/iree/runtime/build_requirements.txt (line 7)) (72.1.0)
Requirement already satisfied: numpy>=2.0.0b1 in /home/cds/anaconda3/envs/tf/lib/python3.11/site-packages (from -r runtime/bindings/python/iree/runtime/build_requirements.txt (line 8)) (2.2.2)
Requirement already satisfied: requests>=2.28.0 in /home/cds/anaconda3/envs/tf/lib/python3.11/site-packages (from -r runtime/bindings/python/iree/runtime/build_requirements.txt (line 9)) (2.32.3)
Requirement already satisfied: wheel>=0.36.2 in /home/cds/anaconda3/envs/tf/lib/python3.11/site-packages (from -r runtime/bindings/python/iree/runtime/build_requirements.txt (line 10)) (0.43.0)
Requirement already satisfied: sympy==1.12.1 in /home/cds/anaconda3/envs/tf/lib/python3.11/site-packages (from -r runtime/bindings/python/iree/runtime/build_requirements.txt (line 11)) (1.12.1)
Requirement already satisfied: mpmath<1.4.0,>=1.1.0 in /home/cds/anaconda3/envs/tf/lib/python3.11/site-packages (from sympy==1.12.1->-r runtime/bindings/python/iree/runtime/build_requirements.txt (line 11)) (1.3.0)
Requirement already satisfied: charset-normalizer<4,>=2 in /home/cds/anaconda3/envs/tf/lib/python3.11/site-packages (from requests>=2.28.0->-r runtime/bindings/python/iree/runtime/build_requirements.txt (line 9)) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in /home/cds/anaconda3/envs/tf/lib/python3.11/site-packages (from requests>=2.28.0->-r runtime/bindings/python/iree/runtime/build_requirements.txt (line 9)) (3.7)
Requirement already satisfied: urllib3<3,>=1.21.1 in /home/cds/anaconda3/envs/tf/lib/python3.11/site-packages (from requests>=2.28.0->-r runtime/bindings/python/iree/runtime/build_requirements.txt (line 9)) (2.2.2)
Requirement already satisfied: certifi>=2017.4.17 in /home/cds/anaconda3/envs/tf/lib/python3.11/site-packages (from requests>=2.28.0->-r runtime/bindings/python/iree/runtime/build_requirements.txt (line 9)) (2024.7.4)
-- Could not find nvcc, please set CUDAToolkit_ROOT.
-- IREE HAL drivers:
-- - local-sync
-- - local-task
-- IREE HAL local executable library loaders:
-- - embedded-elf
-- - system-library
-- - vmvx-module
-- IREE HAL local executable plugin mechanisms:
-- - embedded-elf
-- - system-library
-- IREE compiler input dialects:
-- - StableHLO
-- - Torch MLIR
-- - TOSA
-- IREE compiler output formats:
-- - 'vm-c': textual C source module
-- - 'vm-bytecode': VM bytecode
-- - 'vm-asm': VM MLIR assembly
-- IREE_ENABLE_ASSERTIONS force disabled NDEBUG for CMAKE_CXX_FLAGS_RELWITHDEBINFO: '-O2 -g -DNDEBUG' -> '-O2 -g '
-- IREE_ENABLE_ASSERTIONS force disabled NDEBUG for CMAKE_C_FLAGS_RELWITHDEBINFO: '-O2 -g -DNDEBUG' -> '-O2 -g '
-- Enabling gdb-index (binaries with debug info are not relocatable)
-- Enabling thin archives (static libraries will not be relocatable)
-- Found Python3: /home/cds/anaconda3/envs/tf/bin/python3.1 (found version "3.11.9") found components: Interpreter
-- Found Python: /home/cds/anaconda3/envs/tf/bin/python3.1 (found version "3.11.9") found components: Interpreter
-- Found Python: /home/cds/anaconda3/envs/tf/bin/python3.1 (found suitable version "3.11.9", minimum required is "3.8") found components: Interpreter Development.Module missing components: Development.SABIModule
-- Adding bundled LLVM source dependency
-- IREE compiler target backends:
-- - llvm-cpu
-- - vmvx
-- Configuring third_party/llvm-project
-- bolt project is disabled
-- clang project is enabled
-- clang-tools-extra project is disabled
-- compiler-rt project is disabled
-- cross-project-tests project is disabled
-- libc project is disabled
-- libclc project is disabled
-- lld project is enabled
-- lldb project is disabled
-- mlir project is enabled
-- openmp project is disabled
-- polly project is disabled
-- pstl project is disabled
-- flang project is disabled
-- Found Python3: /home/cds/anaconda3/envs/tf/bin/python3.1 (found suitable version "3.11.9", minimum required is "3.0") found components: Interpreter
-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Looking for errno.h
-- Looking for errno.h - found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for malloc/malloc.h
-- Looking for malloc/malloc.h - not found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for signal.h
-- Looking for signal.h - found
-- Looking for sys/ioctl.h
-- Looking for sys/ioctl.h - found
-- Looking for sys/mman.h
-- Looking for sys/mman.h - found
-- Looking for sys/resource.h
-- Looking for sys/resource.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for sysexits.h
-- Looking for sysexits.h - found
-- Looking for termios.h
-- Looking for termios.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for fenv.h
-- Looking for fenv.h - found
-- Looking for mach/mach.h
-- Looking for mach/mach.h - not found
-- Looking for setrlimit
-- Looking for setrlimit - found
-- Looking for getrlimit
-- Looking for getrlimit - found
-- Looking for dladdr
-- Looking for dladdr - found
-- LLVM host triple: x86_64-unknown-linux-gnu
-- Native target architecture is X86
-- Threads enabled.
-- Doxygen disabled.
-- Ninja version: 1.10.1
-- 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 X86
-- Targeting ARM
-- Targeting AArch64
-- Targeting RISCV
-- LLD version: 20.0.0
-- Clang version: 20.0.0git
-- Configuring llvm-external-projects/mlir-iree-dialects
-- Adding LLVM external project mlir-iree-dialects -> /home/cds/workspace/iree/llvm-external-projects/iree-dialects
-- Building iree-dialects project at /home/cds/workspace/iree/llvm-external-projects/iree-dialects (into /home/cds/workspace/iree/iree-build/llvm-external-projects/mlir-iree-dialects)
-- Configuring third_party/stablehlo
-- Adding LLVM external project stablehlo -> /home/cds/workspace/iree/third_party/stablehlo
-- Building StableHLO as an external LLVM project
-- Failed to find LLVM FileCheck
-- git version: v1.8.3-24-g1e96bb0a normalized to 1.8.3.24
-- Google Benchmark version: 1.8.3.24
-- Enabling additional flags: -DINCLUDE_DIRECTORIES=/home/cds/workspace/iree/third_party/benchmark/include
-- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- success
-- Performing Test HAVE_STD_REGEX -- success
-- 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 -- success
INSTALL TARGETS - target cpuinfo has PUBLIC_HEADER files but no PUBLIC_HEADER DESTINATION.
-- Configuring IREE compiler plugins
-- Registering static linked compiler plugin 'input_stablehlo' (iree::compiler::plugins::input::StableHLO::registration)
-- Registering static linked compiler plugin 'input_torch' (iree::compiler::plugins::input::Torch::registration)
-- Registering static linked compiler plugin 'input_tosa' (iree::compiler::plugins::input::TOSA::registration)
-- Registering static linked compiler plugin 'hal_target_llvm_cpu' (iree::compiler::plugins::target::LLVMCPU::LLVMCPU)
-- Registering static linked compiler plugin 'hal_target_vmvx' (iree::compiler::plugins::target::VMVX::VMVX)
-- Registering static linked compiler plugin 'example' (iree::samples::compiler_plugins::example::registration)
-- Registering static linked compiler plugin 'simple_io_sample' (iree::samples::compiler_plugins::simple_io_sample::registration)
-- Configuring IREE runtime plugins
-- Runtime tracing disabled
-- Configuring done
-- Generating done
-- Build files have been written to: /home/cds/workspace/iree/iree-build
(tf) ➜ iree git:(heads/iree-3.2.0rc20250130) ✗ cmake --build ./iree-build/
[0/2] Re-checking globbed directories...
[5186/7079] Building CXX object compiler/src/iree...ow_Encoding_IR_IR.objects.dir/EncodingAttrs.cpp.o
FAILED: compiler/src/iree/compiler/Dialect/Flow/Encoding/IR/CMakeFiles/iree_compiler_Dialect_Flow_Encoding_IR_IR.objects.dir/EncodingAttrs.cpp.o
/home/cds/app/clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04/bin/clang++ -I/home/cds/workspace/iree -I/home/cds/workspace/iree/iree-build -I/home/cds/workspace/iree/third_party/llvm-project/llvm/include -I/home/cds/workspace/iree/iree-build/llvm-project/include -I/home/cds/workspace/iree/third_party/llvm-project/mlir/include -I/home/cds/workspace/iree/iree-build/llvm-project/tools/mlir/include -I/home/cds/workspace/iree/third_party/llvm-project/lld/include -I/home/cds/workspace/iree/iree-build/llvm-project/tools/lld/include -I/home/cds/workspace/iree/compiler/src -I/home/cds/workspace/iree/iree-build/compiler/src -O2 -g -gsplit-dwarf -ggnu-pubnames -fPIC -fvisibility=hidden -fno-rtti -fno-exceptions -Werror -Wall -Wno-error=deprecated-declarations -Wno-ambiguous-member-template -Wno-char-subscripts -Wno-extern-c-compat -Wno-gnu-alignof-expression -Wno-gnu-variable-sized-type-not-at-end -Wno-ignored-optimization-argument -Wno-invalid-offsetof -Wno-invalid-source-encoding -Wno-mismatched-tags -Wno-pointer-sign -Wno-reserved-user-defined-literal -Wno-return-type-c-linkage -Wno-self-assign-overloaded -Wno-sign-compare -Wno-signed-unsigned-wchar -Wno-strict-overflow -Wno-trigraphs -Wno-unknown-pragmas -Wno-unknown-warning-option -Wno-unused-command-line-argument -Wno-unused-const-variable -Wno-unused-function -Wno-unused-local-typedef -Wno-unused-private-field -Wno-user-defined-warnings -Wno-missing-braces -Wctad-maybe-unsupported -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wfor-loop-analysis -Wformat-security -Wgnu-redeclared-enum -Wimplicit-fallthrough -Winfinite-recursion -Wliteral-conversion -Wnon-virtual-dtor -Woverloaded-virtual -Wpointer-arith -Wself-assign -Wstring-conversion -Wtautological-overlap-compare -Wthread-safety -Wthread-safety-beta -Wunused-comparison -Wvla -fno-lax-vector-conversions -fno-omit-frame-pointer -fmacro-prefix-map=/home/cds/workspace/iree=iree -std=gnu++17 -MD -MT compiler/src/iree/compiler/Dialect/Flow/Encoding/IR/CMakeFiles/iree_compiler_Dialect_Flow_Encoding_IR_IR.objects.dir/EncodingAttrs.cpp.o -MF compiler/src/iree/compiler/Dialect/Flow/Encoding/IR/CMakeFiles/iree_compiler_Dialect_Flow_Encoding_IR_IR.objects.dir/EncodingAttrs.cpp.o.d -o compiler/src/iree/compiler/Dialect/Flow/Encoding/IR/CMakeFiles/iree_compiler_Dialect_Flow_Encoding_IR_IR.objects.dir/EncodingAttrs.cpp.o -c /home/cds/workspace/iree/compiler/src/iree/compiler/Dialect/Flow/Encoding/IR/EncodingAttrs.cpp
/home/cds/workspace/iree/compiler/src/iree/compiler/Dialect/Flow/Encoding/IR/EncodingAttrs.cpp:24:28: error: out-of-line definition of 'get' does not match any declaration in 'mlir::iree_compiler::IREE::Encoding::EncodingAttr'
24 | EncodingAttr EncodingAttr::get(MLIRContext *ctx, int64_t operandIndex,
| ^~~
/home/cds/workspace/iree/compiler/src/iree/compiler/Dialect/Flow/Encoding/IR/EncodingAttrs.cpp:37:10: error: no matching function for call to 'get'
37 | return get(ctx, b.getIndexAttr(operandIndex), opTypeAttr,
| ^~~
/home/cds/workspace/iree/iree-build/compiler/src/iree/compiler/Dialect/Encoding/IR/EncodingAttrs.h.inc:68:23: note: candidate function not viable: no known conversion from 'IntegerAttr' to 'int64_t' (aka 'long') for 2nd argument
68 | static EncodingAttr get(::mlir::MLIRContext *context, int64_t operandIndex, EncodingOpType opType, ArrayRef<Type> elemTypes, ArrayRef<AffineMap> maps = {}, std::optional<AffineMap> bcastMap = {}, ArrayRef<int64_t> roundDimsTo = {}, ArrayRef<Attribute> layouts = {});
| ^ ~~~~~~~~~~~~~~~~~~~~
/home/cds/workspace/iree/iree-build/compiler/src/iree/compiler/Dialect/Encoding/IR/EncodingAttrs.h.inc:67:23: note: candidate function not viable: requires 8 arguments, but 7 were provided
67 | static EncodingAttr get(::mlir::MLIRContext *context, IntegerAttr operand_index, EncodingOpTypeAttr op_type, ArrayAttr element_types, ArrayAttr user_indexing_maps, AffineMapAttr bcast_map, DenseArrayAttr round_dims_to, ArrayAttr layouts);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/cds/workspace/iree/compiler/src/iree/compiler/Dialect/Flow/Encoding/IR/EncodingAttrs.cpp:42:25: error: out-of-line definition of 'getMapForOperandIndex' does not match any declaration in 'mlir::iree_compiler::IREE::Encoding::EncodingAttr'
42 | AffineMap EncodingAttr::getMapForOperandIndex() {
| ^~~~~~~~~~~~~~~~~~~~~
/home/cds/workspace/iree/iree-build/compiler/src/iree/compiler/Dialect/Encoding/IR/EncodingAttrs.h.inc:50:13: note: member declaration does not match because it is const qualified
50 | AffineMap getMapForOperandIndex() const;
| ^ ~~~~~
/home/cds/workspace/iree/compiler/src/iree/compiler/Dialect/Flow/Encoding/IR/EncodingAttrs.cpp:60:39: error: out-of-line definition of 'mapDimToOperandIndex' does not match any declaration in 'mlir::iree_compiler::IREE::Encoding::EncodingAttr'
60 | std::optional<unsigned> EncodingAttr::mapDimToOperandIndex(int64_t dimPos) {
| ^~~~~~~~~~~~~~~~~~~~
/home/cds/workspace/iree/iree-build/compiler/src/iree/compiler/Dialect/Encoding/IR/EncodingAttrs.h.inc:55:27: note: member declaration does not match because it is const qualified
55 | std::optional<unsigned> mapDimToOperandIndex(int64_t dimPos) const;
| ^ ~~~~~
/home/cds/workspace/iree/compiler/src/iree/compiler/Dialect/Flow/Encoding/IR/EncodingAttrs.cpp:92:33: error: out-of-line definition of 'getRoundDimsToArray' does not match any declaration in 'mlir::iree_compiler::IREE::Encoding::EncodingAttr'
92 | ArrayRef<int64_t> EncodingAttr::getRoundDimsToArray() {
| ^~~~~~~~~~~~~~~~~~~
/home/cds/workspace/iree/iree-build/compiler/src/iree/compiler/Dialect/Encoding/IR/EncodingAttrs.h.inc:58:21: note: member declaration does not match because it is const qualified
58 | ArrayRef<int64_t> getRoundDimsToArray() const;
| ^ ~~~~~
/home/cds/workspace/iree/compiler/src/iree/compiler/Dialect/Flow/Encoding/IR/EncodingAttrs.cpp:107:10: error: no matching function for call to 'get'
107 | return get(bcastMap.getContext(), getOperandIndex(), getOpType(),
| ^~~
/home/cds/workspace/iree/iree-build/compiler/src/iree/compiler/Dialect/Encoding/IR/EncodingAttrs.h.inc:68:23: note: candidate function not viable: no known conversion from 'IntegerAttr' to 'int64_t' (aka 'long') for 2nd argument
68 | static EncodingAttr get(::mlir::MLIRContext *context, int64_t operandIndex, EncodingOpType opType, ArrayRef<Type> elemTypes, ArrayRef<AffineMap> maps = {}, std::optional<AffineMap> bcastMap = {}, ArrayRef<int64_t> roundDimsTo = {}, ArrayRef<Attribute> layouts = {});
| ^ ~~~~~~~~~~~~~~~~~~~~
/home/cds/workspace/iree/iree-build/compiler/src/iree/compiler/Dialect/Encoding/IR/EncodingAttrs.h.inc:67:23: note: candidate function not viable: requires 8 arguments, but 7 were provided
67 | static EncodingAttr get(::mlir::MLIRContext *context, IntegerAttr operand_index, EncodingOpTypeAttr op_type, ArrayAttr element_types, ArrayAttr user_indexing_maps, AffineMapAttr bcast_map, DenseArrayAttr round_dims_to, ArrayAttr layouts);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 errors generated.
[5197/7079] Building CXX object compiler/plugins/...orch-mlir/lib/Dialect/Torch/IR/TorchDialect.cpp.o
ninja: build stopped: subcommand failed.
|
Beta Was this translation helpful? Give feedback.
Answered by
sexjun
Jan 31, 2025
Replies: 1 comment
-
fixed by using this script to build iree projects |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
sexjun
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
fixed by using this script to build iree projects
https://github.com/iree-org/iree/tree/main/build_tools/llvm