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

Linker warnings about duplicated sections

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • None
    • 6.2.0, 6.2.1
    • None
    • Windows

    Description

      After upgrading to 6.2.0 I've noticed linker warnings when linking my applications against a static build of Qt:

       [127/127] Linking CXX executable tray/syncthingtray-qt6-static.exe
       /usr/i686-w64-mingw32/static/lib/libQt6Widgets.a(qfiledialog.cpp.obj): duplicate section `.data$_ZZN9QMetaType23registerMutableViewImplI5QListI4QUrlE9QIterableI13QMetaSequenceEEEbSt8functionIFbPvS8_EES_S_E10unregister[__ZZN9QMetaType23registerMutableViewImplI5QListI4QUrlE9QIterableI13QMetaSequenceEEEbSt8functionIFb
       PvS8_EES_S_E10unregister]' has different size
       /usr/i686-w64-mingw32/static/lib/libQt6Widgets.a(qfiledialog.cpp.obj): duplicate section `.data$_ZZN9QMetaType21registerConverterImplI5QListI4QUrlE9QIterableI13QMetaSequenceEEEbSt8functionIFbPKvPvEES_S_E10unregister[__ZZN9QMetaType21registerConverterImplI5QListI4QUrlE9QIterableI13QMetaSequenceEEEbSt8functionIFbPKvP
       vEES_S_E10unregister]' has different size
       /usr/i686-w64-mingw32/static/lib/libQt6Widgets.a(qabstractitemview.cpp.obj): duplicate section `.data$_ZZN9QMetaType23registerMutableViewImplI5QListIiE9QIterableI13QMetaSequenceEEEbSt8functionIFbPvS7_EES_S_E10unregister[__ZZN9QMetaType23registerMutableViewImplI5QListIiE9QIterableI13QMetaSequenceEEEbSt8functionIFbPv
       S7_EES_S_E10unregister]' has different size
       /usr/i686-w64-mingw32/static/lib/libQt6Widgets.a(qabstractitemview.cpp.obj): duplicate section `.data$_ZZN9QMetaType21registerConverterImplI5QListIiE9QIterableI13QMetaSequenceEEEbSt8functionIFbPKvPvEES_S_E10unregister[__ZZN9QMetaType21registerConverterImplI5QListIiE9QIterableI13QMetaSequenceEEEbSt8functionIFbPKvPvE
       ES_S_E10unregister]' has different size
       /usr/i686-w64-mingw32/static/lib/libQt6Core.a(qabstractitemmodel.cpp.obj): duplicate section `.data$_ZZN9QMetaType23registerMutableViewImplI5QListI21QPersistentModelIndexE9QIterableI13QMetaSequenceEEEbSt8functionIFbPvS8_EES_S_E10unregister[__ZZN9QMetaType23registerMutableViewImplI5QListI21QPersistentModelIndexE9QIt
       erableI13QMetaSequenceEEEbSt8functionIFbPvS8_EES_S_E10unregister]' has different size
       /usr/i686-w64-mingw32/static/lib/libQt6Core.a(qabstractitemmodel.cpp.obj): duplicate section `.data$_ZZN9QMetaType21registerConverterImplI5QListI21QPersistentModelIndexE9QIterableI13QMetaSequenceEEEbSt8functionIFbPKvPvEES_S_E10unregister[__ZZN9QMetaType21registerConverterImplI5QListI21QPersistentModelIndexE9QIterab
       leI13QMetaSequenceEEEbSt8functionIFbPKvPvEES_S_E10unregister]' has different size
       /usr/i686-w64-mingw32/static/lib/libQt6Core.a(qabstractitemmodel.cpp.obj): duplicate section `.data$_ZZN9QMetaType23registerMutableViewImplI5QListI11QModelIndexE9QIterableI13QMetaSequenceEEEbSt8functionIFbPvS8_EES_S_E10unregister[__ZZN9QMetaType23registerMutableViewImplI5QListI11QModelIndexE9QIterableI13QMetaSequen
       ceEEEbSt8functionIFbPvS8_EES_S_E10unregister]' has different size
       /usr/i686-w64-mingw32/static/lib/libQt6Core.a(qabstractitemmodel.cpp.obj): duplicate section `.data$_ZZN9QMetaType21registerConverterImplI5QListI11QModelIndexE9QIterableI13QMetaSequenceEEEbSt8functionIFbPKvPvEES_S_E10unregister[__ZZN9QMetaType21registerConverterImplI5QListI11QModelIndexE9QIterableI13QMetaSequenceEE
       EbSt8functionIFbPKvPvEES_S_E10unregister]' has different size
       /usr/i686-w64-mingw32/static/lib/libQt6Core.a(qitemselectionmodel.cpp.obj): duplicate section `.data$_ZZN9QMetaType23registerMutableViewImplI5QListI21QPersistentModelIndexE9QIterableI13QMetaSequenceEEEbSt8functionIFbPvS8_EES_S_E10unregister[__ZZN9QMetaType23registerMutableViewImplI5QListI21QPersistentModelIndexE9QI
       terableI13QMetaSequenceEEEbSt8functionIFbPvS8_EES_S_E10unregister]' has different size
       /usr/i686-w64-mingw32/static/lib/libQt6Core.a(qitemselectionmodel.cpp.obj): duplicate section `.data$_ZZN9QMetaType21registerConverterImplI5QListI21QPersistentModelIndexE9QIterableI13QMetaSequenceEEEbSt8functionIFbPKvPvEES_S_E10unregister[__ZZN9QMetaType21registerConverterImplI5QListI21QPersistentModelIndexE9QItera
       bleI13QMetaSequenceEEEbSt8functionIFbPKvPvEES_S_E10unregister]' has different size
       /usr/i686-w64-mingw32/static/lib/libQt6Core.a(qitemselectionmodel.cpp.obj): duplicate section `.data$_ZZN9QMetaType23registerMutableViewImplI5QListI11QModelIndexE9QIterableI13QMetaSequenceEEEbSt8functionIFbPvS8_EES_S_E10unregister[__ZZN9QMetaType23registerMutableViewImplI5QListI11QModelIndexE9QIterableI13QMetaSeque
       nceEEEbSt8functionIFbPvS8_EES_S_E10unregister]' has different size
       /usr/i686-w64-mingw32/static/lib/libQt6Core.a(qitemselectionmodel.cpp.obj): duplicate section `.data$_ZZN9QMetaType21registerConverterImplI5QListI11QModelIndexE9QIterableI13QMetaSequenceEEEbSt8functionIFbPKvPvEES_S_E10unregister[__ZZN9QMetaType21registerConverterImplI5QListI11QModelIndexE9QIterableI13QMetaSequenceE
       EEbSt8functionIFbPKvPvEES_S_E10unregister]' has different size
       /usr/i686-w64-mingw32/static/lib/libQt6Core.a(qsortfilterproxymodel.cpp.obj): duplicate section `.data$_ZZN9QMetaType23registerMutableViewImplI5QListI21QPersistentModelIndexE9QIterableI13QMetaSequenceEEEbSt8functionIFbPvS8_EES_S_E10unregister[__ZZN9QMetaType23registerMutableViewImplI5QListI21QPersistentModelIndexE9
       QIterableI13QMetaSequenceEEEbSt8functionIFbPvS8_EES_S_E10unregister]' has different size
       /usr/i686-w64-mingw32/static/lib/libQt6Core.a(qsortfilterproxymodel.cpp.obj): duplicate section `.data$_ZZN9QMetaType21registerConverterImplI5QListI21QPersistentModelIndexE9QIterableI13QMetaSequenceEEEbSt8functionIFbPKvPvEES_S_E10unregister[__ZZN9QMetaType21registerConverterImplI5QListI21QPersistentModelIndexE9QIte
       rableI13QMetaSequenceEEEbSt8functionIFbPKvPvEES_S_E10unregister]' has different size
       /usr/i686-w64-mingw32/static/lib/qt6/plugins/platforms/libqwindows.a(qwindowstheme.cpp.obj): duplicate section `.data$_ZZN9QMetaType23registerMutableViewImplI5QListI5QSizeE9QIterableI13QMetaSequenceEEEbSt8functionIFbPvS8_EES_S_E10unregister[__ZZN9QMetaType23registerMutableViewImplI5QListI5QSizeE9QIterableI13QMetaSe
       quenceEEEbSt8functionIFbPvS8_EES_S_E10unregister]' has different size
       /usr/i686-w64-mingw32/static/lib/qt6/plugins/platforms/libqwindows.a(qwindowstheme.cpp.obj): duplicate section `.data$_ZZN9QMetaType21registerConverterImplI5QListI5QSizeE9QIterableI13QMetaSequenceEEEbSt8functionIFbPKvPvEES_S_E10unregister[__ZZN9QMetaType21registerConverterImplI5QListI5QSizeE9QIterableI13QMetaSequen
       ceEEEbSt8functionIFbPKvPvEES_S_E10unregister]' has different size
      

      The problem persists in Qt 6.2.1. I've been building Qt with GCC/mingw-w64 for Windows. I'm only seeing these warnings when using theĀ i686-w64-mingw32 build but not when using the x86_64-w64-mingw32 build and does not happen with a shared Qt build (which is otherwise conducted in the same way). The data sections seem to be related to the meta object system so I added moc as component.

      Note that this does not prevent the build to succeed and as far as I can tell the application still works fine.

      Attachments

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

        Activity

          People

            qtbuildsystem Qt Build System Team
            martchus martchus
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes