Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt 6.5.3 fails to build examples on Debian 12
Forum Updated to NodeBB v4.3 + New Features

Qt 6.5.3 fails to build examples on Debian 12

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
21 Posts 4 Posters 4.1k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • alik_coA Offline
    alik_coA Offline
    alik_co
    wrote on last edited by
    #1

    I have default installation of Qt 6.5.3 on Debian 12.
    Note: to start QtCreator, had to apt-get install libxcb-cursor0.

    Attempt to configure an example ~/Qt/Examples/Qt-6.5.3/widgets/painting/basicdrawing fails:

    ~/Qt/6.5.3/gcc_64/lib/cmake/Qt6/Qt6Config.cmake
    but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT FOUND. Reason given by package:
    Failed to find required Qt component "Gui"
    Expected Config file at
    "~/Qt/6.5.3/gcc_64/lib/cmake/Qt6Gui/Qt6GuiConfig.cmake" exists

    However, "~/Qt/6.5.3/gcc_64/lib/cmake/Qt6Gui/Qt6GuiConfig.cmake" does exist.

    Any advice is highly appreciated. Thanks!

    1 Reply Last reply
    0
    • Axel SpoerlA Offline
      Axel SpoerlA Offline
      Axel Spoerl
      Moderators
      wrote on last edited by
      #2

      That's a bug unfortunately.
      I can reproduce it on 6.5.5, while 6.6.1 works.
      As a workaround you can try building it with qmake instead of cmake.

      Software Engineer
      The Qt Company, Oslo

      alik_coA 1 Reply Last reply
      0
      • cristian-adamC Offline
        cristian-adamC Offline
        cristian-adam
        wrote on last edited by cristian-adam
        #3

        You need to provide more information. Something is missing for the Gui component to be declared as found. The presence of Qt6GuiConfig.cmake doesn't necessarily mean that the Gui component is Ok.

        CMake's --debug-find or --trace-expand parameters will provide more CMake tracing in order to find out what's missing.

        alik_coA 1 Reply Last reply
        0
        • cristian-adamC cristian-adam

          You need to provide more information. Something is missing for the Gui component to be declared as found. The presence of Qt6GuiConfig.cmake doesn't necessarily mean that the Gui component is Ok.

          CMake's --debug-find or --trace-expand parameters will provide more CMake tracing in order to find out what's missing.

          alik_coA Offline
          alik_coA Offline
          alik_co
          wrote on last edited by alik_co
          #4

          @cristian-adam said in Qt 6.5.3 fails to build examples on Debian 12:

          cmake --debug-find

          Couldn't find /usr/share/cmake-3.25/Modules/FindQt6.cmake. In fact, this file doesn't exist at all, I scanned the whole system. Looks like installer bug. I'm guessing because it's Debian, not Ubuntu. Is there a way to get this file? I could copy it and see what happens

          1 Reply Last reply
          0
          • Axel SpoerlA Axel Spoerl

            That's a bug unfortunately.
            I can reproduce it on 6.5.5, while 6.6.1 works.
            As a workaround you can try building it with qmake instead of cmake.

            alik_coA Offline
            alik_coA Offline
            alik_co
            wrote on last edited by
            #5

            @Axel-Spoerl Thanks, qmake worked.

            • Can I copy FindQt6.cmake file from somewhere?
            • Since this is a known issue, may I have a link to the tracking bug?
            1 Reply Last reply
            0
            • Axel SpoerlA Offline
              Axel SpoerlA Offline
              Axel Spoerl
              Moderators
              wrote on last edited by
              #6

              @alik_co @cristian-adam
              It boils down to qt_add_* not being found. I’ll report the bug tomorrow with all details.

              Software Engineer
              The Qt Company, Oslo

              1 Reply Last reply
              0
              • Axel SpoerlA Offline
                Axel SpoerlA Offline
                Axel Spoerl
                Moderators
                wrote on last edited by Axel Spoerl
                #7

                This ticket contains some information I have reproduced.
                Could you run CMake (qt-cmake6) as @cristian-adam suggested and add --trace-expand --trace-redirect=cmake.trace.
                Thereafter, please post the cmake.trace file here (between code tags for formatting) - thanks.

                Software Engineer
                The Qt Company, Oslo

                alik_coA 3 Replies Last reply
                0
                • Axel SpoerlA Axel Spoerl

                  This ticket contains some information I have reproduced.
                  Could you run CMake (qt-cmake6) as @cristian-adam suggested and add --trace-expand --trace-redirect=cmake.trace.
                  Thereafter, please post the cmake.trace file here (between code tags for formatting) - thanks.

                  alik_coA Offline
                  alik_coA Offline
                  alik_co
                  wrote on last edited by
                  #8

                  @Axel-Spoerl Will do later this week. Thanks for your attention

                  1 Reply Last reply
                  0
                  • Axel SpoerlA Axel Spoerl

                    This ticket contains some information I have reproduced.
                    Could you run CMake (qt-cmake6) as @cristian-adam suggested and add --trace-expand --trace-redirect=cmake.trace.
                    Thereafter, please post the cmake.trace file here (between code tags for formatting) - thanks.

                    alik_coA Offline
                    alik_coA Offline
                    alik_co
                    wrote on last edited by alik_co
                    #9

                    @Axel-Spoerl There is no file qt-cmake6 on the the system. Could you please show me exact command line to run, from which directory.

                    Just in case if this matters: at the time of Qt installation, I did not have installed on the system:

                    • libxcb-cursor0
                    • mesa-common-dev
                    • libglu1-mesa-dev
                    • gdb
                    1 Reply Last reply
                    0
                    • jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      I don't have Qt6 at hand to check but you can simply search for the cmake executable in your Qt installation:

                      find ~/Qt/6.5.3/gcc_64 -name "*cmake*"
                      

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      alik_coA 1 Reply Last reply
                      0
                      • Axel SpoerlA Axel Spoerl

                        This ticket contains some information I have reproduced.
                        Could you run CMake (qt-cmake6) as @cristian-adam suggested and add --trace-expand --trace-redirect=cmake.trace.
                        Thereafter, please post the cmake.trace file here (between code tags for formatting) - thanks.

                        alik_coA Offline
                        alik_coA Offline
                        alik_co
                        wrote on last edited by
                        #11

                        @Axel-Spoerl Since there is no qt-cmake6 on my machine, I simply ran cmake for the example with enabled tracing.
                        Here is the whole thing: https://drive.google.com/file/d/16HMlyWeO6VLBiAIJLMd5FP_-PoWzRY8k/view?usp=sharing
                        BTW, is there a way to attach files here?

                        1 Reply Last reply
                        0
                        • jsulmJ jsulm

                          I don't have Qt6 at hand to check but you can simply search for the cmake executable in your Qt installation:

                          find ~/Qt/6.5.3/gcc_64 -name "*cmake*"
                          
                          alik_coA Offline
                          alik_coA Offline
                          alik_co
                          wrote on last edited by
                          #12

                          @jsulm Of course I have cmake executable, otherwise there wouldn't be any discussion at all. The question was about qt-cmake6, which looks like not available in community edition.

                          jsulmJ 1 Reply Last reply
                          0
                          • alik_coA alik_co

                            @jsulm Of course I have cmake executable, otherwise there wouldn't be any discussion at all. The question was about qt-cmake6, which looks like not available in community edition.

                            jsulmJ Offline
                            jsulmJ Offline
                            jsulm
                            Lifetime Qt Champion
                            wrote on last edited by
                            #13

                            @alik_co said in Qt 6.5.3 fails to build examples on Debian 12:

                            The question was about qt-cmake6, which looks like not available in community edition.

                            That's why I suggested to search for it in your Qt installation...

                            https://forum.qt.io/topic/113070/qt-code-of-conduct

                            alik_coA 1 Reply Last reply
                            0
                            • jsulmJ jsulm

                              @alik_co said in Qt 6.5.3 fails to build examples on Debian 12:

                              The question was about qt-cmake6, which looks like not available in community edition.

                              That's why I suggested to search for it in your Qt installation...

                              alik_coA Offline
                              alik_coA Offline
                              alik_co
                              wrote on last edited by
                              #14

                              @jsulm I scanned the whole system recursively from '/'. qt-cmake6 is not there. (of course there is tons of *cmake*)

                              jsulmJ 1 Reply Last reply
                              0
                              • alik_coA alik_co

                                @jsulm I scanned the whole system recursively from '/'. qt-cmake6 is not there. (of course there is tons of *cmake*)

                                jsulmJ Offline
                                jsulmJ Offline
                                jsulm
                                Lifetime Qt Champion
                                wrote on last edited by
                                #15

                                @alik_co Well, I did not suggest to scan whole system...

                                https://forum.qt.io/topic/113070/qt-code-of-conduct

                                1 Reply Last reply
                                0
                                • Axel SpoerlA Offline
                                  Axel SpoerlA Offline
                                  Axel Spoerl
                                  Moderators
                                  wrote on last edited by
                                  #16

                                  @alik_co said in Qt 6.5.3 fails to build examples on Debian 12:

                                  I have default installation of Qt 6.5.3 on Debian 12.
                                  Attempt to configure an example ```~/Qt/Examples/Qt-6.5.3/widgets/painting/basicdrawing`` fails:

                                  If ~/Qt/6.5.3/gcc_64/bin/qt-cmake doesn't exist, you have used the installer to install examples, but you haven't installed Qt 6.5.3.
                                  If you launch Qt Creator, does it show a compile kit for 6.5.3?

                                  Software Engineer
                                  The Qt Company, Oslo

                                  alik_coA 1 Reply Last reply
                                  0
                                  • Axel SpoerlA Axel Spoerl

                                    @alik_co said in Qt 6.5.3 fails to build examples on Debian 12:

                                    I have default installation of Qt 6.5.3 on Debian 12.
                                    Attempt to configure an example ```~/Qt/Examples/Qt-6.5.3/widgets/painting/basicdrawing`` fails:

                                    If ~/Qt/6.5.3/gcc_64/bin/qt-cmake doesn't exist, you have used the installer to install examples, but you haven't installed Qt 6.5.3.
                                    If you launch Qt Creator, does it show a compile kit for 6.5.3?

                                    alik_coA Offline
                                    alik_coA Offline
                                    alik_co
                                    wrote on last edited by alik_co
                                    #17

                                    @Axel-Spoerl Yes the kit is available. As I mentioned at the beginning, qmake projects work just fine, Qt is definitely installed. qt-cmake does exist, there is no qt-cmake6.
                                    qt-cmake and then make successfully built basicdrawing. But QTCreator still fails to open cmake project, qmake works fine.
                                    99c27e12-7fe0-40ba-9d8f-2a05e00200aa-qt6-5-3-kit.png

                                    alik_coA 1 Reply Last reply
                                    0
                                    • alik_coA alik_co

                                      @Axel-Spoerl Yes the kit is available. As I mentioned at the beginning, qmake projects work just fine, Qt is definitely installed. qt-cmake does exist, there is no qt-cmake6.
                                      qt-cmake and then make successfully built basicdrawing. But QTCreator still fails to open cmake project, qmake works fine.
                                      99c27e12-7fe0-40ba-9d8f-2a05e00200aa-qt6-5-3-kit.png

                                      alik_coA Offline
                                      alik_coA Offline
                                      alik_co
                                      wrote on last edited by
                                      #18

                                      @Axel-Spoerl Complete re-install didn't help. As before, qmake projects work fine, but any cmake fails.

                                      jsulmJ 1 Reply Last reply
                                      0
                                      • alik_coA alik_co

                                        @Axel-Spoerl Complete re-install didn't help. As before, qmake projects work fine, but any cmake fails.

                                        jsulmJ Offline
                                        jsulmJ Offline
                                        jsulm
                                        Lifetime Qt Champion
                                        wrote on last edited by
                                        #19

                                        @alik_co What CMake executable is configured in QtCreator?

                                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                                        1 Reply Last reply
                                        0
                                        • Axel SpoerlA Offline
                                          Axel SpoerlA Offline
                                          Axel Spoerl
                                          Moderators
                                          wrote on last edited by
                                          #20

                                          Well, and since Creator gets the build toolchain from qmake:

                                          • Edit->Preferences->Kits
                                          • select "Qt Versions" tab
                                          • select your Qt version ("Desktop Qt 6.5.3 GCC 64bit")
                                          • what is the "qmake path:"?

                                          Software Engineer
                                          The Qt Company, Oslo

                                          alik_coA 1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved