Skip to content

Cannot compile the project on Fedora Linux #144

@JohnNiang

Description

@JohnNiang

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:

  • OS: Linux fedora 6.15.9-201.fc42.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Aug 2 11:37:34 UTC 2025 x86_64 GNU/Linux
  • CMake: cmake version 3.31.6
  • GCC: gcc (GCC) 15.2.1 20250808 (Red Hat 15.2.1-1)
  • Python: Python 3.13.6
  • Ninja: 1.12.1
  • OpenVINO: openvinotoolkit/openvino@2080c1a
  • NPU Compiler: 90b6098
❯ 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions