Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Error during building Qt6 from Git.



  • Hello!
    I'm trying to build Qt6 sources from Git on Ubuntu 20.04.
    The error occurs after I use

    $ ../qt5/configure -developer-build -- -D QT_BUILD_TESTS_BY_DEFAULT=OFF /home/curiouspan/qt6-build
    $ cmake --build . --parallel 4
    

    (I'm on dev branch)
    I tried several times and always the same problem at the same point (23%):
    d0b7f92e-e51a-4fe3-bcb3-2e7da2bac65b-image.png

    In addition, it might be not related to the problem or can be the main cause of the problem, I'm a bit confused what is meant by Ninja in the Qt6 building manual requirements.
    222642a2-3c3b-4694-9b9f-96cae9db36ed-image.png
    What can be the problem for such behavior?
    Thank you in advance!


  • Lifetime Qt Champion

    @CuriousPan Please post text, not screen-shots.
    You did not post actual error, it should be somewhere above what you posted.



  • @jsulm, I actually don't have text of the error anymore because I build it on my Virtual Machine, but I will take your words into consideration. Nevertheless, what do you mean by not posting actual error?


  • Lifetime Qt Champion

    @CuriousPan Take a look at the screen-shot you posted: do you see an error message saying what went wrong?
    The error should be somewhere above.



  • @jsulm, I have rebuilt source files to get the error and show you. The problem is building process just hanged at the mentioned point without breaking with some error. How should I present the error as the console output which appear during building is quite big?


  • Lifetime Qt Champion

    @CuriousPan Do a clean rebuild. And search for error messages in the output.
    "How should I present the error as the console output which appear during building is quite big?" - well, you need to search there.



  • @jsulm, during building there are a lot of warnings, but most of them are related to unused parameter. I always do a clear build.
    Here are first two errors (highlited in red) that appear:

    [  0%] Check QtPdf support
    QtPdf will not be built: QtPdf is missing cmake port.
    [  0%] Built target PdfErrorMessage
    [  0%] Check QtWebEngine support
    QtWebEngine will not be built: Nodejs is required.
    [  0%] Built target WebEngineErrorMessage
    

    The next error is following:

    [ 21%] Building CXX object qtdeclarative/src/qml/CMakeFiles/Qml.dir/jsruntime/qv4objectiterator.cpp.o
    /home/curiouspan/qt5/qtsensors/src/plugins/sensors/sensortag/sensortagbase.cpp: In member function ‘void SensorTagBasePrivate::deviceSearch()’:
    /home/curiouspan/qt5/qtsensors/src/plugins/sensors/sensortag/sensortagbase.cpp:62:128: error: no matching function for call to ‘QOverload<QBluetoothDeviceDiscoveryAgent::Error>::of(QBluetoothDeviceDiscoveryAgent::Error (QBluetoothDeviceDiscoveryAgent::*)() const)’
       62 |     connect(m_deviceDiscoveryAgent, QOverload<QBluetoothDeviceDiscoveryAgent::Error>::of(&QBluetoothDeviceDiscoveryAgent::error),
          |                                                                                                                                                                                   
                                                                                                                                           ^
    

    And the next snippet is the pack of errors:

    /home/curiouspan/qt5/qtsensors/src/plugins/sensors/sensortag/sensortagbase.cpp: In member function ‘void SensorTagBasePrivate::deviceFound(const QBluetoothDeviceInfo&)’:
    /home/curiouspan/qt5/qtsensors/src/plugins/sensors/sensortag/sensortagbase.cpp:91:72: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: [-Werror]
       91 |               (!watchForId.isNull() && watchForId == device.deviceUuid())) {
          |                                                                        ^
    In file included from /home/curiouspan/qt6-build/qtbase/include/QtCore/quuid.h:1,
                     from /home/curiouspan/qt6-build/qtbase/include/QtCore/QUuid:1,
                     from /home/curiouspan/qt6-build/qtbase/include/QtBluetooth/../../../../qt5/qtconnectivity/src/bluetooth/qbluetoothuuid.h:47,
                     from /home/curiouspan/qt6-build/qtbase/include/QtBluetooth/qbluetoothuuid.h:1,
                     from /home/curiouspan/qt6-build/qtbase/include/QtBluetooth/QBluetoothUuid:1,
                     from /home/curiouspan/qt6-build/qtbase/include/QtBluetooth/../../../../qt5/qtconnectivity/src/bluetooth/qlowenergycontroller.h:46,
                     from /home/curiouspan/qt6-build/qtbase/include/QtBluetooth/qlowenergycontroller.h:1,
                     from /home/curiouspan/qt6-build/qtbase/include/QtBluetooth/QLowEnergyController:1,
                     from /home/curiouspan/qt5/qtsensors/src/plugins/sensors/sensortag/sensortagbase.h:49,
                     from /home/curiouspan/qt5/qtsensors/src/plugins/sensors/sensortag/sensortagbase.cpp:41:
    /home/curiouspan/qt6-build/qtbase/include/QtCore/../../../../qt5/qtbase/src/corelib/plugin/quuid.h:137:20: note: candidate 1: ‘constexpr bool QUuid::operator==(const QUuid&) const’
      137 |     constexpr bool operator==(const QUuid &orig) const noexcept
          |                    ^~~~~~~~
    In file included from /home/curiouspan/qt6-build/qtbase/include/QtBluetooth/qbluetoothuuid.h:1,
                     from /home/curiouspan/qt6-build/qtbase/include/QtBluetooth/QBluetoothUuid:1,
                     from /home/curiouspan/qt6-build/qtbase/include/QtBluetooth/../../../../qt5/qtconnectivity/src/bluetooth/qlowenergycontroller.h:46,
                     from /home/curiouspan/qt6-build/qtbase/include/QtBluetooth/qlowenergycontroller.h:1,
                     from /home/curiouspan/qt6-build/qtbase/include/QtBluetooth/QLowEnergyController:1,
                     from /home/curiouspan/qt5/qtsensors/src/plugins/sensors/sensortag/sensortagbase.h:49,
                     from /home/curiouspan/qt5/qtsensors/src/plugins/sensors/sensortag/sensortagbase.cpp:41:
    /home/curiouspan/qt6-build/qtbase/include/QtBluetooth/../../../../qt5/qtconnectivity/src/bluetooth/qbluetoothuuid.h:391:17: note: candidate 2: ‘bool operator==(const QBluetoothUuid&, const QBluetoothUuid&)’
      391 |     friend bool operator==(const QBluetoothUuid &a, const QBluetoothUuid &b)
          |                 ^~~~~~~~
    /home/curiouspan/qt5/qtsensors/src/plugins/sensors/sensortag/sensortagbase.cpp:98:72: error: ‘QLowEnergyController::QLowEnergyController(const QBluetoothAddress&, QObject*)’ is private within this context
       98 |             m_control = new QLowEnergyController(device.address(), this);
          |                                                                        ^
    In file included from /home/curiouspan/qt6-build/qtbase/include/QtBluetooth/qlowenergycontroller.h:1,
                     from /home/curiouspan/qt6-build/qtbase/include/QtBluetooth/QLowEnergyController:1,
                     from /home/curiouspan/qt5/qtsensors/src/plugins/sensors/sensortag/sensortagbase.h:49,
                     from /home/curiouspan/qt5/qtsensors/src/plugins/sensors/sensortag/sensortagbase.cpp:41:
    /home/curiouspan/qt6-build/qtbase/include/QtBluetooth/../../../../qt5/qtconnectivity/src/bluetooth/qlowenergycontroller.h:155:14: note: declared private here
      155 |     explicit QLowEnergyController(const QBluetoothAddress &localDevice, QObject *parent = nullptr);
          |              ^~~~~~~~~~~~~~~~~~~~
    /home/curiouspan/qt5/qtsensors/src/plugins/sensors/sensortag/sensortagbase.cpp:104:103: error: no matching function for call to ‘QOverload<QLowEnergyController::Error>::of(QLowEnergyController::Error (QLowEnergyController::*)() const)’
      104 |             connect(m_control, QOverload<QLowEnergyController::Error>::of(&QLowEnergyController::error),
          |                                                                                                       ^
    
    

    I hope that's the correct way to show errors.


  • Lifetime Qt Champion

    @CuriousPan Do you really have to build dev branch? You can also ask on Qt mailing list about this error.



  • @CuriousPan said in Error during building Qt6 from Git.:

    /home/curiouspan/qt5/qtsensors/src/plugins/sensors/sensortag/sensortagbase.cpp:62:128: error: no matching function for call to ‘QOverloadQBluetoothDeviceDiscoveryAgent::Error::of(QBluetoothDeviceDiscoveryAgent::Error (QBluetoothDeviceDiscoveryAgent::*)() const)’
    62 | connect(m_deviceDiscoveryAgent, QOverloadQBluetoothDeviceDiscoveryAgent::Error::of(&QBluetoothDeviceDiscoveryAgent::error),

    This changed name from error to errorOccurred and you don't need the QOverload anymore.
    The sensors module has not been ported to the Qt CI yet (AFAIK it will be done by september) so you might need to mini-patch code like in this case



  • Thanks everyone who tried to help me. The thing is I didn't need dev branch content. It was enought for me to be updated with 6.2. After switching to it, everything has successfully built.
    I guess, the problem was that there're some code on dev branch which doesn't pass tests.


Log in to reply