Closed wzab closed 1 year ago
I have found a viable workaround. Tracking the processes during building the rns package, I have found that the cause of the problems is running multiple rustc compilation tasks. I have limited the number of rust compilation executed in parallel by creating the /root/.cargo/config
file with the following content:
[build]
jobs=1
After that, the compilation stopped failing on the lack of memory (the single rustc processes ran in a sequence occupied up to 48% of RAM). However, now another problem appears - the /tmp directory is used for intermediate compilation results and this is a ramdisk in Armbian. Therefore, now the compilation ends with:
error: could not compile `openssl-sys`
Caused by:
No space left on device (os error 28)
I've solved the problem of overflown /tmp
directory by setting the TMPDIR variable:
mkdir /root/tmp
export TMPDIR=/root/tmp
Additionally I have added setting the TMPDIR to the /root/.cargo/config
(I'm not sure if that step was necessary):
[build]
jobs=1
[env]
TMPDIR = { value = "/root/tmp", force = true }
With that, the rns
package has built correctly.
I tried to install rns on an Orange Pi Zero machine (with 512 MB of RAM which should be sufficient for rns). I used armbian Linux. I installed necessary additional packages:
After that I created the virtual environment
Then I tried to install the rns:
That last process consumed the whole memory and didn't finish in a few hours.
Running reticulum network nodes on low power embedded systems could be a good solution, especially to create a mesh network. However, it seems that for that a cross-compilation of rns would be necessary. It should be possible to build rns as a Buildroot, OpenWRT or Yocto package on a PC, and then install the resulting package or image on the embedded system.