Well, if you want to develop on KStars, you'd probably want to use a KDE desktop, something like Kubuntu or KDE Neon. You can also do this on Mate, but I'm not sure what the problem is with the KF5 libs.
I see. I figured it would be simpler to develop on KDE, but the problem is that I eventually want to install this modified version on my Raspberry Pi running Ubuntu Mate.
This is probably a noob question, but would it be possible for me to develop/build on Kubuntu, then install on Ubuntu Mate?