CMake Error During Faiss 1.10.0 Compilation

Symptom

When Faiss 1.10.0 is compiled, an error message "CMake 3.24.0 or higher is required." is displayed.

Possible Cause

The current CMake version is too early. Faiss 1.10.0 requires CMake 3.24.0 or later.

Solution

Install CMake 3.24.0 or later. The following uses CMake 3.24.0 as an example.

  • For x86:
    1. Obtain the CMake installation script.
      1
      wget https://github.com/Kitware/CMake/releases/download/v3.24.0/cmake-3.24.0-linux-x86_64.sh
      
    2. Run the installation script.
      bash ./cmake-3.24.0-linux-x86_64.sh --skip-license --prefix=/usr
       1
       2
       3
       4
       5
       6
       7
       8
       9
      10
      # During the installation, the following information is displayed:
      # Option 1
      Do you accept the license? [y/n]: 
      # Enter y.
      # Option 2
      By default the CMake will be installed in:
        "/usr/cmake-3.24.0-linux-x86_64"
      Do you want to include the subdirectory cmake-3.24.0-linux-x86_64?
      Saying no will install in: "/usr" [Y/n]:
      # Enter n.
      
    3. View the CMake version.
      1
      cmake --version
      

      Command output:

      1
      cmake version 3.24.0
      
  • For AArch64:
    1. Obtain the CMake installation script.
      1
      wget https://github.com/Kitware/CMake/releases/download/v3.24.0/cmake-3.24.0-linux-aarch64.sh
      
    2. Run the installation script.
      bash ./cmake-3.24.0-linux-aarch64.sh --skip-license --prefix=/usr
       1
       2
       3
       4
       5
       6
       7
       8
       9
      10
      # During the installation, the following information is displayed:
      # Option 1
      Do you accept the license? [y/n]: 
      # Enter y.
      # Option 2
      By default the CMake will be installed in:
        "/usr/cmake-3.24.0-linux-aarch64"
      Do you want to include the subdirectory cmake-3.24.0-linux-aarch64?
      Saying no will install in: "/usr" [Y/n]:
      # Enter n.
      
    3. View the CMake version.
      1
      cmake --version
      

      Command output:

      1
      cmake version 3.24.0