Web lists-archives.com

Contributing to KDE is hard because of its build architecture




Please, don't take it as a rant, because I got over my frustraction a week ago, and just writing it in the hope to point out something that other developers might not see.

I'm not using KDE myself (i3wm here), but 2 weeks ago I stepped into my never-ending journey of trying to use KMail, failed it (of course, filled bug-reports along the way), and then figured "Okay, I'm a developer — why wouldn't I just go fix the app".

And then I got into a trouble: building KMail. I have most recent stable KDE, but upstream KMail requires its dependencies to be also built from upstream. Maybe it's for the best, because when I built and debugged stable version of KMail, the bug went some place outside of KMail.

Official way of building dependencies is using kdesrc-build. It has multiple problems:

1. it's really bad at handling dependencies. The `kdesrc-build kmail` results in it trying to build 108 packages, including a game "bomber". I didn't have that much space on my HDD, so I had to delete some stuff, but in the end I ran the build. 2. there're also "upstream" dependencies that kdesrc-build doesn't handle. After the build finished, I found 5x fails out of 108 packages. Including KMail. Turns out, KMail depends on QtWebEngine (upstream version too), but kdesrc-build can't build it, you have to do that manually, and then somehow make sure kdesrc-build will see it. 3. it does not notify about dependency problems, it just goes straight to build. I understand it's not possible to include into build system every tiny library out there. But at least it should've printed all dependencies before going to build. Because you can't expect someone to stay overnight staring at terminal and waiting for another build fail, so that the person could install another dependency. It could've worked like this had you 3-4 packages taking an hour to build in summary, but not 108! 4. `kdesrc-build run` probably does not work…? I'm not sure on that one, because I found the option just for writing that mail. But for asking on IRC #kontact before I stumbled upon 1,2,3 points, the major problem I had is that docs mention that to run an app built with kdesrc-build I have to "install" it. Not necessary in the system, just don't forget to export correct paths. However, installing stuff on every added "printf" is counter-productive.

Most contributors not gonna spend a week of their time just trying to build an app they wanted to contribute to. E.g. for me fixing KMail supposed to be a quick side project, I have others to I care about. It would be great if those who care about KDE more made the workflow for new contributors as easy as:

1. Run `kdesrc-build app`
2. Install unsatisfied dependencies
3. Rerun `kdesrc-build app`, and wait for it to finish.
4. Run `kdesrc-build run app`, which will take care of all the necessary exports.