make failed during installation of Qtmqtt
- 
The answer from @SGaist in the thread you derived your thread from still applies: Since you are building for your distribution provided Qt, you need to install the corresponding private-dev package. From the looks of it, the one for qtbase should be enough. 
- 
Hi, You might want to provide more information because right now there's not enough to help you. 
- 
You get the dev branch which is target to Qt 6 and Qt 6 moved to cmake. Checkout the branch / tag that matches the Qt version you want to use in order to build the module. 
- 
As I wrote just above, checkout the 5.12.8 tag and follow the usual procedure. 
- 
git checkout 5.12.8Or git switch 5.12.8Depending on the version you use. 
- 
Hello @SGaist , its throw an error after checkout the branch root@latitude:/home/oem/Qt/5.15.2/gcc_64/lib/qtmqtt# git checkout 5.15.2 
 Already on '5.15.2'
 Your branch is up to date with 'origin/5.15.2'.
 root@latitude-:/home/oem/Qt/5.15.2/gcc_64/lib/qtmqtt# qmake
 root@latitude-:/home/oem/Qt/5.15.2/gcc_64/lib/qtmqtt# make
 cd src/ && ( test -e Makefile || /usr/lib/qt5/bin/qmake -o Makefile /home/oem/Qt/5.15.2/gcc_64/lib/qtmqtt/src/src.pro ) && make -f Makefile
 make[1]: Entering directory '/home/oem/Qt/5.15.2/gcc_64/lib/qtmqtt/src'
 cd mqtt/ && ( test -e Makefile || /usr/lib/qt5/bin/qmake -o Makefile /home/oem/Qt/5.15.2/gcc_64/lib/qtmqtt/src/mqtt/mqtt.pro ) && make -f Makefile
 make[2]: Entering directory '/home/oem/Qt/5.15.2/gcc_64/lib/qtmqtt/src/mqtt'
 g++ -c -include .pch/Qt5Mqtt -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -Wno-deprecated-copy -Wno-redundant-move -Wno-format-overflow -Wno-init-list-lifetime -D_REENTRANT -fPIC -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_MQTT_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../include -I../../include/QtMqtt -I../../include/QtMqtt/5.12.8 -I../../include/QtMqtt/5.12.8/QtMqtt -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore/5.12.8 -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore/5.12.8/QtCore -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I.moc -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o .obj/qmqttclient.o qmqttclient.cpp
 In file included from qmqttclient.cpp:31:
 qmqttclient_p.h:49:10: fatal error: private/qobject_p.h: No such file or directory
 49 | #include <private/qobject_p.h>
 | ^~~~~~~~~~~~~~~~~~~~~
 compilation terminated.
 make[2]: *** [Makefile:611: .obj/qmqttclient.o] Error 1
 make[2]: Leaving directory '/home/oem/Qt/5.15.2/gcc_64/lib/qtmqtt/src/mqtt'
 make[1]: *** [Makefile:47: sub-mqtt-make_first] Error 2
 make[1]: Leaving directory '/home/oem/Qt/5.15.2/gcc_64/lib/qtmqtt/src'
 make: *** [Makefile:49: sub-src-make_first] Error 2
 root@latitude-:/home/oem/Qt/5.15.2/gcc_64/lib/qtmqtt#
- 
You wrote that you needed that for Qt 5.12.8 so why is it now 5.15.2 ? How did you install it ? 
 Why are you using your distribution provided qmake ?
 If you want to build with your distribution provided Qt, you have to install the Qt "private" development packages from your distribution.If you want to build with a custom installed Qt, use the full path to the qmake executable you want to use. Finally: stop doing stuff a root. There's no need for that especially when building libraries and whatnot. Use of root is only for machine management, not development. 
- 
Hii @SGaist , my system was got crashed , now i am installing mqtt library again but it's gives error please help me I'm follow these steps : git clone git://code.qt.io/qt/qtmqtt.git git switch 5.15.2 cd qtmqtt 
 qmake
 make:~/Qt/5.15.2/gcc_64/lib/qtmqtt$ make 
 cd src/ && ( test -e Makefile || /usr/lib/qt5/bin/qmake -o Makefile /home/rajel052/Qt/5.15.2/gcc_64/lib/qtmqtt/src/src.pro ) && make -f Makefile
 make[1]: Entering directory '/home/rajel052/Qt/5.15.2/gcc_64/lib/qtmqtt/src'
 cd mqtt/ && ( test -e Makefile || /usr/lib/qt5/bin/qmake -o Makefile /home/rajel052/Qt/5.15.2/gcc_64/lib/qtmqtt/src/mqtt/mqtt.pro ) && make -f Makefile
 make[2]: Entering directory '/home/rajel052/Qt/5.15.2/gcc_64/lib/qtmqtt/src/mqtt'
 g++ -c -include .pch/Qt5Mqtt -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -Wno-deprecated-copy -Wno-redundant-move -Wno-format-overflow -Wno-init-list-lifetime -D_REENTRANT -fPIC -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_LINKED_LIST -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_MQTT_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../include -I../../include/QtMqtt -I../../include/QtMqtt/5.15.2 -I../../include/QtMqtt/5.15.2/QtMqtt -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore/5.12.8 -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore/5.12.8/QtCore -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I.moc -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o .obj/qmqttclient.o qmqttclient.cpp
 In file included from qmqttclient.cpp:31:
 qmqttclient_p.h:49:10: fatal error: private/qobject_p.h: No such file or directory
 49 | #include <private/qobject_p.h>
 | ^~~~~~~~~~~~~~~~~~~~~
 compilation terminated.
 make[2]: *** [Makefile:619: .obj/qmqttclient.o] Error 1
 make[2]: Leaving directory '/home/externlabs-rajel052/Qt/5.15.2/gcc_64/lib/qtmqtt/src/mqtt'
 make[1]: *** [Makefile:47: sub-mqtt-make_first] Error 2
 make[1]: Leaving directory '/home/externlabs-rajel052/Qt/5.15.2/gcc_64/lib/qtmqtt/src'
 make: *** [Makefile:49: sub-src-make_first] Error 2
- 
You are using your distribution provided Qt. You need to install the Qt private development packages. The one for qtbase should be enough. 
 
