I have opened isue related to GPaste wiith LTO issue. https://github.com/Keruspe/GPaste/issues/259 I'm usin standard bdf ld $ ls -l /etc/alternatives/ld /usr/bin/ld lrwxrwxrwx 1 root root 15 Feb 12 13:19 /etc/alternatives/ld -> /usr/bin/ld.bfd lrwxrwxrwx 1 root root 20 Feb 12 13:19 /usr/bin/ld -> /etc/alternatives/ld $ rpm -qf /usr/bin/ld.bfd binutils-2.31.1-21.fc30.x86_64 Question: does bdf ld reports real source code issue (and it is something which is not reported by gold ld) or it is something wrong with bdf ld that it reports false issue? Problematic g_paste_settings_get_type is defined/used in gpaste in: https://github.com/Keruspe/GPaste/blob/master/src/libgpaste/settings/gpaste-settings.h#L18 https://github.com/Keruspe/GPaste/blob/master/src/libgpaste/libgpaste.sym#L204
Hi Tomasz, This looks like it is a bug with ld.bfd, rather than a bug in GPaste. Is there a small testcase that reproduces the problem ? Or failing that, please can you walk me through how to build GPaste in order to reproduce the bug ? (I have never built GPaste before). Cheers Nick
Just -flto in CFLAGS and -flto -fuse-linker-plugin in LDFLAGS + standard set of NM, AR and RANLIB env variables with gcc-<prog>.
Hi Tomasz, I have tried building gpaste-3.30.2-2.fc30.src.rpm in a rawhide mock environment, but it fails because the build requirement for "pkgconfig(mutter-clutter-3)" cannot be resolved. I have installed the mutter-devel package, but that provides pkconfig(mutter-clutter-4) instead. As far as I can see there is no package for rawhide that provides pkgconfig(mutter-clutter-3). Do you have any advice on what I can do ? Cheers Nick
Created attachment 1534787 [details] libmutter-4 patch Just add attached patch and change BR to pkgconfig(libmutter-4). I forgot to mention that my case is against libmutter-4 :P
Created attachment 1534887 [details] Proposed patch Hi Tomasz, Thanks - with that I was able to reproduce the problem ... and conclude that it is actually a GPaste bug! There is an errant symbol defined in the libgpaste.sym file which is no longer present in the sources. This symbol definition is triggering an "Invalid GType function" error from the gobject-introspection tool, which then leads to the link failing. (I am not clear on how gobject-introspection is being invoked as part of the link, but this does appear to be happening). The attached patch should fix the problem. Please could you try it out and let me know if it works ? Cheers Nick PS: As for why the link works with gold, my best guess is that gold is not invoking the gobject-introspection tool. (Or maybe the plugin being used by gold does not invoke it). So the link succeeds, but it probably includes a bogus reference to the g_paste_settings_get_type function somewhere.
I think that I found similar case with gtk3. There is no issue of course as long as LTO is not used. CPPFLAGS="" CFLAGS="-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto" LDFLAGS="-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto -fuse-linker-plugin" CC="gcc" PKG_CONFIG="/usr/bin/x86_64-redhat-linux-gnu-pkg-config" GI_HOST_OS="" DLLTOOL="false" CC="gcc" /usr/bin/g-ir-scanner --namespace=Gtk --nsversion=3.0 --libtool="/bin/sh ../libtool" --include=Atk-1.0 --include=xlib-2.0 --pkg-export=gtk+-3.0 --c-include=gtk/gtk.h --c-include=gtk/gtk-a11y.h --c-include=gtk/gtkx.h --library=libgtk-3.la --library=../gdk/libgdk-3.la --warn-all --add-include-path=../gdk --include-uninstalled=../gdk/Gdk-3.0.gir --add-include-path=../gdk/x11 --cflags-begin -DG_LOG_DOMAIN=\"Gtk\" -DG_LOG_USE_STRUCTURED=1 -DGTK_VERSION=\"3.24.5\" -DGTK_BINARY_VERSION=\"3.0.0\" -DGTK_COMPILATION -DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED -DGTK_LIBDIR=\"/usr/lib64\" -DGTK_LOCALEDIR=\"/usr/share/locale\" -DGTK_DATADIR=\"/usr/share\" -DGTK_DATA_PREFIX=\"/usr\" -DGTK_SYSCONFDIR=\"/etc\" -DGTK_HOST=\"x86_64-redhat-linux-gnu\" -DGTK_PRINT_BACKENDS=\"file,cups\" -DX11_DATA_PREFIX=\"/usr\" -DISO_CODES_PREFIX=\"/usr\" -I.. -I../gtk -I.. -I../gdk -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS -DGLIB_MIN_REQUIRED_VERSION=GLIB_VERSION_2_52 -DGLIB_MAX_ALLOWED_VERSION=GLIB_VERSION_2_54 -fvisibility=hidden -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/at-spi2-atk/2.0 -I/usr/include/libdrm -I/usr/include/fribidi -I/usr/include/gio-unix-2.0 -pthread -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/libpng16 -DINCLUDE_IM_wayland -DGTK_TEXT_USE_INTERNAL_UNSUPPORTED_API --cflags-end gtk.h gtk-autocleanups.h gtkx-autocleanups.h gtk-a11y.h gtkaboutdialog.h gtkaccelgroup.h gtkaccellabel.h gtkaccelmap.h gtkaccessible.h gtkactionable.h gtkactionbar.h gtkadjustment.h gtkappchooser.h gtkappchooserbutton.h gtkappchooserdialog.h gtkappchooserwidget.h gtkapplication.h gtkapplicationwindow.h gtkaspectframe.h gtkassistant.h gtkbbox.h gtkbin.h gtkbindings.h gtkborder.h gtkbox.h gtkbuilder.h gtkbuildable.h gtkbutton.h gtkcalendar.h gtkcellarea.h gtkcellareacontext.h gtkcellareabox.h gtkcelleditable.h gtkcelllayout.h gtkcellrenderer.h gtkcellrendereraccel.h gtkcellrenderercombo.h gtkcellrendererpixbuf.h gtkcellrendererprogress.h gtkcellrendererspin.h gtkcellrendererspinner.h gtkcellrenderertext.h gtkcellrenderertoggle.h gtkcellview.h gtkcheckbutton.h gtkcheckmenuitem.h gtkclipboard.h gtkcolorbutton.h gtkcolorchooser.h gtkcolorchooserwidget.h gtkcolorchooserdialog.h gtkcolorutils.h gtkcombobox.h gtkcomboboxtext.h gtkcontainer.h gtkcssprovider.h gtkcsssection.h gtkdebug.h gtkdialog.h gtkdnd.h gtkdragdest.h gtkdragsource.h gtkdrawingarea.h gtkeditable.h gtkentry.h gtkentrybuffer.h gtkentrycompletion.h gtkenums.h gtkeventbox.h gtkeventcontroller.h gtkeventcontrollerkey.h gtkeventcontrollermotion.h gtkeventcontrollerscroll.h gtkexpander.h gtkfilechooser.h gtkfilechooserbutton.h gtkfilechooserdialog.h gtkfilechoosernative.h gtkfilechooserwidget.h gtkfilefilter.h gtkfixed.h gtkflowbox.h gtkfontbutton.h gtkfontchooser.h gtkfontchooserdialog.h gtkfontchooserwidget.h gtkframe.h gtkgesture.h gtkgesturedrag.h gtkgesturelongpress.h gtkgesturemultipress.h gtkgesturepan.h gtkgesturerotate.h gtkgesturesingle.h gtkgesturestylus.h gtkgestureswipe.h gtkgesturezoom.h gtkglarea.h gtkgrid.h gtkheaderbar.h gtkicontheme.h gtkiconview.h gtkimage.h gtkimcontext.h gtkimcontextinfo.h gtkimcontextsimple.h gtkimmodule.h gtkimmulticontext.h gtkinfobar.h gtkinvisible.h gtklabel.h gtklayout.h gtklevelbar.h gtklinkbutton.h gtklistbox.h gtkliststore.h gtklockbutton.h gtkmain.h gtkmenu.h gtkmenubar.h gtkmenubutton.h gtkmenuitem.h gtkmenushell.h gtkmenutoolbutton.h gtkmessagedialog.h gtkmodelbutton.h gtkmodules.h gtkmountoperation.h gtknativedialog.h gtknotebook.h gtkoffscreenwindow.h gtkorientable.h gtkoverlay.h gtkpadcontroller.h gtkpagesetup.h gtkpaned.h gtkpapersize.h gtkplacessidebar.h gtkplug.h gtkpopover.h gtkpopovermenu.h gtkprintcontext.h gtkprintoperation.h gtkprintoperationpreview.h gtkprintsettings.h gtkprogressbar.h gtkradiobutton.h gtkradiomenuitem.h gtkradiotoolbutton.h gtkrange.h gtkrecentchooser.h gtkrecentchooserdialog.h gtkrecentchoosermenu.h gtkrecentchooserwidget.h gtkrecentfilter.h gtkrecentmanager.h gtkrender.h gtkrevealer.h gtkscale.h gtkscalebutton.h gtkscrollable.h gtkscrollbar.h gtkscrolledwindow.h gtksearchbar.h gtksearchentry.h gtkselection.h gtkseparator.h gtkseparatormenuitem.h gtkseparatortoolitem.h gtksettings.h gtkshortcutlabel.h gtkshortcutsgroup.h gtkshortcutssection.h gtkshortcutsshortcut.h gtkshortcutswindow.h gtkshow.h gtkstacksidebar.h gtksizegroup.h gtksizerequest.h gtksocket.h gtkspinbutton.h gtkspinner.h gtkstack.h gtkstackswitcher.h gtkstatusbar.h gtkstylecontext.h gtkstyleprovider.h gtkswitch.h gtktestutils.h gtktextattributes.h gtktextbuffer.h gtktextbufferrichtext.h gtktextchild.h gtktextiter.h gtktextmark.h gtktexttag.h gtktexttagtable.h gtktextview.h gtktogglebutton.h gtktoggletoolbutton.h gtktoolbar.h gtktoolbutton.h gtktoolitem.h gtktoolitemgroup.h gtktoolpalette.h gtktoolshell.h gtktooltip.h gtktreednd.h gtktreemodel.h gtktreemodelfilter.h gtktreemodelsort.h gtktreeselection.h gtktreesortable.h gtktreestore.h gtktreeview.h gtktreeviewcolumn.h gtktypes.h gtkviewport.h gtkvolumebutton.h gtkwidget.h gtkwidgetpath.h gtkwindow.h gtkwindowgroup.h gtktypebuiltins.h gtkversion.h a11y/gtk-a11y-autocleanups.h a11y/gtkarrowaccessible.h a11y/gtkbooleancellaccessible.h a11y/gtkbuttonaccessible.h a11y/gtkcellaccessible.h a11y/gtkcellaccessibleparent.h a11y/gtkcheckmenuitemaccessible.h a11y/gtkcomboboxaccessible.h a11y/gtkcontaineraccessible.h a11y/gtkcontainercellaccessible.h a11y/gtkentryaccessible.h a11y/gtkexpanderaccessible.h a11y/gtkflowboxaccessible.h a11y/gtkflowboxchildaccessible.h a11y/gtkframeaccessible.h a11y/gtkiconviewaccessible.h a11y/gtkimageaccessible.h a11y/gtkimagecellaccessible.h a11y/gtklabelaccessible.h a11y/gtklevelbaraccessible.h a11y/gtklinkbuttonaccessible.h a11y/gtklistboxaccessible.h a11y/gtklistboxrowaccessible.h a11y/gtklockbuttonaccessible.h a11y/gtkmenuaccessible.h a11y/gtkmenubuttonaccessible.h a11y/gtkmenuitemaccessible.h a11y/gtkmenushellaccessible.h a11y/gtknotebookaccessible.h a11y/gtknotebookpageaccessible.h a11y/gtkpanedaccessible.h a11y/gtkpopoveraccessible.h a11y/gtkprogressbaraccessible.h a11y/gtkradiobuttonaccessible.h a11y/gtkradiomenuitemaccessible.h a11y/gtkrangeaccessible.h a11y/gtkrenderercellaccessible.h a11y/gtkscaleaccessible.h a11y/gtkscalebuttonaccessible.h a11y/gtkscrolledwindowaccessible.h a11y/gtkspinbuttonaccessible.h a11y/gtkspinneraccessible.h a11y/gtkstatusbaraccessible.h a11y/gtkstackaccessible.h a11y/gtkswitchaccessible.h a11y/gtktextcellaccessible.h a11y/gtktextviewaccessible.h a11y/gtktogglebuttonaccessible.h a11y/gtktoplevelaccessible.h a11y/gtktreeviewaccessible.h a11y/gtkwidgetaccessible.h a11y/gtkwindowaccessible.h deprecated/gtkactivatable.h deprecated/gtkaction.h deprecated/gtkactiongroup.h deprecated/gtkalignment.h deprecated/gtkarrow.h deprecated/gtkcolorsel.h deprecated/gtkcolorseldialog.h deprecated/gtkfontsel.h deprecated/gtkgradient.h deprecated/gtkhandlebox.h deprecated/gtkhbbox.h deprecated/gtkhbox.h deprecated/gtkhpaned.h deprecated/gtkhscale.h deprecated/gtkhscrollbar.h deprecated/gtkhseparator.h deprecated/gtkhsv.h deprecated/gtkiconfactory.h deprecated/gtkimagemenuitem.h deprecated/gtkmisc.h deprecated/gtknumerableicon.h deprecated/gtkradioaction.h deprecated/gtkrc.h deprecated/gtkrecentaction.h deprecated/gtkstatusicon.h deprecated/gtkstock.h deprecated/gtkstyle.h deprecated/gtkstyleproperties.h deprecated/gtksymboliccolor.h deprecated/gtktable.h deprecated/gtktearoffmenuitem.h deprecated/gtkthemingengine.h deprecated/gtktoggleaction.h deprecated/gtkuimanager.h deprecated/gtkvbbox.h deprecated/gtkvbox.h deprecated/gtkvscale.h deprecated/gtkvscrollbar.h deprecated/gtkvseparator.h deprecated/gtkvpaned.h a11y/gtkaccessibility.c a11y/gtkaccessibilitymisc.c a11y/gtkaccessibilityutil.c a11y/gtkarrowaccessible.c a11y/gtkbooleancellaccessible.c a11y/gtkbuttonaccessible.c a11y/gtkcellaccessible.c a11y/gtkcellaccessibleparent.c a11y/gtkcheckmenuitemaccessible.c a11y/gtkcolorswatchaccessible.c a11y/gtkcomboboxaccessible.c a11y/gtkcontaineraccessible.c a11y/gtkcontainercellaccessible.c a11y/gtkentryaccessible.c a11y/gtkexpanderaccessible.c a11y/gtkflowboxaccessible.c a11y/gtkflowboxchildaccessible.c a11y/gtkframeaccessible.c a11y/gtkiconviewaccessible.c a11y/gtkimageaccessible.c a11y/gtkimagecellaccessible.c a11y/gtklabelaccessible.c a11y/gtklevelbaraccessible.c a11y/gtklinkbuttonaccessible.c a11y/gtklistboxaccessible.c a11y/gtklistboxrowaccessible.c a11y/gtklockbuttonaccessible.c a11y/gtkmenuaccessible.c a11y/gtkmenubuttonaccessible.c a11y/gtkmenushellaccessible.c a11y/gtkmenuitemaccessible.c a11y/gtknotebookaccessible.c a11y/gtknotebookpageaccessible.c a11y/gtkpanedaccessible.c a11y/gtkpopoveraccessible.c a11y/gtkprogressbaraccessible.c a11y/gtkradiobuttonaccessible.c a11y/gtkradiomenuitemaccessible.c a11y/gtkrangeaccessible.c a11y/gtkrenderercellaccessible.c a11y/gtkscaleaccessible.c a11y/gtkscalebuttonaccessible.c a11y/gtkscrolledwindowaccessible.c a11y/gtkspinbuttonaccessible.c a11y/gtkspinneraccessible.c a11y/gtkstatusbaraccessible.c a11y/gtkstackaccessible.c a11y/gtkswitchaccessible.c a11y/gtktextcellaccessible.c a11y/gtktextviewaccessible.c a11y/gtktogglebuttonaccessible.c a11y/gtktoplevelaccessible.c a11y/gtktreeviewaccessible.c a11y/gtkwidgetaccessible.c a11y/gtkwindowaccessible.c deprecated/gtkactivatable.c deprecated/gtkaction.c deprecated/gtkactiongroup.c deprecated/gtkalignment.c deprecated/gtkarrow.c deprecated/gtkcolorsel.c deprecated/gtkcolorseldialog.c deprecated/gtkfontsel.c deprecated/gtkgradient.c deprecated/gtkhandlebox.c deprecated/gtkhbbox.c deprecated/gtkhbox.c deprecated/gtkhpaned.c deprecated/gtkhscale.c deprecated/gtkhscrollbar.c deprecated/gtkhseparator.c deprecated/gtkhsv.c deprecated/gtkiconfactory.c deprecated/gtkimagemenuitem.c deprecated/gtkmisc.c deprecated/gtknumerableicon.c deprecated/gtkradioaction.c deprecated/gtkrc.c deprecated/gtkrecentaction.c deprecated/gtkstatusicon.c deprecated/gtkstock.c deprecated/gtkstyle.c deprecated/gtkstyleproperties.c deprecated/gtksymboliccolor.c deprecated/gtktable.c deprecated/gtktearoffmenuitem.c deprecated/gtkthemingengine.c deprecated/gtktoggleaction.c deprecated/gtkuimanager.c deprecated/gtkvbbox.c deprecated/gtkvbox.c deprecated/gtkvscale.c deprecated/gtkvscrollbar.c deprecated/gtkvseparator.c deprecated/gtkvpaned.c inspector/action-editor.c inspector/actions.c inspector/cellrenderergraph.c inspector/css-editor.c inspector/css-node-tree.c inspector/data-list.c inspector/general.c inspector/gestures.c inspector/graphdata.c inspector/gtkstackcombo.c inspector/gtktreemodelcssnode.c inspector/init.c inspector/inspect-button.c inspector/magnifier.c inspector/menu.c inspector/misc-info.c inspector/object-hierarchy.c inspector/object-tree.c inspector/prop-editor.c inspector/prop-list.c inspector/resource-list.c inspector/selector.c inspector/signals-list.c inspector/size-groups.c inspector/statistics.c inspector/strv-editor.c inspector/treewalk.c inspector/visual.c inspector/window.c gtkactionmuxer.c gtkactionobserver.c gtkactionobservable.c gtkactionable.c gtkquery.c gtksearchbar.c gtksearchentry.c gtksearchengine.c gtksearchenginesimple.c gtksearchenginemodel.c fnmatch.c gtkaboutdialog.c gtkaccelgroup.c gtkaccellabel.c gtkaccelmap.c gtkaccessible.c gtkactionbar.c gtkactionhelper.c gtkadjustment.c gtkallocatedbitmask.c gtkappchooser.c gtkappchooserwidget.c gtkappchooserbutton.c gtkappchooserdialog.c gtkapplication.c gtkapplicationaccels.c gtkapplicationimpl.c gtkapplicationwindow.c gtkaspectframe.c gtkassistant.c gtkbbox.c gtkbin.c gtkbindings.c gtkbookmarksmanager.c gtkborder.c gtkbox.c gtkboxgadget.c gtkbuildable.c gtkbuilder.c gtkbuilderparser.c gtkbuilder-menus.c gtkbuiltinicon.c gtkbutton.c gtkcairoblur.c gtkcalendar.c gtkcellarea.c gtkcellareabox.c gtkcellareaboxcontext.c gtkcellareacontext.c gtkcelleditable.c gtkcelllayout.c gtkcellrenderer.c gtkcellrendereraccel.c gtkcellrenderercombo.c gtkcellrendererpixbuf.c gtkcellrendererprogress.c gtkcellrendererspin.c gtkcellrendererspinner.c gtkcellrenderertext.c gtkcellrenderertoggle.c gtkcellview.c gtkcheckbutton.c gtkcheckmenuitem.c gtkcolorbutton.c gtkcolorchooser.c gtkcolorchooserwidget.c gtkcolorchooserdialog.c gtkcoloreditor.c gtkcolorpicker.c gtkcolorpickerkwin.c gtkcolorpickerportal.c gtkcolorpickershell.c gtkcolorplane.c gtkcolorscale.c gtkcolorswatch.c gtkcolorutils.c gtkcombobox.c gtkcomboboxtext.c gtkcomposetable.c gtkcontainer.c gtkcssanimation.c gtkcssanimatedstyle.c gtkcssarrayvalue.c gtkcssbgsizevalue.c gtkcssbordervalue.c gtkcsscalcvalue.c gtkcsscolorvalue.c gtkcsscornervalue.c gtkcsscustomgadget.c gtkcsscustomproperty.c gtkcssdimensionvalue.c gtkcsseasevalue.c gtkcssenumvalue.c gtkcssenginevalue.c gtkcssgadget.c gtkcssiconthemevalue.c gtkcssimage.c gtkcssimagebuiltin.c gtkcssimagecrossfade.c gtkcssimagefallback.c gtkcssimagegradient.c gtkcssimageicontheme.c gtkcssimagelinear.c gtkcssimageradial.c gtkcssimagesurface.c gtkcssimageurl.c gtkcssimagerecolor.c gtkcssimagescaled.c gtkcssimagevalue.c gtkcssinheritvalue.c gtkcssinitialvalue.c gtkcsskeyframes.c gtkcsslookup.c gtkcssmatcher.c gtkcssnode.c gtkcssnodedeclaration.c gtkcssnodestylecache.c gtkcssnumbervalue.c gtkcsspalettevalue.c gtkcssparser.c gtkcsspathnode.c gtkcsspositionvalue.c gtkcssprovider.c gtkcssrepeatvalue.c gtkcssrgbavalue.c gtkcsssection.c gtkcssselector.c gtkcssstringvalue.c gtkcssstyle.c gtkcssstylechange.c gtkcssshadowsvalue.c gtkcssshadowvalue.c gtkcssshorthandproperty.c gtkcssshorthandpropertyimpl.c gtkcssstaticstyle.c gtkcssstylefuncs.c gtkcssstyleproperty.c gtkcssstylepropertyimpl.c gtkcsstransformvalue.c gtkcsstransientnode.c gtkcsstransition.c gtkcsstypedvalue.c gtkcssunsetvalue.c gtkcsstypes.c gtkcssvalue.c gtkcsswidgetnode.c gtkcsswin32sizevalue.c gtkdialog.c gtkdragsource.c gtkdrawingarea.c gtkeditable.c gtkemojichooser.c gtkemojicompletion.c gtkentry.c gtkentrybuffer.c gtkentrycompletion.c gtkeventbox.c gtkeventcontroller.c gtkeventcontrollerkey.c gtkeventcontrollermotion.c gtkeventcontrollerscroll.c gtkexpander.c gtkfilechooser.c gtkfilechooserbutton.c gtkfilechooserdialog.c gtkfilechooserembed.c gtkfilechooserentry.c gtkfilechoosernative.c gtkfilechoosernativeportal.c gtkfilechooserutils.c gtkfilechooserwidget.c gtkfilefilter.c gtkfilesystem.c gtkfilesystemmodel.c gtkfixed.c gtkflowbox.c gtkfontbutton.c gtkfontchooser.c gtkfontchooserdialog.c gtkfontchooserutils.c gtkfontchooserwidget.c gtkframe.c gtkgladecatalog.c gtkgesture.c gtkgesturedrag.c gtkgesturelongpress.c gtkgesturemultipress.c gtkgesturepan.c gtkgesturerotate.c gtkgesturesingle.c gtkgesturestylus.c gtkgestureswipe.c gtkgesturezoom.c gtkglarea.c gtkgrid.c gtkheaderbar.c gtkhsla.c gtkicon.c gtkiconcache.c gtkiconcachevalidator.c gtkiconhelper.c gtkicontheme.c gtkiconview.c gtkimage.c gtkimagedefinition.c gtkimcontext.c gtkimcontextsimple.c gtkimmodule.c gtkimmulticontext.c gtkinfobar.c gtkinvisible.c gtkkeyhash.c gtkkineticscrolling.c gtklabel.c gtklayout.c gtklevelbar.c gtklinkbutton.c gtklistbox.c gtkliststore.c gtklockbutton.c gtkmain.c gtkmagnifier.c gtkmenu.c gtkmenubar.c gtkmenubutton.c gtkmenuitem.c gtkmenusectionbox.c gtkmenushell.c gtkmenutracker.c gtkmenutrackeritem.c gtkmenutoolbutton.c gtkmessagedialog.c gtkmnemonichash.c gtkmodelmenuitem.c gtkmodelbutton.c gtkmodifierstyle.c gtkmodules.c gtkmountoperation.c gtknativedialog.c gtknotebook.c gtkoffscreenwindow.c gtkorientable.c gtkoverlay.c gtkpadcontroller.c gtkpagesetup.c gtkpaned.c gtkpango.c gtkpapersize.c gtkpathbar.c gtkplacessidebar.c gtkplacesview.c gtkplacesviewrow.c gtkprintcontext.c gtkprintoperation.c gtkprintoperationpreview.c gtkprintsettings.c gtkprintutils.c gtkprivate.c gtkprogressbar.c gtkprogresstracker.c gtkpixelcache.c gtkpopover.c gtkpopovermenu.c gtkradiobutton.c gtkradiomenuitem.c gtkradiotoolbutton.c gtkrange.c gtkrbtree.c gtkrecentchooserdefault.c gtkrecentchooserdialog.c gtkrecentchoosermenu.c gtkrecentchooserwidget.c gtkrecentchooserutils.c gtkrecentchooser.c gtkrecentfilter.c gtkrecentmanager.c gtkrender.c gtkrenderbackground.c gtkrenderborder.c gtkrendericon.c gtkrevealer.c gtkroundedbox.c gtkscale.c gtkscalebutton.c gtkscrollable.c gtkscrollbar.c gtkscrolledwindow.c gtkselection.c gtkseparator.c gtkseparatormenuitem.c gtkseparatortoolitem.c gtksettings.c gtkshortcutsgroup.c gtkshortcutlabel.c gtkshortcutsshortcut.c gtkshortcutssection.c gtkshortcutswindow.c gtksidebarrow.c gtksizegroup.c gtksizerequest.c gtksizerequestcache.c gtkshow.c gtkstacksidebar.c gtkspinbutton.c gtkspinner.c gtkstack.c gtkstackswitcher.c gtkstatusbar.c gtkstyleanimation.c gtkstylecascade.c gtkstylecontext.c gtkstyleproperty.c gtkstyleprovider.c gtkstyleproviderprivate.c gtkswitch.c gtktestutils.c gtktextattributes.c gtktextbtree.c gtktextbuffer.c gtktextbufferrichtext.c gtktextbufferserialize.c gtktextchild.c gtktextdisplay.c gtktexthandle.c gtktextiter.c gtktextlayout.c gtktextmark.c gtktextsegment.c gtktexttag.c gtktexttagtable.c gtktexttypes.c gtktextutil.c gtktextview.c gtktogglebutton.c gtktoggletoolbutton.c gtktoolbar.c gtktoolbutton.c gtktoolitem.c gtktoolitemgroup.c gtktoolpalette.c gtktoolshell.c gtktooltip.c gtktooltipwindow.c gtktrashmonitor.c gtktreedatalist.c gtktreednd.c gtktreemenu.c gtktreemodel.c gtktreemodelfilter.c gtktreemodelsort.c gtktreeselection.c gtktreesortable.c gtktreestore.c gtktreeview.c gtktreeviewcolumn.c gtkutils.c gtkvolumebutton.c gtkviewport.c gtkwidget.c gtkwidgetpath.c gtkwindow.c gtkwindowgroup.c gtkwin32draw.c gtkwin32theme.c gdkpixbufutils.c language-names.c script-names.c gtkclipboard.c gtkdnd.c gtkdragdest.c gtkprintoperation-unix.c gtktypebuiltins.c gtksocket.c gtkplug.c /usr/bin/g-ir-scanner libgtk-3.la ../gdk/Gdk-3.0.gir Makefile --output Gtk-3.0.gir g-ir-scanner: link: /bin/sh ../libtool --mode=link --tag=CC gcc -o /home/tkloczko/rpmbuild/BUILD/gtk+-3.24.5/gtk/tmp-introspect_5ficxd7/Gtk-3.0 -export-dynamic -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto /home/tkloczko/rpmbuild/BUILD/gtk+-3.24.5/gtk/tmp-introspect_5ficxd7/Gtk-3.0.o -L. libgtk-3.la ../gdk/libgdk-3.la -lgio-2.0 -lgobject-2.0 -Wl,--export-dynamic -pthread -lgmodule-2.0 -lglib-2.0 -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto -fuse-linker-plugin libtool: link: gcc -o /home/tkloczko/rpmbuild/BUILD/gtk+-3.24.5/gtk/tmp-introspect_5ficxd7/.libs/Gtk-3.0 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto /home/tkloczko/rpmbuild/BUILD/gtk+-3.24.5/gtk/tmp-introspect_5ficxd7/Gtk-3.0.o -Wl,--export-dynamic -pthread -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto -fuse-linker-plugin -Wl,--export-dynamic -L. ./.libs/libgtk-3.so /home/tkloczko/rpmbuild/BUILD/gtk+-3.24.5/gdk/.libs/libgdk-3.so -latk-1.0 -latk-bridge-2.0 -lharfbuzz -lpangoft2-1.0 ../gdk/.libs/libgdk-3.so -lpangocairo-1.0 -lpango-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lXfixes -lxkbcommon -lwayland-cursor -lwayland-egl -lwayland-client -lcairo -lpixman-1 -lfontconfig -lfreetype -lpng16 -lz -lxcb-shm -lxcb -lxcb-render -lXrender -lX11 -lXext -lepoxy -lfribidi -lm -lrt -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -pthread Invalid GType function: 'gtk_accel_group_get_type' Failed to find symbol 'gtk_accel_group_get_type' gtkentry.c:2104: Warning: Gtk: multiple comment blocks documenting 'GtkEntry:inner-border:' identifier (already seen at gtkentry.c:888). Command '['/home/tkloczko/rpmbuild/BUILD/gtk+-3.24.5/gtk/tmp-introspect_5ficxd7/Gtk-3.0', '--introspect-dump=/home/tkloczko/rpmbuild/BUILD/gtk+-3.24.5/gtk/tmp-introspect_5ficxd7/functions.txt,/home/tkloczko/rpmbuild/BUILD/gtk+-3.24.5/gtk/tmp-introspect_5ficxd7/dump.xml']' returned non-zero exit status 1. make[3]: *** [/usr/share/gobject-introspection-1.0/Makefile.introspection:156: Gtk-3.0.gir] Error 1 make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/gtk+-3.24.5/gtk' make[2]: *** [Makefile:3151: all] Error 2 make[1]: *** [Makefile:723: all-recursive] Error 1
I'm curious .. if it is as same bug in gtk why using LTO exposes such bugs or why it is not possible to expose such bugs using LTO?
(In reply to Nick Clifton from comment #5) > Created attachment 1534887 [details] > Proposed patch [..] > The attached patch should fix the problem. Please could you try it out > and let me know if it works ? > > PS: As for why the link works with gold, my best guess is that gold is > not invoking the gobject-introspection tool. (Or maybe the plugin > being used by gold does not invoke it). So the link succeeds, but it > probably includes a bogus reference to the g_paste_settings_get_type > function somewhere. Nick patch which you made does not work because this symbol is used in G_PASTE_TYPE_SETTINGS define which is used in another define and g_object_new() param. I'm not familiar with glib gobject interface so I've asked gpaste maintainer to have look om the code. At the moment I think that is the issue with gpaste code however other half of the story is that such source code a bit wrong coding is only possible to find when LTO is used. In other words I think that kind of bug(s) may may be on both areas.
Sorry do you have any update about this LTO related issue? :)
(In reply to Tomasz Kłoczko from comment #9) Not really. :-} The "Invalid GType function: 'g_paste_settings_get_type'" error message is not actually coming from the linker (either ld.bfd or ld.gold) but rather the gobject-introspection tool. (Which I think is part of the gtk build environment, but I could well be wrong about this). The tool is being invoked by the gpaste build system, in its command line form (called "g-ir-scanner"), and this tool is *also* invoking the linker to link together the output file(s) that it creates with the other object files that make up gpaste. The problem is that the error message from g-ir-scanner is getting mixed in with the output describing the link step, so it looks like a linker error message, rather than a g-ir-scanner error message. As for why enabling LTO is causing this - well my guess would be that when LTO is used the libgpaste.la library is different from when LTO is not used. (With LTO enabled a lot of extra information is stored in the object files that make up the library). The g-ir-scanner program includes the libgaste.la library as part of its scan, so a change in the library's contents might affect its output. (This is all guesswork on my part however). Note - the g_paste_settings_get_type function really does appear to be missing from the gpaste sources. It is referenced gpaste-settings.h and gpaste-settings.c sure, but it does not appear to be defined anywhere. Now for the linker part of this conundrum. The "Failed to find symbol 'g_paste_settings_get_type'" error message is there because the gpaste sources include a special file that tells the linker which version numbers should be associated with which symbols exported by the libgaste library. (This is the src/libgpaste/libgpaste.sym file). This file includes an entry for g_paste_get_type, but since this function does not actually exist, no version can be associated with it. The bfd linker generates an error message for this, the gold linker does not. (It can be argued either way as to which linker is correct. Personally I go with the bfd linker). My theory is that the g_paste_settings_get_type function should not be missing, and that it needs to be added (or re-added) to the gpaste sources. Does this help ? Cheers Nick
g-i-r scanner .. hmm. Theoretically it should only scan :/ I must check what exactly it does and how exactly linking may be affected by what this tool is doing when LTO is used. Will try to have look on this a bit closer from exactly that angle. I think that I more more than one case when g-i-r is involved :/ Nevertheless in all those cases after disable LTO whole package is building correctly. Nick Thx for update :)
Note, LTO is by default (unless using -ffat-lto-objects) generating thin objects during normal compilation, that contain pretty much just the LTO bytecode and nothing else, so if there is some other tool that processes the archives and tries to do something with them, it will not see anything of interest there (unless using the LTO linker plugin and is prepared to deal with that).
In my experiments with LTO I'm using AR=gcc-ar NM=gcc-nm RANLIB=gcc-ranlib in build env and I'm adding to CFLAGS -flto and to LDFLAGS flto -fuse-linker-plugin. Jakub if it is any easier method please let me know :)
That is fine if it propagates down through the Makefiles or whatever build system it has. The question is what that tool does. Try that -ffat-lto-objects and see if it makes it happy (though of course that would make build time somewhat slower).
Only kind of update. When I've switched to gold ld I was able to link gpaste and I was able to pas that point in gtk3 where g-i-r scanner been failing. Now I have in gtk linking issue: /usr/lib/gcc/x86_64-redhat-linux/9/../../../../lib64/libcairo.so: error: undefined reference to 'pthread_mutexattr_init' /usr/lib/gcc/x86_64-redhat-linux/9/../../../../lib64/libcairo.so: error: undefined reference to 'pthread_mutexattr_destroy' /usr/lib/gcc/x86_64-redhat-linux/9/../../../../lib64/libcairo.so: error: undefined reference to 'pthread_mutexattr_settype' But that looks like bug ion linking cairo (missing -lpthread).
(In reply to Tomasz Kłoczko from comment #15) > But that looks like bug ion linking cairo (missing -lpthread). Exactly.
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle. Changing version to '31'.
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle. Changing version to 31.
This message is a reminder that Fedora 31 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '31'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 31 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 31 changed to end-of-life (EOL) status on 2020-11-24. Fedora 31 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.