Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. QtMqtt Installation fatal error: private/qobject_p.h: No such file or directory
Forum Updated to NodeBB v4.3 + New Features

QtMqtt Installation fatal error: private/qobject_p.h: No such file or directory

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
3 Posts 3 Posters 3.0k Views 1 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.
  • A Offline
    A Offline
    Ashraful
    wrote on last edited by Ashraful
    #1

    While installing QtMqtt Library I am facing the error message as shown below.
    Stes followed:

    • clone nearest branch. ( Cloned successfully)
    • qmake (Qmake completed and makefile got created)
    • make (Make shows the errors)

    In file included from /home/ashraful/work_temp/qtmqtt/src/mqtt/qmqttclient.cpp:31:0:
    /home/ashraful/work_temp/qtmqtt/src/mqtt/qmqttclient_p.h:49:10: fatal error: private/qobject_p.h: No such file or directory
    #include <private/qobject_p.h>
    ^~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    Makefile:541: recipe for target '.obj/qmqttclient.o' failed
    make[2]: *** [.obj/qmqttclient.o] Error 1

    I tried to locate the qobject_p.h but there were no such file on my system. I am using ubuntu 18.04LTS.

    As mentioned in the text I have tried to clone the nearest branch but it didnt work.

    Re: Installing MQTT library

    Error Details:
    cd src/ && ( test -e Makefile || /usr/lib/qt5/bin/qmake -o Makefile /home/ashraful/work_temp/qtmqtt/src/src.pro ) && make -f Makefile
    make[1]: Entering directory '/home/ashraful/work_temp/qtmqtt/build/src'
    cd mqtt/ && ( test -e Makefile || /usr/lib/qt5/bin/qmake -o Makefile /home/ashraful/work_temp/qtmqtt/src/mqtt/mqtt.pro ) && make -f Makefile
    Project MESSAGE: perl -w /usr/lib/qt5/bin/syncqt.pl -module QtMqtt -version 5.10.0 -outdir /home/ashraful/work_temp/qtmqtt/build /home/ashraful/work_temp/qtmqtt
    <srcbase> = /home/ashraful/work_temp/qtmqtt
    <outbase> = /home/ashraful/work_temp/qtmqtt/build
    QtMqtt: created fwd-include header(s) for <srcbase>/src/mqtt/ { qmqttclient.h (2), qmqttclient_p.h (1), qmqttconnection_p.h (1), qmqttcontrolpacket_p.h (1), qmqttglobal.h (1), qmqttmessage.h (2), qmqttsubscription.h (2), qmqttsubscription_p.h (1), qmqtttopicfilter.h (2), qmqtttopicname.h (2) }
    QtMqtt: created version header
    QtMqtt: created master header
    QtMqtt: created headers.pri file
    make[2]: Entering directory '/home/ashraful/work_temp/qtmqtt/build/src/mqtt'
    perl /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/unix/findclasslist.pl < QtMqtt.version.in > QtMqtt.version
    g++ -g -O2 -fdebug-prefix-map=/build/qtbase-opensource-src-HhiYiB/qtbase-opensource-src-5.9.5+dfsg=. -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 -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/home/ashraful/work_temp/qtmqtt/src/mqtt -I. -I../../include -I../../include/QtMqtt -I../../include/QtMqtt/5.10.0 -I../../include/QtMqtt/5.10.0/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.9.5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore/5.9.5/QtCore -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I.moc -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -x c++-header -c ../../include/QtMqtt/QtMqttDepends -o .pch/Qt5Mqtt.gch/c++
    g++ -c -include .pch/Qt5Mqtt -g -O2 -fdebug-prefix-map=/build/qtbase-opensource-src-HhiYiB/qtbase-opensource-src-5.9.5+dfsg=. -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 -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/home/ashraful/work_temp/qtmqtt/src/mqtt -I. -I../../include -I../../include/QtMqtt -I../../include/QtMqtt/5.10.0 -I../../include/QtMqtt/5.10.0/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.9.5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore/5.9.5/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 /home/ashraful/work_temp/qtmqtt/src/mqtt/qmqttclient.cpp
    In file included from /home/ashraful/work_temp/qtmqtt/src/mqtt/qmqttclient.cpp:31:0:
    /home/ashraful/work_temp/qtmqtt/src/mqtt/qmqttclient_p.h:49:10: fatal error: private/qobject_p.h: No such file or directory
    #include <private/qobject_p.h>
    ^~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    Makefile:541: recipe for target '.obj/qmqttclient.o' failed
    make[2]: *** [.obj/qmqttclient.o] Error 1
    make[2]: Leaving directory '/home/ashraful/work_temp/qtmqtt/build/src/mqtt'
    Makefile:44: recipe for target 'sub-mqtt-make_first' failed
    make[1]: *** [sub-mqtt-make_first] Error 2
    make[1]: Leaving directory '/home/ashraful/work_temp/qtmqtt/build/src'
    Makefile:46: recipe for target 'sub-src-make_first' failed
    make: *** [sub-src-make_first] Error 2

    1 Reply Last reply
    1
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      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.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • R Offline
        R Offline
        rajel052
        wrote on last edited by
        #3

        hello @Ashraful how to solve this isssue same error coming

        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