MAY
16
2016
|
Compiling all of Qt5, KF5, Plasma5, kdepim5, apps...I see a very high value in compiling my own Qt, and on top of it all the KDE-made software that I use. This makes it very easy to fix bugs and add improvements to the software I use on a day to day basis. Nowadays I think many developers use distro packages for Qt or KF5 or even the whole environment except for the one app they're working on, but in my opinion this leads to "silo" thinking, with workarounds in upper layers rather than fixing issues at the right place. So, here's a working and easy recipe for compiling all the Qt-based software you use. In theory all you need is kdesrc-build and a minimal kdesrc-buildrc that sets some vars (including "branch-group kf5-qt5") and then includes extragear/utils/kdesrc-build/kf5-qt5-build-include (see wiki for more info). One issue though is dependencies. I'm on OpenSuSE Tumbleweed, not gentoo, so the goal is not to compile everything including aspell by hand. So I use *-devel distro packages for everything that doesn't depend on Qt. OpenSuSE users can install all the devel packages necessary for this by downloading this file and then doing zypper in `cat packages-devel` (I'll mention this in the wiki). However for any package that depends on Qt, it becomes messy to use distro devel packages, because it's mixing the distro Qt and my self-compiled Qt. So the best solution is to compile yourself any dependency that uses Qt. With the devel packages above installed and this kdesrc-build setup, kdesrc-build builds 294 modules, and it all succeeds except for artikulate which requires qt5gstreamer (there's an option to turn that off but I can't set that in custom-qt5-libs-build-include, I sent a mail to Andreas Cord-Landwehr about making this more automated), and right now calligra+kexi have a build error but that's unrelated to this setup. Then you can boot into this version of plasma5 (e.g. with a ~/.xsession file). The only thing you need to take care of is screen unlocking. I think kscreenlocker still needs suid root (which breaks installing kscreenlocker later on, we still need to fix cmake about that), but more importantly, you need to set the right PAM module for kscreenlocker. On OpenSuSE this means the following lines in your kdesrc-buildrc (yes it's still called "KDE4", no typo there) : options kscreenlocker cmake-options -DKDE4_COMMON_PAM_SERVICE=xdm end options If you use other Qt-based software, you can add it to your kdesrc-buildrc, even if it doesn't come from git.kde.org, using the "module" syntax with a "repository" being a git URL. For instance I add the gammaray debugging tool to the compilation : module gammaray repository [email protected]:KDAB/GammaRay.git branch master end module The end result: a successful kdesrc-build of 302 out of 306 modules, (the 4 failures being artikulate, calligra, kexi and kscreenlocker, i.e. all investigated and worked on), that makes me very happy. Let's keep it working. And I'm finally using a self-compiled plasma5 environment with kdepim5, on my main laptop. Bugs be warned, here I come! |
![]() |
Comments
Adding these packages to patterns?
If you think your package list might be interesting for anyone using openSUSE Tumbleweed and willing to develop on KDE software, please file a bug on bugzilla.opensuse.org so we can add all that stuff on the "patterns" one can download (if there isn't already).
Can you check if the "patterns-openSUSE-devel_kde_frameworks" already provides everything you need in that package list?
Re: patterns
Interesting, I didn't know patterns existed.
This one has too much for my purpose though, it includes Qt5 and KF5 devel packages, while I want to compile my own Qt5 and KF5.
It has many interesting non-qt devel packages though, I guess they are optional deps I missed.
A pattern for "everything that KDE software (including KF5) needs except for Qt5 and Qt5-based libs" is maybe too much of a corner case, even though that's exactly what I need myself :-)
Calligra
Thanks. I'd appreciate if someone can fix the machinery so Calligra+Kexi can compile.
Re: calligra
I don't think it's a "machinery" problem?
There's a cmake problem when libical is installed...
-- Found Libical version 1.0
CMake Error at CMakeLists.txt:556 (string):
string sub-command REGEX, mode MATCH needs at least 5 arguments total to
command.
... and there is/was a C++ problem too, I think that was when I didn't have ical installed, so cmake worked but compilation failed later:
calligra/plan/libs/ui/reports/reportview.cpp:493:39: error: ‘class KReportPreRenderer’ has no member named ‘generate’
m_reportDocument = m_preRenderer->generate();
Same errors in kexi in both cases.
Re: calligra
All fixed, calligra and kexi now compile.