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

[REG 6.5.1->6.6.0] corelib/ipc/sharedmemory not compiling on Android

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P1: Critical
    • None
    • 6.6.0 FF
    • Core: Other
    • Android

    Description

      Install Qt 6.6.0 Android binaries, configure example corelib/ipc/sharedmemory:

       /6.6.0/android_arm64_v8a/bin/qt-cmake -S /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory -B /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/bld_arm64-v8a -DANDROID_SDK_ROOT=/opt/android/sdk -DANDROID_NDK_ROOT=/opt/android/android-ndk-r25b -GNinja 

      Finishes fine, compile:

      cmake --build . --target apk in /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/bld_arm64-v8a 

      Fails:

      [1/7] Automatic MOC and UIC for target sharedmemory
      [2/7] Building CXX object CMakeFiles/sharedmemory.dir/sharedmemory_autogen/mocs_compilation.cpp.o
      FAILED: CMakeFiles/sharedmemory.dir/sharedmemory_autogen/mocs_compilation.cpp.o 
      /opt/android/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=aarch64-none-linux-android23 --sysroot=/opt/android/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -Dsharedmemory_EXPORTS -I/home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/bld_arm64-v8a/sharedmemory_autogen/include -isystem /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include/QtCore -isystem /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include -isystem /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/mkspecs/android-clang -isystem /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include/QtGui -isystem /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include/QtWidgets -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security   -fPIC -fvisibility=default -pthread -std=gnu++17 -MD -MT CMakeFiles/sharedmemory.dir/sharedmemory_autogen/mocs_compilation.cpp.o -MF CMakeFiles/sharedmemory.dir/sharedmemory_autogen/mocs_compilation.cpp.o.d -o CMakeFiles/sharedmemory.dir/sharedmemory_autogen/mocs_compilation.cpp.o -c /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/bld_arm64-v8a/sharedmemory_autogen/mocs_compilation.cpp
      In file included from /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/bld_arm64-v8a/sharedmemory_autogen/mocs_compilation.cpp:2:
      In file included from /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/bld_arm64-v8a/sharedmemory_autogen/EWIEGA46WW/moc_dialog.cpp:9:
      /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/bld_arm64-v8a/sharedmemory_autogen/EWIEGA46WW/../../../dialog.h:28:5: error: unknown type name 'QSharedMemory'
          QSharedMemory sharedMemory;
          ^
      In file included from /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/bld_arm64-v8a/sharedmemory_autogen/mocs_compilation.cpp:2:
      /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/bld_arm64-v8a/sharedmemory_autogen/EWIEGA46WW/moc_dialog.cpp:137:21: error: cannot initialize object parameter of type 'QDialog' with an expression of type 'Dialog'
          return QDialog::qt_metacast(_clname);
                          ^~~~~~~~~~~
      /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/bld_arm64-v8a/sharedmemory_autogen/EWIEGA46WW/moc_dialog.cpp:142:20: error: cannot initialize object parameter of type 'QDialog' with an expression of type 'Dialog'
          _id = QDialog::qt_metacall(_c, _id, _a);
                         ^~~~~~~~~~~
      /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/bld_arm64-v8a/sharedmemory_autogen/EWIEGA46WW/moc_dialog.cpp:147:32: error: cannot initialize a parameter of type 'QObject *' with an rvalue of type 'Dialog *'
                  qt_static_metacall(this, _c, _id, _a);
                                     ^~~~
      /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/bld_arm64-v8a/sharedmemory_autogen/EWIEGA46WW/moc_dialog.cpp:113:42: note: passing argument to parameter '_o' here
      void Dialog::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
                                               ^
      In file included from /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/bld_arm64-v8a/sharedmemory_autogen/mocs_compilation.cpp:2:
      In file included from /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/bld_arm64-v8a/sharedmemory_autogen/EWIEGA46WW/moc_dialog.cpp:9:
      /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/bld_arm64-v8a/sharedmemory_autogen/EWIEGA46WW/../../../dialog.h:12:7: error: call to deleted constructor of 'QDialog'
      class Dialog : public QDialog
            ^~~~~~
      /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include/QtCore/qmetatype.h:2416:28: note: in implicit copy constructor for 'Dialog' first required here
                      new (addr) S(*reinterpret_cast<const S *>(other));
                                 ^
      /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include/QtCore/qmetatype.h:2481:44: note: in instantiation of member function 'QtPrivate::QMetaTypeForType<Dialog>::getCopyCtr' requested here
              /*.copyCtr=*/ QMetaTypeForType<T>::getCopyCtr(),
                                                 ^
      /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include/QtCore/qmetatype.h:2598:48: note: in instantiation of static data member 'QtPrivate::QMetaTypeInterfaceWrapper<Dialog>::metaType' requested here
              return &QMetaTypeInterfaceWrapper<Ty>::metaType;
                                                     ^
      /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include/QtWidgets/qdialog.h:71:20: note: 'QDialog' has been explicitly marked deleted here
          Q_DISABLE_COPY(QDialog)
                         ^
      In file included from /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/bld_arm64-v8a/sharedmemory_autogen/mocs_compilation.cpp:2:
      In file included from /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/bld_arm64-v8a/sharedmemory_autogen/EWIEGA46WW/moc_dialog.cpp:9:
      /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/bld_arm64-v8a/sharedmemory_autogen/EWIEGA46WW/../../../dialog.h:12:7: error: call to deleted constructor of 'QDialog'
      class Dialog : public QDialog
            ^~~~~~
      /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include/QtCore/qmetatype.h:2427:28: note: in implicit move constructor for 'Dialog' first required here
                      new (addr) S(std::move(*reinterpret_cast<S *>(other)));
                                 ^
      /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include/QtCore/qmetatype.h:2482:44: note: in instantiation of member function 'QtPrivate::QMetaTypeForType<Dialog>::getMoveCtr' requested here
              /*.moveCtr=*/ QMetaTypeForType<T>::getMoveCtr(),
                                                 ^
      /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include/QtCore/qmetatype.h:2598:48: note: in instantiation of static data member 'QtPrivate::QMetaTypeInterfaceWrapper<Dialog>::metaType' requested here
              return &QMetaTypeInterfaceWrapper<Ty>::metaType;
                                                     ^
      /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include/QtWidgets/qdialog.h:71:20: note: 'QDialog' has been explicitly marked deleted here
          Q_DISABLE_COPY(QDialog)
                         ^
      6 errors generated.
      [3/7] Building CXX object CMakeFiles/sharedmemory.dir/main.cpp.o
      FAILED: CMakeFiles/sharedmemory.dir/main.cpp.o 
      /opt/android/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=aarch64-none-linux-android23 --sysroot=/opt/android/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -Dsharedmemory_EXPORTS -I/home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/bld_arm64-v8a/sharedmemory_autogen/include -isystem /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include/QtCore -isystem /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include -isystem /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/mkspecs/android-clang -isystem /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include/QtGui -isystem /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include/QtWidgets -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security   -fPIC -fvisibility=default -pthread -std=gnu++17 -MD -MT CMakeFiles/sharedmemory.dir/main.cpp.o -MF CMakeFiles/sharedmemory.dir/main.cpp.o.d -o CMakeFiles/sharedmemory.dir/main.cpp.o -c /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/main.cpp
      In file included from /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/main.cpp:5:
      /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/dialog.h:28:5: error: unknown type name 'QSharedMemory'
          QSharedMemory sharedMemory;
          ^
      /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/main.cpp:12:5: error: cannot initialize object parameter of type 'QWidget' with an expression of type 'Dialog'
          dialog.show();
          ^~~~~~
      2 errors generated.
      [4/7] Building CXX object CMakeFiles/sharedmemory.dir/dialog.cpp.o
      WARNING 09:34:35
      FAILED: CMakeFiles/sharedmemory.dir/dialog.cpp.o 
      /opt/android/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=aarch64-none-linux-android23 --sysroot=/opt/android/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -Dsharedmemory_EXPORTS -I/home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/bld_arm64-v8a/sharedmemory_autogen/include -isystem /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include/QtCore -isystem /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include -isystem /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/mkspecs/android-clang -isystem /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include/QtGui -isystem /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include/QtWidgets -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security   -fPIC -fvisibility=default -pthread -std=gnu++17 -MD -MT CMakeFiles/sharedmemory.dir/dialog.cpp.o -MF CMakeFiles/sharedmemory.dir/dialog.cpp.o.d -o CMakeFiles/sharedmemory.dir/dialog.cpp.o -c /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/dialog.cpp
      In file included from /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/dialog.cpp:4:
      /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/dialog.h:28:5: error: unknown type name 'QSharedMemory'
          QSharedMemory sharedMemory;
          ^
      /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/dialog.cpp:35:16: error: cannot initialize a parameter of type 'QDialog *' with an rvalue of type 'Dialog *'
          ui.setupUi(this);
                     ^~~~
      /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/bld_arm64-v8a/sharedmemory_autogen/include/ui_dialog.h:29:27: note: passing argument to parameter 'Dialog' here
          void setupUi(QDialog *Dialog)
                                ^
      /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/dialog.cpp:36:5: error: no matching member function for call to 'connect'
          connect(ui.loadFromFileButton, &QPushButton::clicked,
          ^~~~~~~
      /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include/QtCore/qobject.h:177:36: note: candidate function not viable: no known conversion from 'void (QAbstractButton::*)(bool)' to 'const char *' for 2nd argument
          static QMetaObject::Connection connect(const QObject *sender, const char *signal,
                                         ^
      /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include/QtCore/qobject.h:180:36: note: candidate function not viable: no known conversion from 'void (QAbstractButton::*)(bool)' to 'const QMetaMethod' for 2nd argument
          static QMetaObject::Connection connect(const QObject *sender, const QMetaMethod &signal,
                                         ^
      /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include/QtCore/qobject.h:362:41: note: candidate function not viable: no known conversion from 'Dialog' to 'const QObject' for object argument
      inline QMetaObject::Connection QObject::connect(const QObject *asender, const char *asignal,
                                              ^
      /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include/QtCore/qobject.h:198:9: note: candidate template ignored: substitution failure [with Func1 = void (QAbstractButton::*)(bool), Func2 = void (Dialog::*)()]: no type named 'ContextType' in 'QtPrivate::ContextTypeForFunctor<void (Dialog::*)()>'
              connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal,
              ^
      /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include/QtCore/qobject.h:240:9: note: candidate function template not viable: requires 3 arguments, but 4 were provided
              connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal, Func2 &&slot)
              ^
      /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/dialog.cpp:38:5: error: no matching member function for call to 'connect'
          connect(ui.loadFromSharedMemoryButton, &QPushButton::clicked,
          ^~~~~~~
      /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include/QtCore/qobject.h:177:36: note: candidate function not viable: no known conversion from 'void (QAbstractButton::*)(bool)' to 'const char *' for 2nd argument
          static QMetaObject::Connection connect(const QObject *sender, const char *signal,
                                         ^
      /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include/QtCore/qobject.h:180:36: note: candidate function not viable: no known conversion from 'void (QAbstractButton::*)(bool)' to 'const QMetaMethod' for 2nd argument
          static QMetaObject::Connection connect(const QObject *sender, const QMetaMethod &signal,
                                         ^
      /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include/QtCore/qobject.h:362:41: note: candidate function not viable: no known conversion from 'Dialog' to 'const QObject' for object argument
      inline QMetaObject::Connection QObject::connect(const QObject *asender, const char *asignal,
                                              ^
      /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include/QtCore/qobject.h:198:9: note: candidate template ignored: substitution failure [with Func1 = void (QAbstractButton::*)(bool), Func2 = void (Dialog::*)()]: no type named 'ContextType' in 'QtPrivate::ContextTypeForFunctor<void (Dialog::*)()>'
              connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal,
              ^
      /home/qt/RTA/Qt_6.6.0/6.6.0/android_arm64_v8a/include/QtCore/qobject.h:240:9: note: candidate function template not viable: requires 3 arguments, but 4 were provided
              connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal, Func2 &&slot)
              ^
      /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/dialog.cpp:40:5: error: cannot initialize object parameter of type 'QWidget' with an expression of type 'Dialog'
          setWindowTitle(tr("SharedMemory Example"));
          ^~~~~~~~~~~~~~
      /home/qt/RTA/Qt_6.6.0/Examples/Qt-6.6.0/corelib/ipc/sharedmemory/dialog.cpp:92:37: error: use of undeclared identifier 'QSharedMemory'
              if (sharedMemory.error() == QSharedMemory::AlreadyExists) {
                                          ^
      6 errors generated. 

      Regression, example was compiling in Qt 6.5.1.

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            joaijala Johanna Äijälä
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes