Skip to content

CMake Error when i build my app for linux. #131555

Closed as not planned
Closed as not planned

Description

@nyakokitsu

Is there an existing issue for this?

Steps to reproduce

  1. Init prj with Linux support
  2. Add flame example
  3. flutter build linux --release

Expected results

Building linux exebutable

Actual results

CMake Error at /usr/local/share/cmake-3.27/Modules/FindPkgConfig.cmake:607 (message):
Building Linux application...                                   
  A required package was not found
Call Stack (most recent call first):
  /usr/local/share/cmake-3.27/Modules/FindPkgConfig.cmake:82[9]([REDACTED]/actions/runs/[REDACTED]/job/[REDACTED]#step:7:10) (_pkg_check_modules_internal)
  flutter/CMakeLists.txt:25 (pkg_check_modules)

Code sample

Code sample
[Paste your code here]

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output

Flutter doctor says my linux development is enabled and all toolchains installed

Activity

  1. stuartmorgan-g commented on Jul 29, 2023

    @stuartmorgan-g
    Contributor

    flutter/CMakeLists.txt:25 (pkg_check_modules)

    This line is the check for gtk+-3.0, so CMake is unable to locate the configuration for that library.

    Flutter doctor says my linux development is enabled and all toolchains installed

    Please post the full output; doctor should be checking for the presence of gtk+-3.0.

  2. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Jul 29, 2023
  3. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Jul 29, 2023
  4. added
    in triagePresently being triaged by the triage team
    on Jul 31, 2023
  5. huycozy commented on Jul 31, 2023

    @huycozy
    Member

    @nyakokitsu Your flutter doctor output with GTK check is passed, maybe this is related to #115378.

    Can you check if gtk3 exists on your system?

    pkg-config --modversion gtk+-3.0
  6. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Jul 31, 2023
  7. nyakokitsu commented on Jul 31, 2023

    @nyakokitsu
    Author
  8. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Jul 31, 2023
  9. nyakokitsu commented on Jul 31, 2023

    @nyakokitsu
    Author
  10. stuartmorgan-g commented on Jul 31, 2023

    @stuartmorgan-g
    Contributor

    If you make a simple "hello world" style CMake project (without Flutter), and add gtk+-3.0, does it work? It seems like there may be an issue with your CMake installation, since you have the library but CMake can't find it.

  11. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Aug 1, 2023
  12. nyakokitsu commented on Aug 1, 2023

    @nyakokitsu
    Author

    If you make a simple "hello world" style CMake project (without Flutter), and add gtk+-3.0, does it work? It seems like there may be an issue with your CMake installation, since you have the library but CMake can't find it.

    yes, its works

  13. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Aug 1, 2023
  14. stuartmorgan-g commented on Aug 2, 2023

    @stuartmorgan-g
    Contributor

    Could you post the CMakeList.txt that you were able to successfully build using gtk+-3.0? If it had these lines and worked, then it's very strange that they wouldn't work when driving the build via flutter.

  15. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Aug 2, 2023
  16. 5 remaining items

  17. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Aug 2, 2023
  18. huycozy commented on Aug 3, 2023

    @huycozy
    Member

    @nyakokitsu I also tried reproducing this issue on my side but the issue didn't appear. I wonder if the issue still appears without adding flame to the project?

  19. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Aug 3, 2023
  20. nyakokitsu commented on Aug 3, 2023

    @nyakokitsu
    Author
  21. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Aug 3, 2023
  22. huycozy commented on Aug 4, 2023

    @huycozy
    Member

    Did you install Flutter manually or with snapd? Can you please provide the output of flutter doctor -v (with verbose)?

    I'm asking this because I see there is an issue that might be related: flame-engine/flame#1836 (see issue on bluefireteam/audioplayers#1538 as well). In that case, audioplayers_linux package caused that issue by snap didn't use right CMake version, and it was fixed after OP install Flutter manually instead.

  23. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Aug 4, 2023
  24. nyakokitsu commented on Aug 4, 2023

    @nyakokitsu
    Author
  25. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Aug 4, 2023
  26. huycozy commented on Aug 4, 2023

    @huycozy
    Member

    @nyakokitsu Thanks for your update. Unfortunately, since the issue is only reproduced by adding flame, I would suggest you file an issue at the flame repository for better support there.

    Once the issue is identified as caused by Flutter, please come back here with more information and I will re-open this for further investigation. Closing the issue from here.

  27. added
    r: invalidIssue is closed as not valid
    and removed
    in triagePresently being triaged by the triage team
    on Aug 4, 2023
  28. github-actions commented on Aug 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.

  29. locked as resolved and limited conversation to collaborators on Aug 19, 2023
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

    r: invalidIssue is closed as not valid

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions