I tried building OCaml 5.5.2 on my NanoPi running Armbian. I ran “./configure” and then “make”. A lot of output when compiling, ending the build with the lines below (the error starts at the sixth line):
Do you have an idea on about how much memory it needs to run properly? I can always add more swap, at least temporarily. This machine is mainly a file server so nothing, aside from the operating system, is really running here normally.
On the other hand, is an pre-compiled Armbian available somewhere?
I wouldn’t expect that compiling single files one after another would need a lot of memory.
How are you invoking make? Do you use any -j flags? First I’d suggest trying to compile everything sequentially (it’ll of course take longer, but won’t need that much memory). Then if that works, and you want to speed up future builds, you can try gradually larger values for -j N (but don’t leave off the N, because then it’ll try to run as many processes it can, which will need a lot more memory).
A cross compiler is a compiler that runs on some machine, named the host, but generates code for a different machine, named the target.
That way you’ll be able to build OCaml and OCaml programs on a more powerful machine, then transfer them to your NanoPi, and execute your programs there.
I found one of the reasons for the memory shortage: a lot of stale rsync processes. The build now went perfecctly (plain “make”, no fancy parallelization on this little machine).