Skip to content

Conversation

@Daviey
Copy link
Contributor

@Daviey Daviey commented Oct 9, 2025

Adds a patch file to update cmake_minimum_required from 3.7 to 3.10 in the main CMakeLists.txt files. Keeps the existing postPatch for vendored dependencies since those are git submodules that can't be easily patched with patch files.

CMake 4 doesn't support versions older than 3.5, and versions between 3.5-3.10 are deprecated.

Upstream is working on a similar fix in OpenNMT/CTranslate2#1907

Fixes: #450258

Adds a patch file to update cmake_minimum_required from 3.7 to 3.10 in
the main CMakeLists.txt files. Keeps the existing postPatch for vendored
dependencies since those are git submodules that can't be easily patched
with patch files.

CMake 4 doesn't support versions older than 3.5, and versions between
3.5-3.10 are deprecated.

Upstream is working on a similar fix in OpenNMT/CTranslate2#1907

Fixes: NixOS#450258
Signed-off-by: Dave Walker <dave@daviey.com>
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. labels Oct 9, 2025
@nix-owners nix-owners bot requested review from misuzu and mweinelt October 9, 2025 14:28
@mweinelt
Copy link
Member

mweinelt commented Oct 9, 2025

Sorry, I don't understand. The ctranslate2 package is cached for me on master, so it builds after the last patching round.

@LordGrimmauld
Copy link
Contributor

LordGrimmauld commented Oct 14, 2025

The build works, anything in the interval [3.5,3.10) currently works but is on the chopping block for the next round of cmake compatibility drops:

ctranslate2> CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
ctranslate2>   Compatibility with CMake < 3.10 will be removed from a future version of
ctranslate2>   CMake.
ctranslate2>
ctranslate2>   Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
ctranslate2>   to tell CMake that the project requires at least <min> but has been updated
ctranslate2>   to work with policies introduced by <max> or earlier.
ctranslate2>
ctranslate2>

Seeing as upstream is working on a bump to 3.10 cmake min version, we may get away with ignoring this and just doing a regular version bump later. There is no immediate need to change anything.

@Sigmanificient Sigmanificient added this pull request to the merge queue Oct 23, 2025
@mweinelt mweinelt removed this pull request from the merge queue due to a manual request Oct 23, 2025
@mweinelt

This comment was marked as outdated.

@mweinelt mweinelt marked this pull request as draft October 23, 2025 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build failure: ctranslate

3 participants