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

exaample secureudpclient/secureudpserver fails to build on androidx86_64 and androidarm64-v8a

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.2.9
    • 6.2.8
    • Network
    • None
    • Android
    • b2a9239df (tqtc/lts-6.2)
    • 2023wk16FOQtforAndroid

    Description

      exaample secureudpclient and secureudpserver fails to build on androidx86_64 and androidarm64-v8a, and builds and runs on androidarmeabi-v7a,

      logs:

       static void activate(QObject *sender, int signal_index, void **argv);
                      ^
      In file included from ..\secureudpclient\association.cpp:51:
      In file included from ..\secureudpclient/association.h:53:
      In file included from C:\Qt\6.2.8\android_arm64_v8a\include\QtNetwork\QtNetwork:3:
      In file included from C:\Qt\6.2.8\android_arm64_v8a\include\QtNetwork/QtNetworkDepends:3:
      In file included from C:\Qt\6.2.8\android_arm64_v8a\include\QtCore\QtCore:6:
      In file included from C:\Qt\6.2.8\android_arm64_v8a\include\QtCore/qabstractanimation.h:43:
      C:\Qt\6.2.8\android_arm64_v8a\include\QtCore/qobject.h:236:28: error: cannot initialize a parameter of type 'const QObject *' with an lvalue of type 'const typename QtPrivate::FunctionPointer<void (DtlsAssociation::*)()>::Object *' (aka 'const DtlsAssociation *')
                                 receiver, reinterpret_cast<void **>(&slot),
                                 ^~~~~~~~
      ..\secureudpclient\association.cpp:75:5: note: in instantiation of function template specialization 'QObject::connect<void (QIODevice::*)(), void (DtlsAssociation::*)()>' requested here
          connect(&socket, &QUdpSocket::readyRead, this, &DtlsAssociation::readyRead);
          ^
      C:\Qt\6.2.8\android_arm64_v8a\include\QtCore/qobject.h:430:63: note: passing argument to parameter 'receiver' here
                                                     const QObject *receiver, void **slotPtr,
                                                                    ^
      C:\Qt\6.2.8\android_arm64_v8a\include\QtCore/qobject.h:236:28: error: cannot initialize a parameter of type 'const QObject *' with an lvalue of type 'const typename QtPrivate::FunctionPointer<void (DtlsAssociation::*)()>::Object *' (aka 'const DtlsAssociation *')
                                 receiver, reinterpret_cast<void **>(&slot),
                                 ^~~~~~~~
      ..\secureudpclient\association.cpp:79:5: note: in instantiation of function template specialization 'QObject::connect<void (QTimer::*)(QTimer::QPrivateSignal), void (DtlsAssociation::*)()>' requested here
          connect(&pingTimer, &QTimer::timeout, this, &DtlsAssociation::pingTimeout);
          ^
      C:\Qt\6.2.8\android_arm64_v8a\include\QtCore/qobject.h:430:63: note: passing argument to parameter 'receiver' here
                                                     const QObject *receiver, void **slotPtr,
                                                                    ^
      C:\Qt\6.2.8\android_arm64_v8a\include\QtCore/qobject.h:236:28: error: cannot initialize a parameter of type 'const QObject *' with an lvalue of type 'const typename QtPrivate::FunctionPointer<void (DtlsAssociation::*)()>::Object *' (aka 'const DtlsAssociation *')
                                 receiver, reinterpret_cast<void **>(&slot),
                                 ^~~~~~~~
      ..\secureudpclient\association.cpp:96:9: note: in instantiation of function template specialization 'QObject::connect<void (QAbstractSocket::*)(), void (DtlsAssociation::*)()>' requested here
              connect(&socket, &QAbstractSocket::connected, this, &DtlsAssociation::udpSocketConnected);
              ^
      C:\Qt\6.2.8\android_arm64_v8a\include\QtCore/qobject.h:430:63: note: passing argument to parameter 'receiver' here
                                                     const QObject *receiver, void **slotPtr,
                                                                    ^
      13 errors generated.
      make: *** [Makefile:1694: association.obj] Error 1
      make: *** Waiting for unfinished jobs....
      8 errors generated.
      make: *** [Makefile:2594: moc_association.obj] Error 1
      In file included from ..\secureudpclient\mainwindow.cpp:51:
      In file included from C:\Qt\6.2.8\android_arm64_v8a\include\QtCore/QtCore:6:
      In file included from C:\Qt\6.2.8\android_arm64_v8a\include\QtCore/qabstractanimation.h:43:
      C:\Qt\6.2.8\android_arm64_v8a\include\QtCore/qobject.h:235:28: error: cannot initialize a parameter of type 'const QObject *' with an lvalue of type 'const typename QtPrivate::FunctionPointer<void (DtlsAssociation::*)(const QString &)>::Object *' (aka 'const DtlsAssociation *')
              return connectImpl(sender, reinterpret_cast<void **>(&signal),
                                 ^~~~~~
      ..\secureudpclient\mainwindow.cpp:170:5: note: in instantiation of function template specialization 'QObject::connect<void (DtlsAssociation::*)(const QString &), void (MainWindow::*)(const QString &)>' requested here
          connect(newConnection.data(), &DtlsAssociation::errorMessage, this, &MainWindow::addErrorMessage);
          ^
      C:\Qt\6.2.8\android_arm64_v8a\include\QtCore/qobject.h:429:63: note: passing argument to parameter 'sender' here
          static QMetaObject::Connection connectImpl(const QObject *sender, void **signal,
                                                                    ^
      C:\Qt\6.2.8\android_arm64_v8a\include\QtCore/qobject.h:235:28: error: cannot initialize a parameter of type 'const QObject *' with an lvalue of type 'const typename QtPrivate::FunctionPointer<void (DtlsAssociation::*)(const QString &, const QByteArray &, const QByteArray &)>::Object *' (aka 'const DtlsAssociation *')
              return connectImpl(sender, reinterpret_cast<void **>(&signal),
                                 ^~~~~~
      ..\secureudpclient\mainwindow.cpp:173:5: note: in instantiation of function template specialization 'QObject::connect<void (DtlsAssociation::*)(const QString &, const QByteArray &, const QByteArray &), void (MainWindow::*)(const QString &, const QByteArray &, const QByteArray &)>' requested here
          connect(newConnection.data(), &DtlsAssociation::serverResponse, this, &MainWindow::addServerResponse);
          ^
      C:\Qt\6.2.8\android_arm64_v8a\include\QtCore/qobject.h:429:63: note: passing argument to parameter 'sender' here
          static QMetaObject::Connection connectImpl(const QObject *sender, void **signal,
                                                                    ^
      3 errors generated.
      make: *** [Makefile:2049: mainwindow.obj] Error 1
      08:49:25: The process "C:\Users\amanr\AppData\Local\Android\Sdk\ndk\22.1.7171670\prebuilt\windows-x86_64\bin\make.exe" exited with code 2.
      Error while building/deploying project secureudpclient (kit: Android Qt 6.2.8 Clang arm64-v8a)
      When executing step "Make" 

       

       

      steps to reproduce:

      1. Locate example network/secureudpclien or network/secureudpserver
      2.  open example in Qt creator
      3.  select android KIt android-armeabi-v7a or androidx86_64
      4. Build example 

      expected results:

      Example should build and deploy on Android physical device/emulators

      Actual output:
      Example fails to build

       

      Attachments

        Issue Links

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

          Activity

            People

              qtandroidteam Qt Android Team
              alrizwan Alber Rizwan
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes