Is CMake 3.13 absolutely required right now? #1272

issue MatthewLM openend this issue on April 11, 2023
  1. MatthewLM commented at 4:13 pm on April 11, 2023: none

    I see that the minimum required cmake has been increased to 3.13 ( #1230 #1238). I imagine this is necessary for the future but I don’t see how it is needed for v0.3.1. Is it safe to reduce this back to 3.10?

    The problem is that the flutter SDK recommends to remain with 3.10 for plugin authors. As mentioned when creating a new plugin:

    0# The Flutter tooling requires that developers have CMake 3.10 or later
    1# installed. You should not increase this version, as doing so will cause
    2# the plugin to fail to compile for some customers of the plugin.
    

    I could choose to ignore the suggested minimum by flutter or fork the library to reduce the minimum version. Others might have a similar compatibility issue and I don’t know if it was premature to increase the required minimum version yet.

  2. hebasto commented at 6:08 pm on April 11, 2023: member
    cc @theuni
  3. hebasto commented at 12:33 pm on April 12, 2023: member

    @MatthewLM

    Thanks for bringing this issue to our attention!

    Indeed, during our discussion in #1230 we didn’t consider compatibility with the Flutter framework.

    AFAICT, the only required feature is the SameMinorVersion compatibility mode in the write_basic_package_version_file() command (see https://gnusha.org/secp256k1/2023-03-08.log), which is available in CMake 3.11+.

    OTOH, from https://github.com/flutter/flutter/issues/52751 it follows that CMake 3.10 is required

    for easy compatibility with Ubuntu 18.04

    That looks outdated now. Does the Flutter project have any discussion or roadmap concerning the update of the CMake version?

  4. MatthewLM commented at 2:50 pm on April 12, 2023: none

    Thank you for the response. The Ubuntu 18.04 has extended support for the “Pro” users until April 2028 though I imagine that’s a small minority. I can’t find any discussions about increasing the required cmake version for flutter.

    I doubt increasing the required cmake version for a flutter plugin to 3.13 will affect many users. It’s probably only a matter of time before the flutter SDK increases the requirement, though I imagine it’s not high on their priority list.

  5. theuni commented at 3:47 pm on April 12, 2023: contributor

    Hi @MatthewLM

    Thanks for letting us know. Point taken about v0.3.1, though I’m afraid that would only encourage people to count on some behavior that is likely to change in order to take advantage of newer CMake. In fact, I’m going to use this as a plea to merge that PR :p

    So while the bump is only superficial for now, I’d call the current situation an unfortunate mid-state between the bump and the features that take advantage of it.

    For builders on older OS’s, I suspect we’ll continue to recommend the autotools buildsystem for quite a while. Out of curiosity, is there anything it lacks (other than convenience) that CMake allows for?

  6. theuni cross-referenced this on Apr 12, 2023 from issue Build: allow static or shared but not both by theuni
  7. MatthewLM commented at 4:31 pm on April 12, 2023: none

    I tried using ExternalProject_Add for the autotools build but I couldn’t get it to work with the flutter CMake build on Android in particular. I was successful with using the new CMake build.

    I’m going to raise the minimum CMake version to 3.13 as most users of the plugin will likely have no issue.

  8. theuni commented at 5:04 pm on April 12, 2023: contributor
    @MatthewLM I’d be happy to try to troubleshoot the ExternalProject_Add + autotools problem with you if you’d like to open a new issue.
  9. MatthewLM commented at 8:45 pm on April 12, 2023: none
    @theuni Thank you very much for offering to help with that problem, though upon consideration I’m happy to stick with CMake and raise the version. That shouldn’t be an issue for what I’m working on, though maybe this is a somewhat broader issue for other people.
  10. real-or-random commented at 7:19 am on April 13, 2023: contributor

    I’m going to raise the minimum CMake version to 3.13 as most users of the plugin will likely have no issue.

    Thanks for being flexible. I feel that’s the way to go. I totally see that it makes sense for Flutter to recommend not to have stricter requirements than the base framework. But on the other hand, 3.10 is pretty old right now, and requiring 3.13 won’t affect many users.

    The way we see our CMake experiment is that a) it’s a more modern alternative to GNU Autotools, and b) it simply makes integration in other CMake projects easier. If we’d give up on that “modern” part, we’d lose a) unfortunately. But it’s already good to see that b) works out and could lead to more adoption of the library.

    And yes, 0.3.1 was a bit unfortunate. We wanted to get this release out quickly because it’s a security fix, and releasing master is less of a pain backporting fixes to old releases. But I guess it was even the better choice to bump the CMake version earlier before more people start relying on the low version (as pointed out by @theuni).

  11. real-or-random closed this on Apr 13, 2023


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-10-30 03:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me