Qt 6.5.3 fails to build examples on Debian 12
-
You need to provide more information. Something is missing for the
Gui
component to be declared as found. The presence ofQt6GuiConfig.cmake
doesn't necessarily mean that theGui
component is Ok.CMake's
--debug-find
or--trace-expand
parameters will provide more CMake tracing in order to find out what's missing.@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 -
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.@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?
- Can I copy
-
@alik_co @cristian-adam
It boils down to qt_add_* not being found. I’ll report the bug tomorrow with all details. -
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 thecmake.trace
file here (between code tags for formatting) - thanks. -
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 thecmake.trace
file here (between code tags for formatting) - thanks.@Axel-Spoerl Will do later this week. Thanks for your attention
-
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 thecmake.trace
file here (between code tags for formatting) - thanks.@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
-
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*"
-
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 thecmake.trace
file here (between code tags for formatting) - thanks.@Axel-Spoerl Since there is no
qt-cmake6
on my machine, I simply rancmake
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? -
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*"
-
@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.
@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_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...
-
@jsulm I scanned the whole system recursively from '/'.
qt-cmake6
is not there. (of course there is tons of*cmake*
) -
@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_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?@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 noqt-cmake6
.
qt-cmake
and thenmake
successfully builtbasicdrawing
. But QTCreator still fails to open cmake project, qmake works fine.
-
@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 noqt-cmake6
.
qt-cmake
and thenmake
successfully builtbasicdrawing
. But QTCreator still fails to open cmake project, qmake works fine.
@Axel-Spoerl Complete re-install didn't help. As before, qmake projects work fine, but any cmake fails.
-
@Axel-Spoerl Complete re-install didn't help. As before, qmake projects work fine, but any cmake fails.
-
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:"?
-
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:"?
@Axel-Spoerl Found the problem: cmake machinery got broken by custom Default Build Directory (Build & Run -> Default Build Properties). I've been using this configuration with QMake projects with no issues, but CMake got unhappy.
Anyway, to answer your questions:
Qt Versions, -> Qt 6.5.3 GCC 64bit: /home/devwork/Qt/6.5.3/gcc_64/bin/qmake CMake -> Tools: Auto-detected CMake 3.27.7 (Qt) (Default) /home/devwork/Qt/Tools/CMake//bin/cmake System CMake at /usr/bin/cmake /usr/bin/cmake
-
A alik_co has marked this topic as solved on