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

[static linking] duplicate symbol with QIIOFHelper

    XMLWordPrintable

Details

    • 34282d8ce (dev), 6a28e2066 (6.7), 8227b7a04 (tqtc/lts-6.5)

    Description

      i'm using statically linked qt and get the following duplicate symbol:

      [2023-05-03T03:47:05.488Z] duplicate symbol 'NI_6_5_0::QIIOFHelper::initRead()' in:
      [2023-05-03T03:47:05.488Z]     /Volumes/build/NIBuild/3rdparty/Qt/Qt-6.5.0-macx-clang-static/./plugins/imageformats/libqmacheif.a(qiiofhelpers.cpp.o)
      [2023-05-03T03:47:05.488Z]     /Volumes/build/NIBuild/3rdparty/Qt/Qt-6.5.0-macx-clang-static/./plugins/imageformats/libqmacjp2.a(qiiofhelpers.cpp.o)
      

      qiiofhelpers.cpp is directly compiled into both plugins, which works for dynamic linking, but is problematic when using static linking, as downstream code may use `-all_load` or the like to force all static library members to be loaded (unity builds may similar troubles)

      Attachments

        For Gerrit Dashboard: QTBUG-113349
        # Subject Branch Project Status CR V

        Activity

          People

            vgt Eirik Aavitsland
            timblechmann tim blechmann
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes