stephendade / Rpanion-server

Web-based configurator for companion computers of MAVLink vehicles
https://www.docs.rpanion.com/software/rpanion-server
GNU General Public License v3.0
146 stars 62 forks source link

Not enough RAM for building on Raspberry Pi 3B+ #208

Closed codeceptsDE closed 8 months ago

codeceptsDE commented 8 months ago

I'm having trouble building on a Raspberry Pi 3B+, 1Gb RAM is insufficient to build mavlink-routerd.

I had to change deploy/build_mavlinkrouter.sh from

if [ $(free -m | awk '/^Mem:/{print $2}') -le 500]; then
    ninja -j 2 -C build
else
    ninja -C build
fi

to if [ $(free -m | awk '/^Mem:/{print $2}') -le 950 ]; then to make it work. It's a bit slower, but at least it doesn't crash the Pi.

Maybe the same should apply to deploy/build_rpanion.sh, but I found it not to be necessary (right now). But it's cutting it close.

stephendade commented 8 months ago

Thanks for the report. Happy to accept a PR with those changes.

timtuxworth commented 8 months ago

Wouldn't just increasing the swap space work? The default is only 100k.

stephendade commented 8 months ago

Now fixed by increasing swap space on low-RAM Pi's. Closing...