Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. Error during building Qt6 from Git.
Forum Update on Monday, May 27th 2025

Error during building Qt6 from Git.

Scheduled Pinned Locked Moved Solved Qt 6
10 Posts 3 Posters 995 Views
  • 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.
  • C Offline
    C Offline
    CuriousPan
    wrote on last edited by CuriousPan
    #1

    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!

    jsulmJ 1 Reply Last reply
    0
    • C CuriousPan

      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!

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

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

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      C 1 Reply Last reply
      0
      • jsulmJ jsulm

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

        C Offline
        C Offline
        CuriousPan
        wrote on last edited by
        #3

        @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?

        jsulmJ 1 Reply Last reply
        0
        • C CuriousPan

          @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?

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @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.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          C 1 Reply Last reply
          0
          • jsulmJ jsulm

            @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.

            C Offline
            C Offline
            CuriousPan
            wrote on last edited by
            #5

            @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?

            jsulmJ 1 Reply Last reply
            0
            • C CuriousPan

              @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?

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @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.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              C 1 Reply Last reply
              0
              • jsulmJ jsulm

                @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.

                C Offline
                C Offline
                CuriousPan
                wrote on last edited by
                #7

                @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.

                jsulmJ 1 Reply Last reply
                0
                • C CuriousPan

                  @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.

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

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

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • VRoninV Offline
                    VRoninV Offline
                    VRonin
                    wrote on last edited by VRonin
                    #9

                    @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

                    "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                    ~Napoleon Bonaparte

                    On a crusade to banish setIndexWidget() from the holy land of Qt

                    1 Reply Last reply
                    1
                    • C Offline
                      C Offline
                      CuriousPan
                      wrote on last edited by CuriousPan
                      #10

                      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.

                      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