Bug 1290020 - qt-5.6.0-beta : moc ignoring some classes? kf5-frameworkintegration FTBFS
qt-5.6.0-beta : moc ignoring some classes? kf5-frameworkintegration FTBFS
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: qt5-qtbase (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ngo Than
Fedora Extras Quality Assurance
:
Depends On: 1291041
Blocks: qt-5.6
  Show dependency treegraph
 
Reported: 2015-12-09 09:10 EST by Rex Dieter
Modified: 2015-12-16 23:20 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-16 23:20:46 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Qt Bug Tracker QTBUG-49972 None None None Never

  None (edit)
Description Rex Dieter 2015-12-09 09:10:07 EST
x86_64 kf5-frameworkintegration builds are failing against qt 5.6.0 (beta):

[100%] Linking CXX shared module KDEPlatformTheme.so
cd /builddir/build/BUILD/frameworkintegration-5.17.0/x86_64-redhat-linux-gnu/src/platformtheme && /usr/bin/cmake -E cmake_link_script CMakeFiles/KDEPlatformTheme.dir/link.txt --verbose=1
/usr/bin/c++  -fPIC -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic  -std=c++0x -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -pedantic -O3 -DNDEBUG -Wl,--no-undefined -Wl,--fatal-warnings -Wl,--enable-new-dtags  -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -shared  -o KDEPlatformTheme.so CMakeFiles/KDEPlatformTheme.dir/kdeplatformtheme.cpp.o CMakeFiles/KDEPlatformTheme.dir/kfontsettingsdata.cpp.o CMakeFiles/KDEPlatformTheme.dir/khintssettings.cpp.o CMakeFiles/KDEPlatformTheme.dir/kdeplatformfiledialoghelper.cpp.o CMakeFiles/KDEPlatformTheme.dir/kdeplatformfiledialogbase.cpp.o CMakeFiles/KDEPlatformTheme.dir/kdeplatformsystemtrayicon.cpp.o CMakeFiles/KDEPlatformTheme.dir/kfiletreeview.cpp.o CMakeFiles/KDEPlatformTheme.dir/kdirselectdialog.cpp.o CMakeFiles/KDEPlatformTheme.dir/main.cpp.o CMakeFiles/KDEPlatformTheme.dir/KDEPlatformTheme_automoc.cpp.o /usr/lib64/libKF5KIOFileWidgets.so.5.17.0 /usr/lib64/libKF5KIOWidgets.so.5.17.0 /usr/lib64/libKF5Notifications.so.5.17.0 /usr/lib64/libxcb.so -lXcursor /usr/lib64/libKF5KIOCore.so.5.17.0 /usr/lib64/libKF5JobWidgets.so.5.17.0 /usr/lib64/libKF5Service.so.5.17.0 /usr/lib64/libKF5Completion.so.5.17.0 /usr/lib64/libKF5Bookmarks.so.5.17.0 /usr/lib64/libKF5XmlGui.so.5.17.0 /usr/lib64/libKF5IconThemes.so.5.17.0 /usr/lib64/libKF5ConfigWidgets.so.5.17.0 /usr/lib64/libKF5ConfigGui.so.5.17.0 /usr/lib64/libKF5Auth.so.5.17.0 /usr/lib64/libKF5I18n.so.5.17.0 /usr/lib64/libQt5Network.so.5.6.0 /usr/lib64/libKF5WidgetsAddons.so.5.17.0 /usr/lib64/libKF5ItemViews.so.5.17.0 /usr/lib64/libKF5Solid.so.5.17.0 /usr/lib64/libQt5Xml.so.5.6.0 /usr/lib64/libQt5DBus.so.5.6.0 /usr/lib64/libKF5ConfigCore.so.5.17.0 /usr/lib64/libQt5X11Extras.so.5.6.0 /usr/lib64/libKF5Codecs.so.5.17.0 /usr/lib64/libQt5Widgets.so.5.6.0 /usr/lib64/libQt5Gui.so.5.6.0 /usr/lib64/libKF5CoreAddons.so.5.17.0 /usr/lib64/libQt5Core.so.5.6.0 
CMakeFiles/KDEPlatformTheme.dir/kdeplatformsystemtrayicon.cpp.o: In function `SystemTrayMenu* qobject_cast<SystemTrayMenu*>(QObject*)':
/usr/include/qt5/QtCore/qobject.h:518: undefined reference to `SystemTrayMenu::staticMetaObject'
CMakeFiles/KDEPlatformTheme.dir/kdeplatformsystemtrayicon.cpp.o: In function `SystemTrayMenu::SystemTrayMenu()':
/builddir/build/BUILD/frameworkintegration-5.17.0/src/platformtheme/kdeplatformsystemtrayicon.cpp:33: undefined reference to `vtable for SystemTrayMenu'
CMakeFiles/KDEPlatformTheme.dir/kdeplatformsystemtrayicon.cpp.o: In function `SystemTrayMenu::~SystemTrayMenu()':
/builddir/build/BUILD/frameworkintegration-5.17.0/src/platformtheme/kdeplatformsystemtrayicon.cpp:39: undefined reference to `vtable for SystemTrayMenu'
CMakeFiles/KDEPlatformTheme.dir/kdeplatformsystemtrayicon.cpp.o: In function `SystemTrayMenuItem* qobject_cast<SystemTrayMenuItem*>(QObject*)':
/usr/include/qt5/QtCore/qobject.h:518: undefined reference to `SystemTrayMenuItem::staticMetaObject'
CMakeFiles/KDEPlatformTheme.dir/kdeplatformsystemtrayicon.cpp.o: In function `SystemTrayMenuItem::SystemTrayMenuItem()':
/builddir/build/BUILD/frameworkintegration-5.17.0/src/platformtheme/kdeplatformsystemtrayicon.cpp:169: undefined reference to `vtable for SystemTrayMenuItem'
CMakeFiles/KDEPlatformTheme.dir/kdeplatformsystemtrayicon.cpp.o: In function `SystemTrayMenu* qobject_cast<SystemTrayMenu*>(QObject*)':
/usr/include/qt5/QtCore/qobject.h:518: undefined reference to `SystemTrayMenu::staticMetaObject'
CMakeFiles/KDEPlatformTheme.dir/kdeplatformsystemtrayicon.cpp.o: In function `SystemTrayMenuItem* qobject_cast<SystemTrayMenuItem*>(QObject*)':
/usr/include/qt5/QtCore/qobject.h:518: undefined reference to `SystemTrayMenuItem::staticMetaObject'
collect2: error: ld returned 1 exit status
Comment 1 Daniel Vrátil 2015-12-09 11:55:46 EST
The full command executed to generate the moc file:

/usr/lib64/qt5/bin/moc  -I/usr/include/qt5/QtGui/5.6.0/QtGui -I/usr/include/qt5/QtCore/5.6.0 -I/usr/include/qt5/QtCore/5.6.0/QtCore -I/usr/include/qt5 -I/usr/include
/qt5/QtDBus -I/usr/include/qt5/QtCore -I/usr/lib64/qt5/./mkspecs/linux-g++ -I/opt/kde-devel/include/KF5/KConfigWidgets -I/opt/kde-devel/include/KF5 -I/opt/kde-devel/in
clude/KF5/KCodecs -I/opt/kde-devel/include/KF5/KWidgetsAddons -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/opt/kde-devel/include/KF5/KConfigGui -I/usr/incl
ude/qt5/QtXml -I/opt/kde-devel/include/KF5/KConfigCore -I/opt/kde-devel/include/KF5/KAuth -I/opt/kde-devel/include/KF5/KCoreAddons -I/opt/kde-devel/include/KF5/KIconTh
emes -I/opt/kde-devel/include/KF5/KIOFileWidgets -I/opt/kde-devel/include/KF5/KIOWidgets -I/opt/kde-devel/include/KF5/KIOCore -I/opt/kde-devel/include/KF5/KService -I/
opt/kde-devel/include/KF5/KJobWidgets -I/usr/include/qt5/QtNetwork -I/opt/kde-devel/include/KF5/KCompletion -I/opt/kde-devel/include/KF5/KBookmarks -I/opt/kde-devel/in
clude/KF5/KItemViews -I/opt/kde-devel/include/KF5/KXmlGui -I/opt/kde-devel/include/KF5/Solid -I/opt/kde-devel/include/KF5/KI18n -I/opt/kde-devel/include/KF5/KNotificat
ions -I/usr/include/qt5/QtX11Extras -I/usr/include -DKCOREADDONS_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_CAST
_TO_ASCII -DQT_NO_SIGNALS_SLOTS_KEYWORDS -DQT_NO_URL_CAST_FROM_STRING -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_QSTRINGBUILDER -DQT_WIDGETS_LIB -DQT_X11EXTRAS_LIB -DQT_XML_
LIB -DTRANSLATION_DOMAIN="frameworkintegration5"  -o /home/dvratil/devel/KDE/build/frameworks/frameworkintegration/src/platformtheme/moc_kdeplatformsystemtrayicon.cpp





Minimal version that can reproduce:

/usr/lib64/qt5/bin/moc  -I/usr/include/qt5/QtGui/5.6.0/QtGui -I/usr/include/qt5   -o /home/dvratil/devel/KDE/build/frameworks/frameworkintegration/src/platformtheme/moc_kdeplatformsystemtrayicon.cpp /home/dvratil/devel/KDE/frameworks/frameworkintegration/src/platformtheme/kdeplatformsystemtrayicon.h

This makes me believe that there is something suspicious going on in the includes that define the macro and the values....
Comment 2 Rex Dieter 2015-12-15 07:40:09 EST
Helio filed upstream,
https://bugreports.qt.io/browse/QTBUG-49972
Comment 3 Rex Dieter 2015-12-15 12:24:18 EST
OK, after more irc discussion, we strongly suspected our qconfig.h hack where /usr/include/qt5/QtCore/qconfig.h contains:

/* qconfig.h */
/* This file is here to prevent a file conflict on multiarch systems.  A
 * conflict will occur because qconfig.h has arch-specific definitions.
 *
 * DO NOT INCLUDE THE NEW FILE DIRECTLY -- ALWAYS INCLUDE THIS ONE INSTEAD. */

#ifndef QCONFIG_MULTILIB_H
#define QCONFIG_MULTILIB_H
#include <bits/wordsize.h>

#if __WORDSIZE == 32
#include "QtCore/qconfig-32.h"
#elif __WORDSIZE == 64
#include "QtCore/qconfig-64.h"
#else
#error "unexpected value for __WORDSIZE macro"
#endif

#endif


Replacing this placeholder, with the real qconfig.h makes the moc problems go away in my own limited testing.

Now, what to do about it?
Comment 4 Rex Dieter 2015-12-16 23:20:46 EST
https://koji.fedoraproject.org/koji/buildinfo?buildID=705970


Looks like a combination of introducing __WORDSIZE macro into moc, more careful qconfig.h (__WORDSIZE guard before #include <bits/wordsize.h>), and upstream moc improvements, looks like we have a winner

%changelog
* Wed Dec 16 2015 Rex Dieter <rdieter@fedoraproject.org> - 5.6.0-0.15
- pull in another upstream moc fix/improvement (#1290020,QTBUG-49972)
- fix bootstrap/docs

* Wed Dec 16 2015 Rex Dieter <rdieter@fedoraproject.org> 5.6.0-0.13
- workaround moc/qconfig-multilib issues (#1290020,QTBUG-49972)

Note You need to log in before you can comment on or make changes to this bug.