Skip to content

[core] TensorUtils.hpp includes fmt/base.h that is not found

What commit version of aidge do you use

aidge 0.5.0 aidge_backend_cpu 0.3.3.dev61+ged718fc aidge_backend_opencv 0.1.4.dev6+g67601db aidge_core 0.3.2.dev385+g10143f53 aidge_export_cpp 0.1.3.dev72+g05400e5 aidge_learning 0.2.2.dev20+gaed8f56 aidge_onnx 0.3.2.dev82+gdbd8230

Problem description

I got the newest version of libfmt-dev (8.1.1+ds1-2). This version has no "base.h" .

(env_aidge_p10) farges@WDTIS181H:/mnt/d/farges/Documents/aidge/aidge/aidge/aidge_core$ ls /usr/include/fmt
args.h  chrono.h  color.h  compile.h  core.h  format.h  format-inl.h  locale.h  os.h  ostream.h  printf.h  ranges.h  xchar.h

With a pull on the current dev branch, it is impossible to compile:

(env_aidge_p10) farges@WDTIS181H:/mnt/d/farges/Documents/aidge/aidge/aidge/aidge_core$ pip install .
Processing /mnt/d/farges/Documents/aidge/aidge/aidge/aidge_core
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy>=1.21.6 in /mnt/d/farges/Documents/aidge/env_aidge_p10/lib/python3.10/site-packages (from aidge_core==0.5.1) (2.1.3)
Requirement already satisfied: Jinja2>=3.1.2 in /mnt/d/farges/Documents/aidge/env_aidge_p10/lib/python3.10/site-packages (from aidge_core==0.5.1) (3.1.4)
Requirement already satisfied: matplotlib in /mnt/d/farges/Documents/aidge/env_aidge_p10/lib/python3.10/site-packages (from aidge_core==0.5.1) (3.9.4)
Requirement already satisfied: MarkupSafe>=2.0 in /mnt/d/farges/Documents/aidge/env_aidge_p10/lib/python3.10/site-packages (from Jinja2>=3.1.2->aidge_core==0.5.1) (3.0.2)
Requirement already satisfied: contourpy>=1.0.1 in /mnt/d/farges/Documents/aidge/env_aidge_p10/lib/python3.10/site-packages (from matplotlib->aidge_core==0.5.1) (1.3.1)
Requirement already satisfied: cycler>=0.10 in /mnt/d/farges/Documents/aidge/env_aidge_p10/lib/python3.10/site-packages (from matplotlib->aidge_core==0.5.1) (0.12.1)
Requirement already satisfied: fonttools>=4.22.0 in /mnt/d/farges/Documents/aidge/env_aidge_p10/lib/python3.10/site-packages (from matplotlib->aidge_core==0.5.1) (4.55.3)
Requirement already satisfied: kiwisolver>=1.3.1 in /mnt/d/farges/Documents/aidge/env_aidge_p10/lib/python3.10/site-packages (from matplotlib->aidge_core==0.5.1) (1.4.7)
Requirement already satisfied: packaging>=20.0 in /mnt/d/farges/Documents/aidge/env_aidge_p10/lib/python3.10/site-packages (from matplotlib->aidge_core==0.5.1) (24.2)
Requirement already satisfied: pillow>=8 in /mnt/d/farges/Documents/aidge/env_aidge_p10/lib/python3.10/site-packages (from matplotlib->aidge_core==0.5.1) (11.0.0)
Requirement already satisfied: pyparsing>=2.3.1 in /mnt/d/farges/Documents/aidge/env_aidge_p10/lib/python3.10/site-packages (from matplotlib->aidge_core==0.5.1) (3.2.0)
Requirement already satisfied: python-dateutil>=2.7 in /mnt/d/farges/Documents/aidge/env_aidge_p10/lib/python3.10/site-packages (from matplotlib->aidge_core==0.5.1) (2.9.0.post0)
Requirement already satisfied: six>=1.5 in /mnt/d/farges/Documents/aidge/env_aidge_p10/lib/python3.10/site-packages (from python-dateutil>=2.7->matplotlib->aidge_core==0.5.1) (1.17.0)
Building wheels for collected packages: aidge_core
  Building wheel for aidge_core (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for aidge_core (pyproject.toml) did not run successfully.
exit code: 1
  ╰─> [2036 lines of output]
      running bdist_wheel
      running build
      running build_py
 .
...
 .
      copying aidge_core/unit_tests/static/main.cpp -> build/lib.linux-x86_64-cpython-310/aidge_core/unit_tests/static
      running build_ext
      cmake /mnt/d/farges/Documents/aidge/aidge/aidge/aidge_core -DTEST=OFF -DCMAKE_INSTALL_PREFIX:PATH=/mnt/d/farges/Documents/aidge/env_aidge_p10/lib/libAidge -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DENABLE_ASAN=OFF -DPYBIND=ON -DPYBIND_INSTALL_PREFIX:PATH=/mnt/d/farges/Documents/aidge/aidge/aidge/aidge_core/build/lib.linux-x86_64-cpython-310/aidge_core -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCOVERAGE=OFF
      -- Project name: aidge_core
      -- Project version: 0.5.1
      -- Latest git commit: 19cd7d0f
      -- Found system fmt version 10.2.1
      -- Found Python: /mnt/d/farges/Documents/aidge/env_aidge_p10/bin/python3.10 (found version "3.10.12") found components: Interpreter Development.Module
      CMake Deprecation Warning at build/_deps/pybind11-src/CMakeLists.txt:8 (cmake_minimum_required):
        Compatibility with CMake < 3.10 will be removed from a future version of
        CMake.

        Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
        to tell CMake that the project requires at least <min> but has been updated
        to work with policies introduced by <max> or earlier.


      -- pybind11 v2.10.4
      -- Creating binding for module aidge_core
      -- Found Python: /mnt/d/farges/Documents/aidge/env_aidge_p10/bin/python3.10 (found version "3.10.12") found components: Interpreter
      -- Found Python: /usr/include/python3.10 (found version "3.10.12") found components: Development Development.Module Development.Embed
      -- Creating /mnt/d/farges/Documents/aidge/aidge/aidge/aidge_core/include/aidge/core_version.h
      -- Exporting created targets to use them in another build
      -- Configuring done (8.3s)
      -- Generating done (0.7s)
      -- Build files have been written to: /mnt/d/farges/Documents/aidge/aidge/aidge/aidge_core/build
      cmake --build . --config Release -j 4
      [  0%] Building CXX object CMakeFiles/_aidge_core.dir/src/analysis/DynamicAnalysis.cpp.o
      [  0%] Building CXX object CMakeFiles/_aidge_core.dir/src/analysis/OperatorStats.cpp.o
      [  1%] Building CXX object CMakeFiles/_aidge_core.dir/src/analysis/StaticAnalysis.cpp.o
 .
...
 .
      [ 98%] Building CXX object CMakeFiles/aidge_core.dir/python_binding/utils/pybind_Random.cpp.o
      [ 99%] Building CXX object CMakeFiles/aidge_core.dir/python_binding/utils/pybind_TensorUtils.cpp.o
      [ 99%] Building CXX object CMakeFiles/aidge_core.dir/python_binding/utils/sys_info/pybind_CoreVersionInfo.cpp.o
      In file included from /mnt/d/farges/Documents/aidge/aidge/aidge/aidge_core/python_binding/utils/pybind_TensorUtils.cpp:17:
      /mnt/d/farges/Documents/aidge/aidge/aidge/aidge_core/include/aidge/utils/TensorUtils.hpp:16:10: fatal error: fmt/base.h: No such file or directory
         16 | #include <fmt/base.h>
            |          ^~~~~~~~~~~~
      compilation terminated.
      gmake[2]: *** [CMakeFiles/aidge_core.dir/build.make:1395: CMakeFiles/aidge_core.dir/python_binding/utils/pybind_TensorUtils.cpp.o] Error 1
      gmake[2]: *** Waiting for unfinished jobs....
      gmake[1]: *** [CMakeFiles/Makefile2:144: CMakeFiles/aidge_core.dir/all] Error 2
      gmake: *** [Makefile:136: all] Error 2
      error: command '/tmp/pip-build-env-zx1v9o65/overlay/bin/cmake' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for aidge_core
Failed to build aidge_core
ERROR: Failed to build installable wheels for some pyproject.toml based projects (aidge_core)

Define the expected behavior.

A succesfull compilation.

Is this a regression ?

Yes.