Compiling Kodi terminates with oom

Probably the question I would start with is … what build tools does Kodi use? A Kodi forum is probably the right place to ask that.

Here’s one example of doing a cross-compile of uuu and Jumpdrive (build on x86 Ubuntu, target is Librem 5): https://source.puri.sm/Librem5/community-wiki/-/wikis/Building-uuu-and-Jumpdrive

Assuming that there is any kind of sane build tool being used that allows you to try an infinite number of times to build, it’s really just trial and error, looping over { build; what’s missing?; install it }.