Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-84111

Cannot compile qtmqtt with a customized Qt5 install path

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • None
    • 5.14.2
    • MQTT
    • None
    • Centos 6 + RedHat develtool-8 (g++ 8.3.1)
    • Linux/X11

    Description

      We use in production a Cento6 Linux computer 64 bits where Qt4.6 is only available officially.

      To use a more recent version of Qt, i compiled and installed Qt5.14.2 official tarball we only few components need for the target application as core, gui, widgets, svg, websockets, serialports. We don't use qml and webengine components.

      Qt5 is installed in a customized path in a home directory. We compile and run fine the target application use CMake, not qmake.

       

      /home/det/Documents/gilles/installqt/qt5/bin/qmake -query

      QT_SYSROOT:

      QT_INSTALL_PREFIX:/home/det/Documents/gilles/installqt/qt5

      QT_INSTALL_ARCHDATA:/home/det/Documents/gilles/installqt/qt5

      QT_INSTALL_DATA:/home/det/Documents/gilles/installqt/qt5

      QT_INSTALL_DOCS:/home/det/Documents/gilles/installqt/qt5/doc

      QT_INSTALL_HEADERS:/home/det/Documents/gilles/installqt/qt5/include

      QT_INSTALL_LIBS:/home/det/Documents/gilles/installqt/qt5/lib

      QT_INSTALL_LIBEXECS:/home/det/Documents/gilles/installqt/qt5/libexec

      QT_INSTALL_BINS:/home/det/Documents/gilles/installqt/qt5/bin

      QT_INSTALL_TESTS:/home/det/Documents/gilles/installqt/qt5/tests

      QT_INSTALL_PLUGINS:/home/det/Documents/gilles/installqt/qt5/plugins

      QT_INSTALL_IMPORTS:/home/det/Documents/gilles/installqt/qt5/imports

      QT_INSTALL_QML:/home/det/Documents/gilles/installqt/qt5/qml

      QT_INSTALL_TRANSLATIONS:/home/det/Documents/gilles/installqt/qt5/translations

       

      We want to experiment the qtmqtt extra component and i started to try to compile this code using the fresh install of Qt5.14.2. It do not work. This is my bash script used to compile qtmqtt :

       

       /opt/rh/devtoolset-8/enable

       

      export Qt5_DIR=/home/det/Documents/gilles/installqt/qt5

      export PATH=/home/det/Documents/gilles/installqt/qt5/bin/:$PATH

      export QT_QMAKE_EXECUTABLE=/home/det/Documents/gilles/installqt/qt5/bin/qmake

      rm -rf build

      mkdir build

      cd build

      qmake ..

      cd build

      make

       

      This is the result of compilation :

       

      Info: creating stash file /home/det/Downloads/qtmqtt-5.14.2/build/.qmake.stash

      Info: creating cache file /home/det/Downloads/qtmqtt-5.14.2/build/.qmake.cache

      cd src/ && ( test -e Makefile || /home/det/Documents/gilles/installqt/qt5/bin/qmake -o Makefile /home/det/Downloads/qtmqtt-5.14.2/src/src.pro ) && make -f Makefile

      make[1]: Entering directory '/home/det/Downloads/qtmqtt-5.14.2/build/src'

      cd mqtt/ && ( test -e Makefile || /home/det/Documents/gilles/installqt/qt5/bin/qmake -o Makefile /home/det/Downloads/qtmqtt-5.14.2/src/mqtt/mqtt.pro ) && make -f Makefile

      make[2]: Entering directory '/home/det/Downloads/qtmqtt-5.14.2/build/src/mqtt'

      perl /home/det/Documents/gilles/installqt/qt5/mkspecs/features/data/unix/findclasslist.pl < QtMqtt.version.in > QtMqtt.version

      g++ -c -pipe -O2 -std=c+1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -D_REENTRANT -fPIC -DQT_NO_LINKED_LIST -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_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -I/home/det/Downloads/qtmqtt-5.14.2/src/mqtt -I. -I/home/det/Downloads/qtmqtt-5.14.2/include -I/home/det/Downloads/qtmqtt-5.14.2/include/QtMqtt -I../../include -I../../include/QtMqtt -I/home/det/Downloads/qtmqtt-5.14.2/include/QtMqtt/5.14.2 -I/home/det/Downloads/qtmqtt-5.14.2/include/QtMqtt/5.14.2/QtMqtt -I/home/det/Documents/gilles/installqt/qt5/include -I/home/det/Documents/gilles/installqt/qt5/include/QtNetwork -I/home/det/Documents/gilles/installqt/qt5/include/QtCore/5.14.2 -I/home/det/Documents/gilles/installqt/qt5/include/QtCore/5.14.2/QtCore -I/home/det/Documents/gilles/installqt/qt5/include/QtCore -I.moc -I/home/det/Documents/gilles/installqt/qt5/mkspecs/linux-g+ -o .obj/qmqttauthenticationproperties.o /home/det/Downloads/qtmqtt-5.14.2/src/mqtt/qmqttauthenticationproperties.cpp

      In file included from /home/det/Downloads/qtmqtt-5.14.2/src/mqtt/qmqttauthenticationproperties.cpp:30:

      /home/det/Downloads/qtmqtt-5.14.2/src/mqtt/qmqttauthenticationproperties.h:33:10: fatal error: QtMqtt/qmqttglobal.h: No such file or directory

       #include <QtMqtt/qmqttglobal.h>

                ^~~~~~~~~~~~~~~~~~~~~~

      compilation terminated.

      make[2]: *** [Makefile:866: .obj/qmqttauthenticationproperties.o] Error 1

      make[2]: Leaving directory '/home/det/Downloads/qtmqtt-5.14.2/build/src/mqtt'

      make[1]: *** [Makefile:47: sub-mqtt-make_first] Error 2

      make[1]: Leaving directory '/home/det/Downloads/qtmqtt-5.14.2/build/src'

      make: *** [Makefile:49: sub-src-make_first] Error 2

       

      In fact, at make, the qtmqtt API headers are not generated in build directory. If i take another computer with Centos 8 and the system based Qt 5.12, the same qtmqtt code compile fine :

       

      [gilles@localhost qtmqtt]$ make
      cd src/ && ( test -e Makefile || /usr/bin/qmake -o Makefile /mnt/devel/GIT/qtmqtt/src/src.pro ) && make -f Makefile
      make[1]: Entering directory '/mnt/devel/GIT/qtmqtt/src'
      cd mqtt/ && ( test -e Makefile || /usr/bin/qmake -o Makefile /mnt/devel/GIT/qtmqtt/src/mqtt/mqtt.pro ) && make -f Makefile

      <srcbase> = /mnt/devel/GIT/qtmqtt
      <bldbase> = /mnt/devel/GIT/qtmqtt
      <outbase> = /mnt/devel/GIT/qtmqtt
      QtMqtt: created fwd-include header(s) for <srcbase>/src/mqtt/ { qmqttauthenticationproperties.h (2), qmqttclient.h (2), qmqttclient_p.h (1), qmqttconnection_p.h (1), qmqttconnectionproperties.h (4), qmqttconnectionproperties_p.h (1), qmqttcontrolpacket_p.h (1), qmqttglobal.h (1), qmqttmessage.h (2), qmqttmessage_p.h (1), qmqttpublishproperties.h (3), qmqttpublishproperties_p.h (1), qmqttsubscription.h (2), qmqttsubscription_p.h (1), qmqttsubscriptionproperties.h (3), qmqtttopicfilter.h (2), qmqtttopicname.h (2), qmqtttype.h (3) }
      QtMqtt: created version header
      QtMqtt: created master header
      QtMqtt: created headers.pri file
      make[2]: Entering directory '/mnt/devel/GIT/qtmqtt/src/mqtt'
      creating linker version script QtMqtt.version
      compiling qmqttauthenticationproperties.cpp
      compiling qmqttclient.cpp
      compiling qmqttconnection.cpp

      ...

       

      Under Centos6 it miss some stage to configure create modules header files. Why ? What's missing exactly ?

       

      Thanks in advance for your help.

       

      PS : I also cross compiled Qt 5.14.2 + qtmqtt 5.14.2 for WebAssembly (really nice target, congratulations) under CentoS8, and all compile fine too. So i'm sure that my cento6 + qt 5.14.2 has some wrong, but what ?

       

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mkalinow Maurice Kalinowski
            humandynamo Gilles Caulier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes