Skip to content

CMakeLists.txt wrong minimum required version #716

@stavzog

Description

@stavzog

Problem:

Building aws-lc-sys 0.25.1 fails with error:

Not searching for unused variables given on the command line.
  -- Configuring incomplete, errors occurred!

--- stderr
  CMake Error at CMakeLists.txt:4 (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.

I am using rustls 0.23.23 in my project, which seems to be using aws-lc-sys 0.25.1. When building it, it gives me the error: error: failed to run custom build command for 'aws-lc-sys v0.25.1'

I checked the CMakeLists.txt both in my version and in the current version (0.26.0) of aws-lc-sys and the cmake_minimum_required is still 3.0 which does not seem to work with my setup.

To fix the error and make aws-lc-sys build, I just had to go to my index.crates.io folder on my computer and manually fix the CMakeLists.txt files for aws-lc-sys and aws-lc-sys/aws-lc and replace the version from 3.0 to 3.5. I edited this line:

cmake_minimum_required(VERSION 3.0) ====> cmake_minimum_required(VERSION 3.5)

The replaced line completely fixed the issue, and now 'aws-lc-sys' can be compiled successfully.

Relevant details

AWS-LC for Rust versions or commit: 0.25.1 & 0.26.0

System information:

  • CPU architecture: x64
  • CPU name: AMD Ryzen 9 5900HS 3.30Hz
  • OS: Windows 11

P.S. I'm new to posting issues (this is my first one). If I missed any important info, please tell me. :)

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