Skip to content

Fixing pip build for RHEL 9

Hi @gstark @epianori @emily

After upgrading to EL9, I started getting the following error when running pip install .:

CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 3.5 has been removed from 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.
  
    Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.

This is caused by the fact that pip tries to use cmake 4.0.0 by default. This error goes away when we fix the cmake version to 3.26 (i.e. the default cmake version for el9).

Merge request reports

Loading