openvinotoolkit / openvinotoolkit/npu_compiler

Cannot compile the project on Fedora Linux

Open
#144 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
MLIR
Stars
100
Forks
50
Avg merge
3h 57m
Merged PRs (30d)
1

Description

I tried to compile the npu-compiler according to https://github.com/openvinotoolkit/npu_compiler/blob/90b6098b9ee96055d633dc520354434bae22e336/src/vpux_driver_compiler/docs/how_to_build_driver_compiler_withCmakePresets_on_linux.md, but it seemed to be not working, please see the following errors:

❯ cmake --build ./ --target npu_driver_compiler compilerTest profilingTest vpuxCompilerL0Test loaderTest -j8
[0/2] Re-checking globbed directories...
[1754/6596] Building CXX object build-modules/npu_compiler/thirdparty/llvm-project/llvm/tools/mlir/lib/Dialect/Affine/IR/CMakeFiles/obj.MLIRAffineDialect.dir/ValueBoundsOpInterfaceImpl.cpp.o
FAILED: build-modules/npu_compiler/thirdparty/llvm-project/llvm/tools/mlir/lib/Dialect/Affine/IR/CMakeFiles/obj.MLIRAffineDialect.dir/ValueBoundsOpInterfaceImpl.cpp.o 
ccache /usr/lib64/ccache/c++ -DBACKGROUND_FOLDING_ENABLED -DBUILD_LOG_LEVEL=4 -DOV_NATIVE_PARENT_PROJECT_ROOT_DIR=\"openvino\" -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/johnniang/workspaces/openvinotoolkit/openvino/build-x86_64/Release/build-modules/npu_compiler/thirdparty/llvm-project/llvm/tools/mlir/lib/Dialect/Affine/IR -I/home/johnniang/workspaces/openvinotoolkit/npu_compiler/thirdparty/llvm-project/mlir/lib/Dialect/Affine/IR -I/home/johnniang/workspaces/openvinotoolkit/openvino/build-x86_64/Release/build-modules/npu_compiler/thirdparty/llvm-project/llvm/include -I/home/johnniang/workspaces/openvinotoolkit/npu_compiler/thirdparty/llvm-project/llvm/include -I/home/johnniang/workspaces/openvinotoolkit/npu_compiler/thirdparty/llvm-project/mlir/include -I/home/johnniang/workspaces/openvinotoolkit/openvino/build-x86_64/Release/build-modules/npu_compiler/thirdparty/llvm-project/llvm/tools/mlir/include -Wsuggest-override  -fsigned-char -ffunction-sections -fdata-sections -fdiagnostics-show-option -Wall -Wundef -Wno-all -Wno-error=suggest-override -Wno-error=deprecated-declarations -Wno-cpp -Wno-undef -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -w -fdiagnostics-color -ffunction-sections -fdata-sections -Wundef -O3 -DNDEBUG  -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv -fstack-protector-strong -s -ffile-prefix-map=/home/johnniang/workspaces/openvinotoolkit/openvino/= -ffile-prefix-map=../..//= -Wno-all -Wno-error=suggest-override -Wno-error=deprecated-declarations -Wno-cpp -std=c++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -MD -MT build-modules/npu_compiler/thirdparty/llvm-project/llvm/tools/mlir/lib/Dialect/Affine/IR/CMakeFiles/obj.MLIRAffineDialect.dir/ValueBoundsOpInterfaceImpl.cpp.o -MF build-modules/npu_compiler/thirdparty/llvm-project/llvm/tools/mlir/lib/Dialect/Affine/IR/CMakeFiles/obj.MLIRAffineDialect.dir/ValueBoundsOpInterfaceImpl.cpp.o.d -o build-modules/npu_compiler/thirdparty/llvm-project/llvm/tools/mlir/lib/Dialect/Affine/IR/CMakeFiles/obj.MLIRAffineDialect.dir/ValueBoundsOpInterfaceImpl.cpp.o -c /home/johnniang/workspaces/openvinotoolkit/npu_compiler/thirdparty/llvm-project/mlir/lib/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.cpp
In file included from /home/johnniang/workspaces/openvinotoolkit/npu_compiler/thirdparty/llvm-project/mlir/lib/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.cpp:9:
/home/johnniang/workspaces/openvinotoolkit/npu_compiler/thirdparty/llvm-project/mlir/include/mlir/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.h:31:11: error: ‘int64_t’ was not declared in this scope
   31 | FailureOr<int64_t> fullyComposeAndComputeConstantDelta(Value value1,
      |           ^~~~~~~
/home/johnniang/workspaces/openvinotoolkit/npu_compiler/thirdparty/llvm-project/mlir/include/mlir/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.h:13:1: note: ‘int64_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
   12 | #include "mlir/Support/LLVM.h"
  +++ |+#include <cstdint>
   13 | 
/home/johnniang/workspaces/openvinotoolkit/npu_compiler/thirdparty/llvm-project/mlir/include/mlir/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.h:31:18: error: template argument 1 is invalid
   31 | FailureOr<int64_t> fullyComposeAndComputeConstantDelta(Value value1,
      |                  ^
/home/johnniang/workspaces/openvinotoolkit/npu_compiler/thirdparty/llvm-project/mlir/lib/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.cpp:107:77: error: ‘llvm::FailureOr<long int> mlir::affine::fullyComposeAndComputeConstantDelta(mlir::Value, mlir::Value)’ should have been declared inside ‘mlir::affine’
  107 | mlir::affine::fullyComposeAndComputeConstantDelta(Value value1, Value value2) {
      |                                                                             ^
/home/johnniang/workspaces/openvinotoolkit/npu_compiler/thirdparty/llvm-project/mlir/lib/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.cpp:107:1: error: ambiguating new declaration of ‘llvm::FailureOr<long int> mlir::affine::fullyComposeAndComputeConstantDelta(mlir::Value, mlir::Value)’
  107 | mlir::affine::fullyComposeAndComputeConstantDelta(Value value1, Value value2) {
      | ^~~~
/home/johnniang/workspaces/openvinotoolkit/npu_compiler/thirdparty/llvm-project/mlir/include/mlir/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.h:31:20: note: old declaration ‘int mlir::affine::fullyComposeAndComputeConstantDelta(mlir::Value, mlir::Value)’
   31 | FailureOr<int64_t> fullyComposeAndComputeConstantDelta(Value value1,
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[1761/6596] Building CXX object build-modules/npu_compiler/thirdparty/llvm-project/llvm/tools/mlir/lib/Dialect/Affine/IR/CMakeFiles/obj.MLIRAffineDialect.dir/AffineOps.cpp.o
ninja: build stopped: subcommand failed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Fedora build instructions linked in the issue and reproduce the failure using the reported CMake build command. Inspect thirdparty/llvm-project/mlir/include/mlir/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.h and its corresponding source file, then verify the compiler targets build successfully on Fedora with the listed tool versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, fedora, linux
Domain
build-system, compilers
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.