Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 621962 - kde-frameworks/kjsembed-5.35 LTO error : undefined reference to 'QUiLoader::QUiLoader(QObject*)'
Summary: kde-frameworks/kjsembed-5.35 LTO error : undefined reference to 'QUiLoader::Q...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-16 21:41 UTC by Petross404(Petros S)
Modified: 2017-12-25 23:25 UTC (History)
2 users (show)

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


Attachments
build.log (kde-frameworks:kjsembed-5.35.0:20170616-212311.log,156.27 KB, text/x-log)
2017-06-16 21:46 UTC, Petross404(Petros S)
Details
emerge --info (emerge-info,24.91 KB, text/plain)
2017-06-16 21:47 UTC, Petross404(Petros S)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petross404(Petros S) 2017-06-16 21:41:34 UTC
kde-frameworks/kjsembed-5.35 failes to emerge with LTO enabled.

/tmp/portage/kde-frameworks/kjsembed-5.35.0/temp/cccqLFhi.ltrans3.ltrans.o:<artificial>:function KJSEmbed::uiLoader(): error: undefined reference to 'QUiLoader::QUiLoader(QObject*)'
/tmp/portage/kde-frameworks/kjsembed-5.35.0/temp/cccqLFhi.ltrans4.ltrans.o:<artificial>:function UiLoaderNS::pluginPaths(KJS::ExecState*, KJS::JSObject*, KJS::List const&): error: undefined reference to 'QUiLoader::staticMetaObject'
/tmp/portage/kde-frameworks/kjsembed-5.35.0/temp/cccqLFhi.ltrans4.ltrans.o:<artificial>:function UiLoaderNS::pluginPaths(KJS::ExecState*, KJS::JSObject*, KJS::List const&): error: undefined reference to 'QUiLoader::pluginPaths() const'
/tmp/portage/kde-frameworks/kjsembed-5.35.0/temp/cccqLFhi.ltrans4.ltrans.o:<artificial>:function UiLoaderNS::load(KJS::ExecState*, KJS::JSObject*, KJS::List const&): error: undefined reference to 'QUiLoader::staticMetaObject'
/tmp/portage/kde-frameworks/kjsembed-5.35.0/temp/cccqLFhi.ltrans4.ltrans.o:<artificial>:function UiLoaderNS::load(KJS::ExecState*, KJS::JSObject*, KJS::List const&): error: undefined reference to 'QUiLoader::load(QIODevice*, QWidget*)'
/tmp/portage/kde-frameworks/kjsembed-5.35.0/temp/cccqLFhi.ltrans4.ltrans.o:<artificial>:function UiLoaderNS::createWidget(KJS::ExecState*, KJS::JSObject*, KJS::List const&): error: undefined reference to 'QUiLoader::staticMetaObject'
/tmp/portage/kde-frameworks/kjsembed-5.35.0/temp/cccqLFhi.ltrans4.ltrans.o:<artificial>:function UiLoaderNS::createLayout(KJS::ExecState*, KJS::JSObject*, KJS::List const&): error: undefined reference to 'QUiLoader::staticMetaObject'
/tmp/portage/kde-frameworks/kjsembed-5.35.0/temp/cccqLFhi.ltrans4.ltrans.o:<artificial>:function KJSEmbed::UiLoaderBinding::ctorMethod(KJS::ExecState*, KJS::List const&): error: undefined reference to 'QUiLoader::QUiLoader(QObject*)'
/tmp/portage/kde-frameworks/kjsembed-5.35.0/temp/cccqLFhi.ltrans4.ltrans.o:<artificial>:function KJSEmbed::UiLoaderBinding::ctorMethod(KJS::ExecState*, KJS::List const&): error: undefined reference to 'QUiLoader::QUiLoader(QObject*)'
Comment 1 Petross404(Petros S) 2017-06-16 21:46:00 UTC
Created attachment 476714 [details]
build.log
Comment 2 Petross404(Petros S) 2017-06-16 21:47:00 UTC
Created attachment 476716 [details]
emerge --info
Comment 3 Petross404(Petros S) 2017-06-18 10:28:56 UTC
Running : 

# grep -r QUiLoader /usr/lib64/libQt5*
Binary file /usr/lib64/libQt5UiTools.a matches

# equery b /usr/lib64/libQt5UiTools.a 
 * Searching for /usr/lib64/libQt5UiTools.a ... 
dev-qt/designer-5.7.1 (/usr/lib64/libQt5UiTools.a)

and

gcc-nm  /usr/lib64/libQt5UiTools.a | c++filt
....
....
moc_quiloader.o:
         U QObject::childEvent(QChildEvent*)
         U QObject::timerEvent(QTimerEvent*)
         U QObject::customEvent(QEvent*)
         U QObject::eventFilter(QObject*, QEvent*)
         U QObject::qt_metacall(QMetaObject::Call, int, void**)
         U QObject::qt_metacast(char const*)
         U QObject::connectNotify(QMetaMethod const&)
         U QObject::disconnectNotify(QMetaMethod const&)
         U QObject::staticMetaObject
         U QObject::event(QEvent*)
00000000 T QUiLoader::qt_metacall(QMetaObject::Call, int, void**)
00000000 T QUiLoader::qt_metacast(char const*)
         U QUiLoader::createAction(QObject*, QString const&)
         U QUiLoader::createLayout(QString const&, QObject*, QString const&)
         U QUiLoader::createWidget(QString const&, QWidget*, QString const&)
00000000 T QUiLoader::staticMetaObject
         U QUiLoader::createActionGroup(QObject*, QString const&)
00000000 T QUiLoader::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)
         U QUiLoader::~QUiLoader()
         U QUiLoader::~QUiLoader()
         U QObjectData::dynamicMetaObject() const
00000000 T QUiLoader::metaObject() const
         U typeinfo for QObject
00000000 W typeinfo for QUiLoader
00000000 W typeinfo name for QUiLoader
00000000 W vtable for QUiLoader
         U vtable for __cxxabiv1::__si_class_type_info

In this static library one can find a lot of the symbols that fail to link during emerge. After rebuilding multiple times dev-qt/designer, the same linking failure occurs.

Should this library be dynamic (*.so) instead of static in order the linking to succeed?
Comment 4 Petross404(Petros S) 2017-12-03 10:35:42 UTC
I disabled lto for dev-qt/designer. Maybe in the future I will try again.
Comment 5 Petross404(Petros S) 2017-12-23 19:16:53 UTC
(In reply to Petross404(Petros S) from comment #4)
> I disabled lto for dev-qt/designer. Maybe in the future I will try again.

Another workaround is to use STRIP_MASK="*.a" either globally or at least for designer in package.env. FEATURE="nostrip" or -ffat-lto-objects will help as well.

From bug 603594 and 633930.
Comment 6 Andreas Sturmlechner gentoo-dev 2017-12-25 23:25:18 UTC
Thanks for checking back.