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

tst_qmetatype.cpp build error at qt build time

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 5.5.0
    • Core: Object Model
    • None

    Description

      I am building a qt5.5 for my build environment, and the linux64 build gets a compile error at tst_qmetatype.cpp:167

      QVERIFY(!QMetaTypeId2<CustomGadget_NonDefaultConstructible>::Defined);

      Apparently needs a default constructor of CustomGadget_NonDefaultConstructible at some point. As the object name seems to indicate, it shouldn't have one, so gcc can't find it, and my qt build stops there.

      Full command line (minus some include paths) and error message :

      g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_XKB -DQT_DISABLE_DEPRECATED_BEFORE=0 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_TESTLIB_LIB -DQT_CORE_LIB -DQT_TESTCASE_BUILDDIR='"/sdk/src/qt-everywhere-opensource-src-5.5.0/qtbase/tests/auto/corelib/kernel/qmetatype"' -I../../../other/qvariant_common -I../../../../../include -I../../../../../include/QtTest -I../../../../../include/QtCore -I.moc -I../../../../../mkspecs/linux-g++-64 -o .obj/tst_qmetatype.o tst_qmetatype.cpp
      In file included from ../../../../../include/QtCore/qtypetraits.h:2,
                       from ../../../../../include/QtCore/../../src/corelib/global/qtypeinfo.h:35,
                       from ../../../../../include/QtCore/qtypeinfo.h:2,
                       from ../../../../../include/QtCore/../../src/corelib/global/qglobal.h:1099,
                       from ../../../../../include/QtCore/qglobal.h:2,
                       from ../../../../../include/QtCore/../../src/corelib/global/qnamespace.h:38,
                       from ../../../../../include/QtCore/qnamespace.h:2,
                       from ../../../../../include/QtCore/../../src/corelib/kernel/qobjectdefs.h:42,
                       from ../../../../../include/QtCore/qobjectdefs.h:2,
                       from ../../../../../include/QtCore/../../src/corelib/kernel/qobject.h:41,
                       from ../../../../../include/QtCore/qobject.h:2,
                       from ../../../../../include/QtCore/../../src/corelib/animation/qabstractanimation.h:38,
                       from ../../../../../include/QtCore/qabstractanimation.h:2,
                       from ../../../../../include/QtCore/QtCore:5,
                       from tst_qmetatype.cpp:36:
      ../../../../../include/QtCore/../../src/corelib/global/qtypetraits.h: In instantiation of 'const bool QtPrivate::is_default_constructible<CustomGadget_NonDefaultConstructible>::value':
      ../../../../../include/QtCore/../../src/corelib/kernel/qmetatype.h:1775:   instantiated from 'QMetaTypeIdQObject<CustomGadget_NonDefaultConstructible, 512>'
      ../../../../../include/QtCore/../../src/corelib/kernel/qmetatype.h:1577:   instantiated from 'QMetaTypeId<CustomGadget_NonDefaultConstructible>'
      ../../../../../include/QtCore/../../src/corelib/kernel/qmetatype.h:1583:   instantiated from 'QMetaTypeId2<CustomGadget_NonDefaultConstructible>'
      tst_qmetatype.cpp:167:   instantiated from here
      ../../../../../include/QtCore/../../src/corelib/global/qtypetraits.h:526: error: no matching function for call to 'CustomGadget_NonDefaultConstructible::CustomGadget_NonDefaultConstructible()'
      tst_qmetatype.cpp:148: note: candidates are: CustomGadget_NonDefaultConstructible::CustomGadget_NonDefaultConstructible(int)
      tst_qmetatype.cpp:145: note:                 CustomGadget_NonDefaultConstructible::CustomGadget_NonDefaultConstructible(const CustomGadget_NonDefaultConstructible&)
      ../../../../../include/QtCore/../../src/corelib/global/qtypetraits.h:526: error: no matching function for call to 'CustomGadget_NonDefaultConstructible::CustomGadget_NonDefaultConstructible()'
      tst_qmetatype.cpp:148: note: candidates are: CustomGadget_NonDefaultConstructible::CustomGadget_NonDefaultConstructible(int)
      tst_qmetatype.cpp:145: note:                 CustomGadget_NonDefaultConstructible::CustomGadget_NonDefaultConstructible(const CustomGadget_NonDefaultConstructible&)
      ../../../../../include/QtCore/../../src/corelib/global/qtypetraits.h:523: error: no matching function for call to 'CustomGadget_NonDefaultConstructible::CustomGadget_NonDefaultConstructible()'
      tst_qmetatype.cpp:148: note: candidates are: CustomGadget_NonDefaultConstructible::CustomGadget_NonDefaultConstructible(int)
      tst_qmetatype.cpp:145: note:                 CustomGadget_NonDefaultConstructible::CustomGadget_NonDefaultConstructible(const CustomGadget_NonDefaultConstructible&)
      

      Also, i get this even though i have run configure with -nomake tests. That's another problem, but not being able to disable tests prevents me from ignoring that build error and continuing I think i'll just sed the pro files to not build that test for now

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            bartoli Olivier BARTHELEMY
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes