Unsolved QMQTT
-
Do you have
PearlPerl installed ? -
Pearl...haven't heard of it. Do you mean PERL the programming language? Either way, not on purpose - maybe if it snuck in as a part of another IDE, but I don't think so. Do I need it?
-
Indeed, auto-correct helped again...
When building from git yes, you need it as there are scripts that are run one of which generates the forward headers.
-
Huh! Okay - do I just grab the binary (Windows) from perl.org? Can I install that and just make sure the executable is in my Path?
-
-
So there were two options for Perl downloads from perl.org. ActivePerl, and StrawberryPerl - I chose ActivePerl. I installed, made sure it was in my path, rebooted for good luck, and tried the above steps again with the same result (failed on same file).
Did I download the wrong Perl?
-
Did you nuke the build folder before restarting ?
-
Ah - no I didn't. Shall I delete the whole folder and move in a fresh copy? Also, am I using the correct methods - qmake, then mingw32-make?
-
Yes, delete the folder, you can then recreate it.
And yes, if you use the MinGW build of Qt. Note that you can also open the module in Qt Creator to do the build if you want.
-
Argghh!
Okay - I deleted the folder 'qtmqtt-5.12.3' in the /Src directory, and copied in a fresh version. Followed same steps as above, with the same results. I'm using the mingw32 terminal window from the same version of Qt to execute the commands.
How do I do it from within Qt Creator?
Also - thank you for the help so far.
-
I meant the build folder. Please use out of source builds so you keep the sources clean.
Just open the module as any other project.
Did you inspect the console output ? Was there any mention of a script failing ?
-
@SGaist - it didn't get as far as creating a build folder, and there still isn't one that I can find. I think I have some other weirdness going on...I haven't really done much in Qt5 after installing Qt6 (no time).
I tried opening the QtMqtt module in Qt5 Creator, and when it was time to select the kit to use there were two new ones called 'Replacement for "Desktop Qt 5.12.3 MinGW 64-bin"' and 'Replacement for "Desktop Qt 5.11.2 MinGW 32-bit"'. I could still select the usual kit I use, but now when 'Shadow build" is checked the path text is red and says the build directory doesn't exist.
Also tried building the Qt6 version of the module, in Qt6 Creator, which was also successful, but it also will not find the module with either qmake or cmake.
So my questions now are: -where does that usually point? Why do I have those two new kits (did Qt6 interfere?). And, can I put things back to 'normal'?
Oh, I did get the QtMqtt module to build after unchecking Shadow build, but when I try to add it to a new project (Qt += mqtt) it doesn't find the module.
-
-
Hmm, as I said - I opened it with Qt Creator and it built without errors. Is there a way to 'Install' from inside Creator?
When I tried to execute mingw32-make install from the terminal window again, it fails exactly the same way 'QtMqtt/qmqttglobal.h: No such file or directory" even though I'm staring at the file in the folder.
Here is the whole text:
C:\Qt\5.12.3\Src\qtmqtt-5.12.3>mingw32-make install
cd src\ && ( if not exist Makefile C:\Qt\5.12.3\mingw73_64\bin\qmake.exe -o Makefile C:\Qt\5.12.3\Src\qtmqtt-5.12.3\src\src.pro ) && mingw32-make -f Makefile install
mingw32-make[1]: Entering directory 'C:/Qt/5.12.3/Src/qtmqtt-5.12.3/src'
cd mqtt\ && ( if not exist Makefile C:\Qt\5.12.3\mingw73_64\bin\qmake.exe -o Makefile C:\Qt\5.12.3\Src\qtmqtt-5.12.3\src\mqtt\mqtt.pro ) && mingw32-make -f Makefile install
mingw32-make[2]: Entering directory 'C:/Qt/5.12.3/Src/qtmqtt-5.12.3/src/mqtt'
mingw32-make -f Makefile.Release install
mingw32-make[3]: Entering directory 'C:/Qt/5.12.3/Src/qtmqtt-5.12.3/src/mqtt'
g++ -c -fno-keep-inline-dllexport -O2 -std=c++1z -fno-exceptions -Wall -W -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_MQTT_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I....\include -I....\include\QtMqtt -IC:/Qt/5.12.3/Src/qtmqtt-5.12.3/include/QtMqtt/5.12.3 -IC:/Qt/5.12.3/Src/qtmqtt-5.12.3/include/QtMqtt/5.12.3/QtMqtt -Itmp -IC:\Qt\5.12.3\mingw73_64\include -IC:\Qt\5.12.3\mingw73_64\include\QtNetwork -IC:\Qt\5.12.3\mingw73_64\include\QtCore\5.12.3 -IC:\Qt\5.12.3\mingw73_64\include\QtCore\5.12.3\QtCore -IC:\Qt\5.12.3\mingw73_64\include\QtCore -I.moc\release -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.6.11-winx64\include -IC:\Utils\postgresql\pgsql\include -IC:\Qt\5.12.3\mingw73_64\mkspecs\win32-g++ -o .obj\release\qmqttauthenticationproperties.o qmqttauthenticationproperties.cpp
In file included from qmqttauthenticationproperties.cpp:30:0:
qmqttauthenticationproperties.h:33:10: fatal error: QtMqtt/qmqttglobal.h: No such file or directory
#include <QtMqtt/qmqttglobal.h>
^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
mingw32-make[3]: *** [Makefile.Release:553: .obj/release/qmqttauthenticationproperties.o] Error 1
mingw32-make[3]: Leaving directory 'C:/Qt/5.12.3/Src/qtmqtt-5.12.3/src/mqtt'
mingw32-make[2]: *** [Makefile:48: release-install] Error 2
mingw32-make[2]: Leaving directory 'C:/Qt/5.12.3/Src/qtmqtt-5.12.3/src/mqtt'
mingw32-make[1]: *** [Makefile:55: sub-mqtt-install_subtargets] Error 2
mingw32-make[1]: Leaving directory 'C:/Qt/5.12.3/Src/qtmqtt-5.12.3/src'
mingw32-make: *** [Makefile:57: sub-src-install_subtargets] Error 2 -
Hi @SGaist,
Okay, so I went in and changed the #include statement in the offending file (qmqttauthenticationproperties.h) from '#include <QtMqtt/qmttglobal.h>' to '#include <qmttglobal.h>' and re-ran mingw32-make, and it now fails on the next #include statement in the file. Doesn't that mean there is a configuration problem somewhere that can be fixed for the overall qmake process?
-
That is strange.
One thing you can do is add a custom step in Qt Creator and call make install from it.