Unit and Functional tests can't be build on Ubuntu24
Build attempt https://github.com/openvinotoolkit/npu_compiler/actions/runs/14096185091/job/39483889959
2025-03-27T01:39:37.6398961Z [ 98%] Building CXX object tests/unit/CMakeFiles/npuUnitTests.dir/vpux_compiler/dialect/NPUReg37XX/regmapped_invariant_test.cpp.o
2025-03-27T01:39:37.7063494Z [ 98%] Building CXX object tests/unit/CMakeFiles/npuUnitTests.dir/vpux_compiler/dialect/NPUReg40XX/composers/dma_composer_test.cpp.o
2025-03-27T01:39:37.7537228Z [ 98%] Building CXX object tests/unit/CMakeFiles/npuUnitTests.dir/vpux_compiler/dialect/NPUReg40XX/regmapped_act_kernel_invo_test.cpp.o
2025-03-27T01:39:37.8140442Z cc1plus: all warnings being treated as errors
2025-03-27T01:39:37.8395456Z gmake[2]: *** [tests/unit/CMakeFiles/npuUnitTests.dir/build.make:415: tests/unit/CMakeFiles/npuUnitTests.dir/vpux_compiler/core/value_source_info_tests.cpp.o] Error 1
2025-03-27T01:39:37.8401150Z gmake[2]: *** Waiting for unfinished jobs....
2025-03-27T01:39:37.9193697Z In file included from /home/runner/work/npu_compiler/npu_compiler/npu_compiler/src/vpux_compiler/include/vpux/compiler/NPU40XX/dialect/NPUReg40XX/descriptors.hpp:12,
2025-03-27T01:39:37.9203910Z from /home/runner/work/npu_compiler/npu_compiler/npu_compiler/src/vpux_compiler/include/vpux/compiler/NPU40XX/dialect/NPUReg40XX/attributes.hpp:19,
2025-03-27T01:39:37.9206178Z from /home/runner/work/npu_compiler/npu_compiler/npu_compiler/src/vpux_compiler/include/vpux/compiler/NPU40XX/dialect/NPUReg40XX/ops.hpp:10,
2025-03-27T01:39:37.9208107Z from /home/runner/work/npu_compiler/npu_compiler/npu_compiler/tests/unit/vpux_compiler/common/utils.hpp:14:
2025-03-27T01:39:37.9209646Z /home/runner/work/npu_compiler/npu_compiler/npu_compiler/src/vpux_compiler/include/vpux/compiler/dialect/VPURegMapped/descriptors.hpp: At global scope:
2025-03-27T01:39:37.9212591Z /home/runner/work/npu_compiler/npu_compiler/npu_compiler/src/vpux_compiler/include/vpux/compiler/dialect/VPURegMapped/descriptors.hpp:712:28: error: ‘uint8_t’ is not a member of ‘std’; did you mean ‘wint_t’?
2025-03-27T01:39:37.9214127Z 712 | mlir::SmallVector<std::uint8_t> storage;
2025-03-27T01:39:37.9214577Z | ^~~~~~~
2025-03-27T01:39:37.9214983Z | wint_t
2025-03-27T01:39:37.9216305Z /home/runner/work/npu_compiler/npu_compiler/npu_compiler/src/vpux_compiler/include/vpux/compiler/dialect/VPURegMapped/descriptors.hpp:712:35: error: template argument 1 is invalid
2025-03-27T01:39:37.9217981Z 712 | mlir::SmallVector<std::uint8_t> storage;
2025-03-27T01:39:37.9218474Z | ^
2025-03-27T01:39:37.9219830Z /home/runner/work/npu_compiler/npu_compiler/npu_compiler/src/vpux_compiler/include/vpux/compiler/dialect/VPURegMapped/descriptors.hpp:712:35: error: template argument 2 is invalid
2025-03-27T01:39:37.9223110Z /home/runner/work/npu_compiler/npu_compiler/npu_compiler/src/vpux_compiler/include/vpux/compiler/dialect/VPURegMapped/descriptors.hpp: In constructor ‘vpux::VPURegMapped::detail::DescriptorTemplate<Descriptor, name, RegistersPack>::DescriptorTemplate()’:
2025-03-27T01:39:37.9227846Z /home/runner/work/npu_compiler/npu_compiler/npu_compiler/src/vpux_compiler/include/vpux/compiler/dialect/VPURegMapped/descriptors.hpp:338:17: error: request for member ‘resize’ in ‘((vpux::VPURegMapped::detail::DescriptorTemplate<Descriptor, name, RegistersPack>*)this)->vpux::VPURegMapped::detail::DescriptorTemplate<Descriptor, name, RegistersPack>::storage’, which is of non-class type ‘int’
2025-03-27T01:39:37.9230764Z 338 | storage.resize(Union<RegistersPack...>::size.count());
2025-03-27T01:39:37.9231319Z | ^~~~~~
2025-03-27T01:39:37.9233590Z /home/runner/work/npu_compiler/npu_compiler/npu_compiler/src/vpux_compiler/include/vpux/compiler/dialect/VPURegMapped/descriptors.hpp: In member function ‘size_t vpux::VPURegMapped::detail::DescriptorTemplate<Descriptor, name, RegistersPack>::size() const’:
2025-03-27T01:39:37.9238360Z /home/runner/work/npu_compiler/npu_compiler/npu_compiler/src/vpux_compiler/include/vpux/compiler/dialect/VPURegMapped/descriptors.hpp:342:24: error: request for member ‘size’ in ‘((const vpux::VPURegMapped::detail::DescriptorTemplate<Descriptor, name, RegistersPack>*)this)->vpux::VPURegMapped::detail::DescriptorTemplate<Descriptor, name, RegistersPack>::storage’, which is of non-class type ‘const int’
2025-03-27T01:39:37.9241011Z 342 | return storage.size();
...
With the latest update https://github.com/openvinotoolkit/npu_compiler/pull/63, unfortunately, the issue still persists, however no longer related to NPU project. CPU plugin build which is apparently needed for Unit/Functional tests, fails because of
FAILED: src/plugins/intel_cpu/CMakeFiles/openvino_intel_cpu_plugin.dir/Release/src/nodes/conv.cpp.o
/usr/local/bin/cmake -E __run_co_compile --tidy="/usr/bin/clang-tidy-18;--extra-arg=-Wno-unused-command-line-argument;--extra-arg-before=--driver-mode=g++" --source=/home/runner/work/npu_compiler/npu_compiler/openvino/src/plugins/intel_cpu/src/nodes/conv.cpp -- /usr/bin/c++ -DCPU_DEBUG_CAPS -DIMPLEMENT_OPENVINO_RUNTIME_PLUGIN -DIN_OV_COMPONENT -DOV_BUILD_POSTFIX=\"\" -DOV_CPU_WITH_DNNL -DOV_CPU_WITH_MLAS -DOV_NATIVE_PARENT_PROJECT_ROOT_DIR=\"openvino\" -DOV_THREAD=OV_THREAD_TBB -DSNIPPETS_DEBUG_CAPS -D_GLIBCXX_USE_CXX11_ABI=1 -Dopenvino_intel_cpu_plugin_EXPORTS -DCMAKE_INTDIR=\"Release\" -I/home/runner/work/npu_compiler/npu_compiler/openvino/src/plugins/intel_cpu/src -I/home/runner/work/npu_compiler/npu_compiler/openvino/src/core/reference/include -I/home/runner/work/npu_compiler/npu_compiler/openvino/src/core/dev_api -I/home/runner/work/npu_compiler/npu_compiler/openvino/src/core/include -I/home/runner/work/npu_compiler/npu_compiler/openvino/src/inference/include -I/home/runner/work/npu_compiler/npu_compiler/openvino/src/frontends/common/include -I/home/runner/work/npu_compiler/npu_compiler/openvino/src/frontends/onnx/frontend/include -I/home/runner/work/npu_compiler/npu_compiler/openvino/src/frontends/paddle/include -I/home/runner/work/npu_compiler/npu_compiler/openvino/src/frontends/pytorch/include -I/home/runner/work/npu_compiler/npu_compiler/openvino/src/frontends/tensorflow/include -I/home/runner/work/npu_compiler/npu_compiler/openvino/src/frontends/tensorflow_lite/include -I/home/runner/work/npu_compiler/npu_compiler/openvino/src/inference/dev_api -I/home/runner/work/npu_compiler/npu_compiler/openvino/src/common/transformations/include -I/home/runner/work/npu_compiler/npu_compiler/openvino/src/common/low_precision_transformations/include -I/home/runner/work/npu_compiler/npu_compiler/openvino/src/common/itt/include -I/home/runner/work/npu_compiler/npu_compiler/openvino/src/common/util/include -I/home/runner/work/npu_compiler/npu_compiler/openvino/thirdparty/pugixml/src -I/home/runner/work/npu_compiler/npu_compiler/openvino/src/common/conditional_compilation/include -I/home/runner/work/npu_compiler/npu_compiler/openvino/src/core/shape_inference/include -I/home/runner/work/npu_compiler/npu_compiler/openvino/src/common/snippets/include -isystem /home/runner/work/npu_compiler/npu_compiler/openvino/src/plugins/intel_cpu/thirdparty/mlas/inc -isystem /home/runner/work/npu_compiler/npu_compiler/openvino/src/plugins/intel_cpu/thirdparty/mlas/lib -isystem /home/runner/work/npu_compiler/npu_compiler/openvino_build/src/plugins/intel_cpu/thirdparty/onednn/include -isystem /home/runner/work/npu_compiler/npu_compiler/openvino/src/plugins/intel_cpu/thirdparty/onednn/include -isystem /home/runner/work/npu_compiler/npu_compiler/openvino/src/plugins/intel_cpu/thirdparty/onednn/src -isystem /home/runner/work/npu_compiler/npu_compiler/openvino/src/plugins/intel_cpu/thirdparty/onednn/src/../include -isystem /home/runner/work/npu_compiler/npu_compiler/openvino/temp/tbb/include -isystem /home/runner/work/npu_compiler/npu_compiler/openvino/thirdparty/xbyak -Wsuggest-override -fsigned-char -ffunction-sections -fdata-sections -fdiagnostics-show-option -Wall -Wundef -Wmissing-declarations -Wno-error=deprecated-declarations -Wno-cpp -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/runner/work/npu_compiler/npu_compiler/openvino/= -ffile-prefix-map=../openvino/= -Wno-error=deprecated-declarations -Wno-cpp -std=c++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -MD -MT src/plugins/intel_cpu/CMakeFiles/openvino_intel_cpu_plugin.dir/Release/src/nodes/conv.cpp.o -MF src/plugins/intel_cpu/CMakeFiles/openvino_intel_cpu_plugin.dir/Release/src/nodes/conv.cpp.o.d -o src/plugins/intel_cpu/CMakeFiles/openvino_intel_cpu_plugin.dir/Release/src/nodes/conv.cpp.o -c /home/runner/work/npu_compiler/npu_compiler/openvino/src/plugins/intel_cpu/src/nodes/conv.cpp
/home/runner/work/npu_compiler/npu_compiler/openvino/src/plugins/intel_cpu/src/nodes/conv.cpp:956:16: error: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list,-warnings-as-errors]
956 | return dnnl::convolution_forward::primitive_desc(engine,
| ^
/home/runner/work/npu_compiler/npu_compiler/openvino/src/plugins/intel_cpu/src/nodes/conv.cpp:970:12: error: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list,-warnings-as-errors]
970 | return dnnl::convolution_forward::primitive_desc(engine,
| ^
55142 warnings generated.
Suppressed 55140 warnings (55140 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings treated as errors
It turned out that -DCMAKE_COMPILE_WARNING_AS_ERROR=OFF does not work either.
The following workaround is applied: https://github.com/openvinotoolkit/npu_compiler/pull/63/commits/7617ca3f3f43b1f4a366d9263890f1cfb9e0565e#diff-d13d8eff0b112f0c9ae4815115ff214bd1802e06eae5f9730ab4363e6711b827R164
We will come back to this issue with the next NPU Compiler update