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

init_priority attribute set by QT_INIT_METAOBJECT gives error on macos gcc 7.3.0

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.11.0
    • 5.10.1
    • Build tools: moc
    • None
    • macOS Sierra 10.12.6

      Qt version 5.10.1 

      gcc 7.3.0 (installed with brew)

       

       
    • macOS
    • b97765efd452921f75c1d04820c4b5e9e9d49100

    Description

      Hello, I encountered some problems when compiling on macos with 5.10.1 version using g++ 7.3.0

      error: 'init_priority' attribute is not supported on this platform
      {{ QT_INIT_METAOBJECT const QMetaObject nCustomPlotMouseX3Y::staticMetaObject = {}}

      it looks like OS X linker ignores the init_priority attribute.

      My best guess is that that define should check `SUPPORTS_INIT_PRIORITY` before

      https://github.com/gcc-mirror/gcc/blob/master/gcc/config/darwin.h#L957

      as stated 

      https://gcc.gnu.org/onlinedocs/gccint/Macros-for-Initialization.html

      here a link to the build log https://hephaistos.lpp.polytechnique.fr/teamcity/viewLog.html?buildId=12115&buildTypeId=Neutrino_Macos&tab=buildLog&guest=1&_focus=2099

      Attachments

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

        Activity

          People

            ogoffart Olivier Goffart (Woboq GmbH)
            tommaso tommaso
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes