Building kodi from scratch and following the instructions here: https://github.com/xbmc/xbmc/blob/master…E.Linux.md
Installed all the packages mentioned (except flatbuffers – had to build that from source). When cmaking kodi, it complained that libdrm was missing. Simple to install, but not in the list on that page.