Error when building Static QT: Module 'qtmqtt' depends on 'qtdeclarative', but building 'qtdeclarative' was explicitly disabled.
-
I am trying to build a static build of QT using the instructions on the wiki (https://wiki.qt.io/Building_a_static_Qt_for_Windows_using_MinGW) But when I run the powershell script I get this error:
CMake Error at CMakeLists.txt:83 (message): Module 'qtmqtt' depends on 'qtdeclarative', but building 'qtdeclarative' was explicitly disabled. Note: Use '-skip qtmqtt' to exclude it from the build. -- Configuring incomplete, errors occurred! See also "C:/Qt/Static/src/qt-everywhere-src-6.3.1/CMakeFiles/CMakeOutput.log". CMake Error at qtbase/cmake/QtProcessConfigureArgs.cmake:963 (message): CMake exited with code 1. mingw32-make: *** No targets specified and no makefile found. Stop. mingw32-make: *** No rule to make target 'install'. Stop. Out-File : Could not find a part of the path 'C:\Qt\Static\6.3.1\mkspecs\win32-g++\qmake.conf'. At C:\Users\admin\documents\qt-windows10-static-build.ps1:152 char:6 + "@ | Out-File -Append $File -Encoding Ascii + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OpenError: (:) [Out-File], DirectoryNotFoundException + FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.OutFileCommand
I already tried removing
-skip qtdeclarative
from the script and got the same error again. -
Hi and welcome to devnet,
Did you do your second try from a clean state ?
-
@SGaist I am unsure of what you mean by "clean state" in this context. I am aware that most compilers have the option to clean after compiling in order to reset to a pre-compilation state, but I am unsure how that translates to a powershell script. Is there a specific command I need to run, or do I need to manually delete every relevant file?
-
@SGaist I am unsure of what you mean by "clean state" in this context. I am aware that most compilers have the option to clean after compiling in order to reset to a pre-compilation state, but I am unsure how that translates to a powershell script. Is there a specific command I need to run, or do I need to manually delete every relevant file?
@HamishSinc Yeasiest way to always have a clean state before building is to use out of source builds. Means: you do not build inside source code tree, instead you create a build folder and build inside this folder. Then you always can delete everything in the build folder, or even delete the build folder and create a new one to have a clean state.
-
@HamishSinc Yeasiest way to always have a clean state before building is to use out of source builds. Means: you do not build inside source code tree, instead you create a build folder and build inside this folder. Then you always can delete everything in the build folder, or even delete the build folder and create a new one to have a clean state.
@jsulm This error occurs during configuration, not compilation. It's unable to compile at all because there is no makefile, presumably as a result of this error.
-
@jsulm This error occurs during configuration, not compilation. It's unable to compile at all because there is no makefile, presumably as a result of this error.
@HamishSinc configure script also creates many artefacts which can influence later configure calls in same folder, that's why @SGaist asked you whether you tried with a clean state.
-
@HamishSinc configure script also creates many artefacts which can influence later configure calls in same folder, that's why @SGaist asked you whether you tried with a clean state.
@jsulm I ended up deleting the entire directory because I had no idea how to clean. When I ran it again, I was able to get past qtmqtt only to get stuck on a dependency for qtvirtualkeyboard.
What changes would I have to make to the script provided on the wiki in order to output into a separate directory?
It says in the script that the Qt installation directory is a folder with the version number as the name, and that did infact exist when i got stuck on qtmqtt, but deleting it had no effect.
-
@jsulm I ended up deleting the entire directory because I had no idea how to clean. When I ran it again, I was able to get past qtmqtt only to get stuck on a dependency for qtvirtualkeyboard.
What changes would I have to make to the script provided on the wiki in order to output into a separate directory?
It says in the script that the Qt installation directory is a folder with the version number as the name, and that did infact exist when i got stuck on qtmqtt, but deleting it had no effect.
@HamishSinc said in Error when building Static QT: Module 'qtmqtt' depends on 'qtdeclarative', but building 'qtdeclarative' was explicitly disabled.:
What changes would I have to make to the script provided on the wiki in order to output into a separate directory?
I don't know this script, so can't comment on that.