Skip to content

[Bug, Fedora 39] Debug console returns: Unknown CMake command "_minimum_required". #138488

Closed

Description

Steps to reproduce

  1. Attempt to compile program
  2. Get error

Expected results

The program compiles succesfully.

Actual results

Compiler returns an error.

Code sample

First few lines of CMakeLists.txt:


# This file controls Flutter-level build steps. It should not be edited.
cmake_minimum_required(VERSION 3.10)

set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")

# Configuration provided via flutter tool.
include(${EPHEMERAL_DIR}/generated_config.cmake)

Logs

Launching lib/main.dart on Linux in debug mode...
CMake Error at CMakeLists.txt:2 (_minimum_required):
  Unknown CMake command "_minimum_required".

CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.27)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

Exception: Unable to generate build files


Exited (1).

Flutter Doctor output

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.9, on Fedora Linux 39
    (Workstation Edition) 6.5.11-300.fc39.x86_64, locale
    en_US.UTF-8)
[✓] Android toolchain - develop for Android devices
    (Android SDK version 34.0.0)
[✗] Chrome - develop for the web (Cannot find Chrome
    executable at google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to
      a Chrome executable.
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.84.2)
[✓] Connected device (1 available)
[✓] Network resources

! Doctor found issues in 1 category.

Activity

  1. ghost changed the title [-][Bug] Debug console returns: Unknown CMake command "_minimum_required".[/-] [+][Bug, Fedora 39] Debug console returns: Unknown CMake command "_minimum_required".[/+] on Nov 15, 2023
  2. added
    in triagePresently being triaged by the triage team
    on Nov 16, 2023
  3. huycozy commented on Nov 16, 2023

    @huycozy
    Member

    Hi @HatWearingMann
    What is your current installed cmake version in the system? Please share the entire output of flutter doctor -v.

    Also, does this issue occur on a newly created Flutter project?

  4. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Nov 16, 2023
  5. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Nov 16, 2023
  6. huycozy commented on Nov 17, 2023

    @huycozy
    Member

    It could be caused by using a plugin that uses a different CMake version and the plugin may have released a new version recently. I would recommend you check around plugins you are using to see if there is one.

  7. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Nov 17, 2023
  8. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Nov 21, 2023
  9. huycozy commented on Nov 22, 2023

    @huycozy
    Member

    I mean the dependency you are using (in pubspec.yaml). There was a case that you may take a look #131555 (comment).

  10. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Nov 22, 2023
  11. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Nov 22, 2023
  12. huycozy commented on Nov 23, 2023

    @huycozy
    Member

    I'm using Ubuntu 22.04.3 LTS distro with cmake version 3.22.1 and can't see the issue. Labeling the issue for other's input.

  13. added
    platform-linuxBuilding on or for Linux specifically
    needs repro infoAutomated crash report whose cause isn't yet known
    and removed
    in triagePresently being triaged by the triage team
    on Nov 23, 2023
  14. gspencergoog commented on Nov 30, 2023

    @gspencergoog
    Contributor

    I'm not sure what we can do to help here at this point, without more specific information. We explicitly support Debian and Ubuntu, but we don't really have the resources to debug things on Fedora (and we don't have machines with that installed).

    So, unfortunately, we're going to have to close this issue. If you have a specific PR or solution to contribute, we would gladly review that.
    (Desktop Triage)

  15. github-actions commented on Dec 19, 2023

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  16. locked as resolved and limited conversation to collaborators on Dec 19, 2023
  17. added
    team-linuxOwned by the Linux platform team
    and removed on Jun 6, 2024
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

    a: desktopRunning on desktopneeds repro infoAutomated crash report whose cause isn't yet knownplatform-linuxBuilding on or for Linux specificallyteam-linuxOwned by the Linux platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions