Repository navigation
Update cmake to 4.1.2 and start patching packages for compatibility - #20265
Conversation
0e0fc94 to
1457bf4
Compare
|
@hnyman feedback about this: merge as soon as we have every package in core compilable. Then fix feeds later. Ideally 25.xx will target this feature. |
|
For the core package I guess I can take care of updating the version and then bump the package... Do you want to create specific patch so I can merge with your sob and author tag? |
|
Really great @Ansuel if you can take care of local apps in the core repo. No need to have any model patch from me. You can my SoB next to yours, or Suggested-by or something Suitable text might be: Edit CMakeLists.txt to fulfill cmake 4.0 requirements |
|
I noticed that the advice in the cmake error message might actually offer a Makefile-only change possibility without a need for creating a patch for CMakeLists.txt. Adding the value via CMAKE_OPTIONS in Makefile might be enough: That was enough to compile relayd, which is one of the core repo apps that I have not yet patched. Does this sounds preferrable to (temporary) patches? The error message is:
|
|
Honestly I prefer to fix them directly than apply this workaround and
forget about it.
Il Ven 3 Ott 2025, 16:29 Hannu Nyman ***@***.***> ha scritto:
… *hnyman* left a comment (openwrt/openwrt#20265)
<#20265 (comment)>
I noticed that the advice in the cmake error message might actually offer
a Makefile-only change possibility without a need for creating a patch for
CMakeLists.txt.
Adding the value via CMAKE_OPTIONS in Makefile might be enough:
CMAKE_OPTIONS += \
-DCMAKE_POLICY_VERSION_MINIMUM=3.10
That was enough to compile relayd, which is one of the core repo apps that
I have not yet patched.
This might be more clean shortcut compared to separate patches for all
OpenWrt core repo apps.
(Naturally the final solution is change at the "upstream" CMakeLists.txt
Does this sounds preferrable to (temporary) patches?
The error message is:
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 has been removed from CMake.
Update the VERSION argument value. Or, use the ... syntax
to tell CMake that the project requires at least but has been updated
to work with policies introduced by or earlier.
Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
—
Reply to this email directly, view it on GitHub
<#20265 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE2ZMQR3Z5IY3I77RHV5LT33V2B55AVCNFSM6AAAAACIA6OJPSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGNRVHEZDGNJZGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
I would update the packages where OpenWrt is upstream to require cmake 3.10, this version was released in November 2017, see https://www.kitware.com/cmake-3-10-0-available-for-download/ |
98f20eb to
cb964ce
Compare
|
@hnyman Can you change to require 3.10? |
I will do that on Sunday evening, and will also go through the main repo packages. There are still some unpatched packages, as they were not on my first list that you already patched. Nice that you got the main bulk away. |
|
@Ansuel |
|
Please rebase, I fixed some other packages too. |
|
I will rebase on Sunday when I am back at PC. (Remote rebase via gui would likely fail due to jsonfilter changes) Regarding core repo OpenWrt=upstream apps, there are still some to be patched: (Opkg-lede, librpc-uclibc can may be forgotten as ancient) |
2787309 to
fe35940
Compare
d307a19 to
0c0de5d
Compare
|
I have now rebased it and also adjusted all changes to be into 3.10 (instead of 3.30), as 3.10 was applied to the local core packages. I will still go through the main repo once more, as I think that there might still be a few external packages that still have too old version reference. |
|
Tempted to merge and monitor faillog directory delta. @hauke what do you
think?
Il Dom 5 Ott 2025, 17:17 Hannu Nyman ***@***.***> ha scritto:
… *hnyman* left a comment (openwrt/openwrt#20265)
<#20265 (comment)>
I have now rebased it and also adjusted all changes to be into 3.10
(instead of 3.30), as 3.10 was applied to the local core packages.
I will still go through the main repo once more, as I think that there
might still be a few external packages that still have too old version
reference.
—
Reply to this email directly, view it on GitHub
<#20265 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE2ZMQQSDMEVKQ5FJXWYLY33WEZBNAVCNFSM6AAAAACIA6OJPSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGNRZGEZDKOJQGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
Can you do a full build to see how many packages you will break ? |
Edit CMakeLists.txt to fulfill cmake 4.0 requirement that cmake_minimum_required is now at least 3.5 and in future 3.10. Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt#20265 Signed-off-by: Christian Marangi <[email protected]>
Patch CMakeLists.txt in selected apps for cmake 4.x compatibility. New cmake versions require at least 3.5 as 'cmake_minimum_required' in CMakeLists.txt. In future 3.10 will be required. Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt#20265 Signed-off-by: Christian Marangi <[email protected]>
Patch CMakeLists.txt in selected apps for cmake 4.x compatibility. New cmake versions require at least 3.5 as 'cmake_minimum_required' in CMakeLists.txt. In future 3.10 will be required. Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt#20265 Signed-off-by: Christian Marangi <[email protected]>
Patch CMakeLists.txt for cmake 4.x compatibility. New cmake versions require at least 3.5 as 'cmake_minimum_required' in CMakeLists.txt. In future 3.10 will be required. Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt#20265 Signed-off-by: Christian Marangi <[email protected]>
Update cmake to 4.1.2. Note that cmake 4.x requires at least 3.5 as 'cmake_minimum_required' in CMakeLists.txt of each app to be compiled. Future cmake versions will increase that requirement to 3.10 https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt#20265 Signed-off-by: Christian Marangi <[email protected]>
* mediatek: filogic: TP-Link Archer AX80 v1 (EU) support * odhcp6c: update to Git HEAD (2025-11-04) b3e1db42b4db odhcp6c: fix safe interval processing to follow RFC 4862 63461f64d4c1 dhcpv6: always include IA_NA and IA_PD in Request message if requested 1051cabb4da3 dhcpv6: fix incorrect IA type being printed in syslog c5237eabeb5c odhcp6c: prevent RELEASE at shutdown when -k is set a01b1ff1e50f odhcp6c: fix client exiting if Renew and Rebind fails 4839bf6d0feb odhcp6c: implement RKAP: Reconfiguration Key Authentication Protocol 52a9a847def4 dhcpv6: fix solicit loop when server has no address available 7b1f67c23de6 ubus: implement ubus methods to force a Renew and Release 2b0e8f2d8541 ubus: implement retransmission configuration via ubus 8d89d373f360 odhcp6c: add failure when -E option is used without ubus support enabled 58f3c9eb1163 odhcp6c: add new argument option to disable script call 1048fc4fb622 reconfigure: move all configuration functions to a new file 93f056d3a1f2 reconfigure: implement DHCP reconfiguration af669fb23cd3 dhcpv6: implement statistics for DHCPv6 3a1a599fecb7 ubus: implement UBus method to get state data immediately 44c50214997d ubus: emit UBus event on DHCP state changes 33b972bc526a ubus: connect to UBus backend 2f609f248faf odhcp6c: implement asynchronous handling for DHCPv6 State 6466314e7f62 odhcp6c: enable Non-Blocking DHCPv6 Socket 1df65f0caf46 dhcpv6: refactor dhcp_request Function 047c63a8156b dhcpv6: add t1 and t2 transmission 1b5f0c402bbf dscp: add option to set dscp value 96017df54d8f dhcpv6: fix wrong retransmission of DHCPv6 Solicit b929fc8a1cfd odhcp6c: add a simple build script adc651ffed55 cmake: make libubox mandatory 5182e2b696ef cmake: drop EXT_PREFIX_CLASS 8d052c52e18d cmake: disable pedantic f2521b296b21 github: fix CI apt dependencies openwrt/odhcp6c@77e1ae2...b3e1db4 Signed-off-by: Álvaro Fernández Rojas <[email protected]> * odhcpd: update to Git HEAD (2025-11-04) d44af6dd8f4e dhcpv6: create struct dhcpv6_lease 4df45c8c3722 dhcpv4: create struct dhcpv4_lease a6dccae41b60 odhcpd: struct lease -> struct lease_cfg fc0abb66f122 dhcpv4: use leasetime from a->lease 74eeff193848 router: always use link-local src address for RAs b9a071b8341f router: Rewrite the ingress MTU to one configured for the interface 1ef9e0e610d5 router: utilize interface ra_mtu for RA 1480c09ee0aa config: clamp ra_mtu to interface MTU, and default ra_mtu to interface MTU ee4f0df6bd68 netlink: Store interface MTU at link change d174e25e85a1 github: fix CI apt dependencies 8f393d55a76e odhcpd: more fixes for IID calculations openwrt/odhcpd@fc27940...d44af6d Signed-off-by: Álvaro Fernández Rojas <[email protected]> * I don't have a device, but I can help a little. Remember: Do full backups!! Signed-off-by: Sergey Shlukov <[email protected]> * tools/liblzo: add cmake 4.x compatibility Patch CMakeLists.txt to fulfill cmake 4.0 requirements of cmake_minimum_required being at least 3.5 and in future 3.10. Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt#20265 Signed-off-by: Christian Marangi <[email protected]> * treewide: edit local CMakeLists.txt to be compatible with cmake 4.x Edit CMakeLists.txt to fulfill cmake 4.0 requirement that cmake_minimum_required is now at least 3.5 and in future 3.10. Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt#20265 Signed-off-by: Christian Marangi <[email protected]> * libjson-c: patch for cmake 4.x compatibility Patch CMakeLists.txt in selected apps for cmake 4.x compatibility. New cmake versions require at least 3.5 as 'cmake_minimum_required' in CMakeLists.txt. In future 3.10 will be required. Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt#20265 Signed-off-by: Christian Marangi <[email protected]> * jansson: adjust for cmake 4.x compatibility Patch CMakeLists.txt in selected apps for cmake 4.x compatibility. New cmake versions require at least 3.5 as 'cmake_minimum_required' in CMakeLists.txt. In future 3.10 will be required. Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt#20265 Signed-off-by: Christian Marangi <[email protected]> * libevent2: adjust for cmake 4.x compatibility Patch CMakeLists.txt for cmake 4.x compatibility. New cmake versions require at least 3.5 as 'cmake_minimum_required' in CMakeLists.txt. In future 3.10 will be required. Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt#20265 Signed-off-by: Christian Marangi <[email protected]> * tools/cmake: update to 4.1.2 Update cmake to 4.1.2. Note that cmake 4.x requires at least 3.5 as 'cmake_minimum_required' in CMakeLists.txt of each app to be compiled. Future cmake versions will increase that requirement to 3.10 https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt#20265 Signed-off-by: Christian Marangi <[email protected]> * ipq806x: 6.12: backport patch to handle CPUFreq with no SMEM The Google OnHub doesn't init the SMEM in SBL causing the CPUFreq driver to fail probe. This is caused by the fact that new CPUFreq driver makes use of SMEM to identify the SoC variant and on Google OnHub this is not available. Backport patch to detect this state and fallback to compatible matching fixing the CPUFreq driver. Link: openwrt#20587 Signed-off-by: Christian Marangi <[email protected]> * ipq806x: switch to kernel 6.12 Move the ipq806x target to kernel 6.12 by default as every kernel bump problem has been handled. Link: openwrt#20644 Signed-off-by: Christian Marangi <[email protected]> * ipq806x: drop support for kernel 6.6 Drop support for kernel 6.6 as now kernel 6.12 is set as default kernel version. Link: openwrt#20644 Signed-off-by: Christian Marangi <[email protected]> * ath11k: fix transmit queue flushing through flush_sta implementation warning print "ath11k c000000.wifi: failed to flush transmit queue 0" is observed during busy times. The mac80211 fallback implementation of `flush_sta` does not handle the per STA queues well. This is fixed by providing a ath11k specific implementation of flush_sta telling the firmware to flush a given station. The draining of the transmit queues should therefore stop correctly, even if new packets arrive in the mean time. An upstream ath11k RFC is available at: https://patchwork.kernel.org/project/linux-wireless/patch/GV1P250MB14333A5BF24623C4753A10E1E8E0A@GV1P250MB1433.EURP250.PROD.OUTLOOK.COM/ The patch was tested on a Xiaomi AX3600. Signed-off-by: Florian Maurer <[email protected]> Tested-by: Florian Maurer <[email protected]> Co-authored-by: Benjamin Berg <[email protected]> Tested-by: Flole <[email protected]> Link: openwrt#20293 Signed-off-by: Christian Marangi <[email protected]> * airoha: replace PWM patch with upstream version Replace Airoha AN7581 PWM patch with upstream version and add kernel version tag. Signed-off-by: Christian Marangi <[email protected]> * mediatek: filogic: TP-Link Archer AX80 v1 (EU) support * mediatek: filogic: TP-Link Archer AX80 v1 (EU) support * mediatek: filogic: TP-Link Archer AX80 v1 (EU) support * mediatek: filogic: TP-Link Archer AX80 v1 (EU) support * fix Signed-off-by: Sergey Shlukov <[email protected]> * fix led's (#7) * fix led's * Delete router Signed-off-by: Manti <[email protected]> --------- Signed-off-by: Manti <[email protected]> --------- Signed-off-by: Álvaro Fernández Rojas <[email protected]> Signed-off-by: Sergey Shlukov <[email protected]> Signed-off-by: Hannu Nyman <[email protected]> Signed-off-by: Christian Marangi <[email protected]> Signed-off-by: Florian Maurer <[email protected]> Signed-off-by: EmreYavuzalp <[email protected]> Signed-off-by: Manti <[email protected]> Co-authored-by: Emre Yavuzalp <[email protected]> Co-authored-by: Álvaro Fernández Rojas <[email protected]> Co-authored-by: Hannu Nyman <[email protected]> Co-authored-by: Christian Marangi <[email protected]> Co-authored-by: Florian Maurer <[email protected]> Co-authored-by: Benjamin Berg <[email protected]> Co-authored-by: EmreYavuzalp <[email protected]> Co-authored-by: Manti <[email protected]>
|
These packages are not building in 6.12.57 openwrt-imagebuilder-ramips-mt7621 mjpg-streamer-input-uvc mjpg-streamer-output-http mjpg-streamer-www-simple kmod-video-uvc mjpg-streamer |
Please see the PR openwrt/packages#27878 that was merged just before your message. Buildbot will churn binaries for all architectures in the next few days. |
Patch CMakeLists.txt to fulfill cmake 4.0 requirements of cmake_minimum_required being at least 3.5 and in future 3.10. Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt#20265 Signed-off-by: Christian Marangi <[email protected]>
Edit CMakeLists.txt to fulfill cmake 4.0 requirement that cmake_minimum_required is now at least 3.5 and in future 3.10. Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt#20265 Signed-off-by: Christian Marangi <[email protected]>
Patch CMakeLists.txt in selected apps for cmake 4.x compatibility. New cmake versions require at least 3.5 as 'cmake_minimum_required' in CMakeLists.txt. In future 3.10 will be required. Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt#20265 Signed-off-by: Christian Marangi <[email protected]>
Patch CMakeLists.txt in selected apps for cmake 4.x compatibility. New cmake versions require at least 3.5 as 'cmake_minimum_required' in CMakeLists.txt. In future 3.10 will be required. Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt#20265 Signed-off-by: Christian Marangi <[email protected]>
Patch CMakeLists.txt for cmake 4.x compatibility. New cmake versions require at least 3.5 as 'cmake_minimum_required' in CMakeLists.txt. In future 3.10 will be required. Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt#20265 Signed-off-by: Christian Marangi <[email protected]>
Update cmake to 4.1.2. Note that cmake 4.x requires at least 3.5 as 'cmake_minimum_required' in CMakeLists.txt of each app to be compiled. Future cmake versions will increase that requirement to 3.10 https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt#20265 Signed-off-by: Christian Marangi <[email protected]>
Patch CMakeLists.txt to fulfill cmake 4.0 requirements of cmake_minimum_required being at least 3.5 and in future 3.10. Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt#20265 Signed-off-by: Christian Marangi <[email protected]>
Edit CMakeLists.txt to fulfill cmake 4.0 requirement that cmake_minimum_required is now at least 3.5 and in future 3.10. Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt#20265 Signed-off-by: Christian Marangi <[email protected]>
Patch CMakeLists.txt in selected apps for cmake 4.x compatibility. New cmake versions require at least 3.5 as 'cmake_minimum_required' in CMakeLists.txt. In future 3.10 will be required. Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt#20265 Signed-off-by: Christian Marangi <[email protected]>
Patch CMakeLists.txt in selected apps for cmake 4.x compatibility. New cmake versions require at least 3.5 as 'cmake_minimum_required' in CMakeLists.txt. In future 3.10 will be required. Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt#20265 Signed-off-by: Christian Marangi <[email protected]>
Patch CMakeLists.txt for cmake 4.x compatibility. New cmake versions require at least 3.5 as 'cmake_minimum_required' in CMakeLists.txt. In future 3.10 will be required. Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt#20265 Signed-off-by: Christian Marangi <[email protected]>
Update cmake to 4.1.2. Note that cmake 4.x requires at least 3.5 as 'cmake_minimum_required' in CMakeLists.txt of each app to be compiled. Future cmake versions will increase that requirement to 3.10 https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt#20265 Signed-off-by: Christian Marangi <[email protected]>
Patch CMakeLists.txt to fulfill cmake 4.0 requirements of cmake_minimum_required being at least 3.5 and in future 3.10. Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt/openwrt#20265 Signed-off-by: Christian Marangi <[email protected]>
Edit CMakeLists.txt to fulfill cmake 4.0 requirement that cmake_minimum_required is now at least 3.5 and in future 3.10. Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt/openwrt#20265 Signed-off-by: Christian Marangi <[email protected]>
Patch CMakeLists.txt in selected apps for cmake 4.x compatibility. New cmake versions require at least 3.5 as 'cmake_minimum_required' in CMakeLists.txt. In future 3.10 will be required. Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt/openwrt#20265 Signed-off-by: Christian Marangi <[email protected]>
Patch CMakeLists.txt in selected apps for cmake 4.x compatibility. New cmake versions require at least 3.5 as 'cmake_minimum_required' in CMakeLists.txt. In future 3.10 will be required. Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt/openwrt#20265 Signed-off-by: Christian Marangi <[email protected]>
Patch CMakeLists.txt for cmake 4.x compatibility. New cmake versions require at least 3.5 as 'cmake_minimum_required' in CMakeLists.txt. In future 3.10 will be required. Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt/openwrt#20265 Signed-off-by: Christian Marangi <[email protected]>
Update cmake to 4.1.2. Note that cmake 4.x requires at least 3.5 as 'cmake_minimum_required' in CMakeLists.txt of each app to be compiled. Future cmake versions will increase that requirement to 3.10 https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt/openwrt#20265 Signed-off-by: Christian Marangi <[email protected]>
Reference to discussion in pr #19558 from @PolynomialDivision about updating tools/cmake to 4.x.
New cmake versions require at least 3.5 as 'cmake_minimum_required' in CMakeLists.txt of each compiled app.
Future cmake versions will increase that requirement to 3.10
https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html
We have 64 cmake packages in the main OpenWrt repo and 200 packages in packages feed repo.
Some of those have already a new enough 'cmake_minimum_required', but many packages will need patching. As the CMakeLists.txt is part of upstream sources, we can't fully identify the affected packages from our local Makefiles.
The proper end-solution is naturally that the needed change is made to upstream sources, if possible. Many apps are already ok, and many are updating that 'cmake_minimum_required' value along their new versions.
I did this PR as an example of the needed changes and a wake-up call to OpenWrt core developers, who have direct access to the packages where "upstream" is actually an OpenWrt managed repo in OpenWrt git servers. They could rather easily patch upstream CMakeLists.txt while adding other new commits to upstream. Active committers in those packages are e.g. @nbd168 @jow- @blogic @Ansuel
(odhcpd was already changed a week ago, but I have not noticed other changes )
For "normal" packages with external upstream, we may need to patch them until upstream changes the value.
I propose that we locally patch it 3.30, which is the cmake version in the oldest currently supported OpenWrt branch (24.10). Main/master branch already uses cmake 3.31.
This likely requires somewhat similar action as the opkg-apk change, where quite many packages required versioning changes.
This PR has three commits:
Not comprehensive. Just the packages that were needed for my build
{jansson,libjson-c,jsonfilter}: patch for cmake 4.x compatibility
Not comprehensive. Just the packages that were needed for my build
tools/cmake: update to 4.1.2
Compiled / run-tested for mt7622/RT3200.