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

Duplicate symbols qt_mac_genericColorSpace when building qpa example statically

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • 5.0.2
    • 5.0.0 RC 1
    • Core: Plugins
    • None
    • OSX 10.7.5, Xcode 4.3.3
    • macOS

    Description

      1) Build qt as "static":
      ./configure -prefix "/path/where/qt/will/be/installed" -static -debug -commercial -confirm-license -no-javascript-jit -no-qml-debug -no-nis -no-cups -qpa cocoa -nomake examples -nomake tools -nomake tests -no-eglfs -no-kms -no-sql-psql -no-sql-odbc

      2) Open Xcode. In Xcode go to "Preferences -> Locations -> Source Trees"
      3) Add setting "AIRQT5DIR" and set path to the folder where Qt was installed.
      Example: AIRQT5DIR => /Volumes/Data/Qt/builds/qt500rc1

      4) Open "qpa_demo" project from attachment and build target "qpa_demo_static".
      As result error:

      ld: duplicate symbol qt_mac_genericColorSpace() in /../build_qt5/lib/libQt5Widgets_debug.a(qmacstyle_mac.o) and /../build_qt5/plugins/platforms/libqcocoa_debug.a(qcocoahelpers.o) for architecture x86_64
      clang: error: linker command failed with exit code 1 (use -v to see invocation)

      -----------------

      • Optional steps:

      5) Build qt as "shared":
      ./configure -prefix "/path/where/qt/will/be/installed" -shared -debug -commercial -confirm-license -no-javascript-jit -no-qml-debug -no-nis -no-cups -qpa cocoa -nomake examples -nomake tools -nomake tests -no-eglfs -no-kms -no-sql-psql -no-sql-odbc -no-framework

      6) Close and Open Xcode.
      7) Open "qpa_demo" project from attachment and build target "qpa_demo_dynamic".
      As result: qpa_demo_dynamic just working fine.

      Attachments

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

        Activity

          People

            richard Richard Moe Gustavsen
            vlad.gorloff Vlad Gorloff
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes