Compiling Kodi terminates with oom

This may be too late if you already succeeded cross-compiling, but to avoid out-of-memory issues when trying to compile something on the Librem 5 one useful trick is to reduce the number of parallel jobs used for the build. If it is old-style make then the option -j is often used which means make will run a number of parallel compilation processes, compiling several files in parallel which of course demands more memory. You can look at top while the build is ongoing to check if there are several compiler processes running. Then you can specify something like -j 2 to make it use 2 parallel jobs instead of 4, or you can remove the -j flag altogether so that it does not try to use parallelism at all. This should have no effect on the final result of the build, only use less memory and take longer time.

2 Likes