Summary: | dev-qt/qtwidgets-5.9.5[gtk]: undefined reference to `QGnomeTheme::gtkFontName() const' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | n05ph3r42 <official.contacts> |
Component: | Current packages | Assignee: | Qt Bug Alias <qt> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | asturm, tabascoz |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
n05ph3r42
2018-04-15 15:21:51 UTC
Did you switch from GCC-4 to GCC-5 recently without bothering to read the news item about ABI breakage and the need to rebuild? In fact i'm not "switched to gcc5 recently", because i installed this system from scratch at the mid of march, and it was set to ~amd64 from the start. I.e. i had GCC 7.3 from the start, and upgraded to GCC 7.3-r1 recently. And with dev-qt/*-5.9.4 everything was fine. I believe it can be or GCC 7.3-r1 problem, or linker (recently switched to gold globally), CFLAGS (i tried with -flto and -fuse-ld=gold) or some new USE flags (recently globally enabled graphite ?) Looks like same error with: CFLAGS="-march=sandybridge -mfpmath=both -mavx -maes -O2 -pipe -fuse-ld=gold -flto -fno-fat-lto-objects -fomit-frame-pointer -ftree-vectorize" x86_64-pc-linux-gnu-g++ -Wl,-O1 -Wl,--as-needed -Wl,--no-undefined -fuse-ld=gold -Wl,--enable-new-dtags -Wl,-rpath-link,/usr/lib64 -shared -o libqgtk3.so .obj/main.o .obj/qgtk3dialoghelpers.o .obj/qgtk3menu.o .obj/qgtk3theme.o .obj/moc_qgtk3dialoghelpers.o .obj/moc_qgtk3menu.o -lQt5ThemeSupport -lQt5DBus -lQt5Gui -lQt5Core -lGL -lpthread -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lXext -lX11 -lm /var/tmp/portage/dev-qt/qtwidgets-5.9.5/temp/cc9OhKWX.ltrans0.ltrans.o:<artificial>:function QGtk3Theme::~QGtk3Theme(): error: undefined reference to 'vtable for QGnomeTheme' /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function /var/tmp/portage/dev-qt/qtwidgets-5.9.5/temp/cc9OhKWX.ltrans0.ltrans.o:<artificial>:function QGtk3Theme::~QGtk3Theme(): error: undefined reference to 'vtable for QGnomeTheme' /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function /var/tmp/portage/dev-qt/qtwidgets-5.9.5/temp/cc9OhKWX.ltrans0.ltrans.o:<artificial>:function QGnomeTheme::~QGnomeTheme(): error: undefined reference to 'vtable for QGnomeTheme' /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function /var/tmp/portage/dev-qt/qtwidgets-5.9.5/temp/cc9OhKWX.ltrans0.ltrans.o:<artificial>:function QGtk3Theme::gtkFontName() const: error: undefined reference to 'QGnomeTheme::gtkFontName() const' /var/tmp/portage/dev-qt/qtwidgets-5.9.5/temp/cc9OhKWX.ltrans0.ltrans.o:<artificial>:function QGtk3Theme::themeHint(QPlatformTheme::ThemeHint) const: error: undefined reference to 'QGnomeTheme::themeHint(QPlatformTheme::ThemeHint) const' /var/tmp/portage/dev-qt/qtwidgets-5.9.5/temp/cc9OhKWX.ltrans0.ltrans.o:<artificial>:function QGtk3Theme::themeHint(QPlatformTheme::ThemeHint) const: error: undefined reference to 'QGnomeTheme::themeHint(QPlatformTheme::ThemeHint) const' /var/tmp/portage/dev-qt/qtwidgets-5.9.5/temp/cc9OhKWX.ltrans0.ltrans.o:<artificial>:function QGtk3ThemePlugin::create(QString const&, QStringList const&): error: undefined reference to 'QGnomeTheme::QGnomeTheme()' /var/tmp/portage/dev-qt/qtwidgets-5.9.5/temp/cc9OhKWX.ltrans0.ltrans.o:<artificial>:function QGnomeTheme::~QGnomeTheme(): error: undefined reference to 'vtable for QGnomeTheme' /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function /var/tmp/portage/dev-qt/qtwidgets-5.9.5/temp/cc9OhKWX.ltrans0.ltrans.o:<artificial>:typeinfo for QGtk3Theme: error: undefined reference to 'typeinfo for QGnomeTheme' /var/tmp/portage/dev-qt/qtwidgets-5.9.5/temp/cc9OhKWX.ltrans0.ltrans.o:<artificial>:vtable for QGtk3Theme: error: undefined reference to 'QGnomeTheme::createPlatformMenuBar() const' /var/tmp/portage/dev-qt/qtwidgets-5.9.5/temp/cc9OhKWX.ltrans0.ltrans.o:<artificial>:vtable for QGtk3Theme: error: undefined reference to 'QGnomeTheme::createPlatformSystemTrayIcon() const' /var/tmp/portage/dev-qt/qtwidgets-5.9.5/temp/cc9OhKWX.ltrans0.ltrans.o:<artificial>:vtable for QGtk3Theme: error: undefined reference to 'QGnomeTheme::font(QPlatformTheme::Font) const' /var/tmp/portage/dev-qt/qtwidgets-5.9.5/temp/cc9OhKWX.ltrans0.ltrans.o:<artificial>:vtable for QGtk3Theme: error: undefined reference to 'QGnomeTheme::fileIcon(QFileInfo const&, QFlags<QPlatformTheme::IconOption>) const' /var/tmp/portage/dev-qt/qtwidgets-5.9.5/temp/cc9OhKWX.ltrans0.ltrans.o:<artificial>:vtable for QGtk3Theme: error: undefined reference to 'QGnomeTheme::standardButtonText(int) const' collect2: error: ld returned 1 exit status make[1]: *** [Makefile:138: ../../../../plugins/platformthemes/libqgtk3.so] Error 1 make[1]: Leaving directory '/var/tmp/portage/dev-qt/qtwidgets-5.9.5/work/qtbase-opensource-src-5.9.5/src/plugins/platformthemes/gtk3' make: *** [Makefile:45: sub-gtk3-make_first] Error 2 * ERROR: dev-qt/qtwidgets-5.9.5::gentoo failed (compile phase): * emake failed BTW, as for "need to rebuild" - i run "emerge --update --deep --with-bdeps=y --newuse @world && emerge --depclean && emerge @preserved-rebuild && revdep-rebuild" almost everyday, and i make sure that it ends well. On another machine i emerged qtwidgets-5.9.5 successfully with CFLAGS="-march=ivybridge -mfpmath=both -mavx -maes -fuse-ld=gold -flto -fno-fat-lto-objects -ftree-vectorize -fomit-frame-pointer -O2 -pipe" Main difference between those configs, its that ivybridge machine uses no graphite globally. Will check with +graphite later. Noticed strange thing while checking emerge logs: Checking for D-Bus >= 1.2 (host)... Trying source 0 (type pkgConfig) of library host_dbus ... + /usr/bin/pkg-config --exists --silence-errors dbus-1 '>=' 1.2 + /usr/bin/pkg-config --modversion dbus-1 '>=' 1.2 > 1.12.6 + /usr/bin/pkg-config --libs-only-L dbus-1 '>=' 1.2 + /usr/bin/pkg-config --libs-only-l dbus-1 '>=' 1.2 > -ldbus-1 + /usr/bin/pkg-config --cflags dbus-1 '>=' 1.2 > -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include => source accepted. BUT Qt modules and options: Qt Concurrent .......................... yes Qt D-Bus ............................... no Qt D-Bus directly linked to libdbus .... no while equery l qt* * Searching for qt* ... [IP-] [ ] dev-qt/qtchooser-0_p20170803:0 [IP-] [ ] dev-qt/qtcore-5.9.5:5/5.9 [IP-] [ ] dev-qt/qtdbus-5.9.5:5/5.9 [IP-] [ ] dev-qt/qtgui-5.9.5:5/5.9 [IP-] [ ] dev-qt/qtmultimedia-5.9.5:5/5.9 [IP-] [ ] dev-qt/qtnetwork-5.9.5:5/5.9 [IP-] [ ] dev-qt/qtopengl-5.9.4:5/5.9 [IP-] [ ] dev-qt/qtprintsupport-5.9.4:5/5.9 [IP-] [ ] dev-qt/qtx11extras-5.9.5:5/5.9 [IP-] [ ] dev-qt/qtxml-5.9.5:5/5.9 For some reason qtwidgets build configure cannot detect Qt D-bus. Have no idea why. At the same time, all the rest of qt packages detects Qt D-bus well. SOLVED Apparently, global USE="gtk gtk3" flags breaks emerge for qtwidgets. Removing gtk from make conf or addinng to /etc/portage/package.use : =dev-qt/qtwidgets-5.9.5 -gtk -gtk3 solved issue. (In reply to n05ph3r42 from comment #7) > SOLVED > > Apparently, global USE="gtk gtk3" flags breaks emerge for qtwidgets. It shouldn't, mine Qt installation is fine with these use flags. Try to re-emerge anything related to gtk : emerge -1av `qlist -ICS gtk` If Qt tries to compile with LTO but gtk isn't maybe it can cause errors during linking phase. So check your cflags too. (In reply to Petross404(Petros S) from comment #8) > (In reply to n05ph3r42 from comment #7) > > SOLVED > > > > Apparently, global USE="gtk gtk3" flags breaks emerge for qtwidgets. > > It shouldn't, mine Qt installation is fine with these use flags. Try to > re-emerge anything related to gtk : > > emerge -1av `qlist -ICS gtk` > > If Qt tries to compile with LTO but gtk isn't maybe it can cause errors > during linking phase. So check your cflags too. After > emerge -1av `qlist -ICS gtk` and masking (i have USE=gtk in make.conf) /etc/portage/package.use : #=dev-qt/qtwidgets-5.9.5 -gtk -gtk3 error returned. BTW only "gtk" flag matters in this issue, checked right now. "gtk3" doesn't matter. As for CFLAGS, i tried with and w/o LTO and gold before, that changed nothing. Also you can see in first env : https://paste.pound-python.org/show/e1S38NFY8yGL1mTbGFVs/ that i used definitely "safe" cflags. And with USE="-gtk" flag i emerged fine even with CFLAGS="-march=sandybridge -mfpmath=both -mavx -maes -O2 -pipe -pthread -fuse-ld=gold -flto=8 -fomit-frame-pointer -ftree-vectorize" Hmm, just tried with package.use "gtk" flag on another machine - qtwidgets emerged fine. Seems bug is related to dependencies. Also on this machine there is no global "gtk" and "gtk3" flags in make.conf. Maybe unexpected behavior triggered by global (which in fact not global, but specified in make.conf) "gtk3" flag used by some of dependencies? build.log (2mb+) https://www13.zippyshare.com/v/k0zJXhxl/file.html whoops, delete plz my prev comment, its related to other bug |