Compiling vcmi on Raspberry Pi 3

Hi,
I’m a raspberry pi/linux noob but with my strong will power I managed to compile couple of games for raspberry pi (Cataclysm DDA, openxcom, the powder toy) so that they work without lag and I wanted to do the same with VCMI. I was hard at first because I used “make” with other examples but with VCMI the wiki compiling guide uses “cmake”. I managed using google to do all the steps required with success except the last one which is using “dpkg-buildpackage” command. I just gets stuck (most often at 15%) and when I cancel it I can’t do anything with Pi because of lack of ram. I tried using -j4 and even changing swap memory from 100 to 1024 with little success (30%). I’m posting this to ask for your help because it’s seems plausible to make it work but I just don’t have any clue how to get it to work.
Thanks

You have to do two things:

  • Use single-threaded compilation since each process will use up to 3GB RAM in case of GCC.
  • Try to use more recent GCC or Clang since older GCC use more memory.

There no other way. As soon as CGameState.cpp and some serializer parts are compiled everything else is no brainier.

Umm, just a suggestion, I have no idea if it will work:

Another one would be some cross-platform compiling, there might be SDKs that can run on regular computers to build RPI software. it should also be way faster.