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*)'
Created attachment 476714 [details] build.log
Created attachment 476716 [details] emerge --info
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?
I disabled lto for dev-qt/designer. Maybe in the future I will try again.
(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.
Thanks for checking back.