I want to build Iroha hyperledger on Raspberry Pi 3. So I've downloaded code and all dependencies and compiler gcc-8.2 (downloaded precompiled from here), then configured without tests:
cmake -DTESTING=OFF -LA ../
but when I run make: it is stopping on file: iroha/irohad/main/impl/on_demand_ordering_init.cpp. I read in another question about creating swap file, so I've even created swap partition 30G and the problem still happen. By the way I've noticed in htop, that compilation does not use more than 1G RAM + 600M swap memory but it shows "virtual memory exhausted: Cannot allocate memory". I've also tried to do like described in article to add extra flags to g++:
--param ggc-min-expand=0 --param ggc-min-heapsize=8192
I've also tried to increade vm.max_map_count value as mentioned here:
sudo sysctl -w vm.max_map_count=262140 # default was 65535
I've also tried to compile the file by hand, thanks to adding a flag to make the compiling command was visible:
make VERBOSE=1
cd /home/pi/Desktop/iroha/zbudowane/irohad/main && /usr/bin/c++ --param ggc-min-expand=0 --param ggc-min-heapsize=8192 -DBOOST_NO_RTTI -I/home/pi/Desktop/iroha/irohad -I/home/pi/Desktop/iroha/libs -I/home/pi/Desktop/iroha/shared_model -I/home/pi/Desktop/iroha/zbudowane/schema -isystem /usr/local/include -isystem /usr/include/soci -isystem /usr/include/postgresql -std=c++14 -fdiagnostics-color=always -g -O0 -fPIC -o CMakeFiles/application.dir/impl/on_demand_ordering_init.o -c /home/pi/Desktop/iroha/irohad/main/impl/on_demand_ordering_init.cpp
but the problem is still occuring. The bad thing is that it is last file to fully compile entire project:D.