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

QtUiTools causes "different visibility settings" warnings on Mac OS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.3.0 Beta1, 5.11.1, 5.12.0 RC
    • Core: Object Model
    • None
    • OS X 10.9.2 Mavericks, macOS High Sierra 10.13.6
    • macOS

    Description

      When QUiLoader is used in a Qt/MacOS project (example attached), the linker emits many warnings of this type:

      ld: warning: direct access in QMetaTypeIdQObject<QWidget*, true>::qt_metatype_id() to global weak symbol QMetaTypeIdQObject<QWidget*, true>::qt_metatype_id()::metatype_id means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.

      This appears to be due to QtUiTools being compiled with different visibility settings from the rest of Qt. A similar bug was reported (QTBUG-3995) on Qt4.6 but this relationship to QUiLoader is new in Qt5. It may be related, however, as QtUiTools is built as a static library.

      Passing -fvisibility=hidden to the compiler can solve this problem for some Qt projects (including the attached example), but it does not always remove the warning.

      This occurs on OS 10.9.2 Mavericks, but does not occur on Ubuntu 13.04/13.10.

      Attachments

        Issue Links

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

          Activity

            People

              Unassigned Unassigned
              wro William Overall
              Votes:
              2 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes