Clight icon indicating copy to clipboard operation
Clight copied to clipboard

[BUG] CMake compatibility issue

Open vrnch opened this issue 10 months ago • 1 comments

NOTE: Please try to upgrade Clight if not running on latest release, before reporting a bug!

Clight version the issue has been seen with:

4.11

Used distribution:

archlinux

Describe the bug A compatibility issue between the project's CMake configuration and the version of CMake installed on my system. Specifically, the error message indicates that compatibility with CMake versions earlier than 3.5 has been removed, leading to the build failure.

==> Starting build()...
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.


-- Configuring incomplete, errors occurred!
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'libmodule-5.0.1-1': 
error: can't build clightd-5.9-1, deps not satisfied: libmodule
error: can't build clight-4.11-1, deps not satisfied: clightd
error: packages failed to build: libmodule-5.0.1-1  clightd-5.9-1  clight-4.11-1

Expected behavior Successfull installation of Clight without errors

To Reproduce

  1. My CMake version is 4.0.0 (I have to keep this version for other projects)
  2. I was installing Clight through paru
➜ paru -S clight clightd

:: Resolving dependencies...
:: There are 2 providers available for clight:
:: Repository AUR:
    1) clight  2) clight-git  
Enter a number (default=1): 1
:: There are 2 providers available for clightd:
:: Repository AUR:
    1) clightd  2) clightd-git  
Enter a number (default=1): 1
:: Calculating conflicts...
:: Calculating inner conflicts...

Aur (3) libmodule-5.0.1-1  clightd-5.9-1  clight-4.11-1

:: Proceed to review? [Y/n]: y

:: Downloading PKGBUILDs...
 PKGBUILDs up to date
 nothing new to review
fetching devel info...
==> Making package: libmodule 5.0.1-1 (Tue 08 Apr 2025 12:14:12 PM WEST)
==> Retrieving sources...
  -> Found libmodule-5.0.1.tar.gz
==> Validating source files with sha256sums...
    libmodule-5.0.1.tar.gz ... Passed
==> Making package: libmodule 5.0.1-1 (Tue 08 Apr 2025 12:14:12 PM WEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found libmodule-5.0.1.tar.gz
==> Validating source files with sha256sums...
    libmodule-5.0.1.tar.gz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting libmodule-5.0.1.tar.gz with bsdtar
==> Starting prepare()...
==> Sources are ready.
libmodule-5.0.1-1: parsing pkg list...
==> Making package: libmodule 5.0.1-1 (Tue 08 Apr 2025 12:14:14 PM WEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Removing existing $pkgdir/ directory...
==> Starting build()...
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.


-- Configuring incomplete, errors occurred!
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'libmodule-5.0.1-1': 
error: can't build clightd-5.9-1, deps not satisfied: libmodule
error: can't build clight-4.11-1, deps not satisfied: clightd
error: packages failed to build: libmodule-5.0.1-1  clightd-5.9-1  clight-4.11-1

vrnch avatar Apr 08 '25 11:04 vrnch

This should be easily fixed by bumping the cmake_minimum_required to 3.5; are you willing to open a PR to fix that? Thank you! And thanks for reporting :)

FedeDP avatar Oct 09 '25 16:10 FedeDP