Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 653234 - dev-qt/qtwidgets-5.9.5[gtk]: undefined reference to `QGnomeTheme::gtkFontName() const'
Summary: dev-qt/qtwidgets-5.9.5[gtk]: undefined reference to `QGnomeTheme::gtkFontName...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-15 15:21 UTC by n05ph3r42
Modified: 2020-06-27 07:30 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description n05ph3r42 2018-04-15 15:21:51 UTC
emerge --info =dev-qt/qtwidgets-5.9.5
https://paste.pound-python.org/show/IKJePe2SqmVgpvJkdZsk/

emerge -pqv =dev-qt/qtwidgets-5.9.5
https://paste.pound-python.org/show/lA7x59pRHCV8eyVWkh5t/

build log:
https://paste.pound-python.org/show/PBJaiuQppUAdwbzhfasV/

ebuild env:
https://paste.pound-python.org/show/e1S38NFY8yGL1mTbGFVs/

error:
x86_64-pc-linux-gnu-g++ -Wl,-O1 -Wl,--as-needed -Wl,--no-undefined -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 
.obj/qgtk3theme.o: In function `QGtk3Theme::gtkFontName() const':
qgtk3theme.cpp:(.text+0x2d7): undefined reference to `QGnomeTheme::gtkFontName() const'
.obj/qgtk3theme.o: In function `QGtk3Theme::themeHint(QPlatformTheme::ThemeHint) const':
qgtk3theme.cpp:(.text+0x4bf): undefined reference to `QGnomeTheme::themeHint(QPlatformTheme::ThemeHint) const'
qgtk3theme.cpp:(.text+0x587): undefined reference to `QGnomeTheme::themeHint(QPlatformTheme::ThemeHint) const'
.obj/qgtk3theme.o: In function `QGtk3Theme::QGtk3Theme()':
qgtk3theme.cpp:(.text+0x625): undefined reference to `QGnomeTheme::QGnomeTheme()'
.obj/qgtk3theme.o: In function `QGtk3Theme::~QGtk3Theme()':
qgtk3theme.cpp:(.text._ZN10QGtk3ThemeD2Ev[_ZN10QGtk3ThemeD5Ev]+0x3): undefined reference to `vtable for QGnomeTheme'
.obj/qgtk3theme.o: In function `QGtk3Theme::~QGtk3Theme()':
qgtk3theme.cpp:(.text._ZN10QGtk3ThemeD0Ev[_ZN10QGtk3ThemeD5Ev]+0x3): undefined reference to `vtable for QGnomeTheme'
.obj/qgtk3theme.o:(.data.rel.ro._ZTI10QGtk3Theme[_ZTI10QGtk3Theme]+0x10): undefined reference to `typeinfo for QGnomeTheme'
.obj/qgtk3theme.o:(.data.rel.ro._ZTV10QGtk3Theme[_ZTV10QGtk3Theme]+0x30): undefined reference to `QGnomeTheme::createPlatformMenuBar() const'
.obj/qgtk3theme.o:(.data.rel.ro._ZTV10QGtk3Theme[_ZTV10QGtk3Theme]+0x50): undefined reference to `QGnomeTheme::createPlatformSystemTrayIcon() const'
.obj/qgtk3theme.o:(.data.rel.ro._ZTV10QGtk3Theme[_ZTV10QGtk3Theme]+0x60): undefined reference to `QGnomeTheme::font(QPlatformTheme::Font) const'
.obj/qgtk3theme.o:(.data.rel.ro._ZTV10QGtk3Theme[_ZTV10QGtk3Theme]+0x78): undefined reference to `QGnomeTheme::fileIcon(QFileInfo const&, QFlags<QPlatformTheme::IconOption>) const'
.obj/qgtk3theme.o:(.data.rel.ro._ZTV10QGtk3Theme[_ZTV10QGtk3Theme]+0x90): 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


looks similar to resolved https://bugs.gentoo.org/634072 bug, but i have qtgui with dbus enabled:

equery u qtgui:
https://paste.pound-python.org/show/ZiS4ko4FRhRF0VXBZzro/
Comment 1 Andreas Sturmlechner gentoo-dev 2018-04-15 16:08:03 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?
Comment 2 n05ph3r42 2018-04-15 18:16:36 UTC
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.
Comment 3 n05ph3r42 2018-04-15 18:22:39 UTC
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
Comment 4 n05ph3r42 2018-04-15 18:27:23 UTC
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.
Comment 5 n05ph3r42 2018-04-15 20:09:25 UTC
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.
Comment 6 n05ph3r42 2018-04-16 12:55:21 UTC
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.
Comment 7 n05ph3r42 2018-04-16 14:05:19 UTC
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.
Comment 8 Petross404(Petros S) 2018-04-16 16:51:10 UTC
(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.
Comment 9 n05ph3r42 2018-04-16 18:33:51 UTC
(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"
Comment 10 n05ph3r42 2018-04-16 20:13:52 UTC
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?
Comment 11 n05ph3r42 2020-06-27 07:29:03 UTC
build.log (2mb+)
https://www13.zippyshare.com/v/k0zJXhxl/file.html
Comment 12 n05ph3r42 2020-06-27 07:30:08 UTC
whoops, delete plz my prev comment, its related to other bug