backport: bitcoin/bitcoin#32693: depends: fix cmake compatibility error for freetype#7372
backport: bitcoin/bitcoin#32693: depends: fix cmake compatibility error for freetype#7372knst wants to merge 1 commit into
Conversation
|
✅ Review complete (commit 4a8a5a3) |
|
This pull request has conflicts, please rebase. |
✅ No Merge Conflicts DetectedThis PR currently has no conflicts with other open PRs. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughThe freetype dependency build definition is updated to apply a new patch ( Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
d7c3790 build: patch cmake min version on freetype (josibake) Pull request description: ## Problem While doing a depends build with CMake 4.0.1, I got the following error: ``` Extracting freetype... /root/bitcoin/depends/sources/freetype-2.11.0.tar.xz: OK Preprocessing freetype... Configuring freetype... CMake Error at CMakeLists.txt:100 (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! make: *** [funcs.mk:343: /root/bitcoin/depends/x86_64-pc-linux-gnu/.freetype_stamp_configured] Error 1 make: Leaving directory '/root/bitcoin/depends' ``` .. which led me to https://cmake.org/cmake/help/latest/release/4.0.html#deprecated-and-removed-features, which states compatibility with CMake versions less than 3.5 has been removed in 4.0. ## Fix Based on the suggestion from the error message (and from reading the CMake docs), I added `-DCMAKE_POLICY_VERSION_MINIMUM=3.22`. I picked `3.22` (as opposed to 3.5) since that is the minimum version of CMake we specify in `doc/dependencies.md`. Would be nice if there was a way to pipe the min version in as a variable (since presumably we'd want to update this to be in lock step with the minimum CMake version of the whole project), but I couldn't think of a simple way to do this. Open to suggestions on a more robust way to do this if this is deemed too brittle. ACKs for top commit: fanquake: ACK d7c3790 hebasto: ACK d7c3790. Tested on Ubuntu 25.04 with both cmake 4.0.2 and the default cmake 3.31.6. Tree-SHA512: fb664ec73bfffc504f1dcc9076072307f443d056d14325de41c4a29f3ee4077f1922e79b5895b49e7354f45ad6a35be4973c153c2baf3376df6c0d209efc9c54 Co-authored-by: merge-script <fanquake@gmail.com>
thepastaclaw
left a comment
There was a problem hiding this comment.
Code Review
Faithful, minimal backport of bitcoin#32693 that fixes freetype's depends build under CMake 4 by patching freetype's CMakeLists.txt to require CMake >= 3.12. The freetype.mk wiring (patch registration + preprocess_cmds) matches established depends conventions, no Dash-specific interactions, and no prerequisite gaps.
Note: posted as a COMMENT review because GitHub rejected the clean APPROVE review for this stale, no-longer-head commit.
thepastaclaw
left a comment
There was a problem hiding this comment.
Code Review
Faithful, minimal backport of bitcoin#32693 that fixes freetype's depends build under CMake 4.x by adding a patch raising freetype's cmake_minimum_required from 2.8.12 to 3.12 and wiring it through freetype.mk via the standard
Issue being fixed or feature implemented
It fixes freetype dependency build on Kubuntu 26.04 which provide cmake-4 by default.
What was done?
Backport bitcoin#32693
How Has This Been Tested?
Build succeed
Breaking Changes
N/A
Checklist: