When Xfconf is build witt LTO optimisation build fails with: [tkloczko@barrel xfconf-4.14.1]$ make make all-recursive make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/xfconf-4.14.1' Making all in common make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/xfconf-4.14.1/common' make all-am make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/xfconf-4.14.1/common' make[3]: Nothing to be done for 'all-am'. make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/xfconf-4.14.1/common' make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/xfconf-4.14.1/common' Making all in xfconf make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/xfconf-4.14.1/xfconf' CPPFLAGS="-DNDEBUG -DHAVE_GNUC_VISIBILITY" CFLAGS="-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -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=auto -flto-partition=none -Os -fvisibility=hidden" LDFLAGS="-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin -Wl,--as-needed -Wl,-O1" 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 --add-include-path=. --warn-all -DLIBXFCONF_COMPILATION --symbol-prefix=xfconf_g_ --symbol-prefix=xfconf_ --c-include=xfconf/xfconf.h --namespace=Xfconf --nsversion=0 --libtool="/bin/sh ../libtool" --include=GObject-2.0 --include=GLib-2.0 --include=Gio-2.0 --pkg-export=libxfconf-0 --library=libxfconf-0.la --cflags-begin -I.. -DLIBXFCONF_COMPILATION -DG_LOG_DOMAIN=\"xfconf\" --cflags-end xfconf-binding.h xfconf-channel.h xfconf-errors.h xfconf-types.h xfconf.h xfconf-binding.c xfconf-cache.c xfconf-channel.c xfconf.c ../common/xfconf-types.c libxfconf-0.la Makefile --output Xfconf-0.gir g-ir-scanner: link: /bin/sh ../libtool --mode=link --tag=CC gcc -o /home/tkloczko/rpmbuild/BUILD/xfconf-4.14.1/xfconf/tmp-introspectn10q4vwv/Xfconf-0 -export-dynamic -DNDEBUG -DHAVE_GNUC_VISIBILITY -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -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=auto -flto-partition=none -Os -fvisibility=hidden /home/tkloczko/rpmbuild/BUILD/xfconf-4.14.1/xfconf/tmp-introspectn10q4vwv/Xfconf-0.o -L. libxfconf-0.la -lgio-2.0 -lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0 -lglib-2.0 -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin -Wl,--as-needed -Wl,-O1 libtool: link: gcc -o /home/tkloczko/rpmbuild/BUILD/xfconf-4.14.1/xfconf/tmp-introspectn10q4vwv/.libs/Xfconf-0 -DNDEBUG -DHAVE_GNUC_VISIBILITY -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -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=auto -flto-partition=none -Os -fvisibility=hidden /home/tkloczko/rpmbuild/BUILD/xfconf-4.14.1/xfconf/tmp-introspectn10q4vwv/Xfconf-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=auto -flto-partition=none -fuse-linker-plugin -Wl,--as-needed -Wl,-O1 -Wl,--export-dynamic -L. ./.libs/libxfconf-0.so -lgthread-2.0 -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -pthread Invalid GType function: 'xfconf_channel_get_type' Failed to find symbol 'xfconf_channel_get_type' Command '['/home/tkloczko/rpmbuild/BUILD/xfconf-4.14.1/xfconf/tmp-introspectn10q4vwv/Xfconf-0', '--introspect-dump=/home/tkloczko/rpmbuild/BUILD/xfconf-4.14.1/xfconf/tmp-introspectn10q4vwv/functions.txt,/home/tkloczko/rpmbuild/BUILD/xfconf-4.14.1/xfconf/tmp-introspectn10q4vwv/dump.xml']' returned non-zero exit status 1. make[2]: *** [/usr/share/gobject-introspection-1.0/Makefile.introspection:156: Xfconf-0.gir] Error 1 make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/xfconf-4.14.1/xfconf' make[1]: *** [Makefile:503: all-recursive] Error 1 make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/xfconf-4.14.1' make: *** [Makefile:435: all] Error 2 [
I have no experiences with LTO, but with CFLAGS="-flto=auto -flto-partition=none", compilation works (xfconf master, gcc 9.3.0). Can you test without LTO ? Your compilation problem seems to be on gobject-introspection side, can you retry with --enable-introspection=no ?
Passing CFLAGS and LDFLAGS is not enough. https://wiki.debian.org/LTO This issue is on linking stage. Looks like `xfconf_channel_get_type` is not marked as part of the ABI and by this whole symbol is not added to DSO.
-- GitLab Migration Automatic Message -- This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfconf/-/issues/8. Please create an account or use an existing account on one of our supported OAuth providers. If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev