hnyman
November 9, 2025, 8:43am
1
Cmake compiling tool was recently updated to 4.1.2, which has broken about 100 packages. The newer cmake versions require that the CMakeLists.txt file in upstream sources claims compatibility with at least cmake 3.5. And many old versions of packages still have a specification for older cmake in their sources.
The cmake failures are pretty visible:
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!
If you are using or maintaining a package that is now failing for a cmake related reason, pleast participate in bringing things up to shape.
In many cases, the correct solution would be to update the package to a newer version, as many/most packages have been recently modifying their sources for this reason.
Alternatively, even if the upstream has not yet released a new version, there may already be a compatibility commit that can be backported here as a patch.
Third option would be to create a local patch just authoring a local patch changing the 'cmake_minimum_required' in CMakeLists.txt to be 3.10. See example in our commit histories. https://github.com/openwrt/packages/commits/master
First list of failing packages was in https://github.com/openwrt/openwrt/pull/20265#issuecomment-3395192802
The current buildbot failures can be seen at https://downloads.openwrt.org/snapshots/faillogs/ (pick there the architecture relevant to you, or just any of the newest builds)
References:
Issue discussion in packages feed:
opened 01:39PM - 06 Oct 25 UTC
chore
### Package Name
- [ ] base16384
- [ ] bluld
- [ ] canutils
- [ ] cereal
- [x] … cgi-io
- [x] cjson
- [ ] ecdsautils
- [ ] hidapi
- [ ] leptonica
- [ ] libftdi
- [x] libftdi1 #27762
- [ ] libid3tag
- [ ] liblo
- [ ] libmad
- [ ] libnatpmp
- [ ] libradiotap
- [ ] libroxml
- [ ] libsndfile
- [ ] libsoxr
- [ ] libssh
- [ ] libtins
- [ ] libuecc
- [ ] libvorbis
- [ ] libwebsockets
- [ ] libyaml-cpp
- [ ] libyang
- [x] lua-cjson
- [ ] lua-ev
- [ ] lualanes
- [ ] luv
- [ ] lzmq
- [x] lzo
- [ ] mbpoll
- [ ] mbusd
- [ ] mjpg-streamer
- [x] msgpack-c
- [x] nlbwmon
- [ ] openelp
- [ ] openobex
- [x] phantap
- [ ] portaudio
- [ ] protobuf
- [ ] qrencode
- [ ] quectel-timesync
- [ ] realtek-poe
- [ ] respondd
- [ ] rtpmidid
- [ ] softethervpn5
- [ ] spawn-fcgi
- [ ] swanmon
- [ ] sysrepo
- [ ] telldus-core
- [x] tiff #27764
- [ ] tini
- [ ] tunneldigger
- [ ] uci2
- [ ] uledd
- [x] usteer
- [ ] v4l2camera
- [ ] v4l2rtspserver
- [ ] v4l2tools
- [ ] xxhash
- [ ] yajl
- [ ] zlog
- [ ] zmq
### Maintainer
-
### OpenWrt Version
- master
### Steps to Reproduce
cmake used in the toolchain for compilation of 250+ packages, will be updated to 4.1.2 in near future.
See https://github.com/openwrt/openwrt/pull/20265
Many packages have already be fixed by their upstreams: the minimum definition in each package's CMakeLists.txt has been already updated to a suitable value.
(so far the local packages in the main OpenWrt repo have been updated to be compatible, by setting the minimum value to cmake 3.10)
The proper final solution is for each upstream to update their packages sources (at upstream). In meanwhile, we can patch the CMakeLists.txt at the package locally, but that will be cumbersome.
The minimum will now be 3.5 and soon that will change to 3.10.
Testing done by building all packages, reveals that about 80 packages will fail to build with cmake 4.1.2.
**If you are maintaining / updating any of them, please fix also the needed cmake version minimum at the same time.** Otherwise the package build will break soon.
List from Hauke's testing:
<details>
```
hauke@debian-16gb-nbg1-1:~/openwrt/openwrt$ grep "Compatibility with CMake < 3.5 has been removed from CMake" logs/ -r
logs/package/feeds/packages/openobex/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/libsoxr/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/bluld/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/softethervpn5/host-compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/lualanes/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/realtek-poe/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/lua-cjson/lua-53/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/lua-cjson/lua-51/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/lua-cjson/lua-54/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/openelp/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/libyaml-cpp/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/base16384/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/leptonica/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/libftdi/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/uledd/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/mjpg-streamer/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/v4l2camera/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/libmad/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/telldus-core/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/zmq/curve/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/zmq/nc/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/libftdi1/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/mbusd/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/cjson/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/sysrepo/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/tini/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/canutils/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/tunneldigger/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/libnatpmp/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/quectel-timesync/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/usteer/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/rtpmidid/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/tiff/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/xxhash/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/hidapi/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/luv/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/liblo/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/libvorbis/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/libtins/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/lzmq/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/libsndfile/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/libyang/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/libid3tag/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/cereal/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/mbpoll/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/uci2/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/v4l2tools/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/nlbwmon/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/cgi-io/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/libuecc/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/libssh/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/portaudio/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/phantap/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/libroxml/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/qrencode/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/lua-ev/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/spawn-fcgi/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/zlog/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/ecdsautils/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/yajl/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/libwebsockets/mbedtls/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/libwebsockets/full/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/libwebsockets/openssl/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/respondd/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/msgpack-c/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/lzo/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/swanmon/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/protobuf/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/protobuf/host-compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/libradiotap/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/packages/v4l2rtspserver/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/routing/oonf-dlep-proxy/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/routing/oonf-dlep-radio/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/routing/oonf-olsrd2/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/routing/ohybridproxy/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/routing/minimalist-pcproxy/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/luci/lucihttp/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/telephony/sipp/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/telephony/bcg729/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
logs/package/feeds/video/libdouble-conversion/compile.txt: Compatibility with CMake < 3.5 has been removed from CMake.
```
</details>
cmake bump PR:
main ← hnyman:cmake4
opened 05:50PM - 01 Oct 25 UTC
Reference to discussion in pr #19558 from @PolynomialDivision about updating too… ls/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:
* treewide: patch OpenWrt core apps for cmake 4.x compatibility
_Not comprehensive. Just the packages that were needed for my build_
- [x] mt76
- [x] libnl-tiny
- [x] libubox
- [x] uclient
- [x] udebug
- [x] ustream-ssl
- [x] odhcp6c
- [x] odhcpd
- [x] uhttpd
- [x] unetd
- [x] fstools
- [x] fwtool
- [x] procd
- [x] rpcd
- [x] ubox
- [x] ubus
- [x] ucert
- [x] uci
- [x] urngd
- [x] usign
- [x] ugps
* {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.
5 Likes
Luci asked me for cmake 3.31.0 as a minimum and from what I've seen it's the latest stable one, by the way the new clones come with cmake 3.5 so it's not enough for Luci.
hnyman
November 9, 2025, 6:35pm
3
We are already using cmake 4.1.2.
This is only about adjusting packages not to claim too low cmake as their standard.
(24.10 is using cmake 3.30 for compilation, and no LuCI package in 24.10 asks for higher cmake)
That's right, it was in snapshot compiled where it asked me for 3.31
hnyman
November 9, 2025, 6:47pm
5
Yeah, and 4.1.2 is built as a tool for OpenWrt compilation in master.
OpenWrt compilation does not use the host cmake.
@hnyman you got there too fast. I took a look at some key packages and you’d already tackled them XD
hnyman
November 9, 2025, 7:44pm
7
Yeah, I tried to look for those packages that are dependencies of others. I haven't fixed them all, but a dozen at least.
2 Likes
You’re doing great work as always my man.