Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 725868 - kde-frameworks/kio-5.67.0-r1, kde-frameworks/kxmlgui-5.67.0, kde-frameworks/kirigami-5.67.1-r1: Fail to compile when used with dev-qt/qtnetwork-5.15.0
Summary: kde-frameworks/kio-5.67.0-r1, kde-frameworks/kxmlgui-5.67.0, kde-frameworks/k...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard: fixed in KDE Frameworks 5.70
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-28 11:21 UTC by matthias.grobarek
Modified: 2020-05-30 11:28 UTC (History)
2 users (show)

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


Attachments
emerge --info qtnetwork kio kirigami kxmlgui (after installing the fixed versions) (emerge-info.txt,20.97 KB, text/plain)
2020-05-28 11:21 UTC, matthias.grobarek
Details
Build log of kio-5.67.0-r1 (build-kio-5.67.0-r1.log.gz,8.92 KB, application/gzip)
2020-05-28 11:26 UTC, matthias.grobarek
Details
Build log of kirigami-5.67.1-r1 (build-kirigami-5.67.1-r1.log.gz,6.41 KB, application/gzip)
2020-05-28 11:26 UTC, matthias.grobarek
Details
Build log of kxmlgui-5.67.0 (build-kxmlgui-5.67.0.log.gz,6.15 KB, application/gzip)
2020-05-28 11:27 UTC, matthias.grobarek
Details
Patch file for kio-5.67.0-r1 (kio-5.67.0-fix-invalid-qt-version-switch.patch,4.21 KB, patch)
2020-05-28 11:28 UTC, matthias.grobarek
Details | Diff
Modified ebuild for kio-5.67.0-r1 that includes the patch file (kio-5.67.0-r2.ebuild,2.46 KB, text/plain)
2020-05-28 11:29 UTC, matthias.grobarek
Details
Patch file for kirigami-5.67.1-r1 (kirigami-5.67.1-fix-invalid-qt-version-switch.patch,661 bytes, patch)
2020-05-28 11:29 UTC, matthias.grobarek
Details | Diff
Modified ebuild for kirigami-5.67.1-r1 that includes the patch file (kirigami-5.67.1-r2.ebuild,1.05 KB, text/plain)
2020-05-28 11:30 UTC, matthias.grobarek
Details
Patch file for kxmlgui-5.67.0 (kxmlgui-5.67.0-fix-invalid-qt-version-switch.patch,1.26 KB, patch)
2020-05-28 11:31 UTC, matthias.grobarek
Details | Diff
Modified ebuild for kxmlgui-5.67.0 that includes the patch file (kxmlgui-5.67.0-r1.ebuild,1.32 KB, text/plain)
2020-05-28 11:31 UTC, matthias.grobarek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description matthias.grobarek 2020-05-28 11:21:41 UTC
Created attachment 642330 [details]
emerge --info qtnetwork kio kirigami kxmlgui (after installing the fixed versions)

== SYMPTOMS ==

After I updated dev-qt/qtnetwork to 5.15.0 on my system (which is not yet stabilized), the subsequent rebuilds of kde-frameworks/kio-5.67.0-r1, kde-frameworks/kxmlgui-5.67.0 and kde-frameworks/kirigami-5.67.1-r1 failed.


== ANALYSIS ==

The reason is that the source code of these three packages use a Qt version switch in several places, e. g.:

#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
    if (reply->error() != QNetworkReply::NoError) {
#else
    if (reply->networkError() != QNetworkReply::NoError) {
#endif

…or:

#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
    const auto socketError = socket->error();
#else
    const auto socketError = socket->socketError();
#endif


So the authors assume that prior to Qt 5.15.0 the methods are called error() and error() while in Qt 5.15.0 and later they are called networkError() and socketError().

But this assumption is wrong, as can be seen in the API documentation of Qt 5.15:
• The class QAbstractSocket keeps using error() instead of socketError(): https://doc.qt.io/qt-5/qabstractsocket.html (compare with the Qt 5.14 doc: https://doc.qt.io/qt-5.14/qabstractsocket.html)
• The class QNetworkReply keeps using error() instead of networkError(): https://doc.qt.io/qt-5/qnetworkreply.html (compare with the Qt 5.14 doc: https://doc.qt.io/qt-5.14/qnetworkreply.html)


== FIX ==

I created patch files for the affected source code files that remove the Qt version switch for said method calls, and added them in the ebuild files accordingly. This enabled me to successfully build the three packages.
Comment 1 matthias.grobarek 2020-05-28 11:26:12 UTC
Created attachment 642332 [details]
Build log of kio-5.67.0-r1
Comment 2 matthias.grobarek 2020-05-28 11:26:39 UTC
Created attachment 642334 [details]
Build log of kirigami-5.67.1-r1
Comment 3 matthias.grobarek 2020-05-28 11:27:25 UTC
Created attachment 642348 [details]
Build log of kxmlgui-5.67.0
Comment 4 matthias.grobarek 2020-05-28 11:28:31 UTC
Created attachment 642350 [details, diff]
Patch file for kio-5.67.0-r1
Comment 5 matthias.grobarek 2020-05-28 11:29:18 UTC
Created attachment 642352 [details]
Modified ebuild for kio-5.67.0-r1 that includes the patch file
Comment 6 matthias.grobarek 2020-05-28 11:29:53 UTC
Created attachment 642354 [details, diff]
Patch file for kirigami-5.67.1-r1
Comment 7 matthias.grobarek 2020-05-28 11:30:23 UTC
Created attachment 642356 [details]
Modified ebuild for kirigami-5.67.1-r1 that includes the patch file
Comment 8 matthias.grobarek 2020-05-28 11:31:08 UTC
Created attachment 642358 [details, diff]
Patch file for kxmlgui-5.67.0
Comment 9 matthias.grobarek 2020-05-28 11:31:32 UTC
Created attachment 642360 [details]
Modified ebuild for kxmlgui-5.67.0 that includes the patch file
Comment 10 Andreas Sturmlechner gentoo-dev 2020-05-28 15:59:31 UTC
Please update your mixed arch/~arch system to KDE Frameworks 5.70.
Comment 11 Andreas Sturmlechner gentoo-dev 2020-05-29 07:52:20 UTC
There won't be any more changes to 5.67.

Please just update to 5.70.
Comment 12 Andreas Sturmlechner gentoo-dev 2020-05-29 07:57:10 UTC
You can use our autogenerated files for that:

https://gitweb.gentoo.org/proj/kde.git/tree/Documentation/package.accept_keywords/kde-frameworks-5.70.keywords
Comment 13 matthias.grobarek 2020-05-29 18:38:10 UTC
Thank you, 5.70 builds fine.
The only thing I had to do on top of that upgrade was to update kde-apps/konsole from stable 19.12.3-r1 to unstable 20.04.1 (or 20.04.1-r2 as of today) because it wouldn’t compile with the 5.70 components anymore.
Comment 14 Andreas Sturmlechner gentoo-dev 2020-05-30 07:54:59 UTC
konsole-19.12.3 and potentially other stable kde-apps/* packages is also a victim of Qt 5.15.0, not related to the KDE Frameworks upgrade.
Comment 15 Andreas Sturmlechner gentoo-dev 2020-05-30 11:28:44 UTC
Stabilisation was initiated in bug 724346.