Skip to content

cmake 4.x requires packages to claim compatibility with at least cmake 3.5 #27607

Closed

Description

@hnyman

Package Name

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 openwrt/openwrt#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.

Activity

  1. added theissue type on Oct 6, 2025
  2. pinned this issue on Oct 6, 2025
  3. hauke commented on Oct 6, 2025

    @hauke
    Member

    cgi-io was fixed here: #27597
    usteer was fixed here: #27596

  4. champtar commented on Oct 9, 2025

    @champtar
    Member

    Ping @openwrt/packages-write, if you maintain a package that use cmake, it might need patching, please have a look at this issue

  5. Ansuel commented on Nov 4, 2025

    @Ansuel
    Member

    To move things up and push for faster update, I merged the cmake update in core.

    feeds follow a different update path and it's ok to have broken package while they get fixed as our buildbot will eventually pick the fixed package and they will come again later.

  6. Jalakas commented on Nov 5, 2025

    @Jalakas
    Contributor

    tiff also needed some help with building:

    --- libs/tiff/Makefile
    +++ libs/tiff/Makefile
    @@ -55,7 +55,8 @@
     	-Dwebp=OFF \
     	-Djpeg12=OFF \
     	-Dcxx=OFF \
    -	-Dlibdeflate=OFF
    +	-Dlibdeflate=OFF \
    +	-DCMAKE_POLICY_VERSION_MINIMUM=3.5
     
     define Build/InstallDev
     	$(call Build/InstallDev/cmake,$(1))
    
  7. cotequeiroz commented on Nov 5, 2025

    @cotequeiroz
    Member

    Despite not being included in the list, the afalg_engine package needed the policy bump as well, done with 9959178.

  8. Ansuel commented on Nov 5, 2025

    @Ansuel
    Member

    Thanks a lot @cotequeiroz

  9. Ansuel commented on Nov 5, 2025

    @Ansuel
    Member

    tiff also needed some help with building:

    --- libs/tiff/Makefile
    +++ libs/tiff/Makefile
    @@ -55,7 +55,8 @@
     	-Dwebp=OFF \
     	-Djpeg12=OFF \
     	-Dcxx=OFF \
    -	-Dlibdeflate=OFF
    +	-Dlibdeflate=OFF \
    +	-DCMAKE_POLICY_VERSION_MINIMUM=3.5
     
     define Build/InstallDev
     	$(call Build/InstallDev/cmake,$(1))
    

    No introduce a patch please, don't use the policy flag...

  10. hnyman commented on Nov 6, 2025

    @hnyman
    ContributorAuthor

    As the cmake version bump has been merged, there is the fallout of non-compiling packages, like expected.
    Current failure list can easiest be seen from the buildbot faillogs list.
    E.g.

    Note that not all are from the cmake bump. Some are failing for other reasons, and some are also failing as a dependency package fails first.

  11. Ansuel commented on Nov 6, 2025

    @Ansuel
    Member

    Many are also caused by dependency package failing due to cmake

  12. 40 remaining items

  13. hauke commented on Nov 16, 2025

    @hauke
    Member

    libmraa and rtty are failing for me because of the cmake min version.

  14. 1715173329 commented on Nov 17, 2025

    @1715173329
    Member

    ping @zhaojh329 for rtty

  15. Ansuel commented on Nov 25, 2025

    @Ansuel
    Member

    only libradiotap is pending waiting for the guy upstream to accept the change.... everything else is effectively cmake updated.

    only video feeds is left i guess...

  16. BKPepe commented on Nov 25, 2025

    @BKPepe
    Member

    Just like always @Ansuel, excellent work. Truly incredible. This is how it should look. :) Thanks so much. To do it properly, which you do, requires enormous effort and time for the given changes to be sent and subsequently accepted into upstream repositories, which you do. Brilliant.

  17. Ansuel commented on Nov 25, 2025

    @Ansuel
    Member

    now if only someone could take care of all the python package failing from ages now.... they are broken from 24.10

  18. BKPepe commented on Nov 25, 2025

    @BKPepe
    Member

    I know, they are broken in OpenWrt 24.10, it was caused by setuptools update, I am fully aware of it, but I did not look at it so far. :( Will do it really soon. 😢 😢 Hopefully this week.

  19. Ansuel commented on Nov 25, 2025

    @Ansuel
    Member

    @BKPepe nono it wasn't for you just that we have lots of hard to tackle package to fix for other target. I hoped python stuff was easy to handle and was well maintained. Not blaming anyone and especially not you!

  20. Ansuel commented on Nov 26, 2025

    @Ansuel
    Member

    Can someone check if video feeds have package that doesn't compile for cmake?

    If not I guess we can close this.

    Seems I fixed every broken package affected by this.

    Thanks allo for the massive help <3

  21. Rondom commented on Dec 22, 2025

    @Rondom
    Contributor

    I don't get why uledd has a check mark and why it compiles fine in CI when it fails locally for me. It clearly has not been updated.

  22. hnyman commented on Dec 22, 2025

    @hnyman
    ContributorAuthor

    why uledd has a check mark and why it compiles fine in CI when it fails locally for me. It clearly has not been updated

    It has been updated, by adding a patch: 3b35d81
    uledd: add patch for CMake >= 4.0 support

    If it fails for you, check that you are you using up-to-date feed.

  23. Rondom commented on Dec 22, 2025

    @Rondom
    Contributor

    My bad, sorry for the noise.

  24. BKPepe commented on Dec 22, 2025

    @BKPepe
    Member

    It looks like, we can close this. Closing! :)

  25. unpinned this issue on Dec 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions