D13816: Make KItinerary work as a static library

Volker Krause noreply at phabricator.kde.org
Fri Jul 6 08:33:10 BST 2018


vkrause added a comment.


  In D13816#287459 <https://phabricator.kde.org/D13816#287459>, @lepagevalleeemmanuel wrote:
  
  > > Or does anyone have an idea how to solve this more elegantly? :)
  >
  > Hi, we talked about this at Randa and QtWorldSummit last year. Sorry for stopping working on this after I made enough progress to make it work for me. I was assigned to work on other things. The clean way is using:
  >
  > Q_IMPORT_PLUGIN(KirigamiPlugin)
  
  
  Right, that works for plugins. There is even https://codereview.qt-project.org/#/c/195680/ since 5.11 allowing us to hook "plugin loading", for things covered by static construction in the dynamic case. The patch here is looking more at something like the bug report you mentioned below, ie. use of static construction in libraries rather than plugins.
  
  > Like other Qt static modules, This can be semi-automated using MOC magic and CMake-foo. All the magic is there https://github.com/ring-project/ring-kde-appimage-builder/tree/gentoo_base . It's not very clean, but it works. I have to catch a plane later today, so I can't write a lengthy comment right now.
  
  Most of those patches seem to be dealing with the Qt5::Test dependency or other dependency-related changes, ie. this should be pretty harmless to integrate?
  
  > Just to say, fixing static frameworks and LTO bugs reduce the size of the KF5 based APK/AppImage by 86% and they load 6-8 time faster when PGO/FDO is enabled. Of course all of this is not "free". There is a non-trivial amount of work before @apol SDK or mine can work with random KF5 apps. Things like https://bugs.kde.org/show_bug.cgi?id=387820 become real crashers instead of unrefined behaviors. I brute force fixed all of them using horrible hacks to Ring-KDE could ship on Android/Plasma_Mobile/Appimage/macOS with a 13-18mb (with or without breeze icons) size instead of ~185-200mb (with or without breeze icons).
  
  That bug report is more what I'm looking at here. I disagree with your assessment though that this is undefined behavior or broken in the current dynamic code. Static construction is actually a pattern used all over the place, among them are qrc, the qml compiler and the ECM qm catalog loader, as well as custom code as you found in KConfig, or as this patch tries to  support in KItinerary. So I think we need a proper solution for this.

REPOSITORY
  R1003 KItinerary: Travel Reservation handling library

REVISION DETAIL
  https://phabricator.kde.org/D13816

To: vkrause, #frameworks
Cc: mart, lepagevalleeemmanuel, apol, kde-pim, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180706/a7f21a65/attachment.html>


More information about the Kde-frameworks-devel mailing list