If running on the Raspberry Pi, there's not much need to compile Kodi as it's already available through any number of sources: Raspbian, OpenELEC, OSMC, etc. The same mostly applies to ordinary PCs if you substitute other distros for Raspbian.
That said, I recently replaced a Raspberry Pi 3 that had been running Kodi (most recently on Raspbian, and on OpenELEC before that) with a Rock Pi X running Gentoo Linux, and the latest version of Kodi compiled without issue on that. (Why the change? I wanted more streaming sources than just YouTube. The LBRY desktop app (an AppImage built for AMD64 Linux) runs on it, and unauthorized.tv works in Chromium.) The only remaining snag is that I think video is still timing out when I leave it for a few hours, and when I switch the TV back on it's running at 1080i with overscan, not 1366x768 (or whatever) without overscan.
_/_ / v \ Scott Alfter (remove the obvious to send mail) (IIGS(