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

QGtkStyle: linking error on Mac

    XMLWordPrintable

    Details

    • Platform/s:
      macOS
    • Commits:
      qtbase/stable: 24d8bcf93a14545769154dae9ce06de2ef4c2430

      Description

      Steps to reproduce:

      • port install gtk2
      • ./configure -I /opt/local/include -L /opt/local/lib

      Linking error:

      clang++ -headerpad_max_install_names -mmacosx-version-min=10.6 -single_module -dynamiclib -compatibility_version	5.0 -current_version	5.0.0 -install_name	/Users/jpnurmi/Projects/qt5/qtbase/lib/QtWidgets.framework/Versions/5/QtWidgets_debug -o QtWidgets_debug .obj/debug-shared/qmacstyle_mac.o .obj/debug-shared/qscroller_mac.o .obj/debug-shared/qaction.o .obj/debug-shared/qactiongroup.o .obj/debug-shared/qapplication.o .obj/debug-shared/qwidgetbackingstore.o .obj/debug-shared/qboxlayout.o .obj/debug-shared/qformlayout.o .obj/debug-shared/qgridlayout.o .obj/debug-shared/qlayout.o .obj/debug-shared/qlayoutengine.o .obj/debug-shared/qlayoutitem.o .obj/debug-shared/qshortcut.o .obj/debug-shared/qstackedlayout.o .obj/debug-shared/qtooltip.o .obj/debug-shared/qwhatsthis.o .obj/debug-shared/qwidget.o .obj/debug-shared/qwidgetaction.o .obj/debug-shared/qgesture.o .obj/debug-shared/qstandardgestures.o .obj/debug-shared/qgesturerecognizer.o .obj/debug-shared/qgesturemanager.o .obj/debug-shared/qdesktopwidget.o .obj/debug-shared/qwidgetsvariant.o .obj/debug-shared/qapplication_qpa.o .obj/debug-shared/qdesktopwidget_qpa.o .obj/debug-shared/qwidget_qpa.o .obj/debug-shared/qwidgetwindow.o .obj/debug-shared/qdrawutil.o .obj/debug-shared/qstyle.o .obj/debug-shared/qstyleanimation.o .obj/debug-shared/qstylefactory.o .obj/debug-shared/qstyleoption.o .obj/debug-shared/qstyleplugin.o .obj/debug-shared/qstylehelper.o .obj/debug-shared/qcommonstyle.o .obj/debug-shared/qproxystyle.o .obj/debug-shared/qstylepainter.o .obj/debug-shared/qstylesheetstyle.o .obj/debug-shared/qstylesheetstyle_default.o .obj/debug-shared/qwindowsstyle.o .obj/debug-shared/qgtkstyle.o .obj/debug-shared/qgtkpainter.o .obj/debug-shared/qgtk2painter.o .obj/debug-shared/qgtkstyle_p.o .obj/debug-shared/qfusionstyle.o .obj/debug-shared/qabstractbutton.o .obj/debug-shared/qabstractslider.o .obj/debug-shared/qabstractspinbox.o .obj/debug-shared/qcalendarwidget.o .obj/debug-shared/qcheckbox.o .obj/debug-shared/qcombobox.o .obj/debug-shared/qcommandlinkbutton.o .obj/debug-shared/qdatetimeedit.o .obj/debug-shared/qdial.o .obj/debug-shared/qdialogbuttonbox.o .obj/debug-shared/qdockwidget.o .obj/debug-shared/qdockarealayout.o .obj/debug-shared/qeffects.o .obj/debug-shared/qfontcombobox.o .obj/debug-shared/qframe.o .obj/debug-shared/qgroupbox.o .obj/debug-shared/qlabel.o .obj/debug-shared/qlcdnumber.o .obj/debug-shared/qlineedit_p.o .obj/debug-shared/qlineedit.o .obj/debug-shared/qmainwindow.o .obj/debug-shared/qmainwindowlayout.o .obj/debug-shared/qmdiarea.o .obj/debug-shared/qmdisubwindow.o .obj/debug-shared/qmenu.o .obj/debug-shared/qmenubar.o .obj/debug-shared/qprogressbar.o .obj/debug-shared/qpushbutton.o .obj/debug-shared/qradiobutton.o .obj/debug-shared/qrubberband.o .obj/debug-shared/qscrollbar.o .obj/debug-shared/qsizegrip.o .obj/debug-shared/qslider.o .obj/debug-shared/qspinbox.o .obj/debug-shared/qsplashscreen.o .obj/debug-shared/qsplitter.o .obj/debug-shared/qstackedwidget.o .obj/debug-shared/qstatusbar.o .obj/debug-shared/qtabbar.o .obj/debug-shared/qtabwidget.o .obj/debug-shared/qtextedit.o .obj/debug-shared/qtextbrowser.o .obj/debug-shared/qtoolbar.o .obj/debug-shared/qtoolbarlayout.o .obj/debug-shared/qtoolbarextension.o .obj/debug-shared/qtoolbarseparator.o .obj/debug-shared/qtoolbox.o .obj/debug-shared/qtoolbutton.o .obj/debug-shared/qabstractscrollarea.o .obj/debug-shared/qwidgetresizehandler.o .obj/debug-shared/qfocusframe.o .obj/debug-shared/qscrollarea.o .obj/debug-shared/qwidgetanimator.o .obj/debug-shared/qwidgettextcontrol.o .obj/debug-shared/qwidgetlinecontrol.o .obj/debug-shared/qtoolbararealayout.o .obj/debug-shared/qplaintextedit.o .obj/debug-shared/qcolordialog.o .obj/debug-shared/qdialog.o .obj/debug-shared/qerrormessage.o .obj/debug-shared/qfiledialog.o .obj/debug-shared/qfontdialog.o .obj/debug-shared/qinputdialog.o .obj/debug-shared/qmessagebox.o .obj/debug-shared/qprogressdialog.o .obj/debug-shared/qsidebar.o .obj/debug-shared/qfilesystemmodel.o .obj/debug-shared/qfileinfogatherer.o .obj/debug-shared/qwizard.o .obj/debug-shared/qaccessiblewidget.o .obj/debug-shared/qabstractitemview.o .obj/debug-shared/qheaderview.o .obj/debug-shared/qlistview.o .obj/debug-shared/qbsptree.o .obj/debug-shared/qtableview.o .obj/debug-shared/qtreeview.o .obj/debug-shared/qabstractitemdelegate.o .obj/debug-shared/qitemdelegate.o .obj/debug-shared/qdirmodel.o .obj/debug-shared/qlistwidget.o .obj/debug-shared/qtablewidget.o .obj/debug-shared/qtreewidget.o .obj/debug-shared/qitemeditorfactory.o .obj/debug-shared/qtreewidgetitemiterator.o .obj/debug-shared/qdatawidgetmapper.o .obj/debug-shared/qfileiconprovider.o .obj/debug-shared/qcolumnview.o .obj/debug-shared/qcolumnviewgrip.o .obj/debug-shared/qstyleditemdelegate.o .obj/debug-shared/qgraphicsgridlayout.o .obj/debug-shared/qgraphicsitem.o .obj/debug-shared/qgraphicsitemanimation.o .obj/debug-shared/qgraphicslayout.o .obj/debug-shared/qgraphicslayout_p.o .obj/debug-shared/qgraphicslayoutitem.o .obj/debug-shared/qgraphicslinearlayout.o .obj/debug-shared/qgraphicsproxywidget.o .obj/debug-shared/qgraphicsscene.o .obj/debug-shared/qgraphicsscene_bsp.o .obj/debug-shared/qgraphicsscenebsptreeindex.o .obj/debug-shared/qgraphicssceneevent.o .obj/debug-shared/qgraphicssceneindex.o .obj/debug-shared/qgraphicsscenelinearindex.o .obj/debug-shared/qgraphicstransform.o .obj/debug-shared/qgraphicsview.o .obj/debug-shared/qgraphicswidget.o .obj/debug-shared/qgraphicswidget_p.o .obj/debug-shared/qgridlayoutengine.o .obj/debug-shared/qsimplex_p.o .obj/debug-shared/qgraphicsanchorlayout_p.o .obj/debug-shared/qgraphicsanchorlayout.o .obj/debug-shared/qsystemtrayicon.o .obj/debug-shared/qcolormap.o .obj/debug-shared/qcompleter.o .obj/debug-shared/qscroller.o .obj/debug-shared/qscrollerproperties.o .obj/debug-shared/qflickgesture.o .obj/debug-shared/qundogroup.o .obj/debug-shared/qundostack.o .obj/debug-shared/qundoview.o .obj/debug-shared/qsystemtrayicon_qpa.o .obj/debug-shared/qguistatemachine.o .obj/debug-shared/qkeyeventtransition.o .obj/debug-shared/qmouseeventtransition.o .obj/debug-shared/qbasickeyeventtransition.o .obj/debug-shared/qbasicmouseeventtransition.o .obj/debug-shared/qgraphicseffect.o .obj/debug-shared/qpixmapfilter.o .obj/debug-shared/qrc_qstyle.o .obj/debug-shared/qrc_qmessagebox.o .obj/debug-shared/moc_qboxlayout.o .obj/debug-shared/moc_qdesktopwidget.o .obj/debug-shared/moc_qformlayout.o .obj/debug-shared/moc_qgridlayout.o .obj/debug-shared/moc_qlayout.o .obj/debug-shared/moc_qshortcut.o .obj/debug-shared/moc_qsizepolicy.o .obj/debug-shared/moc_qstackedlayout.o .obj/debug-shared/moc_qdesktopwidget_qpa_p.o .obj/debug-shared/moc_qwidgetwindow_qpa_p.o .obj/debug-shared/moc_qstyle.o .obj/debug-shared/moc_qstyleanimation_p.o .obj/debug-shared/moc_qstyleplugin.o .obj/debug-shared/moc_qproxystyle.o .obj/debug-shared/moc_qmacstyle_mac_p.o .obj/debug-shared/moc_qmacstyle_mac_p_p.o .obj/debug-shared/moc_qwindowsstyle_p.o .obj/debug-shared/moc_qgtkstyle_p.o .obj/debug-shared/moc_qgtkstyle_p_p.o .obj/debug-shared/moc_qfusionstyle_p.o .obj/debug-shared/moc_qbuttongroup.o .obj/debug-shared/moc_qabstractbutton.o .obj/debug-shared/moc_qabstractslider.o .obj/debug-shared/moc_qcalendartextnavigator_p.o .obj/debug-shared/moc_qcheckbox.o .obj/debug-shared/moc_qcombobox_p.o .obj/debug-shared/moc_qcommandlinkbutton.o .obj/debug-shared/moc_qdatetimeedit_p.o .obj/debug-shared/moc_qdial.o .obj/debug-shared/moc_qdockwidget_p.o .obj/debug-shared/moc_qframe.o .obj/debug-shared/moc_qlcdnumber.o .obj/debug-shared/moc_qmainwindow.o .obj/debug-shared/moc_qmainwindowlayout_p.o .obj/debug-shared/moc_qprogressbar.o .obj/debug-shared/moc_qradiobutton.o .obj/debug-shared/moc_qrubberband.o .obj/debug-shared/moc_qscrollbar.o .obj/debug-shared/moc_qslider.o .obj/debug-shared/moc_qspinbox.o .obj/debug-shared/moc_qsplashscreen.o .obj/debug-shared/moc_qsplitter.o .obj/debug-shared/moc_qstackedwidget.o .obj/debug-shared/moc_qstatusbar.o .obj/debug-shared/moc_qtabbar_p.o .obj/debug-shared/moc_qtoolbarlayout_p.o .obj/debug-shared/moc_qtoolbarextension_p.o .obj/debug-shared/moc_qtoolbarseparator_p.o .obj/debug-shared/moc_qwidgetresizehandler_p.o .obj/debug-shared/moc_qfocusframe.o .obj/debug-shared/moc_qscrollarea.o .obj/debug-shared/moc_qwidgetanimator_p.o .obj/debug-shared/moc_qwidgetlinecontrol_p.o .obj/debug-shared/moc_qerrormessage.o .obj/debug-shared/moc_qsidebar_p.o .obj/debug-shared/moc_qfileinfogatherer_p.o .obj/debug-shared/moc_qlistview.o .obj/debug-shared/moc_qabstractitemdelegate.o .obj/debug-shared/moc_qlistwidget_p.o .obj/debug-shared/moc_qtablewidget_p.o .obj/debug-shared/moc_qtreewidget_p.o .obj/debug-shared/moc_qitemeditorfactory_p.o .obj/debug-shared/moc_qcolumnviewgrip_p.o .obj/debug-shared/moc_qgraphicsitemanimation.o .obj/debug-shared/moc_qgraphicsscenelinearindex_p.o .obj/debug-shared/moc_qgraphicswidget.o .obj/debug-shared/moc_qgraphicsanchorlayout.o .obj/debug-shared/moc_qcompleter_p.o .obj/debug-shared/moc_qsystemtrayicon_p.o .obj/debug-shared/moc_qscroller.o .obj/debug-shared/moc_qscroller_p.o .obj/debug-shared/moc_qflickgesture_p.o .obj/debug-shared/moc_qundogroup.o .obj/debug-shared/moc_qundostack.o .obj/debug-shared/moc_qundostack_p.o .obj/debug-shared/moc_qundoview.o .obj/debug-shared/moc_qkeyeventtransition.o .obj/debug-shared/moc_qmouseeventtransition.o .obj/debug-shared/moc_qbasickeyeventtransition_p.o .obj/debug-shared/moc_qbasicmouseeventtransition_p.o .obj/debug-shared/moc_qgraphicseffect.o .obj/debug-shared/moc_qgraphicseffect_p.o .obj/debug-shared/moc_qpixmapfilter_p.o  -F/Users/jpnurmi/Projects/qt5/qtbase/lib -L/opt/local/lib -framework QtGui -framework QtCore -framework Carbon -framework Cocoa -lz -lgobject-2.0 -lglib-2.0 -lintl -framework OpenGL -framework AGL 
      Undefined symbols for architecture x86_64:
        "_XSetErrorHandler", referenced from:
            QGtkStylePrivate::initGtkWidgets() const in qgtkstyle_p.o
        "_XSetTransientForHint", referenced from:
            QGtkStylePrivate::setupGtkFileChooser(_GtkWidget*, QWidget*, QString const&, QString const&, QString*, QFlags<QFileDialog::Option>, bool, QHash<_GtkFileFilter*, QString>*) in qgtkstyle_p.o
      ld: symbol(s) not found for architecture x86_64
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      make[3]: *** [../../lib/QtWidgets.framework/QtWidgets_debug] Error 1
      

      First of all, GTK support shouldn't get automatically enabled on Mac even if the GTK development headers happen to be available. We can still support -gtkstyle, it just shouldn't get enabled by default. Secondly, the Xlib calls should be excluded on Mac to fix the linking error.

        Attachments

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

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            jpnurmi J-P Nurmi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes