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

ODR warnings with static build

    XMLWordPrintable

Details

    • macOS

    Description

      I built Qt as static on macOS, and then when building Quick applications, there are tens if not hundreds of ODR warnings for each application I build:

      [9/66] Automatic QML type registration for target coffeemachine
      Warning: qquickforeignutils_p.h:107: Multiple C++ types called QEventPointDerived found!
       (other occurrence in : qquickforeignutils_p.h : 107 )
       This violates the One Definition Rule!
      Warning: qquickforeignutils_p.h:107: Multiple C++ types called QEventPointDerived found!
       (other occurrence in : qquickforeignutils_p.h : 107 )
       This violates the One Definition Rule!
      Warning: qqmldelegatecomponent_p.h:28: Multiple C++ types called QQmlDelegateChoice found!
       (other occurrence in : qqmldelegatecomponent_p.h : 28 )
       This violates the One Definition Rule!
      

      The configure-line for Qt:

      ../source-dev-qt/configure -prefix ./result-config-static-optimized-A/install-macos-qt -no-warnings-are-errors -confirm-license -release -ltcg -optimize-size -static -no-sbom -nomake tests -nomake examples -skip qtimageformats,qtlanguageserver -submodules qtbase,qtdeclarative,qtquicktimeline,qtsvg -- -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang
      

      The configure-line for application:

      qt-cmake -GNinja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ../source-apps/app-coffee
      

      This is on recent Qt 'dev', macOS ARM, 15.2 Sequoia

      Attachments

        Issue Links

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

          Activity

            People

              qtqmlteam Qt Qml Team User
              vuokko Juha Vuolle
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes